/* WaveSleep — marketing site.

   Tokens follow the split scripts/build-appstore.py settled for the App Store
   panels, for the same reason: the logo's Gauge amber and the app UI's Cabin
   Red sit inches apart on one surface here, and at that distance the
   difference reads as a mistake rather than a sibling.

     Cabin Red  #FF5C3A   chrome, links, rules, everything interactive
     Gauge amber #FF6A1A  the mark and the wordmark, nowhere else
     Void black #0B0906   ground. Never pure #000 off-device: the brand brief
                          is explicit that everything here is lit, not printed.

   Dark only, matching the app. */

:root {
  --void: #0B0906;
  --surface: #141416;
  --surface-2: #1C1C20;
  --red: #FF5C3A;
  --red-hi: #FF7A5C;   /* >=7:1 on void, for small text */
  --amber: #FF6A1A;
  --cream: #F2E9DC;
  --muted: #9A948B;
  --hairline: rgba(242, 233, 220, .10);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 34rem;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--cream);
  font-family: var(--ui);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--red-hi); text-decoration-color: rgba(255, 122, 92, .4); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 3px; }

.sr-only, .skip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; top: .75rem; left: .75rem; z-index: 20; width: auto; height: auto;
  clip: auto; margin: 0; padding: .6rem 1rem; background: var(--surface-2);
  color: var(--cream); border-radius: 8px; text-decoration: none;
}

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem var(--pad);
  background: rgba(11, 9, 6, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand img { width: 30px; height: 30px; }
.wordmark {
  font-family: var(--mono); font-weight: 600; font-size: 1.06rem;
  letter-spacing: .04em; color: var(--amber);
}
.nav nav { display: flex; gap: clamp(.85rem, 3vw, 1.6rem); }
.nav nav a {
  font-size: .875rem; color: var(--muted); text-decoration: none;
  padding: .3rem 0; border-bottom: 1px solid transparent;
}
.nav nav a:hover { color: var(--cream); border-bottom-color: var(--red); }

/* ----------------------------------------------------------------- hero */

.hero { position: relative; isolation: isolate; }
.hero-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,9,6,.94) 0%, rgba(11,9,6,.80) 34%, rgba(11,9,6,0) 62%),
    linear-gradient(0deg, var(--void) 0%, rgba(11,9,6,0) 26%);
}
.hero-copy {
  position: absolute; z-index: 2; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad); max-width: 40rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 1rem + 4.4vw, 4rem);
  line-height: 1.04; letter-spacing: -.022em; font-weight: 700;
}
.lede { margin: 0; max-width: 30rem; color: var(--muted); font-size: clamp(1rem, .93rem + .32vw, 1.18rem); }
.cta { margin: 1.6rem 0 0; display: flex; flex-direction: column; gap: .4rem; }
.cta-soon {
  align-self: flex-start;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); border: 1px solid rgba(255, 92, 58, .45); border-radius: 999px;
  padding: .62rem 1.15rem;
}
.cta-sub { font-size: .8rem; color: var(--muted); }

/* ---------------------------------------------------------------- beats */

.eyebrow {
  font-family: var(--mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--red);
  margin: 0 0 .9rem; display: flex; align-items: center; gap: .7rem;
}
.eyebrow .num { color: var(--muted); }
.eyebrow .num::after { content: "—"; margin-left: .7rem; color: var(--hairline); }

.beat {
  display: grid; gap: clamp(2rem, 6vw, 5rem); align-items: center;
  grid-template-columns: 1fr;
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  border-top: 1px solid var(--hairline);
}
.beat h2 {
  margin: 0 0 1rem; font-size: clamp(1.6rem, 1rem + 2.1vw, 2.5rem);
  line-height: 1.14; letter-spacing: -.018em; font-weight: 650;
}
.beat p { margin: 0 0 .9rem; color: var(--muted); max-width: var(--measure); }
.beat p strong { color: var(--cream); font-weight: 600; }

.phone {
  position: relative; width: min(300px, 78vw); margin-inline: auto;
  border-radius: 30px; overflow: hidden;
  border: 1px solid rgba(242, 233, 220, .14);
  box-shadow: 0 30px 70px -18px rgba(0, 0, 0, .95),
              0 0 90px -26px rgba(255, 92, 58, .5);
}

@media (min-width: 860px) {
  .beat { grid-template-columns: 1.05fr .95fr; }
  .beat.flip .beat-text { order: 2; }
  .beat.flip .beat-media { order: 1; }
  .phone { width: min(320px, 100%); }
}

/* ---------------------------------------------------------------- bands */

.band { padding: clamp(3.5rem, 9vw, 7rem) var(--pad); border-top: 1px solid var(--hairline); }
.band > h2 {
  margin: 0 0 2rem; font-size: clamp(1.6rem, 1rem + 2.1vw, 2.5rem);
  line-height: 1.14; letter-spacing: -.018em; font-weight: 650; max-width: 22ch;
}
.wide-p { color: var(--muted); max-width: 46rem; margin: 0 0 1rem; }
.quiet { background: linear-gradient(180deg, rgba(20,20,22,.55), transparent); }

/* Six cells. auto-fit at 15rem lands on four columns at desktop and leaves a
   ragged 4+2; 19rem holds it to three, so it breaks evenly. */
.grid { display: grid; gap: 1.6rem 2.4rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.watch {
  width: 190px; border-radius: 34px; margin: 0 0 2.2rem;
  border: 1px solid rgba(242, 233, 220, .14);
  box-shadow: 0 22px 50px -16px rgba(0, 0, 0, .95), 0 0 70px -24px rgba(255, 92, 58, .45);
}
@media (min-width: 860px) {
  /* The watch sits beside the heading rather than above the grid — it is
     evidence for one cell, not a banner for all six. */
  .band > h2 { display: inline-block; vertical-align: middle; }
  .watch { float: right; margin: -1rem 0 1.5rem 2.5rem; width: 210px; }
}
.grid h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 600; letter-spacing: -.005em; }
.grid p { margin: 0; color: var(--muted); font-size: .95rem; }

/* -------------------------------------------------------------- pricing */

.tiers { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); max-width: 56rem; }
.tier {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 16px; padding: 1.6rem 1.5rem;
}
.tier.plus { border-color: rgba(255, 92, 58, .34); background: var(--surface-2); }
.tier h3 {
  margin: 0 0 1rem; font-family: var(--mono); font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.tier.plus h3 { color: var(--red); }
.tier ul { margin: 0; padding: 0; list-style: none; }
.tier li { padding: .42rem 0 .42rem 1.4rem; position: relative; border-bottom: 1px solid var(--hairline); font-size: .95rem; }
.tier li:last-child { border-bottom: 0; }
.tier li::before { content: "·"; position: absolute; left: .35rem; color: var(--red); font-weight: 700; }
.price { margin: 1.1rem 0 .5rem; font-size: 1.05rem; }
.price strong { color: var(--cream); font-weight: 650; }
.price .sep { color: var(--muted); margin: 0 .3rem; }
.tier-note { margin: .9rem 0 0; color: var(--muted); font-size: .875rem; }
.fineprint { margin: 1.6rem 0 0; color: var(--muted); font-size: .875rem; max-width: 46rem; }

/* ---------------------------------------------------------------- prose */

.prose { max-width: var(--measure); margin: 0 auto; padding: clamp(2.5rem, 7vw, 4.5rem) var(--pad) 1rem; }
.prose h1 { margin: 0 0 1.4rem; font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; }
.prose h2 {
  margin: 2.4rem 0 .6rem; font-family: var(--mono); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.prose h3 { margin: 1.6rem 0 .4rem; font-size: 1.02rem; font-weight: 650; }
.prose p { margin: 0 0 .9rem; color: var(--muted); }
.prose strong { color: var(--cream); font-weight: 600; }
.prose ul { margin: 0 0 1rem; padding: 0; list-style: none; }
.prose li { position: relative; padding: .18rem 0 .18rem 1.15rem; color: var(--muted); }
.prose li::before { content: "·"; position: absolute; left: .2rem; color: var(--red); font-weight: 700; }
.prose-note {
  margin-top: 2.4rem; padding: .9rem 1.1rem; border-left: 2px solid rgba(255, 92, 58, .4);
  background: rgba(20, 20, 22, .6); border-radius: 0 8px 8px 0; font-size: .875rem;
}

/* Only the very first paragraph pair of a legal doc is the title block. */
.prose h1 + p { color: var(--cream); }

/* ------------------------------------------------------------------ faq */

.faq { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; padding: .95rem 1.8rem .95rem 0; position: relative;
  font-weight: 600; color: var(--cream); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .2rem; top: .8rem;
  color: var(--red); font-size: 1.2rem; line-height: 1;
}
.faq[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--red-hi); }
.faq-body { padding: 0 0 1rem; }
.faq-body p { margin: 0 0 .8rem; color: var(--muted); }

/* --------------------------------------------------------------- footer */

.foot { padding: 0 var(--pad) 3rem; }
.rule { height: 1px; background: var(--hairline); margin: 0 0 1.6rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; align-items: center; }
.foot p { margin: 0; color: var(--muted); font-size: .82rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; }
.foot nav a { color: var(--muted); font-size: .82rem; text-decoration: none; }
.foot nav a:hover { color: var(--red-hi); }

/* ------------------------------------------------------- contrast / a11y */

@media (prefers-contrast: more) {
  :root { --muted: #C9C2B8; --hairline: rgba(242, 233, 220, .28); }
  .hero::after {
    background:
      linear-gradient(90deg, rgba(11,9,6,.98) 0%, rgba(11,9,6,.92) 42%, rgba(11,9,6,.35) 70%),
      linear-gradient(0deg, var(--void) 0%, rgba(11,9,6,0) 26%);
  }
}

@media (max-width: 700px) {
  /* Stacked, the headline can no longer sit over the photograph and stay
     legible, so the image becomes a band above the copy instead of behind it. */
  .hero { display: flex; flex-direction: column; }
  .hero-img { aspect-ratio: 4 / 3; object-position: 62% 50%; }
  .hero::after {
    background: linear-gradient(0deg, var(--void) 0%, rgba(11,9,6,.55) 30%, rgba(11,9,6,0) 60%);
    inset: 0 0 auto; height: 75vw; max-height: 60vh;
  }
  .hero-copy { position: static; padding: 1.5rem var(--pad) 2.5rem; max-width: none; }
  .cta { margin-top: 1.25rem; }
}
