/* Voces — hearvoices.app
   Palette lifted from the app icon: dark forest ground, and the five ribbons
   behind Bach's wig used as the voice colours throughout the site. */

:root {
  --ink:        #F1EDE2;
  --ink-dim:    #A9BDB0;
  --ink-faint:  #728A7B;

  --ground:     #0A1712;
  --ground-2:   #0E2019;
  --surface:    #13291F;
  --surface-2:  #17332A;
  --line:       #23473A;

  /* the five ribbons — upper to lower */
  --v-upper:    #7FD8A8;   /* mint   */
  --v-cream:    #EFE4CF;   /* cream  */
  --v-middle:   #E8963F;   /* orange */
  --v-gold:     #D9B23C;   /* gold   */
  --v-lower:    #4A90D9;   /* blue   */

  --accent:     #8FE8B0;
  --accent-ink: #06251A;

  --wrap:       1120px;
  --radius:     18px;
  --radius-lg:  28px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 650; }
p  { margin: 0 0 1.1em; }

em { font-style: normal; color: var(--accent); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 12px 20px;
}
.skip:focus { left: 12px; top: 12px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem;
  font-weight: 600; color: var(--ink-faint); margin-bottom: 1.2em;
}
.section-lede { font-size: 1.12rem; color: var(--ink-dim); max-width: 62ch; }
.aside { color: var(--ink-faint); font-size: 0.95rem; max-width: 66ch; }
.fineprint { color: var(--ink-faint); font-size: 0.85rem; }
.muted { color: var(--ink-dim); }
.small { font-size: 0.82rem; }

/* ─────────────  buttons  ───────────── */

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: 1rem; padding: 14px 26px; border-radius: 999px;
  border: 0; cursor: pointer; font-family: inherit; text-align: center;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--surface); filter: none; }
.btn-small { padding: 9px 18px; font-size: 0.9rem; }
.btn-large { padding: 18px 36px; font-size: 1.1rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ─────────────  nav  ───────────── */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 23, 18, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--ink-dim); font-size: 0.92rem; }
.nav nav a:hover { color: var(--ink); text-decoration: none; }
.nav .btn-small { margin-left: 4px; }

/* Language switcher. Deliberately not inside `.nav nav`, which is hidden below
   780px: the one control a visitor who cannot read the page needs is the last
   thing that should disappear on a phone. */
/* Language switcher. A <details> rather than a button and a listbox: seven
   languages will not sit in a row, and this needs no JavaScript — the legal
   pages load no scripts at all, and the site promises none. The cost is that
   it closes on a second click rather than on click-away, which is the standard
   behaviour of the element and not worth a script to change. */
.lang { position: relative; margin-left: 18px; }
.lang > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  color: var(--ink-faint); font-size: 0.78rem; font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; line-height: 1;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::after { content: "\25BE"; font-size: 0.7em; letter-spacing: 0; }
.lang > summary:hover,
.lang[open] > summary { color: var(--ink); background: var(--surface); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 170px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.lang-menu a {
  display: block; padding: 8px 12px; border-radius: 9px;
  color: var(--ink-dim); font-size: 0.9rem; line-height: 1.25;
}
.lang-menu a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.lang-menu a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }

@media (max-width: 780px) { .nav nav { display: none; } .lang { margin-left: auto; } }
@media (max-width: 420px) { .nav-inner { gap: 12px; } .lang > summary { padding: 5px 7px; } }

/* ─────────────  hero  ───────────── */

.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(56px, 8vw, 96px);
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(127,216,168,.10), transparent 60%),
    linear-gradient(180deg, var(--ground-2), var(--ground));
}
/* the ribbons, drifting across behind everything */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    linear-gradient(transparent 22%, var(--v-upper)  22%, var(--v-upper)  22.35%, transparent 22.35%),
    linear-gradient(transparent 38%, var(--v-cream)  38%, var(--v-cream)  38.35%, transparent 38.35%),
    linear-gradient(transparent 56%, var(--v-middle) 56%, var(--v-middle) 56.35%, transparent 56.35%),
    linear-gradient(transparent 71%, var(--v-lower)  71%, var(--v-lower)  71.35%, transparent 71.35%);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}
.hero-inner {
  position: relative; display: grid; gap: 48px; align-items: center;
  grid-template-columns: 1.15fr 0.85fr;
  padding-bottom: clamp(56px, 8vw, 100px);
}
.hero-copy { position: relative; }
.lede { font-size: 1.18rem; color: var(--ink-dim); max-width: 54ch; margin-bottom: 1.8em; }
.hero .cta-row { margin-bottom: 18px; }
.hero-art { text-align: center; }
.app-icon {
  width: min(320px, 78vw); height: auto; margin: 0 auto;
  border-radius: 24%;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.06);
}
.hero-caption { margin-top: 18px; color: var(--ink-faint); font-size: 0.9rem; font-style: italic; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

/* ─────────────  ear test  ───────────── */

.test { background: var(--ground); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px);
}
.test-card { margin: 36px 0 28px; text-align: center; min-height: 330px;
  display: flex; flex-direction: column; justify-content: center; }
.test-stage[hidden] { display: none; }
.test-intro { color: var(--ink-dim); }
.test-progress {
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  color: var(--ink-faint); margin-bottom: 20px;
}
.test-question { font-size: 1.25rem; font-weight: 600; margin: 22px 0 18px; }

.playbar {
  height: 6px; border-radius: 999px; background: var(--ground-2);
  max-width: 460px; margin: 0 auto; overflow: hidden;
}
.playbar span { display: block; height: 100%; width: 0; background: var(--ink-faint); border-radius: 999px; }

.visualiser { display: flex; flex-direction: column; gap: 10px; max-width: 460px; margin: 0 auto 26px; }
.vis-lane {
  height: 12px; border-radius: 999px; background: var(--ground-2);
  position: relative; display: flex; align-items: center;
}
.vis-lane b {
  position: absolute; left: 100%; margin-left: 12px; font-size: .72rem;
  font-weight: 600; color: var(--ink-faint); letter-spacing: .04em;
}
.vis-lane:not(.dim) b { color: var(--ink); }
.vis-lane span {
  display: block; height: 100%; width: 0; border-radius: 999px;
  transition: width .25s ease, margin-left .25s ease, opacity .25s ease; opacity: .95;
}
@media (max-width: 560px) { .visualiser { max-width: 78%; } }
.vis-lane[data-lane="upper"]  span { background: var(--v-upper); }
.vis-lane[data-lane="middle"] span { background: var(--v-middle); }
.vis-lane[data-lane="lower"]  span { background: var(--v-lower); }
.vis-lane.dim span { opacity: .18; }

.choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.choice {
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  background: var(--surface-2); color: var(--ink); border: 1.5px solid var(--line);
  padding: 14px 30px; border-radius: 999px; transition: border-color .15s, background .15s;
}
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice:disabled { cursor: default; opacity: .55; }
.choice.correct { border-color: var(--v-upper); background: rgba(127,216,168,.16); opacity: 1; }
.choice.wrong   { border-color: #D9584A; background: rgba(217,88,74,.14); opacity: 1; }

.verdict { font-size: 1.35rem; font-weight: 650; margin-bottom: .4em; }
.verdict.ok  { color: var(--v-upper); }
.verdict.bad { color: var(--v-gold); }
.reveal-copy { color: var(--ink-dim); max-width: 46ch; margin: 0 auto 22px; }
.test-reveal .cta-row, .test-card .cta-row { justify-content: center; }

.score { font-size: 3rem; font-weight: 700; line-height: 1; margin-bottom: .3em; color: var(--accent); }
.diagnosis-copy { color: var(--ink-dim); max-width: 48ch; margin: 0 auto 24px; }
.test-fallback { color: var(--v-gold); }

/* ─────────────  comparison table  ───────────── */

.gap { background: var(--ground-2); }
.table-scroll { overflow-x: auto; margin: 36px 0 24px; }
.compare { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; }
.compare th, .compare td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { color: var(--ink-faint); font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .1em; }
.compare tbody th { font-weight: 600; }
.compare .yes { color: var(--v-upper); }
.compare .no, .compare .dash { color: var(--ink-faint); }
.compare .ours { background: rgba(143,232,176,.07); }
.compare .ours th, .compare .ours td { border-bottom-color: transparent; }
.compare .ours td.yes { font-weight: 650; }

/* ─────────────  modes  ───────────── */

.mode {
  display: grid; grid-template-columns: 1fr 300px; gap: clamp(28px, 5vw, 72px);
  align-items: center; padding: clamp(32px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
}
.mode:first-of-type { border-top: 0; }
.mode.reverse .mode-copy { order: 2; }
.mode-num { font-size: .8rem; letter-spacing: .18em; color: var(--ink-faint); margin-bottom: .8em; }
.mode-copy p:last-child { color: var(--ink-dim); margin-bottom: 0; }
.mode-shot img, .split-shot img, .wide-shot img, .download-shot img {
  border-radius: 22px; border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.8); margin: 0 auto;
}
.mode-shot, .split-shot, .wide-shot, .download-shot { margin: 0; }
@media (max-width: 760px) {
  .mode { grid-template-columns: 1fr; }
  .mode.reverse .mode-copy { order: 0; }
  .mode-shot img { max-width: 250px; }
}

/* ─────────────  drift  ───────────── */

.drift { background: var(--ground-2); }
.drift h2 { color: var(--v-gold); }
.drift-inner { display: grid; grid-template-columns: 1fr 300px; gap: clamp(28px, 5vw, 72px); align-items: center; }
.drift-copy p:not(.eyebrow):not(.section-lede) { color: var(--ink-dim); }
.drift-shot { margin: 0; }
@media (max-width: 820px) { .drift-inner { grid-template-columns: 1fr; } .drift-shot img { max-width: 260px; } }
.facts { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.facts li {
  padding-left: 20px; position: relative; color: var(--ink-dim); font-size: .98rem;
}
.facts li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; border-radius: 999px; background: var(--v-gold);
}
.facts strong { color: var(--ink); font-weight: 650; }

/* ─────────────  split  ───────────── */

.split-inner { display: grid; grid-template-columns: 1fr 300px; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.alt { background: var(--ground-2); }
.split p:not(.eyebrow) { color: var(--ink-dim); }
.split-inner.reverse { grid-template-columns: 300px 1fr; }
.split-inner.reverse > div { order: 2; }
.split-inner.reverse .split-shot { order: 1; }
@media (max-width: 760px) {
  .split-inner, .split-inner.reverse { grid-template-columns: 1fr; }
  .split-inner.reverse > div, .split-inner.reverse .split-shot { order: 0; }
}

/* ─────────────  repertoire  ───────────── */

.repertoire { background: var(--ground-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 40px 0 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; text-align: center;
}
.stat-n { display: block; font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-l { display: block; margin-top: 8px; font-size: .88rem; color: var(--ink-dim); }
.stats.sub .stat { padding: 16px; background: transparent; }
.stats.sub .stat-n { font-size: 1.6rem; color: var(--v-cream); }
.repertoire .aside { margin-top: 28px; }
.wide-shot { margin-top: 40px; }

/* ─────────────  audience  ───────────── */

.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 40px; }
.who-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.who-card h3 { font-size: 1.05rem; margin-bottom: .5em; }
.who-card p { color: var(--ink-dim); font-size: .95rem; margin: 0; }
.who-card:last-child h3 { color: var(--ink-faint); }

/* ─────────────  privacy  ───────────── */

.privacy { background: var(--ground-2); }
.privacy p:not(.aside) { color: var(--ink-dim); font-size: 1.08rem; }

/* ─────────────  pricing  ───────────── */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 40px 0 24px; align-items: start; }
.plan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; position: relative;
}
.plan.featured { border-color: var(--accent); background: rgba(143,232,176,.06); }
.badge {
  position: absolute; top: -11px; left: 24px; background: var(--accent);
  color: var(--accent-ink); font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 999px; margin: 0;
}
.plan h3 { font-size: 1rem; color: var(--ink-dim); font-weight: 600; margin-bottom: .3em; }
.price { font-size: 2rem; font-weight: 700; margin-bottom: .8em; line-height: 1.1; }
.price span { font-size: .85rem; font-weight: 500; color: var(--ink-faint); margin-left: 6px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.plan li { color: var(--ink-dim); font-size: .92rem; padding-left: 18px; position: relative; }
.plan li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* ─────────────  faq  ───────────── */

.faq { background: var(--ground-2); }
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-dim); margin: 0 0 18px; max-width: 62ch; }

/* ─────────────  icon story  ───────────── */

.icon-story { background: var(--ground); }
.icon-inner { display: grid; grid-template-columns: 440px 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.icon-face { margin: 0; }
.icon-face img { border-radius: var(--radius-lg); box-shadow: 0 30px 70px -26px rgba(0,0,0,.8); }
.icon-copy p:not(.eyebrow) { color: var(--ink-dim); }
.icon-copy h2 { color: var(--v-middle); }
@media (max-width: 860px) { .icon-inner { grid-template-columns: 1fr; } }

/* ─────────────  download  ───────────── */

.download {
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(143,232,176,.10), transparent 65%),
    var(--ground-2);
  border-top: 1px solid var(--line);
}
.download-inner { display: grid; grid-template-columns: 1fr 260px; gap: clamp(32px, 5vw, 64px); align-items: center; }
.download h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.download .fineprint { margin-top: 18px; }
@media (max-width: 760px) { .download-inner { grid-template-columns: 1fr; } .download-shot { display: none; } }

/* ─────────────  footer  ───────────── */

.footer { border-top: 1px solid var(--line); padding: 48px 0; background: var(--ground); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.footer .brand-name { margin: 0; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer nav a { color: var(--ink-dim); font-size: .9rem; }
.footer .small { grid-column: 1 / -1; max-width: 70ch; color: var(--ink-faint); margin: 12px 0 0; }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }

/* ─────────────  legal pages  ───────────── */

.legal { padding-top: 56px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal p, .legal li { color: var(--ink-dim); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: .5em; }
.legal .updated { color: var(--ink-faint); font-size: .9rem; margin-bottom: 2.5em; }
.legal table { border-collapse: collapse; width: 100%; margin: 1.5em 0; font-size: .93rem; }
.legal th, .legal td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink); font-weight: 600; }
