/* Evenbed site — tokens mirror drift/constants/colors.ts */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0A0E1A;
  --bg-2: #0E1326;
  --surface: #1E2235;
  --surface-2: #252A40;
  --cream: #F5F0E8;
  --cream-muted: rgba(245,240,232,0.62);
  --cream-faint: rgba(245,240,232,0.36);
  --accent: #8E95F7;
  --accent-light: #ADB2FF;
  --lav: #CDD0FF;
  --accent-bg: rgba(142,149,247,0.10);
  --accent-fill: rgba(142,149,247,0.18);
  --accent-border: rgba(142,149,247,0.30);
  --success: #7FD3B0;
  --amber: #E9B872;
  --error: #EE8A7C;
  --border: rgba(255,255,255,0.07);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --r: 18px;
  --max: 1120px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Starfield behind everything */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(142,149,247,0.20), transparent 70%),
    radial-gradient(700px 500px at -10% 40%, rgba(142,149,247,0.08), transparent 70%),
    var(--bg);
}
.sky::before, .sky::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(245,240,232,.5), transparent 60%),
    radial-gradient(1px 1px at 72% 12%, rgba(245,240,232,.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 62%, rgba(245,240,232,.35), transparent 60%),
    radial-gradient(1px 1px at 88% 48%, rgba(245,240,232,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 82%, rgba(245,240,232,.3), transparent 60%),
    radial-gradient(1px 1px at 58% 88%, rgba(245,240,232,.4), transparent 60%),
    radial-gradient(1px 1px at 92% 78%, rgba(245,240,232,.3), transparent 60%),
    radial-gradient(1px 1px at 5% 50%, rgba(245,240,232,.35), transparent 60%);
}
.sky::after { transform: translate(37%, 23%) scale(1.3); opacity: .6; animation: twinkle 7s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .15; } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); background: rgba(10,14,26,0.72); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 18px; letter-spacing: -0.2px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--cream-muted); transition: color .15s; }
.nav-links a:hover { color: var(--cream); }
.nav-links .btn { color: var(--bg); padding: 10px 18px; font-size: 14px; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  padding: 15px 24px; border-radius: 14px; border: none; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform .15s, opacity .15s, background .15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--cream); color: var(--bg); box-shadow: 0 8px 30px rgba(142,149,247,0.25); }
.btn-primary:hover { background: #FFFFFF; }
.btn-ghost { background: var(--accent-bg); color: var(--lav); border: 1px solid var(--accent-border); }
.btn-ghost:hover { background: var(--accent-fill); }

/* Type */
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase; color: var(--lav); }
.h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(42px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -1.5px; }
.h1 em, .h2 em { font-style: italic; color: var(--lav); }
.h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.1; letter-spacing: -0.8px; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--cream-muted); line-height: 1.65; }
.muted { color: var(--cream-muted); }
.faint { color: var(--cream-faint); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; padding: 72px 0 96px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(127,211,176,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(127,211,176,0); } 100% { box-shadow: 0 0 0 0 rgba(127,211,176,0); } }
.hero .h1 { margin-bottom: 22px; }
.hero .lead { max-width: 520px; margin-bottom: 32px; }
.hero-alt { margin-top: 18px; font-size: 14px; color: var(--cream-faint); }
.hero-alt a { color: var(--lav); text-decoration: none; border-bottom: 1px solid var(--accent-border); }
.count-line { margin-top: 14px; font-size: 14px; color: var(--cream-muted); }
.count-line strong { color: var(--cream); font-weight: 500; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 40px 0 72px; gap: 48px; } }

/* Waitlist */
[data-waitlist] { max-width: 520px; }
.wl-form { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-input {
  flex: 1; min-width: 220px; background: var(--surface); color: var(--cream);
  border: 1px solid var(--accent-border); border-radius: 14px; padding: 15px 18px;
  font: 15px var(--sans); outline: none; transition: border-color .15s, box-shadow .15s;
}
.wl-input::placeholder { color: var(--cream-faint); }
.wl-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(142,149,247,.18); }
.wl-note { margin-top: 10px; font-size: 13px; color: var(--cream-faint); }
.wl-error { color: var(--error); }
.wl-card { background: linear-gradient(160deg, rgba(142,149,247,.16), rgba(30,34,53,.9) 55%); border: 1px solid var(--accent-border); border-radius: 22px; padding: 26px; }
.wl-pop { animation: pop .5s cubic-bezier(.175,.885,.32,1.275); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.wl-eyebrow { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--success); font-weight: 500; }
.wl-position { font-family: var(--serif); font-weight: 300; font-size: 64px; line-height: 1.05; letter-spacing: -2px; margin: 6px 0 4px; }
.wl-sub { color: var(--cream-muted); font-size: 14px; margin-bottom: 18px; }
.wl-meter { display: flex; gap: 6px; margin-bottom: 10px; }
.wl-meter span { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.09); }
.wl-meter span.on { background: var(--success); }
.wl-reward { font-size: 14px; color: var(--cream); margin-bottom: 16px; }
.wl-linkrow { display: flex; gap: 8px; margin-bottom: 10px; }
.wl-link { min-width: 0; font-size: 13px; color: var(--lav); }
.wl-share { width: 100%; }

/* Phone mockup */
.phone {
  width: 300px; margin: 0 auto; aspect-ratio: 9 / 19.2; background: var(--bg);
  border-radius: 46px; border: 1px solid rgba(255,255,255,.10); padding: 16px;
  box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 0 8px #121628, 0 0 120px rgba(142,149,247,.22);
  position: relative; transform: rotate(-2deg); animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: rotate(-2deg) translateY(-10px); } }
.phone-notch { width: 96px; height: 26px; border-radius: 14px; background: #000; margin: 0 auto 18px; }
.phone-greet { font-size: 12px; color: var(--cream-faint); padding: 0 6px; }
.phone-title { font-family: var(--serif); font-weight: 300; font-size: 20px; padding: 0 6px 12px; }
.ring { position: relative; width: 150px; height: 150px; margin: 4px auto 14px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-arc { stroke-dasharray: 402; stroke-dashoffset: 402; animation: fill 2.2s .4s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes fill { to { stroke-dashoffset: 88; } }
.ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-num b { font-family: var(--serif); font-weight: 300; font-size: 46px; line-height: 1; }
.ring-num small { font-size: 9px; letter-spacing: 2px; color: var(--cream-faint); margin-top: 4px; }
.mini { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.mini-label { font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--cream-faint); }
.mini-row { display: flex; justify-content: space-between; align-items: baseline; }
.mini-big { font-family: var(--serif); font-weight: 300; font-size: 22px; }
.mini-luna { background: var(--accent-bg); border-color: var(--accent-border); font-size: 12px; color: var(--cream-muted); line-height: 1.5; }
.mini-luna b { color: var(--cream); font-weight: 500; }

/* Sections */
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 14px; display: block; }
.section-head .lead { margin-top: 16px; }
@media (max-width: 720px) { .section { padding: 72px 0; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 28px; }
.stat-big { font-family: var(--serif); font-weight: 300; font-size: 56px; line-height: 1; letter-spacing: -2px; color: var(--lav); margin-bottom: 14px; }
.stat-text { font-size: 16px; margin-bottom: 14px; }
.cite { font-size: 12px; color: var(--cream-faint); }
.cite a { color: var(--cream-faint); }

/* Tool cards */
.tool-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; text-decoration: none; transition: transform .2s, border-color .2s; min-height: 280px; }
.tool-card:hover { transform: translateY(-4px); border-color: var(--accent-border); }
.tool-card::after { content: ''; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(142,149,247,.28), transparent 70%); }
.tool-tag { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--success); font-weight: 500; }
.tool-title { font-family: var(--serif); font-weight: 300; font-size: 32px; line-height: 1.1; }
.tool-desc { color: var(--cream-muted); flex: 1; }
.tool-go { color: var(--lav); font-weight: 500; }

/* Steps */
.step-n { font-family: var(--serif); font-size: 15px; color: var(--lav); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--accent-border); display: grid; place-items: center; margin-bottom: 18px; }
.step-title { font-family: var(--serif); font-weight: 300; font-size: 24px; margin-bottom: 8px; }

/* Not list */
.not-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.not-list span { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--cream-faint); text-decoration: line-through; font-size: 14px; }
.not-list span.yes { text-decoration: none; color: var(--cream); background: var(--accent-fill); border-color: var(--accent-border); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq summary { cursor: pointer; list-style: none; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--lav); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--cream-muted); margin-top: 12px; }

/* Final CTA */
.final { text-align: center; padding: 120px 0; border-top: 1px solid var(--border); }
.final .h2 { max-width: 760px; margin: 0 auto 18px; }
.final .lead { max-width: 520px; margin: 0 auto 32px; }
.final [data-waitlist] { margin: 0 auto; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0 48px; font-size: 13px; color: var(--cream-faint); }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer a { text-decoration: none; margin-left: 20px; }
.footer a:hover { color: var(--cream-muted); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .ring-arc { stroke-dashoffset: 88; }
}

/* Legal pages */
.legal { max-width: 720px; padding: 64px 24px 96px; margin: 0 auto; }
.legal h1 { font-family: var(--serif); font-weight: 300; font-size: 44px; margin-bottom: 8px; }
.legal h2 { font-family: var(--serif); font-weight: 300; font-size: 24px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--cream-muted); margin-bottom: 10px; }
.legal ul { padding-left: 20px; }

/* Pause screen in the hero phone */
.pz { display: flex; flex-direction: column; height: calc(100% - 44px); padding: 8px 10px 6px; }
.pz-time { font-size: 12px; color: var(--cream-faint); text-align: center; letter-spacing: 1px; }
.pz-moon { width: 40px; height: 40px; margin: 34px auto 18px; }
.pz-title { font-family: var(--serif); font-weight: 300; font-size: 27px; line-height: 1.15; text-align: center; margin-bottom: 18px; }
.pz-line { font-size: 13px; color: var(--cream-muted); text-align: center; line-height: 1.55; margin-bottom: 10px; }
.pz-line q { color: var(--cream); }
.pz-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.pz-btn { border-radius: 14px; padding: 12px; text-align: center; font-size: 14px; font-weight: 500; }
.pz-btn.main { background: var(--cream); color: var(--bg); }
.pz-btn.soft { background: var(--accent-bg); color: var(--lav); border: 1px solid var(--accent-border); }
.pz-skip { font-size: 12px; color: var(--cream-faint); text-align: center; padding-top: 4px; }

/* Sound familiar: the night, hour by hour */
.moments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.moment .t { font-family: var(--serif); font-weight: 300; font-size: 40px; letter-spacing: -1px; line-height: 1; margin-bottom: 14px; }
.moment:nth-child(2) .t { color: var(--amber); }
.moment:nth-child(3) .t { color: var(--error); }
.moment p { font-size: 18px; }
.define { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; background: linear-gradient(120deg, rgba(142,149,247,.14), var(--surface) 60%); }
.define .word { font-family: var(--serif); font-weight: 300; font-size: 28px; line-height: 1.15; max-width: 260px; }
.define .pos { display: block; font-family: var(--sans); font-size: 13px; color: var(--cream-faint); margin-top: 6px; }
@media (max-width: 860px) { .moments, .define { grid-template-columns: 1fr; } }

/* 3pm you vs 1am you */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split .card .who { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; margin-bottom: 14px; display: block; }
.split .day { background: linear-gradient(160deg, rgba(233,184,114,.16), var(--surface) 60%); }
.split .day .who { color: var(--amber); }
.split .night .who { color: var(--lav); }
.split .say { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
.turn { margin-top: 28px; font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.6vw, 30px); color: var(--amber); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

/* Firmness */
.firm .label { font-family: var(--serif); font-weight: 300; font-size: 28px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.firm .dots { display: inline-flex; gap: 4px; }
.firm .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.12); }
.firm .dots i.on { background: var(--accent); }
.firm.pick { border-color: var(--accent-border); background: linear-gradient(160deg, rgba(142,149,247,.14), var(--surface) 60%); }
.firm .tag { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--success); font-weight: 500; }
.wayout { margin-top: 20px; font-size: 14px; color: var(--cream-faint); max-width: 760px; }
.privacy-row { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.privacy-row .card { padding: 22px 24px; }
.privacy-row b { display: block; font-weight: 500; margin-bottom: 6px; }
@media (max-width: 720px) { .privacy-row { grid-template-columns: 1fr; } }

/* The 14 nights */
.road { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.road::before { content: ''; position: absolute; left: 28px; right: 28px; top: 22px; height: 2px; background: linear-gradient(90deg, var(--accent), rgba(142,149,247,.15)); }
.stop { position: relative; padding-top: 58px; }
.stop::before { content: ''; position: absolute; top: 12px; left: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 6px rgba(142,149,247,.12); }
.stop:last-child::before { background: var(--accent); }
.stop h3 { font-family: var(--serif); font-weight: 300; font-size: 26px; margin-bottom: 6px; }
@media (max-width: 860px) {
  .road { grid-template-columns: 1fr; gap: 28px; }
  .road::before { left: 10px; right: auto; top: 12px; bottom: 12px; width: 2px; height: auto; background: linear-gradient(180deg, var(--accent), rgba(142,149,247,.15)); }
  .stop { padding: 0 0 0 44px; }
  .stop::before { top: 4px; }
}

/* Get Pro free */
.refer { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; background: linear-gradient(120deg, rgba(127,211,176,.12), var(--surface) 60%); }
.refer ol { list-style: none; counter-reset: s; display: grid; gap: 16px; }
.refer li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; color: var(--cream-muted); }
.refer li::before { content: counter(s); font-family: var(--serif); color: var(--success); width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(127,211,176,.4); display: grid; place-items: center; }
.refer li b { color: var(--cream); font-weight: 500; display: block; }
@media (max-width: 860px) { .refer { grid-template-columns: 1fr; gap: 28px; } }
