/* Sleep Station — sleepstationapp.com
   Shared base for every page. "Midnight Bloom" v3 tokens from the app's design system.
   Dark by design: the app lives at night, and so does this site. */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0D1126;
  --night-990: #0B0E22;
  --surface: #181D40;
  --surface-2: #222750;
  --border: rgba(160, 175, 255, 0.13);
  --border-strong: rgba(160, 175, 255, 0.24);
  --primary: #9B7BFF;
  --primary-press: #8259F0;
  --accent-soft: #C9B8FF;
  --sky: #8FB8FF;
  --cream: #F6EBD9;
  --gold: #F6D9A8;
  --peach: #FFB37C;
  --dawn-2: #FFD9A3;
  --green: #7DD8A0;
  --text-1: #F2F3FF;
  --text-2: #A8B0DC;
  --text-3: #6C74A3;
  --tint: rgba(155, 123, 255, 0.13);
  --tint-border: rgba(155, 123, 255, 0.4);
  --tint-gold: rgba(246, 217, 168, 0.1);
  --tint-gold-border: rgba(246, 217, 168, 0.35);
  --dawn-grad: linear-gradient(90deg, #2B2566 0%, #8259F0 42%, #FFB37C 86%, #FFD9A3 100%);
  --radius: 24px;
  --radius-tile: 18px;
  --pill: 999px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --track: -0.025em;
  --max: 1120px;
  --pad: 24px;
  --motion: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg);
  background-image: linear-gradient(180deg, #0F1430 0%, #0D1126 50%, #0B0E22 100%);
  background-attachment: fixed;
  overflow-x: clip;
}
::selection { background: rgba(155, 123, 255, 0.45); color: #fff; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: var(--track); line-height: 1.1; }
p { margin: 0; }
.wrap { width: min(var(--max), 100% - 2 * var(--pad)); margin-inline: auto; position: relative; z-index: 1; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--pill); }
.skip:focus { left: 8px; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 26px; border-radius: var(--pill); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; white-space: nowrap;
  transition: transform var(--motion), background var(--motion), border-color var(--motion), box-shadow var(--motion);
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 32px -14px rgba(155, 123, 255, 0.8); }
.btn-primary:hover { background: var(--primary-press); box-shadow: 0 0 28px rgba(155, 123, 255, 0.3), 0 12px 32px -14px rgba(155, 123, 255, 0.8); }
.btn-primary:disabled { opacity: 0.7; cursor: default; }
.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; }

/* ——— Nav (document pages) ——— */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(13, 17, 38, 0.72); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text-1); font-weight: 700; font-size: 18px; letter-spacing: var(--track); text-decoration: none !important; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text-1); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 860px) { .nav-links { display: none; } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft); }
.eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--dawn-grad); }

/* ——— Store badges + waitlist ——— */
.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 12px; height: 58px; padding: 0 20px 0 16px; border-radius: 16px;
  background: rgba(11, 14, 34, 0.7); border: 1px solid var(--border-strong); color: var(--text-1);
  text-decoration: none !important; transition: border-color var(--motion), transform var(--motion);
}
.badge:hover { border-color: var(--accent-soft); transform: translateY(-1px); }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.badge small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.badge b { font-size: 17px; font-weight: 700; }
.badges[hidden] { display: none; }

.waitlist { width: 100%; max-width: 480px; margin-inline: auto; }
.waitlist-row { display: flex; gap: 10px; }
.waitlist input[type="email"] {
  flex: 1; min-width: 0; height: 56px; padding: 0 22px; border-radius: var(--pill);
  border: 1px solid var(--border-strong); background: rgba(11, 14, 34, 0.6); color: var(--text-1);
  font: inherit; font-size: 16px; outline: none; transition: border-color var(--motion), box-shadow var(--motion), background var(--motion);
}
.waitlist input[type="email"]::placeholder { color: var(--text-3); }
.waitlist input[type="email"]:focus { border-color: var(--accent-soft); background: rgba(11, 14, 34, 0.9); box-shadow: 0 0 0 4px rgba(155, 123, 255, 0.16); }
.waitlist .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist-note { margin-top: 14px; font-size: 14px; color: var(--text-3); min-height: 1.5em; transition: color var(--motion); }
.waitlist-note.ok { color: var(--cream); }
.waitlist-note.err { color: var(--peach); }
.waitlist.done .waitlist-row { display: none; }
.waitlist.done .waitlist-note { font-size: 18px; color: var(--text-1); }
@media (max-width: 520px) {
  .waitlist-row { flex-direction: column; }
  .waitlist input[type="email"] { flex: none; width: 100%; }
  .waitlist .btn { width: 100%; }
}

/* ——— Footer ——— */
.footer { padding: 48px 0 56px; color: var(--text-3); font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap; align-items: center; }
.footer .brand { font-size: 16px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer nav a { color: var(--text-2); font-weight: 500; }
.footer nav a:hover { color: var(--text-1); text-decoration: none; }
.footer .legal { margin-top: 28px; max-width: 64ch; line-height: 1.6; }

/* ——— Reveal on scroll: hidden only while motion is on and the element has not arrived ——— */
.reveal { transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms); }
.anim .reveal:not(.in) { opacity: 0; transform: translateY(18px); }

/* ——— Document pages (privacy, terms, support, delete-account) ——— */
.page { padding: 56px 0 96px; }
.page-head { max-width: 760px; margin-inline: auto; margin-bottom: 40px; }
.page-head h1 { font-size: clamp(34px, 5vw, 50px); margin-top: 14px; }
.page-head .meta { color: var(--text-3); margin-top: 14px; font-size: 15px; }
.summary { max-width: 760px; margin: 0 auto 40px; background: var(--surface); border: 1px solid var(--tint-border); border-radius: var(--radius); padding: 26px 28px; }
.summary h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 14px; }
.summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.summary li { padding-left: 24px; position: relative; color: var(--text-2); font-size: 15.5px; }
.summary li::before { content: ''; position: absolute; left: 0; top: 9px; width: 12px; height: 3px; border-radius: 2px; background: var(--dawn-grad); }
.summary li b { color: var(--text-1); font-weight: 600; }
.prose { max-width: 760px; margin-inline: auto; color: var(--text-2); font-size: 16.5px; }
.prose h2 { color: var(--text-1); font-size: 26px; margin: 52px 0 16px; padding-top: 28px; border-top: 1px solid var(--border); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { color: var(--text-1); font-size: 19px; margin: 30px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent-soft); }
.prose strong { color: var(--text-1); font-weight: 600; }
.prose a { font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text-1); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.prose td:first-child { color: var(--text-1); font-weight: 600; white-space: nowrap; }
.prose .table-wrap { overflow-x: auto; }
.prose .callout { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-tile); padding: 18px 22px; margin: 0 0 20px; }
.toc { max-width: 760px; margin: 0 auto 36px; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { font-size: 13.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--pill); padding: 7px 14px; }
.toc a:hover { color: var(--text-1); border-color: var(--border-strong); text-decoration: none; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; position: relative; padding: 18px 20px 18px 66px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-tile); }
.steps-list li::before { content: counter(s); position: absolute; left: 20px; top: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); border: 1px solid var(--tint-border); color: var(--accent-soft); font-weight: 700; font-size: 14px; }
.steps-list li b { color: var(--text-1); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card h3 { font-size: 17px; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 14.5px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 24px; }
.contact-grid .card a.big { display: inline-block; margin-top: 10px; font-size: 17px; font-weight: 700; color: var(--text-1); }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
