:root {
  --night: #07081a;
  --deep: #0d1030;
  --panel: rgba(21, 24, 58, 0.62);
  --line: rgba(142, 166, 255, 0.18);
  --ink: #f2f3ff;
  --text: #c9cdf2;
  --muted: #8e93c4;
  --indigo: #3f46c8;
  --peri: #8ea6ff;
  --violet: #d98bff;
  --mint: #7ff0c8;
  --font-display: "Montserrat", "Instrument Sans", system-ui, sans-serif;
  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--peri); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(142, 166, 255, 0.35); color: #fff; }

/* Ambient layers */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: 2; width: 34rem; height: 34rem; pointer-events: none;
  border-radius: 50%; opacity: 0; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(142, 166, 255, 0.16), rgba(217, 139, 255, 0.07) 40%, transparent 70%);
  transition: opacity 0.4s;
  translate: var(--cx, -100vw) var(--cy, -100vh);
}
@media (hover: hover) and (pointer: fine) { body.has-pointer .cursor-glow { opacity: 1; } }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(0.9rem, env(safe-area-inset-top)) var(--gutter) 0.9rem;
  background: linear-gradient(to bottom, rgba(7, 8, 26, 0.75), rgba(7, 8, 26, 0));
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.topbar.scrolled {
  background: rgba(7, 8, 26, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.01em; }
.brand svg { width: 2.1rem; height: 2.1rem; filter: drop-shadow(0 0 18px rgba(63, 70, 200, 0.7)); }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(13, 16, 48, 0.6); backdrop-filter: blur(10px);
  color: var(--ink); font-size: 0.875rem; font-weight: 500;
}
.status-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(127, 240, 200, 0.6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(127, 240, 200, 0.55); } 80%, 100% { box-shadow: 0 0 0 0.6rem rgba(127, 240, 200, 0); } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: 7rem var(--gutter) clamp(4rem, 10vh, 7rem); isolation: isolate; overflow: hidden; }
.hero-canvas, .hero-fallback, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-canvas { z-index: -3; display: block; }
.hero-fallback {
  z-index: -4;
  background:
    radial-gradient(60% 50% at 70% 35%, rgba(63, 70, 200, 0.55), transparent 70%),
    radial-gradient(40% 40% at 85% 70%, rgba(217, 139, 255, 0.3), transparent 70%),
    linear-gradient(180deg, #0b0d2a, var(--night));
}
.hero-fallback { transition: opacity 1.2s; }
.hero-fallback.is-hidden { opacity: 0; }
.hero-shade { z-index: -2; background: linear-gradient(90deg, rgba(7, 8, 26, 0.88) 0%, rgba(7, 8, 26, 0.45) 45%, rgba(7, 8, 26, 0) 70%), linear-gradient(0deg, var(--night) 0%, rgba(7, 8, 26, 0) 35%); pointer-events: none; }
.hero-copy { max-width: min(46rem, 100%); position: relative; }
.hero-kicker { color: var(--peri); font-weight: 600; font-size: clamp(0.9rem, 0.85rem + 0.3vw, 1.05rem); margin-bottom: 1.1rem; }
.hero-title {
  font-size: clamp(2.7rem, 1.4rem + 6vw, 6.8rem); line-height: 0.98; font-weight: 800;
  letter-spacing: -0.045em; margin-bottom: 1.6rem; perspective: 900px; color: var(--ink);
  text-shadow: 0 0 60px rgba(63, 70, 200, 0.45);
}
.hero-title .word { display: inline-block; white-space: nowrap; }
.hero-title .char {
  display: inline-block; transform-origin: 50% 100%;
  animation:
    char-in 1s cubic-bezier(0.2, 0.9, 0.25, 1.15) both calc(0.25s + var(--i) * 0.035s),
    char-glow 7s ease-in-out infinite calc(2.2s + var(--i) * 0.045s);
}
@keyframes char-in { from { opacity: 0; transform: translateY(0.7em) rotateX(-85deg); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes char-glow {
  0%, 9%, 100% { color: var(--ink); text-shadow: 0 0 60px rgba(63, 70, 200, 0.45); }
  4% { color: #d6deff; text-shadow: 0 0 18px rgba(142, 166, 255, 0.95), 0 0 46px rgba(217, 139, 255, 0.6); }
}
.hero-sub { max-width: 36rem; font-size: clamp(1.05rem, 1rem + 0.45vw, 1.3rem); color: var(--text); margin-bottom: 2rem; animation: fade-up 1s 1.1s both; }
.hero-kicker { animation: fade-up 1s 0.1s both; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.1rem; animation: fade-up 1s 1.35s both; }
.launch-chip {
  position: relative; display: inline-flex; align-items: center; padding: 0.8rem 1.35rem; border-radius: 999px;
  font-weight: 600; color: #fff; background: linear-gradient(120deg, var(--indigo), #6a4fe0 55%, #b05fe8);
  box-shadow: 0 10px 40px -8px rgba(99, 83, 240, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25); overflow: hidden;
}
.launch-chip::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  animation: chip-shine 3.6s 2s ease-in-out infinite;
}
@keyframes chip-shine { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
.hero-meta-note { color: var(--muted); font-size: 0.95rem; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.scroll-cue {
  position: absolute; right: var(--gutter); bottom: clamp(1.5rem, 5vh, 3rem); display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: var(--muted); font-size: 0.8rem; text-decoration: none; animation: fade-up 1s 1.8s both;
}
.scroll-line { width: 1px; height: 3.5rem; background: linear-gradient(var(--peri), transparent); position: relative; overflow: hidden; }
.scroll-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: #fff; animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { to { top: 110%; } }

/* Marquee */
.marquee { position: relative; z-index: 3; border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(63, 70, 200, 0.18), rgba(217, 139, 255, 0.12)); overflow: hidden; padding: 1.1rem 0; transform: rotate(-1.4deg) scale(1.03); }
.marquee-track { display: flex; gap: 1.6rem; width: max-content; animation: marquee 26s linear infinite; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 1.2rem + 3vw, 3.6rem); line-height: 1; color: var(--ink); white-space: nowrap; }
.marquee-track i { font-style: normal; color: var(--peri); }
.marquee-track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1.4px rgba(201, 205, 242, 0.75); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Vectors */
.vectors { position: relative; z-index: 3; max-width: var(--max); margin: 0 auto; padding: clamp(5rem, 12vw, 9rem) var(--gutter) clamp(3rem, 8vw, 6rem); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: end; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head h2 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.2rem); line-height: 1; font-weight: 800; letter-spacing: -0.04em; }
.section-head p { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); max-width: 30rem; }

.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem; min-height: 22rem;
  padding: clamp(1.4rem, 2.5vw, 2rem); border-radius: 26px; border: 1px solid var(--line);
  background: radial-gradient(28rem circle at var(--mx) var(--my), rgba(142, 166, 255, 0.14), transparent 45%), var(--panel);
  overflow: hidden; transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out, border-color 0.3s; will-change: transform;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(22rem circle at var(--mx) var(--my), rgba(217, 139, 255, 0.8), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card h3 { font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.8rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.7rem; }
.card p { color: var(--text); max-width: 32rem; }
.card-deal { grid-column: span 4; }
.card-texts { grid-column: span 2; }
.card-calls { grid-column: span 2; }
.card-route { grid-column: span 2; }
.card-buyers { grid-column: span 2; }

.demo { position: relative; border-radius: 18px; background: rgba(7, 8, 26, 0.55); border: 1px solid rgba(142, 166, 255, 0.12); padding: 1rem; }

.demo-deal { display: grid; gap: 0.9rem; }
.deal-address { font-weight: 600; color: var(--ink); transition: opacity 0.3s; }
.deal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.deal-grid span { display: block; color: var(--muted); font-size: 0.85rem; }
.deal-grid strong { font-family: var(--font-display); font-size: clamp(1.4rem, 1rem + 1.8vw, 2.6rem); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.deal-grid div:last-child strong { color: var(--mint); text-shadow: 0 0 24px rgba(127, 240, 200, 0.35); }
.deal-bar { height: 0.5rem; border-radius: 999px; background: rgba(142, 166, 255, 0.12); overflow: hidden; }
.deal-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--indigo), var(--peri), var(--mint)); transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.deal-verdict { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.verdict-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }

.demo-texts { display: grid; gap: 0.8rem; min-height: 9.5rem; align-content: start; }
.bubble {
  justify-self: end; max-width: 92%; padding: 0.7rem 0.95rem; border-radius: 18px 18px 6px 18px;
  background: linear-gradient(135deg, #4a50d6, #6b4fe0); color: #fff; font-size: 0.95rem; line-height: 1.4;
  box-shadow: 0 10px 30px -10px rgba(99, 83, 240, 0.8); transition: opacity 0.35s, transform 0.35s;
}
.bubble.swap { opacity: 0; transform: translateY(8px) scale(0.98); }
.guard {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: #ffd3a6;
  padding: 0.5rem 0.75rem; border-radius: 12px; background: rgba(255, 138, 76, 0.12); border: 1px solid rgba(255, 138, 76, 0.35);
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s;
}
.guard.show { opacity: 1; transform: none; }
.guard-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #ff8a4c; flex: none; }

.demo-calls { display: grid; gap: 1rem; }
.call-pill { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border-radius: 999px; background: linear-gradient(120deg, #d98bff, #b47cff); color: #1b1240; font-weight: 600; font-size: 0.92rem; }
.call-pill strong { margin-left: auto; font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.call-live { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #1b1240; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.wave { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 3rem; padding: 0 0.3rem; }
.wave i { flex: 1; border-radius: 999px; background: linear-gradient(var(--violet), var(--peri)); height: 30%; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: -0.3s; } .wave i:nth-child(3n+1) { animation-delay: -0.6s; } .wave i:nth-child(4n) { animation-duration: 0.8s; }
@keyframes wave { 50% { height: 100%; } }

.demo-route { padding: 0.5rem; }
.demo-route svg { display: block; width: 100%; height: auto; }
.route-grid { stroke: rgba(142, 166, 255, 0.1); stroke-width: 1; fill: none; }
.route-line { fill: none; stroke: var(--peri); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 560; stroke-dashoffset: 560; filter: drop-shadow(0 0 6px rgba(142, 166, 255, 0.8)); }
.card.in .route-line { animation: draw 3.2s 0.3s cubic-bezier(0.6, 0, 0.3, 1) forwards infinite alternate; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.route-stops circle { fill: var(--deep); stroke: var(--violet); stroke-width: 2; }
.route-stops text { fill: var(--ink); font: 700 9px var(--font-ui); text-anchor: middle; }

.demo-buyers { display: grid; gap: 0.75rem; }
.buyer-target { padding: 0.75rem 0.9rem; border-radius: 14px; border: 1px dashed rgba(127, 240, 200, 0.6); color: var(--ink); font-weight: 600; }
.buyer-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.buyer-chips span {
  padding: 0.45rem 0.75rem; border-radius: 999px; font-size: 0.85rem; color: var(--ink);
  background: rgba(142, 166, 255, 0.14); border: 1px solid rgba(142, 166, 255, 0.3);
  opacity: 0; transform: translateY(-14px) scale(0.9);
}
.card.in .buyer-chips span { animation: snap 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) forwards; animation-delay: calc(0.4s + var(--d) * 0.25s); }
@keyframes snap { to { opacity: 1; transform: none; } }

.capabilities { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.capabilities li { padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 0.92rem; background: rgba(13, 16, 48, 0.5); }

/* Statement */
.statement { position: relative; z-index: 3; max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 12vw, 10rem) var(--gutter); }
.statement-text { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 1rem + 3vw, 3.7rem); line-height: 1.12; letter-spacing: -0.035em; color: rgba(201, 205, 242, 0.16); }
.statement-text .w { transition: color 0.35s, text-shadow 0.35s; }
.statement-text .w.on { color: var(--ink); }
.statement-text .w.hot { color: var(--peri); text-shadow: 0 0 30px rgba(142, 166, 255, 0.45); }

/* Finale */
.finale { position: relative; z-index: 3; min-height: 90svh; display: grid; place-items: center; align-content: center; text-align: center; gap: 1.5rem; padding: 6rem var(--gutter); overflow: hidden; }
.finale-orb { position: absolute; width: min(70rem, 160vw); aspect-ratio: 1; border-radius: 50%; z-index: -1; background: conic-gradient(from 0deg, rgba(63, 70, 200, 0.55), rgba(217, 139, 255, 0.45), rgba(127, 240, 200, 0.25), rgba(63, 70, 200, 0.55)); filter: blur(90px); opacity: 0.55; animation: spin 24s linear infinite; will-change: transform; }
@keyframes spin { to { transform: rotate(1turn); } }
.finale-mark { width: clamp(5rem, 12vw, 8rem); color: #fff; filter: drop-shadow(0 0 30px rgba(142, 166, 255, 0.9)); stroke-dasharray: 90; stroke-dashoffset: 90; }
.finale.in .finale-mark { animation: mark-draw 1.6s cubic-bezier(0.6, 0, 0.2, 1) forwards; }
@keyframes mark-draw { to { stroke-dashoffset: 0; } }
.finale-title { font-size: clamp(2.4rem, 1.1rem + 5.8vw, 6.4rem); line-height: 1; font-weight: 800; letter-spacing: -0.045em; max-width: 14ch; }
.finale-sub { color: var(--text); max-width: 32rem; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); }

.footer { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; padding: 2rem var(--gutter) max(2rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.bento .reveal:nth-child(2) { transition-delay: 0.08s; } .bento .reveal:nth-child(3) { transition-delay: 0.16s; }
.bento .reveal:nth-child(4) { transition-delay: 0.24s; } .bento .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal.in.card { transition: opacity 0.9s ease, transform 0.25s ease-out; }

@media (max-width: 960px) {
  .section-head { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-deal { grid-column: span 2; }
  .card-texts, .card-calls, .card-route, .card-buyers { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .card-deal, .card-texts, .card-calls, .card-route, .card-buyers { grid-column: auto; }
  .card { min-height: 0; }
  .hero { align-items: end; padding-top: 6rem; }
  .hero-shade { background: linear-gradient(0deg, var(--night) 8%, rgba(7, 8, 26, 0.55) 55%, rgba(7, 8, 26, 0.2) 100%); }
  .scroll-cue { display: none; }
  .status-pill { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
  .deal-grid { grid-template-columns: 1fr 1fr; }
  .deal-grid div:last-child { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .route-line { stroke-dashoffset: 0; }
  .buyer-chips span { opacity: 1; transform: none; }
  .finale-mark { stroke-dashoffset: 0; }
}
