/* tokumo.app: one stylesheet for every page.
   No fonts, images or anything else from other sites, and no inline styles, so the
   Content-Security-Policy in _headers can stay at style-src 'self'.
   Light by default; the dark palette is the app's Midnight Arcade theme.
   Every text colour pair below measures at least 4.5:1 (notes/claims.md, "Contrast"). */

:root {
  color-scheme: light dark;
  --bg: #FAF8FF;
  --surface: #FFFFFF;
  --surface-2: #F1EDFA;
  --text: #17122B;
  --text-2: #4B4566;
  --link: #AF117A; /* --accent, a touch darker: the hero's note has a link, and it also has to measure 4.5:1 on the glow */
  --link-hover: #7B23B0;
  --accent: #B4127E;
  --accent-2: #7B23B0;
  --focus: #6A1FD0;
  --line: #DDD6EE;
  --glow: rgba(123, 35, 176, 0.12);
  --glow-2: rgba(180, 18, 126, 0.08);
  --grid: rgba(123, 35, 176, 0.14);
  --mark-glow: rgba(180, 18, 126, 0.28);
  --radius: 16px;
  --font: system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0A14;
    --surface: #17142A;
    --surface-2: #1E1A36;
    --text: #E6E3F3;
    --text-2: #B9B3D6;
    --link: #FF5CC8;
    --link-hover: #2FE0F0;
    --accent: #FF5CC8;
    --accent-2: #E05CFF;
    --focus: #2FE0F0;
    --line: #2E2950;
    --glow: rgba(91, 59, 255, 0.24);
    --glow-2: rgba(255, 92, 200, 0.10);
    --grid: rgba(160, 120, 255, 0.20);
    --mark-glow: rgba(255, 92, 200, 0.45);
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.4rem 0 0.6rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.6rem 0 0.4rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.35rem;
}

strong {
  font-weight: 700;
}

address {
  font-style: normal;
}

[id] {
  scroll-margin-top: 1rem;
}

.wrap {
  width: min(100% - 2rem, 46rem);
  margin-inline: auto;
}

.wrap--wide {
  width: min(100% - 2rem, 64rem);
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.skip-link:hover {
  color: var(--bg);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.wordmark {
  font-weight: 800;
  font-stretch: condensed;
  font-size: 0.95rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.site-nav ul,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
}

.site-nav li + li,
.footer-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--link);
}

.site-nav a[aria-current="page"] {
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* ---------- Home page ---------- */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(2.5rem, 9vw, 5rem) clamp(3rem, 10vw, 5.5rem);
  background:
    radial-gradient(60rem 28rem at 50% -8rem, var(--glow), transparent 70%),
    radial-gradient(36rem 18rem at 90% 0, var(--glow-2), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

/* A flat take on the app's horizon grid, fading out below the text. Decoration only. */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(2.25rem, 9vw, 4.5rem);
  background-image:
    linear-gradient(var(--grid) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 48px 24px;
  background-position: center bottom;
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-mark {
  display: block;
  width: clamp(88px, 24vw, 128px);
  height: auto;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 0 18px var(--mark-glow));
}

.hero h1 {
  font-size: clamp(2.1rem, 8vw, 3.2rem);
  font-weight: 800;
  font-stretch: condensed;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-left: 0.3em; /* balances the letter spacing after the last letter */
}

.lead {
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero p {
  max-width: 36rem;
  margin-inline: auto;
}

.hero .note {
  color: var(--text-2);
  margin-top: 1.25rem;
  margin-bottom: 0;
}

/* Google's badge, its file unchanged (docs/design/site-v1.md 9.5). The badge itself is 168 of the image's 250 px,
   inside 41 px of transparent margin, a pixel short of the quarter of its height Google asks to keep clear; the
   paragraph's top margin and the hero's padding give the rest. Sized in px, so a small text setting can't take it
   under Google's 28 px. */
.hero .badge {
  margin: 1rem auto 0;
}

.badge a {
  display: inline-block;
}

.badge img {
  display: block;
  width: 180px; /* the badge itself 46.8 px tall */
}

.section {
  padding-block: 1rem 0.5rem;
}

.section-intro {
  color: var(--text-2);
  max-width: 44rem;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.cards > li + li {
  margin-top: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-2);
}

.plans {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  align-items: start;
  margin-bottom: 1rem;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 0.5rem;
}

.plan--pro {
  border-color: var(--accent-2);
}

.plan h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.plan-tag {
  margin: -0.25rem 0 0.75rem;
  color: var(--text-2);
  font-weight: 600;
}

.offer {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
}

.offer h4 {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}

.small {
  font-size: 0.95rem;
  color: var(--text-2);
}

.link-list {
  list-style: none;
  padding: 0;
}

.link-list li + li {
  margin-top: 0.6rem;
}

/* The pictures: one column on a phone, and from 40rem the first across the top with the other two side by side. */
.shots {
  display: grid;
  gap: 1.25rem;
  margin: 0 0 1rem;
}

@media (min-width: 40rem) {
  .shots {
    grid-template-columns: 1fr 1fr;
  }

  .shots > :first-child {
    grid-column: 1 / -1;
  }
}

.shots figure {
  margin: 0;
}

/* The colour behind shows only until a picture has loaded. */
.shots img {
  display: block;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.shots figcaption {
  margin-top: 0.45rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ---------- Reading pages: privacy, terms, support, 404 ---------- */

.doc {
  padding-block: 2.5rem 1rem;
}

.doc-meta {
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.toc {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.5rem;
  margin: 1.5rem 0 2rem;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.toc ol {
  margin-bottom: 0.5rem;
}

@media (min-width: 40rem) {
  .toc ol {
    columns: 2;
    column-gap: 2rem;
  }

  .toc li {
    break-inside: avoid;
  }
}

.toc li + li {
  margin-top: 0.2rem;
}

.doc section {
  margin-bottom: 1rem;
}

.notice {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem 0.25rem;
  margin: 0 0 1rem;
}

.notice p {
  font-weight: 600;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.25rem;
  margin-bottom: 1rem;
}

/* ---------- Press kit ---------- */

.facts {
  margin: 0 0 1rem;
  border-top: 1px solid var(--line);
}

.facts > div {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .facts > div {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 1rem;
  }
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

.facts dd ul,
.facts dd p {
  margin-bottom: 0.4rem;
}

.downloads {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.downloads > li {
  display: grid;
  gap: 0.75rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.downloads > li + li {
  margin-top: 0;
}

@media (min-width: 40rem) {
  .downloads > li {
    grid-template-columns: 15rem 1fr;
    gap: 1.25rem;
  }
}

.downloads img {
  display: block;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.downloads .icon-preview {
  width: 8rem;
}

.downloads h3 {
  margin-top: 0;
}

.downloads p {
  margin-bottom: 0.5rem;
}

.quote {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  border-radius: 0 12px 12px 0;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.95rem;
  padding-block: 1.5rem 2rem;
}

.site-footer p {
  margin: 0.75rem 0 0;
}

/* ---------- Other modes ---------- */

@media (forced-colors: active) {
  .card,
  .plan,
  .toc,
  .notice,
  .contact-card {
    border: 1px solid CanvasText;
  }

  .hero::after {
    display: none;
  }
}

@media print {
  .skip-link,
  .site-nav,
  .hero::after {
    display: none;
  }

  .site-footer,
  .toc,
  .notice {
    background: none;
  }

  a {
    color: inherit;
  }
}
