/* Power Napper — midnight & gold. Tokens and rules are documented in DESIGN.md. */

:root {
  --night: #000000;
  --night-raised: #0b0f1e;
  --navy: #161d35;
  --navy-high: #1e2745;
  --line: #2a3150;
  --gold: #e8c26a;
  --gold-dim: #b8933f;
  --gold-ink: #1a1405;
  --cream: #f1ece0;
  --mist: #a9a3b8;
  --moonlight: #afc3ff;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --radius: 12px;
  --section: 96px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 400 1.0625rem/1.6 var(--font);
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--cream); }

:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem); letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 2.5vw + 1rem, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 16px; }
.gold { color: var(--gold); }
.muted { color: var(--mist); }
.eyebrow {
  display: inline-block; margin-bottom: 16px; color: var(--gold);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.lead { font-size: 1.2rem; color: var(--mist); max-width: 56ch; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); font-weight: 700; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { color: var(--mist); font-size: 12px; font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }
.site-header .btn { white-space: nowrap; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--mist); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--cream); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: #f3d58f; color: var(--gold-ink); }
.btn-secondary { background: transparent; color: var(--cream); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--gold-dim); color: var(--cream); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }

/* Sections */
section { padding-block: var(--section); }
/* Links like #pricing land below the sticky header. */
section[id] { scroll-margin-top: 64px; }
.alt { background: var(--night-raised); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 48px; }

/* Hero */
.hero { padding-block: 72px var(--section); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 20px; }
.hero-note { font-size: 0.95rem; color: var(--mist); }
.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual::before {
  content: ""; position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 194, 106, 0.22), rgba(232, 194, 106, 0.04) 45%, transparent 68%);
}

/* A real 1:1 screenshot clipped to a circle inside a dark bezel. */
.watch {
  position: relative; width: min(100%, 360px); aspect-ratio: 1; border-radius: 50%;
  padding: 14px; background: linear-gradient(145deg, #2b2f3a, #0d0f14);
  box-shadow: inset 0 0 0 1px #3a3f4d, 0 0 0 1px #000;
}
.watch img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #000; }
.watch-sm { width: min(100%, 240px); padding: 10px; }

/* The difference */
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contrast .card p:last-child { margin: 0; }
.card {
  background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.card-quiet { background: transparent; }
.card h3 { margin-bottom: 8px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; justify-items: center; text-align: center; gap: 20px; }
.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: var(--gold-ink); font-weight: 700; margin-right: 8px;
}
.steps h3 { display: flex; align-items: center; justify-content: center; margin: 0; }
.steps p { color: var(--mist); max-width: 32ch; margin: 0; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature .icon { width: 28px; height: 28px; color: var(--gold); margin-bottom: 12px; }
.feature p { color: var(--mist); margin: 0; }
.tracking { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 64px; }
.tracking-shots { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.checklist li::before { content: "✓"; color: var(--gold); font-weight: 700; }

/* Privacy */
.privacy-band { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.privacy-band .moon { width: 72px; height: 72px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.pills li {
  background: var(--navy); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 0.95rem; color: var(--cream);
}

/* Watches */
.watch-table { width: 100%; border-collapse: collapse; }
.watch-table th, .watch-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.watch-table th { color: var(--mist); font-weight: 600; font-size: 0.9rem; }
.watch-table td:last-child { color: var(--mist); }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 820px; }
.price { font-size: 2.6rem; font-weight: 700; margin: 8px 0 4px; }
.price small { font-size: 1rem; color: var(--mist); font-weight: 400; }
.plan-featured { border-color: var(--gold-dim); box-shadow: 0 0 0 1px var(--gold-dim) inset; }
.plan .checklist { margin-top: 20px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 16px; font-size: 1.5rem; color: var(--gold); font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--mist); margin: 0 0 20px; max-width: 70ch; }

/* Waitlist */
.waitlist { text-align: center; }
.waitlist .lead { margin-inline: auto; }
.signup { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.signup label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.signup input[type="email"] {
  min-height: 48px; width: min(360px, 100%); padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--navy); color: var(--cream); font: 1rem var(--font);
}
.signup input[type="email"]::placeholder { color: var(--mist); }
.signup input[type="email"]:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.form-status { min-height: 1.6em; margin-top: 16px; color: var(--gold); }
.hp { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; color: var(--mist); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--mist); }
.site-footer a:hover { color: var(--cream); }

/* Article pages (privacy) */
.article { max-width: 760px; padding-block: 64px var(--section); }
.article h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }
.article h2 { font-size: 1.5rem; margin-top: 40px; }
.article p, .article li { color: var(--cream); }
.article .muted { color: var(--mist); }
.article table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.article th, .article td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { color: var(--mist); font-size: 0.9rem; }

/* Tablet */
@media (max-width: 960px) {
  :root { --section: 80px; }
  .hero .wrap, .tracking { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .watch { width: min(100%, 300px); }
  .features { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .site-header .btn { margin-left: auto; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --section: 64px; }
  .wrap { width: min(var(--max), 100% - 32px); }
  .contrast, .steps, .features, .pricing, .privacy-band { grid-template-columns: 1fr; }
  .privacy-band .moon { width: 56px; height: 56px; }
  .hero { padding-top: 40px; }
  .watch { width: min(100%, 260px); }
  .watch-table th:last-child, .watch-table td:last-child { display: none; }
  .signup .btn { width: min(360px, 100%); }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
