:root {
  --bg: #0B0B0F;
  --surface: #151519;
  --surface-raised: #1C1C22;
  --border: #26262E;
  --text-primary: #F3F3F5;
  --text-secondary: #9A9AA4;
  --text-tertiary: #65656F;
  --accent: #ED507E;
  --accent-soft: #3A1B24;
  --success: #3FC98A;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-w: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 18px 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 11, 15, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 11, 15, 0.86);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text-primary); }

@media (max-width: 720px) {
  .nav-links { gap: 16px; font-size: 13px; }
  .nav-links a:first-child { display: none; }
}

@media (max-width: 520px) {
  .nav-links { gap: 12px; }
  .nav-links a:nth-child(2) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 140px 24px 80px;
}

.hero-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, 140vw);
  height: min(760px, 140vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-mark {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 8px 30px rgba(237, 80, 126, 0.35));
}

.hero-title {
  font-size: clamp(40px, 8vw, 76px);
  font-weight: 800;
  letter-spacing: -2px;
  margin: 0;
  line-height: 1.02;
  color: var(--text-primary);
}

.by-line {
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.by-line span.glitch {
  position: relative;
  display: inline-block;
  color: var(--text-secondary);
}

.by-line span.glitch.glitching::before,
.by-line span.glitch.glitching::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
}

.by-line span.glitch.glitching::before {
  clip-path: inset(0 0 60% 0);
  transform: translate(-2px, -1px);
  color: var(--accent);
  opacity: 0.8;
}

.by-line span.glitch.glitching::after {
  clip-path: inset(60% 0 0 0);
  transform: translate(2px, 1px);
  color: #7ad0ff;
  opacity: 0.6;
}

.hero-tagline {
  max-width: 560px;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover { background: #f16e91; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--text-tertiary); }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  opacity: 0.7;
  z-index: 1;
}

/* ---------- Scrollytelling narrative ---------- */
.narrative {
  position: relative;
}

.story-track {
  position: relative;
}

.story-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-stage-inner {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
}

.story-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.story-step.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .story-visual { order: -1; }
}

.story-eyebrow {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 12px;
}

.story-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.story-body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  max-width: 440px;
}

@media (max-width: 860px) {
  .story-body { margin-inline: auto; }
}

.story-visual {
  position: relative;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-card {
  width: 100%;
  max-width: 340px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 26px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mock-row:last-child { border-bottom: none; }

.mock-dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.mock-text-line {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-raised);
}

.progress-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 30;
}

.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s ease, height 0.3s ease;
}

.progress-dot.active {
  background: var(--accent);
  height: 22px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .progress-rail { display: none; }
}

/* ---------- Generic scroll reveal (reused across every section) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Feature belt (non-pinned, still scroll-revealed) ---------- */
.belt {
  padding: 140px 24px 40px;
  position: relative;
}

.belt-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 64px;
}

.belt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.belt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.3s ease;
}

.belt-card.visible:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1);
}

.belt-card h3 {
  font-size: 17px;
  margin: 14px 0 8px;
  color: var(--text-primary);
}

.belt-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.belt-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 120px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 640px;
  height: 640px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(237, 80, 126, 0.22) 0%, rgba(237, 80, 126, 0) 70%);
  pointer-events: none;
  z-index: 0;
  animation: ctaPulse 7s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -1px;
  margin: 0 0 18px;
}

.cta-band p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px 60px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- Legal pages ---------- */
.legal-page {
  padding: 120px 24px 100px;
  max-width: 760px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -1px;
  margin: 0 0 8px;
}

.legal-lead {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 48px;
}

.legal-section {
  margin-bottom: 34px;
}

.legal-section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-tertiary);
  font-weight: 700;
  margin: 0 0 10px;
}

.legal-section p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 0;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 40px;
}

.legal-back:hover { color: var(--text-primary); }

/* ---------- Download page ---------- */
.dl-hero {
  padding: 150px 24px 20px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.dl-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -1px;
  margin: 0 0 14px;
}

.dl-hero p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 780px;
  margin: 64px auto 140px;
  padding: 0 24px;
}

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.3s ease;
}

.dl-card.visible:hover {
  border-color: var(--accent);
}

.dl-platform {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 700;
}

.dl-badge-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.88;
}

.dl-badge-btn:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.dl-badge-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.dl-badge-btn img,
.dl-badge-btn svg {
  height: 54px;
  width: auto;
  display: block;
}

.dl-status {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
}

.dl-note {
  font-size: 14px;
  color: var(--text-secondary);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
  margin-top: 0;
}

.dl-note.open {
  max-height: 60px;
  opacity: 1;
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story-step, .belt-card, .reveal, .dl-card, .cta-glow { transition: none; animation: none; }
}
