/* WINTUDE landing page (2026-10-01). Light theme, same palette as the app (ui.css), with a cinematic layer:
   an aurora of brand colours, flowing price lines, scroll-driven storytelling. Animations: landing.js (GSAP). */

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/dashboard/fonts/instrument-serif-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/dashboard/fonts/instrument-serif-400-normal.woff2') format('woff2');
}

:root {
  --bg: #fbfcfe; --bg-2: #f4f6fb; --panel: #ffffff; --panel-2: #fafbfd;
  --line: rgba(14, 17, 22, .08); --line-2: rgba(14, 17, 22, .13);
  --fg: #0b0f19; --fg-2: #4a5160; --fg-3: #8a91a0;
  --brand: #2456e6; --brand-2: #1c45bd; --violet: #6d4aff; --cyan: #0ea5e9; --green: #10b981; --amber: #f59e0b;
  --pos: #0b9b63; --neg: #e0413f;
  --grad: linear-gradient(100deg, #2456e6 0%, #6d4aff 42%, #0ea5e9 74%, #10b981 100%);
  --grad-soft: linear-gradient(135deg, rgba(36,86,230,.10), rgba(109,74,255,.08) 50%, rgba(16,185,129,.08));
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-2: 0 18px 40px -14px rgba(16, 24, 40, .20), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-3: 0 50px 100px -30px rgba(36, 86, 230, .30), 0 30px 60px -30px rgba(16, 24, 40, .25);
  --r: 22px;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: Geist, -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
em { font-style: normal; }
.serif, h1 em, h2 em, h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.grad-text, h1 em .w, h2 em .w { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; }
h1 em:not(:has(.w)), h2 em:not(:has(.w)) { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: rgba(36, 86, 230, .18); }

/* ------------------------------------------------------------------ scroll progress + header */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

.top { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; border-bottom: 1px solid transparent; }
.top.scrolled { background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom-color: var(--line); box-shadow: 0 8px 30px -18px rgba(16, 24, 40, .25); }
.nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand img { width: 132px; height: auto; }
.links { display: flex; gap: 26px; margin-left: 10px; font-size: 14.5px; color: var(--fg-2); font-weight: 500; }
.links a { position: relative; padding: 6px 0; transition: color .2s; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.links a:hover { color: var(--fg); }
.links a:hover::after { transform: scaleX(1); }
.nav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ------------------------------------------------------------------ buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px;
  padding: 10px 18px; font: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.7); color: var(--fg); cursor: pointer; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, border-color .25s; will-change: transform; }
.btn:hover { background: #fff; border-color: rgba(14,17,22,.2); box-shadow: var(--shadow-1); }
.btn-primary { color: #fff; border: 0; background: linear-gradient(135deg, #2456e6, #5b3df0 60%, #6d4aff);
  box-shadow: 0 10px 24px -10px rgba(36, 86, 230, .65), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { background: linear-gradient(135deg, #1f4ed6, #5233e8 60%, #6440ff); border: 0;
  box-shadow: 0 16px 34px -12px rgba(36, 86, 230, .75), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-primary::before { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); transition: left .7s var(--ease); }
.btn-primary:hover::before { left: 120%; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(14,17,22,.04); box-shadow: none; border-color: transparent; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; min-height: 100svh; padding: 150px 0 0; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.aurora { position: absolute; inset: -20% 0 0; filter: blur(70px) saturate(1.2); opacity: .9; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: multiply; }
.aurora .a1 { width: 52vw; height: 52vw; left: -6vw; top: -10vw; background: radial-gradient(circle, rgba(36,86,230,.30), transparent 62%); animation: drift1 22s ease-in-out infinite alternate; }
.aurora .a2 { width: 46vw; height: 46vw; right: -8vw; top: -6vw; background: radial-gradient(circle, rgba(109,74,255,.26), transparent 62%); animation: drift2 26s ease-in-out infinite alternate; }
.aurora .a3 { width: 40vw; height: 40vw; left: 30vw; top: 22vw; background: radial-gradient(circle, rgba(14,165,233,.22), transparent 62%); animation: drift3 30s ease-in-out infinite alternate; }
.aurora .a4 { width: 34vw; height: 34vw; right: 8vw; top: 30vw; background: radial-gradient(circle, rgba(16,185,129,.18), transparent 62%); animation: drift1 34s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(8vw, 6vw) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-7vw, 8vw) scale(1.08); } }
@keyframes drift3 { to { transform: translate(-6vw, -5vw) scale(1.15); } }
.grid-lines { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(14,17,22,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(14,17,22,.045) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }
#flow { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .95;
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%); }
.grain { position: absolute; inset: 0; opacity: .05; mix-blend-mode: multiply;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg)); }

.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 550;
  color: var(--fg-2); background: rgba(255,255,255,.72); border: 1px solid var(--line-2); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1); transition: transform .3s var(--ease), box-shadow .3s; }
.pill:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } }
.pill-arrow { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fg); color: #fff; font-size: 13px; }
.hero-title { margin: 26px 0 0; font-size: clamp(46px, 8.6vw, 112px); line-height: .96; letter-spacing: -.045em; font-weight: 640; max-width: 12ch; }
.hero-title em { font-size: 1.04em; letter-spacing: -.02em; padding-right: .06em; }
.hero-sub { margin: 26px auto 0; max-width: 620px; font-size: clamp(16.5px, 1.6vw, 19px); color: var(--fg-2); line-height: 1.6; }
.hero-cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-note { margin: 20px 0 0; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: 13.5px; color: var(--fg-3); }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 15px; height: 15px; stroke: var(--green); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* the product window */
.stage-wrap { margin: 70px auto 0; max-width: 1180px; padding: 0 24px 40px; perspective: 1600px; }
.stage { transform-origin: 50% 0%; transform-style: preserve-3d; will-change: transform; }
.win { border-radius: 20px; background: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow-3), 0 0 0 1px var(--line), inset 0 1px 0 #fff; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--fg-3); }
.win-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #e5e7eb; }
.win-bar > i:nth-child(1) { background: #ff6b6b; } .win-bar > i:nth-child(2) { background: #fbbf24; } .win-bar > i:nth-child(3) { background: #34d399; }
.win-bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; }
.tag { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px; background: #fff; }
.win-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 380px; }
.win-chart { padding: 18px 18px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.agent-row { display: flex; align-items: center; gap: 12px; }
.agent-row img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 16px -6px rgba(109,74,255,.5); }
.agent-row b { display: block; font-size: 15px; letter-spacing: -.01em; }
.agent-row small { color: var(--fg-3); font-size: 12.5px; }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--pos);
  background: rgba(16,185,129,.1); padding: 5px 11px; border-radius: 999px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ping 2s infinite; }
.chart { width: 100%; height: auto; aspect-ratio: 64 / 30; margin-top: 12px; overflow: visible; }
.chart .grid-h { stroke: rgba(14,17,22,.06); }
.chart .band { fill: url(#bandFill); }
.chart .ema { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; }
.chart .ema2 { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-dasharray: 4 5; opacity: .8; }
.chart .up { fill: var(--pos); } .chart .dn { fill: var(--neg); }
.chart .wick { stroke-width: 1.2; }
.chart .mark circle { fill: #fff; stroke-width: 2.5; }
.chart .mark text { font: 600 11px Geist, sans-serif; }
.chart .level { stroke: var(--brand); stroke-dasharray: 6 6; stroke-width: 1.3; }
.chart .level-label { font: 600 10.5px var(--mono); fill: var(--brand); }
.win-feed { padding: 16px; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(250,251,253,.7), rgba(255,255,255,.4)); min-width: 0; }
.feed-h { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); display: flex; justify-content: space-between; }
.feed { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; overflow: hidden; }
.feed li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 11px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-1); font-size: 13px; line-height: 1.45; }
.feed .fi { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.fi.buy { background: rgba(16,185,129,.12); color: var(--pos); } .fi.wait { background: rgba(245,158,11,.14); color: #b45309; }
.fi.read { background: rgba(36,86,230,.10); color: var(--brand); } .fi.safe { background: rgba(109,74,255,.12); color: var(--violet); }
.feed b { font-weight: 600; } .feed small { display: block; color: var(--fg-3); font-family: var(--mono); font-size: 11px; margin-top: 2px; }
.feed-foot { margin-top: 12px; font-size: 12px; color: var(--fg-3); display: flex; align-items: center; gap: 8px; }
.feed-foot b { color: var(--fg); font-family: var(--mono); font-weight: 600; }

/* ------------------------------------------------------------------ markets ticker */
.ticker { padding: 26px 0 10px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-cap { text-align: center; color: var(--fg-3); font-size: 13px; letter-spacing: .02em; margin-bottom: 18px; }
.ticker-row { display: flex; width: max-content; gap: 12px; animation: marquee 48s linear infinite; padding: 5px 0; }
.ticker-row.rev { animation-direction: reverse; animation-duration: 56s; }
.ticker:hover .ticker-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.tk b { font-family: var(--mono); font-size: 13.5px; font-weight: 600; letter-spacing: .01em; }
.tk small { color: var(--fg-3); font-size: 12.5px; }
.tk svg { width: 64px; height: 22px; }
.tk path { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ facts */
.facts { padding: 70px 0 30px; }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 30px 22px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact b { display: block; font-size: clamp(38px, 4.4vw, 56px); line-height: 1; letter-spacing: -.04em; font-weight: 640; }
.fact b em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.fact > span { display: block; margin-top: 10px; color: var(--fg-2); font-size: 14.5px; }

/* ------------------------------------------------------------------ section heads */
section { position: relative; }
.sec { padding: 130px 0; }
.sec-head { max-width: 760px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.kicker::before { content: ""; width: 18px; height: 1.5px; background: var(--grad); }
.sec-head h2, .h2 { margin: 16px 0 0; font-size: clamp(36px, 5.4vw, 68px); line-height: 1; letter-spacing: -.04em; font-weight: 640; }
.sec-head p { margin: 20px 0 0; font-size: clamp(16px, 1.5vw, 18.5px); color: var(--fg-2); }
.sec-head.center p { margin-left: auto; margin-right: auto; max-width: 600px; }

/* ------------------------------------------------------------------ story (pinned on wide screens) */
.story { padding-top: 120px; }
.story-pin { position: relative; margin-top: 50px; }
.story-stage { position: relative; }
.story-progress { display: none; }
.step { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 60px; align-items: center; padding: 40px 0; }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--brand); font-weight: 600; letter-spacing: .06em; }
.step h3 { margin: 12px 0 0; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -.035em; font-weight: 620; }
.step p { margin: 16px 0 0; font-size: 17px; color: var(--fg-2); max-width: 470px; }
.step-visual { position: relative; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2);
  min-height: 360px; padding: 26px; overflow: hidden; }
.step-visual::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .7; pointer-events: none; }
.step-visual > * { position: relative; }
@media (min-width: 1024px) {
  .story.pinned .story-pin { height: 100svh; display: flex; align-items: center; margin-top: 0; }
  .story.pinned .story-stage { height: 560px; width: 100%; }
  .story.pinned .step { position: absolute; inset: 0; padding: 0; }
  .story.pinned .step-visual { height: 520px; }
  .story.pinned .story-progress { display: block; position: absolute; left: 0; bottom: -40px; width: 38%; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
  .story.pinned .story-progress i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
}

/* visual 1: chat */
.v-chat { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.bubble { max-width: 88%; padding: 14px 16px; border-radius: 18px; font-size: 15px; line-height: 1.5; box-shadow: var(--shadow-1); }
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, #2456e6, #5b3df0); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.ai .who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-3); margin-bottom: 6px; }
.bubble.ai .who img { width: 22px; height: 22px; border-radius: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-2); }
.chip.on { background: rgba(36,86,230,.08); color: var(--brand); border-color: rgba(36,86,230,.2); }
.typed::after { content: "▍"; margin-left: 1px; animation: blink 1s steps(1) infinite; opacity: .7; }
@keyframes blink { 50% { opacity: 0; } }

/* visual 2: rules */
.rules { font-family: var(--mono); font-size: 14px; line-height: 1.9; background: #0e1424; color: #dbe4ff; border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 30px 60px -30px rgba(14,20,36,.6); }
.rules .k { color: #8ab4ff; } .rules .v { color: #ffd479; } .rules .c { color: #6b7a99; } .rules .g { color: #7ee2b8; }
.rules .ln { display: block; }
.rules-note { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

/* visual 3: test */
.v-test .eq { width: 100%; height: 230px; }
.v-test .eq path.line { fill: none; stroke: url(#eqStroke); stroke-width: 3; stroke-linecap: round; }
.v-test .eq path.area { fill: url(#eqFill); }
.v-test .eq line { stroke: rgba(14,17,22,.06); }
.test-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.tchip { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 13px; color: var(--fg-2); box-shadow: var(--shadow-1); }
.tchip b { display: block; color: var(--fg); font-size: 14px; margin-bottom: 2px; }

/* visual 4: journal */
.journal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.journal li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-1); font-size: 14px; }
.journal .fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.journal small { color: var(--fg-3); font-family: var(--mono); font-size: 11.5px; }
.paper-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: #b45309; background: rgba(245,158,11,.12);
  border-radius: 999px; padding: 6px 12px; margin-bottom: 14px; }

/* visual 5: live */
.v-live { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow-1); }
.switch { width: 64px; height: 34px; border-radius: 999px; background: #e5e7eb; position: relative; transition: background .4s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .5s var(--ease); }
.switch.on { background: linear-gradient(135deg, var(--green), #0ea5e9); }
.switch.on::after { transform: translateX(30px); }
.confirm { font-family: var(--mono); font-size: 14px; border: 1.5px dashed rgba(224,65,63,.4); color: var(--neg); border-radius: 12px; padding: 12px 14px; background: rgba(224,65,63,.04); }
.rails-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ------------------------------------------------------------------ bento */
.bento { margin-top: 60px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { position: relative; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1);
  min-height: 430px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease); --mx: 50%; --my: 50%; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(36,86,230,.10), transparent 60%); }
.card:hover::after { opacity: 1; }
.card.span-2 { grid-column: span 2; }
.card.c-judge { grid-column: 1 / -1; min-height: 0; }
.c-judge .card-art { min-height: 190px; }
.card-art { position: relative; z-index: 0; contain: paint; flex: 1 1 auto; min-height: 250px; display: flex; align-items: center; justify-content: center; padding: 24px 24px 8px;
  overflow: hidden; border-bottom: 1px solid var(--line); }
.card-art > * { transition: transform .8s var(--ease); }
.card:hover .card-art > *:not(.orbit) { transform: translateY(-4px) scale(1.02); }
.card-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.85)); }
.card-copy { padding: 22px 26px 26px; background: #fff; position: relative; z-index: 1; }
.card-copy h3 { margin: 0; font-size: 22px; letter-spacing: -.025em; line-height: 1.2; font-weight: 620; }
.card-copy p { margin: 8px 0 0; color: var(--fg-2); font-size: 15px; max-width: 460px; }
.c-chart .card-art { background: radial-gradient(120% 90% at 70% 0%, rgba(36,86,230,.10), transparent 60%), var(--panel-2); }
.c-chart .card-art svg { width: 100%; height: auto; aspect-ratio: 72 / 30; }
.c-research .card-art { background: radial-gradient(100% 80% at 30% 0%, rgba(14,165,233,.12), transparent 60%), var(--panel-2); flex-direction: column; gap: 10px; justify-content: flex-start; }
.src { width: 92%; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-1); font-size: 13px; }
.src b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.src small { color: var(--fg-3); font-family: var(--mono); font-size: 11px; }
.src:nth-child(2) { width: 84%; margin-left: 28px; } .src:nth-child(3) { width: 76%; margin-right: 20px; opacity: .85; }
.c-code .card-art { background: radial-gradient(100% 80% at 70% 0%, rgba(109,74,255,.14), transparent 60%), var(--panel-2); }
.code { width: 100%; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; background: #0e1424; color: #dbe4ff; border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 24px 48px -26px rgba(14,20,36,.7); white-space: pre; overflow: hidden; }
.code .k { color: #c4a7ff; } .code .f { color: #7ee2b8; } .code .n { color: #ffd479; } .code .c { color: #6b7a99; } .code .s { color: #8ab4ff; }
.c-memory .card-art { background: radial-gradient(100% 80% at 50% 0%, rgba(16,185,129,.12), transparent 60%), var(--panel-2); flex-wrap: wrap; align-content: center; gap: 10px; }
.mem { padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); font-size: 13.5px; color: var(--fg-2);
  display: inline-flex; gap: 8px; align-items: center; height: fit-content; }
.mem i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.c-faces .card-art { background: radial-gradient(100% 90% at 50% 20%, rgba(109,74,255,.12), transparent 65%), var(--panel-2); align-items: center; }
.orbit { position: relative; width: 300px; height: 300px; margin: -20px 0 -30px; transform: scale(.86); }
.orbit .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(109,74,255,.25); animation: spin 60s linear infinite; }
.orbit .ring.r2 { inset: 55px; animation-duration: 40s; animation-direction: reverse; }
.orbit .ring img { position: absolute; width: 46px; height: 46px; border-radius: 14px; box-shadow: 0 10px 22px -10px rgba(16,24,40,.45); animation: spin 60s linear infinite reverse; }
.orbit .ring.r2 img { width: 40px; height: 40px; animation-duration: 40s; animation-direction: normal; }
.orbit .core { position: absolute; inset: 112px; border-radius: 22px; background: var(--grad); box-shadow: 0 18px 40px -14px rgba(36,86,230,.7); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 26px; }
@keyframes spin { to { transform: rotate(360deg); } }
.c-judge .card-art { background: radial-gradient(100% 90% at 80% 0%, rgba(245,158,11,.10), transparent 60%), var(--panel-2); }
.judge { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 8px; }
.opt { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-1); font-size: 13px; transition: all .5s var(--ease); }
.opt b { display: block; font-family: var(--mono); font-size: 12px; color: var(--fg-3); margin-bottom: 4px; }
.opt.pick { border-color: rgba(16,185,129,.5); box-shadow: 0 0 0 4px rgba(16,185,129,.12), var(--shadow-2); transform: translateY(-6px); }
.opt.pick b { color: var(--pos); }
.judge-meta { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ safety */
.safety-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 70px; align-items: center; }
.rails { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 12px; }
.rails li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.rails li .ck { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(16,185,129,.1); }
.rails li .ck svg { width: 17px; height: 17px; stroke: var(--pos); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rails b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.rails span { color: var(--fg-2); font-size: 14.5px; }
.rings { position: relative; aspect-ratio: 1; max-width: 520px; margin: 0 auto; width: 100%; }
.rings .rg { position: absolute; border-radius: 50%; border: 1.5px solid rgba(36,86,230,.16); }
.rings .rg span { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--fg-2); box-shadow: var(--shadow-1); white-space: nowrap; }
.rings .rg:nth-child(1) { inset: 0; } .rings .rg:nth-child(2) { inset: 12%; } .rings .rg:nth-child(3) { inset: 24%; } .rings .rg:nth-child(4) { inset: 36%; }
.rings .rg:nth-child(1) span { top: 0; left: 50%; transform: translate(-50%, -50%); }
.rings .rg:nth-child(2) span { top: 50%; right: 0; transform: translate(50%, -50%); }
.rings .rg:nth-child(3) span { bottom: 0; left: 50%; transform: translate(-50%, 50%); }
.rings .rg:nth-child(4) span { top: 50%; left: 0; transform: translate(-50%, -50%); }
.rings .rg:nth-child(1) { background: radial-gradient(circle, transparent 60%, rgba(36,86,230,.04)); }
.rings .center { position: absolute; inset: 44%; border-radius: 50%; background: var(--grad); box-shadow: 0 20px 50px -14px rgba(36,86,230,.6); display: grid; place-items: center; }
.rings .center svg { width: 42%; height: 42%; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rings .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(36,86,230,.0), rgba(36,86,230,.10) 12%, transparent 13%); animation: spin 8s linear infinite; }

/* ------------------------------------------------------------------ EMS Trinity */
.ems-card { position: relative; border-radius: 32px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; padding: 60px; isolation: isolate; }
.ems-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 100% 0%, rgba(109,74,255,.10), transparent 60%),
  radial-gradient(60% 80% at 0% 100%, rgba(16,185,129,.08), transparent 60%); }
.planes { position: relative; height: 340px; perspective: 1000px; }
.plane { position: absolute; left: 8%; right: 8%; height: 150px; border-radius: 18px; background: rgba(255,255,255,.75); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2); backdrop-filter: blur(6px); transform: rotateX(58deg) rotateZ(-12deg); display: flex; align-items: flex-start; padding: 14px 18px; }
.plane b { font-family: var(--mono); font-size: 13px; color: var(--brand); }
.plane svg { position: absolute; inset: 30px 14px 14px; width: calc(100% - 28px); height: calc(100% - 44px); }
.plane path { fill: none; stroke-width: 2; }
.plane:nth-child(1) { top: 0; } .plane:nth-child(2) { top: 70px; } .plane:nth-child(3) { top: 140px; } .plane:nth-child(4) { top: 210px; }

/* ------------------------------------------------------------------ start steps */
.timeline { list-style: none; margin: 60px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; counter-reset: s; }
.timeline::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 2px; background: var(--line); }
.timeline .bar { position: absolute; top: 27px; left: 28px; right: 28px; height: 2px; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.timeline li { position: relative; counter-increment: s; }
.timeline li::before { content: counter(s, decimal-leading-zero); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line-2); box-shadow: var(--shadow-2); font-family: var(--mono); font-weight: 600; color: var(--brand); position: relative; z-index: 1; }
.timeline b { display: block; margin-top: 20px; font-size: 18px; letter-spacing: -.02em; }
.timeline span { display: block; margin-top: 6px; color: var(--fg-2); font-size: 15px; }

/* ------------------------------------------------------------------ honest */
.honest-card { border-radius: 28px; padding: 54px; background: linear-gradient(180deg, #fffaf0, #fff); border: 1px solid rgba(245,158,11,.25);
  box-shadow: var(--shadow-1); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 50px; }
.honest-card .h2 { font-size: clamp(32px, 4.2vw, 52px); }
.honest-card p { margin: 0 0 14px; color: var(--fg-2); font-size: 16px; }
.honest-card p strong { color: var(--fg); }
.warn-ico { width: 46px; height: 46px; border-radius: 14px; background: rgba(245,158,11,.14); display: grid; place-items: center; margin-bottom: 18px; }
.warn-ico svg { width: 22px; height: 22px; stroke: #b45309; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ final CTA */
.final-card { position: relative; border-radius: 36px; overflow: hidden; padding: 110px 40px; text-align: center; color: #fff; isolation: isolate;
  background: linear-gradient(135deg, #1d47d0, #4a33e0 55%, #5c3cf0); box-shadow: 0 50px 100px -40px rgba(36,86,230,.7); }
.final-card .aurora { inset: -30%; filter: blur(60px); opacity: .9; }
.final-card .aurora i { mix-blend-mode: screen; }
.final-card .aurora .a1 { background: radial-gradient(circle, rgba(14,165,233,.7), transparent 62%); }
.final-card .aurora .a2 { background: radial-gradient(circle, rgba(16,185,129,.55), transparent 62%); }
.final-card .aurora .a3 { background: radial-gradient(circle, rgba(167,139,250,.6), transparent 62%); }
.final-card .grid-lines { background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); }
.final-card > *:not(.aurora):not(.grid-lines) { position: relative; z-index: 1; }
.final-card .aurora, .final-card .grid-lines { position: absolute; z-index: 0; }
.final-card h2 { margin: 0; font-size: clamp(40px, 6.4vw, 84px); line-height: .98; letter-spacing: -.045em; font-weight: 640; }
.final-card h2 em { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.final-card h2 em .w { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.final-card p { margin: 22px auto 0; max-width: 520px; font-size: 18px; color: rgba(255,255,255,.82); }
.final-card .hero-cta { margin-top: 36px; }
.btn-white { background: #fff; color: #1d2a6b; border: 0; box-shadow: 0 14px 30px -12px rgba(0,0,0,.45); }
.btn-white:hover { background: #fff; transform: translateY(-1px); }
.btn-glass { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-glass:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); }

/* ------------------------------------------------------------------ footer */
footer { padding: 60px 0 50px; color: var(--fg-3); font-size: 14px; }
.foot { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 36px; }
.foot img { width: 120px; height: auto; }
.foot p { max-width: 520px; margin: 14px 0 0; }
.foot nav { display: flex; gap: 22px; } .foot nav a:hover { color: var(--fg); }

/* ------------------------------------------------------------------ reveal states (only with JS; never hides content without it) */
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(28px); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1023px) {
  .links { display: none; }
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .win-chart { border-right: 0; border-bottom: 1px solid var(--line); }
  .step { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 34px 0; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.span-2 { grid-column: span 2; }
  .safety-grid, .ems-card, .honest-card { grid-template-columns: minmax(0, 1fr); }
  .ems-card { padding: 40px 28px; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .timeline::before, .timeline .bar { display: none; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(2) { border-right: 0; } .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav { height: 62px; gap: 8px; }
  .brand img { width: 100px; }
  .nav-actions { flex-shrink: 0; }
  .nav-actions .btn-ghost { display: none; }
  .nav-actions .btn { padding: 8px 14px; font-size: 13.5px; }
  .hero { padding-top: 112px; }
  .hero-title { letter-spacing: -.04em; }
  .hero-cta .btn { width: 100%; }
  .hero-cta { width: 100%; max-width: 380px; }
  .stage-wrap { margin-top: 46px; padding: 0 14px 20px; }
  .win-feed .feed li:nth-child(n+4) { display: none; }
  .sec { padding: 90px 0; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card.span-2 { grid-column: auto; }
  .card { min-height: 380px; }
  .judge { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .honest-card { padding: 34px 22px; gap: 10px; }
  .final-card { padding: 80px 22px; border-radius: 28px; }
  .test-chips { grid-template-columns: minmax(0, 1fr); }
  .step-visual { min-height: 0; padding: 18px; }
  .rails-mini { grid-template-columns: minmax(0, 1fr); }
  .fact { padding: 22px 14px; }
  .rings { width: 74%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal]:not(.in) { opacity: 1; transform: none; }
}
