/* Wake — website styles. Mirrors the app's identity (src/theme/colors.ts):
   warm cream ground, charcoal text, antique-gold accent, Playfair Display serif
   for display type over a clean system sans for body copy. */

:root {
  --bg: #faf8f4;        /* soft warm cream */
  --surface: #ffffff;   /* cards above the cream */
  --text: #2a2a2a;      /* charcoal */
  --muted: #8a7b6a;     /* muted warm brown/grey */
  --gold: #8a6d2f;      /* deep antique gold — the accent */
  --gold-button: #9a7340;
  --gold-tint: #fbf6ec; /* a whisper of gold */
  --border: #dcdcdc;    /* subtle grey edge */
  --divider: #c4c4c4;   /* hairline rule */

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", sans-serif;

  --measure: 64rem;   /* page max width */
  --read: 42rem;      /* prose max width */
  --shadow: 0 18px 50px -28px rgba(60, 45, 20, 0.4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

::selection { background: var(--gold-tint); }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; }

.container { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--gold {
  background: var(--gold-button);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(138, 109, 47, 0.8);
}
.btn--gold:hover { background: var(--gold); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--store {
  background: var(--text);
  color: #fff;
  padding: 0.7rem 1.4rem;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  gap: 0;
}
.btn--store .store__top { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 500; opacity: 0.85; }
.btn--store .store__main { font-size: 1.05rem; font-weight: 600; }
.btn--store svg { width: 16px; height: 16px; fill: #fff; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
}
.nav__brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a { color: var(--muted); font-size: 0.95rem; }
.nav__links a:hover { color: var(--gold); }
.nav__links .btn { font-size: 0.9rem; padding: 0.55rem 1.15rem; }
.nav__links .btn--gold { color: #fff; }
@media (max-width: 40rem) {
  .nav__links a:not(.btn) { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3.5rem;
}
.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.08;
  margin: 0 0 1.1rem;
}
.hero__sub {
  font-size: 1.18rem;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 32rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero__note { margin: 1.1rem 0 0; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 3rem; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__cta { justify-content: center; }
  .phone { margin: 1rem auto 0; }
}

/* ── Phone mockup (CSS-only morning screen) ──────────────────────────────── */
.phone {
  width: 268px;
  max-width: 80vw;
  margin-left: auto;
  border-radius: 42px;
  background: #1c1c1c;
  padding: 11px;
  box-shadow: var(--shadow);
}
.phone__video {
  display: block;
  width: 100%;
  border-radius: 32px;
  aspect-ratio: 636 / 1280;
  object-fit: cover;
  background: var(--bg);
}
.phone__screen {
  background: var(--bg);
  border-radius: 32px;
  overflow: hidden;
  padding: 1.4rem 1.2rem 1.5rem;
}
.phone__notch {
  width: 42%;
  height: 6px;
  border-radius: 3px;
  background: #d8d3ca;
  margin: 0 auto 1.1rem;
}
.phone__eyebrow { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.phone__greet { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; margin: 0.2rem 0 0.15rem; }
.phone__weather { font-size: 0.78rem; color: var(--muted); margin: 0 0 1.1rem; }
.phone__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  margin-bottom: 0.8rem;
}
.phone__card-label { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.phone__focal { font-family: var(--serif); font-size: 1rem; font-weight: 600; margin: 0.25rem 0 0; }
.phone__step { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; padding: 0.42rem 0; }
.phone__dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--divider); flex: none; }
.phone__dot--done { background: var(--gold); border-color: var(--gold); position: relative; }
.phone__dot--done::after {
  content: "✓"; color: #fff; font-size: 9px; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.phone__step--done { color: var(--muted); }
.phone__start {
  margin-top: 0.9rem;
  background: var(--gold-button);
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 0.7rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── Trust strip ─────────────────────────────────────────────────────────── */
.trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--gold-tint);
}
.trust__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.trust__item strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.trust__item span { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 40rem) { .trust__inner { grid-template-columns: 1fr; gap: 1rem; } }

/* ── Generic section ─────────────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section__head { max-width: var(--read); margin: 0 auto 3rem; text-align: center; }
.section__head .eyebrow { text-align: center; }
.section__head h2 { font-size: clamp(2rem, 5vw, 2.7rem); line-height: 1.15; margin: 0 0 0.8rem; }
.section__head p { color: var(--muted); margin: 0; font-size: 1.1rem; }
.section--tint { background: var(--gold-tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Pillars ─────────────────────────────────────────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow);
}
.pillar__step {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.pillar__title { font-size: 1.45rem; margin: 0 0 0.6rem; }
.pillar__body { color: var(--muted); font-size: 1rem; margin: 0; }
@media (max-width: 40rem) { .pillars { grid-template-columns: 1fr; } }

/* ── Differentiator comparison ───────────────────────────────────────────── */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.compare__col {
  border-radius: 20px;
  padding: 2rem 1.8rem;
  border: 1px solid var(--border);
}
.compare__col--old {
  background: transparent;
}
.compare__col--wake {
  background: var(--surface);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.compare__col h3 {
  font-size: 1.2rem;
  margin: 0 0 1.1rem;
}
.compare__col--old h3 { color: var(--muted); }
.compare__col--wake h3 { color: var(--gold); }
.compare__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.compare__col li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--text);
  line-height: 1.5;
}
.compare__col li::before {
  position: absolute;
  left: 0;
  top: -0.05em;
  font-size: 1.05rem;
  font-weight: 700;
}
.compare__col--old li {
  color: var(--muted);
}
.compare__col--old li::before {
  content: '\00d7'; /* × */
  color: var(--muted);
}
.compare__col--wake li::before {
  content: '\2713'; /* ✓ */
  color: var(--gold);
}
@media (max-width: 40rem) { .compare { grid-template-columns: 1fr; } }

/* ── Steps (how it works) ────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.step__num {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  color: var(--gold); background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.step h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }
@media (max-width: 46rem) { .steps { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; } }
@media (max-width: 26rem) { .steps { grid-template-columns: 1fr; } }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  position: relative;
}
.plan--feature { border-color: var(--gold); box-shadow: var(--shadow); }
.plan__tag {
  position: absolute; top: -0.8rem; left: 1.8rem;
  background: var(--gold); color: #fff;
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.7rem; border-radius: 999px;
}
.plan__name { font-size: 1.25rem; margin: 0 0 0.4rem; }
.plan__price { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; }
.plan__price span { font-family: var(--sans); font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.plan__meta { color: var(--muted); font-size: 0.9rem; margin: 0.4rem 0 0; }
.pricing__foot { text-align: center; color: var(--muted); font-size: 0.88rem; margin: 2rem auto 0; max-width: var(--read); }
@media (max-width: 40rem) { .plans { grid-template-columns: 1fr; } }

/* ── Waitlist CTA band ───────────────────────────────────────────────────── */
.cta { text-align: center; }
.cta h2 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 0.7rem; }
.cta p { color: var(--muted); margin: 0 auto 2rem; max-width: var(--read); font-size: 1.1rem; }
.waitlist {
  display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap;
  max-width: 32rem; margin: 0 auto;
}
.waitlist input {
  flex: 1 1 16rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
}
.waitlist input:focus { outline: none; border-color: var(--gold); }
.waitlist__msg { margin: 1rem 0 0; font-size: 0.95rem; color: var(--gold); min-height: 1.2em; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq { max-width: var(--read); margin: 0 auto; padding: 0 1.5rem; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
}
.faq summary {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0.8rem 0 0; }

/* ── Star divider ────────────────────────────────────────────────────────── */
.star-rule {
  display: flex; align-items: center; justify-content: center; gap: 0.85rem;
  margin: 0 auto; max-width: 18rem;
}
.star-rule__line { flex: 1; height: 1px; background: var(--divider); }
.star-rule__star { color: var(--gold); font-size: 0.8rem; line-height: 1; }

/* ── Legal documents (privacy.html / terms.html) ─────────────────────────── */
.wrap { max-width: var(--read); margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.doc h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
}
.doc__updated { color: var(--muted); font-size: 0.95rem; margin: 0 0 2.5rem; }
.doc h2 {
  font-size: 1.4rem;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.doc h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; margin: 1.5rem 0 0.4rem; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.25rem; }
.doc li { margin: 0.4rem 0; }
.doc strong { font-weight: 700; }

/* Unfilled [BRACKETED] placeholders — visually obvious so they can't ship by
   accident. Fill the token text in the HTML. */
.ph {
  background: var(--gold-tint);
  border-bottom: 1px dashed var(--gold);
  padding: 0 0.15em;
  color: var(--gold);
  font-style: normal;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
}
.footer__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: center;
  justify-content: space-between;
}
.footer__brand { font-family: var(--serif); font-weight: 600; color: var(--text); font-size: 1.05rem; }
.footer__links { display: flex; gap: 1.4rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--gold); }

/* ── Polish: anchor offset, focus, reduced motion ────────────────────────── */

/* Sticky-nav offset so jump links don't land under the header. */
section[id],
main[id] {
  scroll-margin-top: 76px;
}

/* Clear keyboard focus everywhere (mouse clicks don't trigger :focus-visible). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Scroll reveal ───────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Signature motion: hero sunrise glow + living phone ───────────────────── */
.hero { position: relative; overflow: hidden; }
.hero__copy,
.hero .phone { position: relative; z-index: 1; }
.hero__glow {
  position: absolute;
  top: -35%;
  right: -12%;
  width: 65%;
  height: 130%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(201, 154, 84, 0.32),
    rgba(201, 154, 84, 0.08) 55%,
    rgba(201, 154, 84, 0) 74%
  );
  animation: sunrise 9s ease-in-out infinite alternate;
}
@keyframes sunrise {
  from { opacity: 0.6; transform: translateY(12px) scale(1); }
  to   { opacity: 1;   transform: translateY(-12px) scale(1.06); }
}
@media (max-width: 52rem) {
  .hero__glow { top: -18%; right: -28%; width: 92%; height: 66%; }
}

/* A slow, subtle float so the device feels alive, not a static screenshot. */
.phone { animation: float 7s ease-in-out 0.6s infinite alternate; }
@keyframes float {
  from { transform: translateY(0); }
  to   { transform: translateY(-7px); }
}

/* Cards lift on hover for a touch of tactility. */
.pillar,
.plan,
.step__num {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.pillar:hover,
.plan:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 64px -30px rgba(60, 45, 20, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .hero__glow { animation: none; opacity: 0.8; }
  .phone { animation: none; }
  .pillar:hover,
  .plan:hover { transform: none; }
}
