/* Stepwave — landing + legal pages. Dependency-free, palette pulled from the app
   (OnboardingDesign / StopwatchDesign): near-black bg, warm off-white text, lime accent. */

:root {
  --bg:      #08090b;
  --panel:   #131519;
  --panel-2: #1a1c22;
  --border:  #20222a;
  --text:    #f4f1ea;
  --muted:   #8e929c;
  --dim:     #5a5e68;
  --accent:  #b8f23b;
  --accent-soft: rgba(184, 242, 59, 0.12);
  --red:     #ff5a4d;

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;

  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Atmospheric background: a faint lime glow up top + a fixed grain overlay. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(184, 242, 59, 0.10), transparent 60%),
    radial-gradient(800px 500px at 6% 4%, rgba(184, 242, 59, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 9, 11, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent);
  display: grid; place-items: center;
  position: relative; flex: none;
}
.brand .mark::before { /* stopwatch tick */
  content: ""; width: 2px; height: 9px; background: var(--bg); border-radius: 2px;
  position: absolute; transform: translateY(-1px);
}
.brand .mark::after { content: ""; width: 2px; height: 2px; background: var(--bg); border-radius: 50%; position: absolute; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; color: var(--muted); font-weight: 500; }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--accent); border: 1px solid rgba(184,242,59,0.35);
  padding: 8px 14px; border-radius: 9px; text-transform: uppercase; letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 92px 0 64px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s var(--ease) infinite; }
h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 7.5vw, 78px); line-height: 0.98; letter-spacing: -0.03em;
  max-width: 16ch;
}
h1 .hl { color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); max-width: 52ch; margin-top: 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; align-items: center; }
.btn {
  font-weight: 600; font-size: 15px; padding: 14px 24px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 10px; transition: transform 0.18s var(--ease), background 0.2s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--dim); }
.note { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }

/* ---------- Step timeline (the signature visual) ---------- */
.device {
  margin-top: 64px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: 22px;
  padding: 26px; position: relative; overflow: hidden;
}
.device::before { /* faint grid */
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
}
.device-label { position: relative; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.steps { position: relative; display: grid; gap: 10px; }
.step {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.015); border: 1px solid var(--border);
  border-radius: 13px; padding: 15px 18px;
}
.step .idx { font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
.step .name { font-weight: 500; color: var(--muted); }
.step .time { font-family: var(--font-mono); font-weight: 700; font-size: 17px; color: var(--text); }
.step.live { border-color: rgba(184,242,59,0.5); background: var(--accent-soft); }
.step.live .name { color: var(--text); font-weight: 600; }
.step.live .idx { color: var(--accent); }
.step.live .time { color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.step.live .time .rec { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: pulse 1.2s var(--ease) infinite; }

/* ---------- Sections ---------- */
section { padding: 72px 0; position: relative; }
.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.02; letter-spacing: -0.025em; max-width: 18ch; }
.section-lead { color: var(--muted); margin-top: 16px; max-width: 56ch; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 24px; transition: border-color 0.25s, transform 0.25s var(--ease);
}
.card:hover { border-color: var(--dim); transform: translateY(-3px); }
.card .ico { font-family: var(--font-mono); font-size: 13px; color: var(--accent); border: 1px solid rgba(184,242,59,0.3); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 18px; }
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Pricing strip ---------- */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; }
@media (max-width: 560px) { .tiers { grid-template-columns: 1fr; } }
.tier { border: 1px solid var(--border); border-radius: 18px; padding: 30px; background: var(--panel); }
.tier.pro { border-color: rgba(184,242,59,0.4); background: linear-gradient(180deg, var(--accent-soft), var(--panel)); }
.tier .t-name { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; color: var(--muted); }
.tier.pro .t-name { color: var(--accent); }
.tier .t-price { font-family: var(--font-display); font-weight: 800; font-size: 34px; margin: 12px 0 4px; }
.tier .t-sub { color: var(--dim); font-size: 13px; font-family: var(--font-mono); }
.tier ul { list-style: none; margin-top: 20px; display: grid; gap: 11px; }
.tier li { color: var(--muted); font-size: 15px; padding-left: 24px; position: relative; }
.tier li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--font-mono); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 54px 0 70px; margin-top: 40px; position: relative; z-index: 2; }
.foot { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; color: var(--muted); }
.foot-links a { transition: color 0.2s; }
.foot-links a:hover { color: var(--accent); }
.foot-meta { font-family: var(--font-mono); font-size: 12px; color: var(--dim); line-height: 1.8; }

/* ---------- Doc pages (privacy / terms / support) ---------- */
.doc { padding: 64px 0 30px; max-width: 760px; }
.doc .back { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.doc .back:hover { color: var(--accent); }
.doc h1 { font-size: clamp(34px, 6vw, 52px); margin: 26px 0 10px; max-width: none; }
.doc .updated { font-family: var(--font-mono); font-size: 13px; color: var(--dim); margin-bottom: 40px; }
.doc h2 { font-size: 23px; margin: 38px 0 12px; max-width: none; }
.doc h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 24px 0 8px; }
.doc p, .doc li { color: #cfd0d4; font-size: 16px; }
.doc p { margin-bottom: 14px; }
.doc ul, .doc ol { margin: 0 0 16px 22px; display: grid; gap: 8px; }
.doc a.inline { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc strong { color: var(--text); }
.callout { border: 1px solid rgba(255,90,77,0.35); background: rgba(255,90,77,0.07); border-radius: 14px; padding: 20px 22px; margin: 22px 0; }
.callout strong { color: var(--red); }

/* ---------- Reveal animation ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.78); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; animation: rise 0.7s var(--ease) forwards; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.15s; } .d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; } .d5 { animation-delay: 0.5s; } .d6 { animation-delay: 0.65s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  .eyebrow .dot, .step.live .time .rec { animation: none; }
}
