/* Vocablish site. Tokens mirror the app's palette (DESIGN.md, src/constants/theme.ts):
   one quiet theme in two palettes, one azure accent, serif only for the language. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --border: #e4e4e9;
  --neutral: #efeff2;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #aeaeb2;
  --accent: #0f62cd;
  --on-accent: #ffffff;
  --accent-pressed: #0c4ea2;
  --accent-soft: #e9f2fb;
  --accent-soft-deep: #d8e7f8;
  --device: #1d1d1f;
  --device-edge: transparent;
  --shadow-device: 0 40px 80px -40px rgb(16 24 40 / 0.45), 0 16px 32px -16px rgb(16 24 40 / 0.2);

  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;

  --gutter: 20px;
  --max: 1120px;
  --r-control: 12px;
  --r-card: 16px;
  --r-hero: 20px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101013;
    --surface: #1a1a1e;
    --border: #2b2b31;
    --neutral: #26262c;
    --text: #f2f2f5;
    --text-2: #a0a0a8;
    --text-3: #6b6b74;
    --accent: #5aa9ff;
    --on-accent: #06121f;
    --accent-pressed: #8cc3ff;
    --accent-soft: #16283d;
    --accent-soft-deep: #1d3552;
    --device: #050506;
    --device-edge: #34343b;
    --shadow-device: 0 40px 80px -40px rgb(0 0 0 / 0.8), 0 16px 32px -16px rgb(0 0 0 / 0.5);
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--r-control);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.125em;
  height: 1.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.accent { color: var(--accent); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--r-control);
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-pressed); color: var(--on-accent); }

/* Header */

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.lockup:hover { color: var(--text); }

.mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
}
.mark-back,
.mark-card {
  position: absolute;
  width: 24px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.mark-back { background: var(--accent-soft); transform: translateX(2.4px) rotate(16deg); }
.mark-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transform: rotate(5deg);
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.08);
  font: 15px/1 var(--serif);
  color: var(--text);
}

.wordmark { font: 1.375rem/1.3 var(--serif); }

.lockup-sm .mark { transform: scale(0.8); transform-origin: left center; width: 24px; }
.lockup-sm .wordmark { font-size: 1.125rem; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-link:hover { color: var(--text); }
@media (min-width: 760px) {
  .nav-link { display: inline-block; }
  .nav .btn { margin-left: 8px; }
}

/* Device frame around real app screenshots */

/* The bezel is the image's margin: percentages there resolve against the phone's own width. */
.phone {
  display: flow-root;
  margin: 0;
  background: var(--device);
  border-radius: 15.5% / 7.4%;
  box-shadow: 0 0 0 1px var(--device-edge), var(--shadow-device);
}
.phone picture { display: block; }
.phone img {
  display: block;
  width: 93.8%;
  margin: 3.1%;
  border-radius: 13.4% / 6.2%;
  background: var(--neutral);
}

/* Hero: the brand typeset as a dictionary entry */

.hero { padding: clamp(24px, 5vw, 72px) 0 clamp(64px, 9vw, 120px); }

.hero-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; }
}

.headword {
  margin-left: -0.04em;
  font: 400 clamp(4.25rem, 1.6rem + 11vw, 9.5rem)/0.95 var(--serif);
  letter-spacing: -0.025em;
  transition: color 160ms ease;
}
.headword .syl { position: relative; top: -0.07em; margin: 0 0.03em; font-size: 0.7em; color: var(--accent); }
.headword.is-saying { color: var(--accent); }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 20px;
}
.pos { font: italic 1.625rem/1 var(--serif); color: var(--text-2); }
.ipa { font-size: 1.1875rem; color: var(--text-2); }

.hear {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--accent-soft-deep);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.9375rem/1 var(--sans);
  cursor: pointer;
}
.hear:hover { border-color: var(--accent); }
.hear .icon { width: 18px; height: 18px; }
.hear-icon { display: inline-flex; }
.hear .hear-stop,
.hear.is-playing .hear-play { display: none; }
.hear.is-playing .hear-stop { display: inline-flex; }
.hear-ring {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hear.is-playing .hear-ring { animation: sonar 1.6s ease-out infinite; }
}
@keyframes sonar {
  from { opacity: 0.55; transform: scale(1); }
  to { opacity: 0; transform: scale(1.35, 1.7); }
}

.forms {
  margin-top: 14px;
  font: italic 1.0625rem/1.4 var(--serif);
  color: var(--text-2);
}

.definition {
  max-width: 30ch;
  margin-top: 28px;
  font-size: clamp(1.3125rem, 1.1rem + 0.7vw, 1.625rem);
  line-height: 1.42;
  letter-spacing: -0.01em;
}
.definition .w { transition: color 120ms linear; }
.definition.is-reading .w { color: color-mix(in srgb, var(--text) 32%, transparent); }
.definition.is-reading .w.on { color: var(--text); }
.definition.is-reading .w.now { color: var(--accent); }

.example {
  max-width: 36ch;
  margin-top: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  font: italic 1.1875rem/1.5 var(--serif);
  color: var(--text-2);
}

.hero-cta { margin-top: 40px; }
.reassure { margin-top: 14px; font-size: 0.9375rem; color: var(--text-2); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.stores-center { justify-content: center; }
.store { display: inline-block; border-radius: 9px; line-height: 0; }
.store img { height: 48px; width: auto; }

.hero-shot { display: flex; justify-content: center; }
.hero-shot .phone { width: min(300px, 78vw); }
@media (min-width: 940px) {
  .hero-shot .phone { width: 100%; }
}

/* Sections */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section + .section { padding-top: 0; }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head p,
.split-text > p { margin-top: 16px; font-size: 1.1875rem; color: var(--text-2); }
.split-text > p + p { margin-top: 12px; }

h2 { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.022em; }
h3 { font-size: 1.1875rem; line-height: 1.3; }

/* How it works: the loop, in order */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step .phone { width: 100%; }
.step-text { margin-top: 28px; }
.step h3 { display: flex; align-items: baseline; gap: 10px; }
.step-n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  transform: translateY(-2px);
}
.step p { margin-top: 8px; color: var(--text-2); }

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; }
  .step .phone { width: min(100%, 280px); }
}
@media (max-width: 640px) {
  .steps {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: 20px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { scroll-snap-align: start; }
  .step .phone { width: 100%; }
}

/* Split sections: copy beside one screen */

.split { display: grid; gap: 48px; align-items: center; }
.split-shot { display: flex; justify-content: center; }
.split-shot .phone { width: min(300px, 76vw); }
/* Two scenes, day and night, the second set lower so they read as a pair. */
.split-shot.pair { gap: 20px; align-items: flex-start; }
.split-shot.pair .phone { width: min(250px, 42vw); }
.split-shot.pair .phone + .phone { margin-top: 56px; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 80px; }
  .split-reverse .split-text { order: 2; }
}

.points { margin: 32px 0 0; }
.point { padding: 22px 0; border-top: 1px solid var(--border); }
.point:last-child { padding-bottom: 0; }
.point dt { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; }
.point dd { margin: 6px 0 0; max-width: 52ch; color: var(--text-2); }

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li { padding-top: 22px; border-top: 1px solid var(--border); }
.features p { margin-top: 8px; color: var(--text-2); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: none; gap: 28px; } }
@media (min-width: 900px) {
  .split-features { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  .split-features .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-features .split-shot .phone { width: 100%; }
}

/* Privacy band */

.privacy-band {
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--accent-soft-deep);
  border-radius: var(--r-hero);
  background: var(--accent-soft);
}
.privacy-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.privacy-points p { margin-top: 6px; color: var(--text-2); }
.band-link { margin-top: 32px; font-weight: 600; }
@media (max-width: 760px) { .privacy-points { grid-template-columns: none; gap: 22px; } }

/* FAQ: one grouped list, like the app's Settings */

.faq-wrap { max-width: calc(760px + 2 * var(--gutter)); }
.faq-wrap h2 { margin-bottom: 32px; }
.faq {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
}
.faq details + details { border-top: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline-offset: -2px; border-radius: 0; }
.faq .chev { color: var(--text-3); transition: transform 180ms ease; }
.faq details[open] .chev { transform: rotate(180deg); }
.faq details > :not(summary) { margin: 0; padding: 0 20px 20px; max-width: 64ch; color: var(--text-2); }
.faq details > p + p { margin-top: -8px; }
.faq-more { margin-top: 20px; color: var(--text-2); }

/* Final call */

.final-inner { text-align: center; }
.final h2 { max-width: 16ch; margin-inline: auto; }
.final p { margin: 16px 0 32px; font-size: 1.1875rem; color: var(--text-2); }

/* Footer */

.site-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-2);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
}
.footer-brand p { margin-top: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.footer-nav a { color: var(--text); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }
.fine-print { margin-top: 32px; max-width: 90ch; font-size: 0.8125rem; line-height: 1.5; }
.fine-print p + p { margin-top: 8px; }

/* Long-form pages: privacy, terms, support */

.doc { max-width: calc(720px + 2 * var(--gutter)); padding-top: clamp(24px, 5vw, 56px); padding-bottom: 96px; }
.doc-head h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.025em; }
.lede { margin-top: 20px; font-size: 1.1875rem; line-height: 1.5; color: var(--text-2); }
.updated { margin-top: 16px; font-size: 0.9375rem; color: var(--text-2); }

.toc {
  margin-top: 36px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}
.toc-title { font-weight: 600; }
.toc ol { margin: 10px 0 0; padding-left: 1.25em; columns: 2 220px; column-gap: 32px; color: var(--text-2); }
.toc li { padding: 3px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.doc-body { margin-top: 40px; }
.doc-body section { scroll-margin-top: 24px; }
.doc-body section + section,
.doc-body .summary + section,
.doc-body .contact-cards + section { margin-top: 48px; }
.doc-body h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.015em; }
.doc-body p,
.doc-body li { line-height: 1.65; }
.doc-body h2 + p,
.doc-body h2 + .faq { margin-top: 14px; }
.doc-body p + p,
.doc-body p + ul,
.doc-body ul + p,
.doc-body p + .table-wrap,
.doc-body .table-wrap + p { margin-top: 14px; }
.doc-body ul { margin: 14px 0 0; padding-left: 1.25em; }
.doc-body li + li { margin-top: 6px; }

.summary {
  padding: 24px 28px;
  border: 1px solid var(--accent-soft-deep);
  border-radius: var(--r-card);
  background: var(--accent-soft);
}
.summary h2 { font-size: 1.1875rem; }
.summary ul { margin-top: 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; }
th { color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--border); }
tbody tr + tr td { border-top: 1px solid var(--border); }
td:first-child { font-weight: 600; }

.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .contact-cards { grid-template-columns: none; } }
.contact-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
a.contact-card:hover { border-color: var(--accent); color: var(--text); }
.contact-card > span { display: grid; gap: 4px; }
.contact-card > span > span { color: var(--text-2); font-size: 0.9375rem; }
.contact-icon { width: 24px; height: 24px; color: var(--accent); margin-top: 1px; }

/* 404 */

.not-found { padding-top: clamp(40px, 8vw, 96px); padding-bottom: 120px; }
.headword-sm { font-size: clamp(4rem, 2rem + 8vw, 7rem); }
.nf-meta { margin-top: 12px; font: italic 1.25rem/1.4 var(--serif); color: var(--text-2); }
.nf-meta .pos { font-size: inherit; margin-right: 6px; }
.not-found h1 { margin-top: 48px; font-size: 1.75rem; }
.not-found h1 + p { margin-top: 10px; color: var(--text-2); }
.not-found .btn { margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
