/* ============================================================
   STEP ZERO — marketing site
   dark theme · Quicksand · scroll-driven journey
   ============================================================ */

:root {
  --bg: #060a14;
  --bg-2: #0a1020;
  --bg-3: #0e1628;
  --ink: #eef2fa;
  --muted: #9aa7bf;
  --faint: #5c6a85;
  --accent: #6fe3d2;
  --accent-warm: #f4b183;
  --hairline: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.03);
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Quicksand", ui-rounded, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(111, 227, 210, 0.25); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1d2942; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3a5e; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- typography ---------- */

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; text-wrap: balance; }

h1 { font-size: clamp(2.6rem, 6.4vw, 4.9rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.22rem; line-height: 1.35; }

h1 em { font-style: italic; font-weight: 300; color: var(--accent); }

.accent { color: var(--accent); }
.accent-warm { color: var(--accent-warm); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.lede, .body-lg {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 400;
}

.body-lg { margin-top: 1.4rem; }
.max-ch { max-width: 56ch; }
.footnote { color: var(--faint); font-size: 0.8rem; margin-top: 1.2rem; }

/* ---------- layout helpers ---------- */

.container { width: min(1160px, calc(100% - 3rem)); margin-inline: auto; }
.container.narrow { max-width: 780px; }
.container.center { text-align: center; }

.section { padding: clamp(6rem, 12vh, 9rem) 0; position: relative; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              background 0.35s var(--ease), border-color 0.35s var(--ease);
  will-change: transform;
}

.btn.primary {
  background: linear-gradient(135deg, #79ead9, #4fbfae);
  color: #04241f;
  box-shadow: 0 6px 24px -8px rgba(111, 227, 210, 0.45);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(111, 227, 210, 0.55); }

.btn.ghost {
  border-color: var(--hairline);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn.ghost:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }

.btn.small { padding: 0.55rem 1.2rem; font-size: 0.85rem; }
.btn.lg { padding: 1rem 2.2rem; font-size: 1.02rem; }

.actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2.4rem; }
.actions.center { justify-content: center; }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }

.brand-mark { width: 44px; height: 28px; overflow: visible; }
.mark-dot { fill: var(--accent); }
.mark-steps { stroke: var(--ink); }

.brand:hover .mark-dot { animation: dot-hop 0.9s var(--ease); }
@keyframes dot-hop {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-90px); }
  60% { transform: translateY(12px); }
  80% { transform: translateY(-20px); }
}

.brand-word { font-weight: 600; font-size: 1.12rem; letter-spacing: 0.04em; }

.nav-links { display: flex; gap: 2rem; margin-left: auto; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: right 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.nav-cta { flex-shrink: 0; }

.nav-burger {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  z-index: 120;
}
.nav-burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(6, 10, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.mobile-menu a {
  font-size: 1.8rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease), color 0.3s;
}
.mobile-menu a:hover { color: var(--accent); }
body.menu-open .mobile-menu a { opacity: 1; transform: none; }
body.menu-open .mobile-menu a:nth-child(1) { transition-delay: 0.08s; }
body.menu-open .mobile-menu a:nth-child(2) { transition-delay: 0.14s; }
body.menu-open .mobile-menu a:nth-child(3) { transition-delay: 0.2s; }
body.menu-open .mobile-menu a:nth-child(4) { transition-delay: 0.26s; }
.mobile-menu-foot {
  position: absolute;
  bottom: 2.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- hero overlay (lives inside the pinned journey) ---------- */

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 1rem) 1.5rem 24vh;
  will-change: opacity, transform;
}

/* soft scrim so the headline reads over the bright city scene; it fades
   out with the overlay since it's part of the same element */
.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 95% 72% at 50% 44%,
              rgba(4, 7, 15, 0.82),
              rgba(4, 7, 15, 0.42) 55%,
              transparent 80%);
}

.hero-overlay h1 {
  text-shadow: 0 2px 10px rgba(3, 5, 11, 0.95), 0 4px 44px rgba(3, 5, 11, 0.85);
}

.hero-overlay .eyebrow { text-shadow: 0 1px 8px rgba(3, 5, 11, 0.95); }

.hero-overlay .lede {
  max-width: 52ch;
  margin-top: 1.6rem;
  color: #b6c1d6;
  text-shadow: 0 1px 6px rgba(3, 5, 11, 0.95), 0 2px 20px rgba(3, 5, 11, 0.9);
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: var(--faint);
}
.scroll-cue-text { font-size: 0.68rem; letter-spacing: 0.4em; text-transform: uppercase; }
.scroll-cue-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  position: relative;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(0); }
  60%, 100% { transform: translateY(105%); }
}

/* ---------- journey ---------- */

.journey { height: 780vh; position: relative; }

.journey-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(3, 5, 11, 0.55) 100%),
    linear-gradient(to bottom, rgba(6, 10, 20, 0.6), transparent 18%, transparent 88%, rgba(6, 10, 20, 0.7));
}

.captions { position: absolute; inset: 0; pointer-events: none; }

.caption {
  position: absolute;
  bottom: clamp(6rem, 16vh, 9.5rem);
  max-width: min(30rem, 78vw);
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
}
.caption.side-left { left: clamp(1.5rem, 7vw, 7rem); }
.caption.side-right { right: clamp(1.5rem, 7vw, 7rem); text-align: right; }

.caption .chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(111, 227, 210, 0.08);
  border: 1px solid rgba(111, 227, 210, 0.22);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  margin-bottom: 1.1rem;
  backdrop-filter: blur(6px);
}

.caption blockquote {
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 500;
  line-height: 1.45;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(3, 5, 11, 0.9), 0 0 60px rgba(3, 5, 11, 0.6);
}

.rail {
  position: absolute;
  right: clamp(1rem, 2.6vw, 2.4rem);
  top: 50%;
  transform: translateY(-50%);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.rail li { display: flex; align-items: center; gap: 0.8rem; flex-direction: row-reverse; }
.rail i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.4s ease, transform 0.4s var(--ease), box-shadow 0.4s ease;
}
.rail em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease);
  white-space: nowrap;
}
.rail li.active i {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 12px rgba(111, 227, 210, 0.7);
}
.rail li.active em { opacity: 1; transform: none; }

/* ---------- about / stats ---------- */

.about { background: linear-gradient(to bottom, var(--bg), var(--bg-2) 55%, var(--bg)); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 4rem;
}
.stat {
  background: var(--bg-2);
  padding: 2.4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.stat-num {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-label { color: var(--muted); font-size: 0.92rem; max-width: 26ch; }

/* ---------- products ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 3.6rem;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 2.2rem 2rem 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.45s var(--ease), border-color 0.45s ease, background 0.45s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              rgba(111, 227, 210, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: rgba(111, 227, 210, 0.28); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(111, 227, 210, 0.08);
  border: 1px solid rgba(111, 227, 210, 0.18);
  margin-bottom: 0.4rem;
}
.card-icon svg { width: 28px; height: 28px; }

.card p { color: var(--muted); font-size: 0.95rem; flex: 1; }

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.3s;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- cta ---------- */

.cta {
  background:
    radial-gradient(60% 90% at 50% 110%, rgba(111, 227, 210, 0.08), transparent 70%),
    linear-gradient(to bottom, var(--bg), var(--bg-2));
  border-top: 1px solid var(--hairline);
}

.cta-mark {
  width: 110px;
  margin-bottom: 2rem;
  overflow: visible;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  background: #04070f;
  padding: 4.5rem 0 2.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-brand p { color: var(--faint); font-size: 0.9rem; margin-top: 1.2rem; }

.footer-col { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.5rem;
}
.footer-col a { color: var(--muted); font-size: 0.92rem; transition: color 0.3s; width: fit-content; }
.footer-col a:hover { color: var(--accent); }

.socials { display: flex; gap: 0.8rem; margin-top: 0.6rem; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.socials a:hover { color: var(--accent); border-color: rgba(111, 227, 210, 0.4); transform: translateY(-2px); }
.socials svg { width: 16px; height: 16px; }

.footer-fine {
  border-top: 1px solid var(--hairline);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.8rem;
}
.footer-tag { letter-spacing: 0.08em; }

/* ---------- reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease);
}
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .orb, .hero-watermark, .scroll-cue-line::after { animation: none !important; }
}

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }

  .rail { display: none; }

  .caption,
  .caption.side-left,
  .caption.side-right {
    left: 1.4rem;
    right: 1.4rem;
    text-align: left;
    max-width: none;
    bottom: clamp(4rem, 12vh, 7rem);
  }
}

@media (max-width: 520px) {
  .hero-overlay { padding-bottom: 20vh; }
  .hero-overlay .actions .btn { width: auto; }
  .brand-word { font-size: 1rem; }
}
