/* Stillwatch site. Same tokens as the app (lib/ui/theme.dart): night ground,
   amber "armed", teal "listening", alarm red. Dark first, softer light theme. */

:root {
  --ground: #0E1420;
  --raised: #172033;
  --line: #26324A;
  --line-strong: #33415E;
  --ink: #E8ECF4;
  --soft: #C3CBDA;
  --muted: #9AA6BC;
  --amber: #F2B33D;
  --on-amber: #0E1420;
  --teal: #3CC6B0;
  --alarm: #B3260E;
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --text: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #F4F2EC;
    --raised: #FFFFFF;
    --line: #DAD6CC;
    --line-strong: #C4BFB2;
    --ink: #141A26;
    --soft: #3A4356;
    --muted: #5A6478;
    --teal: #1E7F70;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ground: #F4F2EC; --raised: #FFFFFF; --line: #DAD6CC; --line-strong: #C4BFB2;
  --ink: #141A26; --soft: #3A4356; --muted: #5A6478; --teal: #1E7F70;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 18px/1.55 var(--text);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- Top bar ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand b { font: 800 24px/1 var(--display); font-stretch: 112%; letter-spacing: -0.01em; }
.bar nav { display: flex; gap: 22px; font-size: 16px; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 24px; border-radius: 16px;
  font: 800 18px/1.1 var(--display); text-decoration: none; cursor: pointer; border: 0;
}
.btn.primary { background: var(--amber); color: var(--on-amber); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); font-family: var(--text); font-weight: 600; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 40px; padding: 16px 0 72px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 1fr; gap: 64px; padding: 48px 0 96px; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px;
  background: rgba(242, 179, 61, 0.16); color: var(--amber); font-size: 14px; font-weight: 700;
}
.hero h1 {
  font: 800 clamp(40px, 6.6vw, 72px)/1.02 var(--display); font-stretch: 108%;
  letter-spacing: -0.02em; margin: 18px 0 18px; max-width: 14ch;
}
.hero p.lede { font-size: 20px; color: var(--soft); margin: 0 0 28px; max-width: 34ch; }
.hero .facts { margin-top: 16px; font-size: 15px; color: var(--muted); }

/* ---------- Hero demo: a tiny Stillwatch you can arm and set off ---------- */
.demo { justify-self: center; width: min(340px, 100%); }
.phone {
  background: #05080D; border: 2px solid var(--line); border-radius: 44px; padding: 12px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
}
.screen {
  position: relative; border-radius: 34px; overflow: hidden; aspect-ratio: 9 / 16;
  background: #0E1420; color: #E8ECF4; display: grid; place-items: center; text-align: center;
  transition: background-color 200ms;
}
.screen.ringing { background: var(--alarm); }
.rings { position: relative; width: 78%; aspect-ratio: 1; display: grid; place-items: center; }
.rings i {
  position: absolute; inset: 0; border-radius: 50%; border: 1px solid #26324A;
}
.rings i:nth-child(2) { inset: 8.3%; border-color: #33415E; }
.rings i:nth-child(3) { inset: 16.5%; border-color: #33415E; }
.screen.armed .rings i { border-width: 2px; border-color: rgba(242, 179, 61, .2); }
.screen.armed .rings i:nth-child(2) { border-color: rgba(242, 179, 61, .45); }
.screen.armed .rings i:nth-child(3) { border-color: var(--amber); }
.arm {
  position: relative; width: 58%; aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--amber); color: var(--on-amber); display: grid; place-content: center; gap: 2px;
  font: 800 30px/1 var(--display); font-stretch: 118%;
}
.arm small { font: 600 12px/1.2 var(--text); }
.watching { position: relative; display: grid; gap: 4px; }
.watching b { font: 800 clamp(20px, 6vw, 26px)/1.1 var(--display); color: var(--amber); letter-spacing: .04em; }
.watching span { font-size: 13px; color: #9AA6BC; }
.demo-status { position: absolute; top: 16px; left: 0; right: 0; font: 700 13px/1 var(--text); color: #9AA6BC; }
.pinpad { width: 84%; display: grid; gap: 14px; }
.pinpad h3 { margin: 0; font: 800 30px/1 var(--display); letter-spacing: .06em; color: #fff; }
.pinpad p { margin: 0; font-size: 13px; color: #fff; }
.dots { display: flex; justify-content: center; gap: 10px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; }
.dots i.on { background: #fff; }
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.keys button {
  height: 44px; border: 0; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; font: 700 20px/1 var(--display);
  display: grid; place-items: center;
}
.keys button:active { background: rgba(255, 255, 255, .32); }
.demo-controls { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.demo-controls .btn { min-height: 48px; font-size: 16px; }
.demo-note { margin: 12px 2px 0; text-align: center; font-size: 15px; color: var(--muted); min-height: 1.6em; }
.shake { animation: shake 360ms ease-out infinite; }
@keyframes shake { 20%,60% { transform: translateX(-4px) rotate(-1deg); } 40%,80% { transform: translateX(4px) rotate(1deg); } }
[hidden] { display: none !important; }

/* ---------- Problem band ---------- */
.band { padding: 24px 0 72px; }
.band h2, .section-title { font: 800 clamp(30px, 4.2vw, 44px)/1.08 var(--display); margin: 0 0 28px; letter-spacing: -0.01em; max-width: 22ch; }
.pains { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 820px) { .pains { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pain { background: var(--raised); border: 1px solid var(--line); border-radius: 18px; padding: 22px; color: var(--soft); }
.pain strong { display: block; color: var(--ink); font-size: 19px; margin-bottom: 6px; }

/* ---------- Feature rows ---------- */
.rows { display: grid; gap: 80px; padding: 24px 0 88px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
@media (min-width: 820px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .row.flip .shot { order: 2; }
}
.row h2 { font: 800 clamp(28px, 4vw, 40px)/1.08 var(--display); margin: 0 0 14px; letter-spacing: -0.01em; }
.row p { margin: 0 0 12px; color: var(--soft); max-width: 42ch; }
.row .detail { color: var(--teal); font-weight: 700; }
.shot {
  margin: 0; justify-self: center; width: min(300px, 80vw);
  border-radius: 34px; padding: 10px; background: #05080D; border: 2px solid var(--line);
}
.shot img { border-radius: 25px; }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; counter-reset: s; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: s; background: var(--raised); border: 1px solid var(--line); border-radius: 18px; padding: 22px; color: var(--soft); }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--amber); color: var(--on-amber); font: 800 18px/1 var(--display); margin-bottom: 12px;
}
.steps b { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- Video (click to load) ---------- */
.video-wrap { display: grid; gap: 32px; align-items: center; padding: 88px 0; }
@media (min-width: 820px) { .video-wrap { grid-template-columns: minmax(0, 1fr) auto; } }
.video {
  position: relative; width: min(340px, 86vw); aspect-ratio: 9 / 16; justify-self: center;
  border-radius: 28px; overflow: hidden; background: #05080D; border: 2px solid var(--line);
}
.video button {
  position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: transparent;
  display: grid; place-items: center; color: #fff;
}
.video button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.video button span {
  position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: var(--amber); color: var(--on-amber);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-wrap p { color: var(--soft); max-width: 40ch; }

/* ---------- FAQ ---------- */
.faq { padding: 0 0 88px; max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 19px; }
.faq p { color: var(--soft); margin: 10px 0 0; }

/* ---------- Closing band ---------- */
.closing {
  background: var(--raised); border: 1px solid var(--line); border-radius: 30px;
  padding: clamp(28px, 6vw, 60px); display: grid; gap: 24px; align-items: center; margin-bottom: 72px;
}
@media (min-width: 820px) { .closing { grid-template-columns: 1.3fr auto; } }
.closing h2 { font: 800 clamp(28px, 4vw, 40px)/1.08 var(--display); margin: 0 0 10px; }
.closing p { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- Long-form pages (privacy) ---------- */
.doc { max-width: 44rem; padding: 24px 0 80px; }
.doc h1 { font: 800 clamp(38px, 6vw, 56px)/1.02 var(--display); margin: 12px 0 10px; letter-spacing: -0.015em; }
.doc .meta { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font: 800 24px/1.2 var(--display); margin: 40px 0 8px; }
.doc p, .doc li { max-width: 68ch; color: var(--soft); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 4px 0; }
.doc strong { color: var(--ink); }
.doc .contact { background: var(--raised); border-left: 4px solid var(--amber); border-radius: 10px; padding: 14px 18px; }

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