:root {
  --bg: #0e0821;
  --bg-2: #180f31;
  --panel: #1d1440;
  --panel-line: #352a63;
  --teal: #3be7da;
  --orange: #ff8a3d;
  --gold: #ffc857;
  --text: #f3f0fb;
  --muted: #b3a9d6;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

p { margin: 0 0 1em; color: var(--muted); }

a { color: inherit; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 8, 33, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--teal), var(--orange));
  display: inline-block;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  display: inline-block;
}

.logo-title {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-block;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.main-nav a:hover, .main-nav a:focus-visible { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  background:
    radial-gradient(60% 60% at 78% 15%, rgba(59, 231, 218, 0.16), transparent 60%),
    radial-gradient(55% 55% at 10% 90%, rgba(255, 138, 61, 0.14), transparent 60%),
    var(--bg);
}

.hero-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

#trail-path {
  fill: none;
  stroke: url(#trail-gradient);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 6 14;
  animation: trail-flow 5s linear infinite;
}

@keyframes trail-flow {
  to { stroke-dashoffset: -200; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.eyebrow {
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 1.08rem;
  max-width: 52ch;
}

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: var(--bg-2);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 0 rgba(59, 231, 218, 0);
}

.btn-store:hover, .btn-store:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(59, 231, 218, 0.45);
}

.btn-store span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: 1.05rem;
}

.btn-store small {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(24, 15, 49, 0.7);
}

/* Store row and disabled state */
.store-row { display: inline-flex; gap: 12px; align-items: center; }
.btn-store[aria-disabled="true"] { opacity: 0.72; pointer-events: none; }

.hero-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Stats strip */

.stats-strip {
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
  background: var(--bg-2);
}

.stats-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 26px 24px;
}

.stats-strip-inner div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  border-left: 1px solid var(--panel-line);
}

.stats-strip-inner div:first-child { border-left: none; }

.stats-strip-inner strong {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.3rem;
}

.stats-strip-inner span {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Features */

.features {
  padding: 96px 0;
}

.section-head {
  max-width: 560px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-card--info .feature-icon { background: rgba(59, 231, 218, 0.12); color: var(--teal); }
.feature-card--warn .feature-icon { background: rgba(255, 138, 61, 0.14); color: var(--orange); }
.feature-card--stat .feature-icon { background: rgba(255, 200, 87, 0.14); color: var(--gold); }
.feature-card--gear .feature-icon { background: rgba(179, 169, 214, 0.14); color: var(--muted); }

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.92rem;
  margin: 0;
}

/* How it works */

.how {
  padding: 40px 0 100px;
}

.how-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.how-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  max-width: 20ch;
}

.how-visual {
  position: relative;
  height: 220px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.how-glow-line {
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--orange), var(--gold));
  transform: translateY(-50%) rotate(-4deg);
  box-shadow: 0 0 20px rgba(255, 138, 61, 0.5);
}

.how-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

.how-pin--info { top: 34%; left: 30%; background: var(--teal); color: var(--bg-2); }
.how-pin--warn { top: 60%; left: 66%; background: var(--orange); color: var(--bg-2); }

/* CTA band */

.cta-band {
  padding: 90px 0;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-top: 1px solid var(--panel-line);
}

.cta-band-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.cta-band-inner h2 {
  max-width: 22ch;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--panel-line);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner a {
  text-decoration: none;
  color: var(--muted);
}

.footer-inner a:hover { color: var(--text); }

/* Legal page reuse */

.legal-main {
  padding: 64px 0 100px;
}

.legal-main .wrap {
  max-width: 760px;
}

.legal-main h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.legal-main h2 {
  font-size: 1.25rem;
  margin-top: 2em;
}

.legal-main p, .legal-main li {
  color: var(--muted);
}

.legal-updated {
  color: var(--teal);
  font-size: 0.9rem;
  margin-bottom: 2em;
}

/* Responsive */

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .how-inner { grid-template-columns: 1fr; }
  .stats-strip-inner { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .stats-strip-inner div:nth-child(3) { border-left: none; }
}

@media (max-width: 640px) {
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--panel-line);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
}
