:root {
    --bg: #0b0a12;
    --bg-2: #110f1b;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-2: rgba(255, 255, 255, 0.14);
    --text: #f4effc;
    --muted: #a39bbb;
    --faint: #6f6888;
    --pink: #ff7ad9;
    --purple: #c77dff;
    --cyan: #7bdcff;
    --grad: linear-gradient(100deg, #ff8fe0 0%, #c77dff 55%, #9d8bff 100%);
    --radius: 18px;
    --display: 'Unbounded', system-ui, sans-serif;
    --body: 'Manrope', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --gutter: clamp(16px, 4vw, 48px);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 500 16px/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -0.02em; line-height: 1.08; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
::selection { background: rgba(199, 125, 255, 0.4); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--faint); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: 999px; border: 0;
    background: var(--grad); color: #160a20;
    font: 700 15px/1 var(--body); text-decoration: none; cursor: pointer;
    box-shadow: 0 8px 30px -8px rgba(255, 122, 217, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.2s cubic-bezier(.3, 1.6, .5, 1), box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 40px -8px rgba(255, 122, 217, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .pill:focus-visible, input:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.btn-small { padding: 9px 18px; font-size: 14px; }
.btn-big { padding: 16px 30px; font-size: 16px; }

/* Nav */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 20;
    display: flex; align-items: center; gap: 24px;
    padding: 14px var(--gutter);
    transition: background 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(11, 10, 18, 0.72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-color: var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 19px var(--display); }
.brand img { border-radius: 8px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 110px var(--gutter) 40px; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(11, 10, 18, 0.82) 0%, rgba(11, 10, 18, 0.55) 35%, transparent 62%); }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); z-index: -1; pointer-events: none; }
.hero-fallback { display: none; }
.no-3d .hero-fallback {
    display: block; position: absolute; z-index: -2; right: 8%; top: 22%; width: min(42vw, 460px); aspect-ratio: 1;
    border-radius: 28%; background: radial-gradient(circle at 30% 30%, #ffc1ee, #ff7ad9 40%, #9d4edd 100%);
    box-shadow: 0 0 120px rgba(255, 122, 217, 0.5); animation: wobble 4s ease-in-out infinite;
}
@keyframes wobble { 0%, 100% { border-radius: 28%; transform: rotate(-6deg); } 50% { border-radius: 34% 24% 30% 26%; transform: rotate(4deg) scale(1.03); } }
.hero-copy { max-width: 600px; pointer-events: none; }
.hero-copy a, .hero-copy .btn { pointer-events: auto; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 14px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
    font: 500 13px var(--mono); color: var(--muted); backdrop-filter: blur(8px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.hero h1 { font-size: clamp(40px, 6.4vw, 84px); font-weight: 800; margin: 22px 0 22px; text-wrap: balance; }
.lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 520px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.poke-hint { margin-top: 26px; font: 500 13px var(--mono); color: var(--faint); transition: opacity 0.6s; }
.poke-hint::before { content: '↗ '; color: var(--pink); }
.poke-hint.poked { opacity: 0; }
.no-3d .poke-hint { display: none; }
.stats {
    list-style: none; margin: 60px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 900px;
}
.stats li { padding: 14px 18px; border-radius: 14px; background: rgba(17, 15, 27, 0.6); box-shadow: inset 0 0 0 1px var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stats b { display: block; font: 800 20px var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--muted); font-size: 14px; }

/* Sections */
.section { padding: clamp(80px, 11vw, 140px) var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(36px, 5vw, 60px); }
.kicker { font: 500 13px var(--mono); color: var(--pink); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 14px; }
.section h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; text-wrap: balance; }
.sub { color: var(--muted); margin-top: 16px; font-size: 17px; }

/* Feature cards */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
    position: relative; padding: 28px; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 0 0 1px var(--border);
    transition: transform 0.35s cubic-bezier(.3, 1.4, .5, 1), box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--border-2), 0 20px 60px -30px rgba(199, 125, 255, 0.5); }
.card h3 { font-size: 21px; font-weight: 600; margin: 10px 0 10px; }
.card p { color: var(--muted); font-size: 15px; }
.tag { font: 500 12px var(--mono); color: var(--purple); text-transform: uppercase; letter-spacing: 0.1em; }
.icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: linear-gradient(135deg, rgba(255, 122, 217, 0.18), rgba(157, 139, 255, 0.18)); box-shadow: inset 0 0 0 1px rgba(255, 122, 217, 0.25); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--pink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-mace { grid-column: span 2; grid-row: span 2; padding: 0; min-height: 480px; display: flex; flex-direction: column; justify-content: flex-end;
    background: radial-gradient(ellipse at 50% 35%, rgba(199, 125, 255, 0.22), transparent 65%), linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); }
.mace-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.card-mace .card-body { position: relative; padding: 28px; max-width: 520px; background: linear-gradient(transparent, rgba(11, 10, 18, 0.85) 40%); }
.card-mace h3 { font-size: 30px; }

/* Modules */
.module-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin-bottom: 18px; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; }
.search input {
    width: 100%; padding: 12px 16px 12px 44px; border-radius: 999px; border: 0;
    background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); color: var(--text);
    font: 500 15px var(--body);
}
.search input::placeholder { color: var(--faint); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill {
    padding: 9px 15px; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted);
    font: 600 14px var(--body); transition: background 0.2s, color 0.2s;
}
.pill:hover { color: var(--text); background: var(--surface-2); }
.pill[aria-selected="true"] { background: var(--grad); color: #160a20; box-shadow: none; }
.module-count { text-align: center; color: var(--muted); min-height: 1.6em; margin-bottom: 10px; font-size: 14px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.module {
    padding: 15px 17px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.module:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(255, 122, 217, 0.35); transform: translateY(-2px); }
.module[hidden] { display: none; }
.module-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.module b { font-weight: 700; font-size: 15px; }
.mcat { font: 500 11px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.module p { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 4px; }

/* Get */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #160a20; font: 800 17px var(--display); margin-bottom: 18px; }
.steps h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15px; }
.get-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin-top: 44px; }
.get-note { color: var(--muted); }
.get-note[hidden], [data-link][hidden] { display: none; }

/* Footer */
.footer { margin-top: clamp(90px, 12vw, 150px); padding: 50px var(--gutter) 60px; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--muted); font-size: 14px; }
.footer img { width: 150px; height: auto; margin-bottom: 8px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(.2, .9, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
.bento .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.bento .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: 0.16s; }

/* Layout breakpoints */
@media (max-width: 1000px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-mace { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 860px) {
    .hero { padding-top: 0; justify-content: flex-start; min-height: 0; }
    .hero-canvas { position: relative; inset: auto; height: 58svh; min-height: 340px; margin: 0 calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter)); -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
    .no-3d .hero-fallback { position: relative; right: auto; top: auto; margin: 110px auto 40px; width: 60vw; }
    .no-3d .hero-canvas { display: none; }
    .hero::after { display: none; }
    .hero::before { display: none; }
    .hero-copy { margin-top: -30px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; }
    .steps { grid-template-columns: 1fr; }
    .poke-hint::before { content: '↑ '; }
}
@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav .btn-small { margin-left: auto; }
    .bento { grid-template-columns: 1fr; }
    .card-mace { grid-column: auto; }
    .card-mace { min-height: 420px; }
    .cta .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .no-3d .hero-fallback { animation: none; }
}

/* "Looks as good as it plays": scroll-driven 3D flight over the click GUI */
.fly { position: relative; height: 340vh; margin-top: clamp(60px, 9vw, 120px); }
.fly-stage {
    position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate;
    background:
        radial-gradient(ellipse 60% 50% at 70% 35%, rgba(124, 58, 237, 0.28), transparent 70%),
        radial-gradient(ellipse 50% 45% at 20% 75%, rgba(199, 125, 255, 0.16), transparent 70%),
        radial-gradient(ellipse 40% 35% at 85% 85%, rgba(255, 122, 217, 0.12), transparent 70%),
        #07060d;
    --fit: 1;
}
.fly-stage::before, .fly-stage::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 18%; z-index: 3; pointer-events: none; background: linear-gradient(var(--bg), transparent); }
.fly-stage::after { inset: auto 0 0 0; background: linear-gradient(transparent, var(--bg)); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.fly-cam { position: absolute; inset: 0; z-index: 1; perspective: 1300px; transform: scale(var(--fit)); }
.gui { position: absolute; width: max-content; will-change: transform; font-family: 'Pixelify Sans', var(--mono); color: #ece6f7; --dof: 0; }

.g-search { margin: 0 auto 22px; width: 360px; padding: 12px 18px; border-radius: 999px; background: rgba(22, 19, 32, 0.92); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); color: #8f88a8; font-size: 18px; display: flex; gap: 10px; align-items: center; }
.g-search-icon { font-size: 22px; line-height: 1; }
.g-cols { display: flex; gap: 16px; align-items: flex-start; }
.g-panel {
    width: 214px; padding: 12px 10px 10px; border-radius: 14px;
    background: rgba(18, 16, 27, 0.9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
    transition: filter 0.2s;
    filter: blur(calc(var(--dof) * 2.6px)) brightness(calc(1 - var(--dof) * 0.35));
}
.g-panel.focus { filter: none; box-shadow: inset 0 0 0 1px rgba(255, 122, 217, 0.35), 0 0 60px -10px rgba(199, 125, 255, 0.45), 0 30px 60px -20px rgba(0, 0, 0, 0.7); }
.g-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px; font-size: 20px; font-weight: 600; }
.g-count { font-size: 14px; color: #6f6888; }
.g-count.on { color: var(--purple); }
.g-bar { height: 3px; border-radius: 3px; margin: 8px 4px 8px; background: linear-gradient(90deg, #c77dff, #ff7ad9); }
.g-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; margin: 2px 0; border-radius: 7px; font-size: 17px; color: #d9d2ea; }
.g-row.on { background: linear-gradient(90deg, #ff6fd2, #b77bff); color: #fff; box-shadow: 0 0 18px -6px rgba(255, 111, 210, 0.8); }
.g-plus { color: #7d7696; font-size: 16px; }
.g-row.on .g-plus { color: #fff; }
.g-settings { margin: 4px 2px 8px 6px; padding: 6px 8px 8px; border-left: 2px solid rgba(255, 122, 217, 0.6); background: rgba(255, 255, 255, 0.03); border-radius: 0 8px 8px 0; }
.g-group { color: var(--pink); font-size: 15px; margin: 2px 0 6px; }
.g-set { font-size: 15px; color: #cfc8e2; padding: 3px 0; }
.g-bool, .g-mode { display: flex; justify-content: space-between; align-items: center; }
.g-check { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 2px #5d5578; display: grid; place-items: center; font-size: 12px; color: #fff; }
.g-check.on { background: linear-gradient(135deg, #ff6fd2, #b77bff); box-shadow: none; }
.g-mode { color: #cfc8e2; }
.g-mode .g-mode { color: var(--pink); }
.g-num-top { display: flex; justify-content: space-between; }
.g-val { color: #fff; }
.g-track { height: 4px; border-radius: 4px; background: #2e2842; margin: 5px 0 3px; }
.g-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #c77dff, #ff7ad9); position: relative; }
.g-fill::after { content: ''; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #fff; translate: 0 -50%; box-shadow: 0 0 10px rgba(255, 122, 217, 0.9); }
.g-hint { margin-top: 18px; text-align: right; color: #6f6888; font-size: 15px; white-space: pre; }

.fly-captions { position: absolute; z-index: 4; left: var(--gutter); bottom: clamp(40px, 10vh, 110px); pointer-events: none; }
.cap { position: absolute; left: 0; bottom: 0; width: max-content; max-width: min(600px, calc(100vw - 2 * var(--gutter))); opacity: 0; text-shadow: 0 2px 30px rgba(7, 6, 13, 0.9); }
.cap h2 { font-size: clamp(32px, 4.6vw, 58px); font-weight: 800; }
.cap .sub { margin-top: 14px; }
.fly-scroll { position: absolute; z-index: 4; right: var(--gutter); bottom: 34px; font: 500 12px var(--mono); color: var(--faint); letter-spacing: 0.2em; text-transform: uppercase; }
.fly-scroll::after { content: ''; display: block; width: 1px; height: 36px; margin: 10px auto 0; background: linear-gradient(var(--pink), transparent); animation: scrollcue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes scrollcue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) {
    .fly { height: 300vh; }
    .fly-captions { bottom: 28px; }
    .cap h2 { font-size: 30px; }
    .fly-scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .fly { height: auto; }
    .fly-stage { position: relative; }
    .fly-scroll::after { animation: none; }
}
