/* Sonavie website. Palette from CLAUDE.md; light/dark follows the device.
   Text contrast (WCAG AA): #1E5752 on #BFE8E3 6.25:1 · #276E68 on #EAF7F5 5.44:1 · #955038 on #BFE8E3 4.56:1
   · #E6F4F2 on #0F2A2B 13.4:1 · #4FB8AE on #0F2A2B 6.35:1 · #F6C3A8 on #0B1617 10.4:1 · #0F2A2B on #4FB8AE 6.35:1.
   Coral is a warm accent only: eyebrows, badges, the timer, a thin wave. Never large areas. */

/* Pricing stays hidden until launch. To show it, delete this one line: */
.pricing { display: none; }

:root {
  --bg: #BFE8E3;
  --bg-alt: #D3F0EC;
  --surface: #EAF7F5;
  --text: #1E5752;
  --text-2: #276E68;
  --link: #276E68;
  --accent: #4FB8AE;
  --on-accent: #0F2A2B;
  --coral: #F6C3A8;
  --coral-text: #955038;
  --line: rgba(30, 87, 82, 0.14);
  --shadow: 0 18px 50px rgba(15, 42, 43, 0.14);
  --night: #0B1617;
  --night-2: #0F2A2B;
  --night-text: #E6F4F2;
  --night-text-2: #A8CEC9;
  --radius: 24px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F2A2B;
    --bg-alt: #12302F;
    --surface: #163B3C;
    --text: #E6F4F2;
    --text-2: #A8CEC9;
    --link: #4FB8AE;
    --coral-text: #F6C3A8;
    --line: rgba(230, 244, 242, 0.12);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-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: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: min(100% - 40px, 1120px); margin-inline: auto; }
.narrow { width: min(100% - 40px, 760px); margin-inline: auto; }
.center { text-align: center; }
.small { font-size: 0.9rem; }
.muted { color: var(--text-2); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--text-2); line-height: 1.55; }
.fine { font-size: 0.95rem; color: var(--text-2); }
.eyebrow {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral-text); margin-bottom: 0.9em;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 20; background: var(--surface);
  color: var(--text); padding: 10px 16px; border-radius: 12px;
}
.skip-link:focus { top: 16px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: inherit; font-weight: 700; color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: 999px; padding: 0.85em 1.5em; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 24px rgba(79, 184, 174, 0.28); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(79, 184, 174, 0.36); }
.button-large { font-size: 1.1rem; padding: 1em 1.8em; }
.button-small { font-size: 0.92rem; padding: 0.55em 1.05em; box-shadow: none; }

/* Header */
.site-header { position: relative; z-index: 5; padding: 18px 0; }
.home .site-header { position: absolute; inset: 0 0 auto 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
/* The logo's pastel circle matches the light background: a thin teal ring keeps it visible (as in the app). */
.brand img, .thanks-logo { border-radius: 50%; outline: 1.5px solid rgba(79, 184, 174, 0.55); }
.brand img { outline-offset: -3px; }
.thanks-logo { outline-offset: -11px; outline-width: 2px; }
.site-nav { display: flex; gap: 26px; font-weight: 600; font-size: 0.97rem; }
.site-nav a { text-decoration: none; color: inherit; opacity: 0.85; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }
.header-end { display: flex; align-items: center; gap: 14px; }
.on-dark, .on-dark .brand, .on-dark .site-nav a { color: var(--night-text); }

.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.lang-switch a {
  font-size: 0.8rem; font-weight: 700; text-decoration: none; color: inherit; opacity: 0.75;
  padding: 0.25em 0.65em; border-radius: 999px;
}
.lang-switch a:hover { opacity: 1; }
.lang-switch a[aria-current="true"] { opacity: 1; background: var(--surface); color: var(--text); }
.on-dark .lang-switch { border-color: rgba(230, 244, 242, 0.25); }
.on-dark .lang-switch a[aria-current="true"] { background: rgba(230, 244, 242, 0.16); color: var(--night-text); }

@media (max-width: 900px) { .site-nav { display: none; } }
@media (max-width: 440px) { .site-header .header-badge { display: none; } }

/* Hero: always deep and dark, like the app at night */
.hero {
  position: relative; overflow: hidden; color: var(--night-text);
  background: radial-gradient(120% 90% at 80% 10%, #16403F 0%, var(--night-2) 45%, var(--night) 100%);
  padding: 130px 0 90px;
}
.hero-waves { position: absolute; inset: auto 0 0 0; width: 100%; height: 62%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero .eyebrow { color: var(--coral); }
.hero h1 { color: #F2FAF9; max-width: 13ch; }
.hero-sub { font-size: clamp(1.1rem, 2.3vw, 1.35rem); color: var(--night-text-2); max-width: 34ch; margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
/* Apple's official badge: unmodified, at least 40 px high */
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.hero-phone { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .hero { padding: 110px 0 70px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; text-align: left; }
}

/* iPhone frame drawn in CSS */
.phone {
  margin: 0; width: min(290px, 74vw); padding: 9px; border-radius: 48px;
  background: linear-gradient(160deg, #24393A, #0A1314 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 30px 80px rgba(0, 0, 0, 0.45);
}
.phone img { border-radius: 40px; width: 100%; }
.phone-hero { width: min(310px, 76vw); }

/* Medical notice right under the hero */
.notice-band { background: var(--surface); border-bottom: 1px solid var(--line); }
.notice-inner { display: flex; gap: 12px; align-items: flex-start; padding: 16px 0; font-size: 0.95rem; }
.notice-inner svg { font-size: 1.3rem; color: var(--coral-text); margin-top: 2px; }
.notice-inner p { margin: 0; }

/* Sections */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-surface { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.headphones { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--coral-text); margin: 0; }
.group-title { margin: 32px 0 6px; font-size: 1.1rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.group-intro { color: var(--text-2); margin-bottom: 18px; max-width: 60ch; }
.free-line { display: flex; gap: 10px; align-items: baseline; margin: 28px 0 0; font-weight: 600; color: var(--text); }
.free-line svg { color: var(--accent); flex: none; transform: translateY(0.15em); }

/* Listening cards */
.sound-grid { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sound-card {
  position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 18px;
  background: var(--surface); border-radius: var(--radius); border: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.sound-card.is-playing { border-color: var(--accent); box-shadow: var(--shadow); }
.sound-text { flex: 1; min-width: 0; }
.sound-text h3 { margin: 0 0 4px; min-height: 54px; display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 8px; }
/* Cards in a row share the same height (grid stretch); button and title stay aligned at the top. */
.sound-grid > li { height: 100%; }
.sound-text p { margin: 0; font-size: 0.95rem; color: var(--text-2); line-height: 1.45; }
.play {
  flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 1.35rem;
  transition: transform 0.2s ease;
}
.play:hover { transform: scale(1.05); }
.play .icon-pause, .play[aria-pressed="true"] .icon-play { display: none; }
.play[aria-pressed="true"] .icon-pause { display: inline-flex; }
.badge { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; padding: 0.2em 0.65em; border-radius: 999px; }
.badge-free { color: var(--text-2); border: 1px solid var(--line); }
.badge-premium { background: var(--coral); color: var(--on-accent); }
.bars { display: none; gap: 3px; align-items: flex-end; height: 18px; position: absolute; right: 18px; top: 18px; }
.sound-card.is-playing .bars { display: inline-flex; }
.bars i { display: block; width: 3px; height: 40%; border-radius: 2px; background: var(--coral-text); }
@media (prefers-reduced-motion: no-preference) {
  .bars i { animation: bar 1.1s ease-in-out infinite; }
  .bars i:nth-child(2) { animation-delay: -0.3s; }
  .bars i:nth-child(3) { animation-delay: -0.6s; }
  .bars i:nth-child(4) { animation-delay: -0.9s; }
}
@keyframes bar { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* Split sections */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.split-media { display: flex; justify-content: center; }
.steps { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps p { margin: 0; }
.step-n {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; background: var(--accent); color: var(--on-accent);
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* Night: always dark */
.night { background: linear-gradient(180deg, var(--night-2), var(--night)); color: var(--night-text); }
.night .lead, .night p { color: var(--night-text-2); }
.night h2, .night h3 { color: #F2FAF9; }
.night .eyebrow { color: var(--coral); }
.night-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.night-media { display: flex; justify-content: center; }
.night-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.night-list h3 { margin-bottom: 4px; }
.night-list p { margin: 0; }
@media (max-width: 860px) { .night-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Dynamic Island and Lock Screen illustration (CSS, until real captures arrive) */
.island-demo { display: grid; gap: 18px; justify-items: center; }
.island {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  min-width: 230px; padding: 10px 18px; border-radius: 999px; background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.island-moon, .lock-moon { color: var(--accent); font-size: 1.25rem; display: inline-flex; }
.island-time { color: var(--coral); font-weight: 700; font-variant-numeric: tabular-nums; }
.lock-card {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  width: min(360px, 100%); padding: 16px 18px; border-radius: 26px;
  background: rgba(15, 42, 43, 0.92); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.45);
}
.lock-text { display: grid; line-height: 1.25; }
.lock-text strong { color: var(--night-text); }
.lock-text small { color: var(--night-text-2); font-size: 0.85rem; }
.lock-time { color: var(--coral); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lock-pause {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-size: 1.1rem;
}

/* Story */
.story { margin: 0; }
.story blockquote { margin: 0 0 18px; padding: 0 0 0 22px; border-left: 3px solid var(--coral); }
.story blockquote p { font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.55; color: var(--text); }
.story figcaption { font-weight: 700; color: var(--coral-text); padding-left: 25px; }

/* Privacy */
.privacy-list { list-style: none; padding: 0; margin: 34px 0 26px; display: grid; gap: 14px; text-align: left; }
.privacy-list li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 18px; padding: 16px 18px; }
.privacy-list p { margin: 0; }
.pi-icon { color: var(--accent); font-size: 1.4rem; display: inline-flex; margin-top: 2px; }
@media (prefers-color-scheme: light) { .pi-icon { color: var(--text-2); } }

/* Pricing (while the plans are hidden, the section is just one calm line) */
.section-pricing { padding: 48px 0; }
.pricing-line { text-align: center; font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; margin: 0; }
.pricing { margin-top: 40px; }
.pricing-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.tier { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.tier-premium { box-shadow: inset 0 0 0 2px var(--coral); }
.tier ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tier li { display: flex; gap: 10px; }
.tier li svg { color: var(--accent); margin-top: 0.3em; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
.plan { background: var(--surface); border-radius: 20px; padding: 20px; }
.plan-featured { box-shadow: inset 0 0 0 2px var(--accent); }
.plan h4 { margin: 0 0 6px; }
.price { font-size: 1.3rem; font-weight: 700; margin: 0 0 4px; }
@media (max-width: 760px) { .pricing-cols, .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 12px; margin-top: 28px; }
.faq details { background: var(--surface); border-radius: 18px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--text-2); }
.faq details[open] summary::after { content: "–"; }
.answer { padding-bottom: 14px; color: var(--text-2); }
.answer p:last-child, .answer ul:last-child { margin-bottom: 0; }

/* Download, and the small news sign-up in the footer */
.download-badge { display: flex; justify-content: center; margin-top: 26px; }
.wait-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px auto 16px; max-width: 560px; }
.wait-form input[type="email"] {
  flex: 1 1 260px; font: inherit; color: var(--text); background: var(--surface);
  border: 2px solid var(--line); border-radius: 999px; padding: 0.85em 1.2em;
}
.wait-form input[type="email"]::placeholder { color: var(--text-2); opacity: 0.8; }
.wait-form input[type="email"]:focus-visible { border-color: var(--accent); outline-offset: 2px; }

/* Final medical notice */
.notice-final { padding-top: 0; }
.notice-card { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 24px; border-left: 4px solid var(--coral); }
.notice-card svg { font-size: 1.5rem; color: var(--coral-text); margin-top: 4px; }
.notice-card h2 { font-size: 1.25rem; margin-bottom: 0.4em; }
.notice-card p { margin: 0; color: var(--text-2); }

/* Text pages */
.text-page .page { padding: 40px 0 90px; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 0.4em; }
.page h2 { font-size: 1.45rem; margin-top: 1.8em; }
.page h3 { margin-top: 1.4em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.45em; }
.thanks { padding: 70px 0 110px; }
.thanks-logo { width: 128px; margin: 0 auto 24px; }

/* Footer */
.site-footer { background: var(--surface); padding: 56px 0 40px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--text-2); margin: 12px 0 16px; }
.social { display: flex; gap: 12px; }
.social a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem;
  color: var(--text); background: var(--bg); text-decoration: none;
}
.footer-links { display: grid; gap: 10px; align-content: start; font-weight: 600; }
.footer-links a { text-decoration: none; color: var(--text); }
.footer-links a:hover { text-decoration: underline; }
.footer-end { display: grid; gap: 12px; align-content: start; justify-items: start; }
.footer-end p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-news { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.news-title { font-weight: 700; font-size: 0.97rem; margin: 0 0 10px; }
.news-form { justify-content: flex-start; margin: 0 0 8px; max-width: 460px; }
.news-form input[type="email"] { flex: 1 1 220px; font-size: 0.95rem; padding: 0.55em 1em; background: var(--bg); }
.footer-news p.small { margin: 0; }

/* Gentle reveal on scroll (only with JavaScript and without Reduce Motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
