/* ============================================================
   PLIX · multi-page landing · 2026 edition
   Fonts: Space Grotesk (display) · Inter (text) · JetBrains Mono (code)
   Tech: CSS 3D · @property · scroll-driven animations · container queries
   ============================================================ */

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg:        #000000;
  --bg-1:      #07070a;
  --bg-2:      #0c0c11;
  --surface:   rgba(255,255,255,.03);
  --surface-2: rgba(255,255,255,.055);
  --border:    rgba(255,255,255,.09);
  --border-2:  rgba(255,255,255,.17);
  --fg:        #fafafa;
  --fg-muted:  #a8a8b3;
  --fg-dim:    #6b6b78;
  --accent:    #7c5cff;
  --accent-2:  #22d3ee;
  --accent-3:  #d946ef;
  --grad:      linear-gradient(135deg, #22d3ee 0%, #7c5cff 52%, #d946ef 100%);
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,.16), rgba(124,92,255,.16) 52%, rgba(217,70,239,.16));
  --green:     #4ade80;
  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1180px;
  --ease:      cubic-bezier(.21,.6,.35,1);
  --shadow-glow: 0 30px 80px -34px rgba(0,0,0,.85);
  --font:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --display:   'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--fg);
  line-height: 1.6; font-size: 16px; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); }
::selection { background: rgba(124,92,255,.4); color: #fff; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.08; }

/* ---------- background layers ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -4;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 100%);
}
.bg-glow {
  position: fixed; inset: -25% -10% auto -10%; height: 75vh; z-index: -3;
  background:
    radial-gradient(40% 60% at 28% 18%, rgba(124,92,255,.22), transparent 70%),
    radial-gradient(38% 50% at 76% 8%, rgba(34,211,238,.15), transparent 70%),
    radial-gradient(30% 40% at 54% 42%, rgba(217,70,239,.12), transparent 70%);
  filter: blur(22px); pointer-events: none; transition: transform .5s var(--ease);
}
.bg-noise {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scroll progress (scroll-driven animation) ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 200; transform-origin: 0 50%; background: var(--grad); transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .scroll-progress { animation: grow-progress auto linear; animation-timeline: scroll(root); }
  @keyframes grow-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- custom cursor glow ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; z-index: 1; pointer-events: none;
  border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(124,92,255,.10), transparent 60%);
  opacity: 0; transition: opacity .4s; mix-blend-mode: screen;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(0,0,0,.5); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(0,0,0,.78); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 13px 24px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(124,92,255,.4); }
.brand-word { font-family: var(--display); font-size: 20px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 2px; margin-inline-start: 10px; }
.nav-links a { padding: 8px 13px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--fg-muted); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); background: var(--surface); }

.nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

/* language dropdown */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg); border-radius: 10px; padding: 8px 12px; transition: border-color .2s;
}
.lang-btn:hover { border-color: var(--border-2); }
.lang-btn .chev { transition: transform .25s; opacity: .7; }
.lang.open .lang-btn .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 168px; z-index: 50;
  background: rgba(14,14,18,.96); border: 1px solid var(--border-2); border-radius: 12px; padding: 6px;
  box-shadow: var(--shadow-glow); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: .2s var(--ease);
  backdrop-filter: blur(14px);
}
.lang.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--fg-muted); background: none; border: 0; text-align: start; transition: .15s; }
.lang-opt .flag { font-size: 16px; }
.lang-opt .code { margin-inline-start: auto; font-family: var(--mono); font-size: 11px; color: var(--fg-dim); }
.lang-opt:hover { background: var(--surface-2); color: var(--fg); }
.lang-opt.active { color: var(--fg); background: var(--grad-soft); }

.btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; border-radius: 11px; padding: 10px 17px; border: 1px solid transparent; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #0a0a0b; font-weight: 700; box-shadow: 0 8px 26px -10px rgba(124,92,255,.7); }
.btn-primary:hover { box-shadow: 0 12px 36px -10px rgba(124,92,255,.9); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-2); }
.gh-btn .gh-count { font-family: var(--mono); font-size: 12px; background: rgba(255,255,255,.14); padding: 1px 7px; border-radius: 20px; }
.btn .arrow { transition: transform .2s var(--ease); } .btn-primary:hover .arrow { transform: translateX(3px); }

.nav-burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { width: 20px; height: 2px; background: var(--fg); border-radius: 2px; transition: .25s; }
.nav-burger.open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2){ opacity: 0; }
.nav-burger.open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   HERO (3D canvas)
   ============================================================ */
.hero { position: relative; padding: 86px 24px 56px; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 100px; font-size: 13px; font-weight: 500; background: var(--surface); border: 1px solid var(--border); color: var(--fg-muted); transition: .2s; }
.pill:hover { border-color: var(--border-2); color: var(--fg); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(74,222,128,.18); }

.hero-title { font-size: clamp(40px, 7.4vw, 82px); font-weight: 700; margin: 26px 0 18px; max-width: 15ch; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(16px, 2.1vw, 19px); color: var(--fg-muted); max-width: 62ch; margin: 0 auto; }
.hero-cta { display: flex; gap: 12px; margin: 34px 0 0; flex-wrap: wrap; justify-content: center; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; width: 100%; max-width: 780px; margin: 50px auto 0; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-1); padding: 20px 12px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--fg-dim); }

/* ---------- code window ---------- */
.code-window { width: 100%; max-width: 840px; margin: 46px auto 0; border: 1px solid var(--border-2); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(20,20,26,.92), rgba(8,8,11,.94)); box-shadow: var(--shadow-glow); overflow: hidden; text-align: start; }
.cw-bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.cw-dots { display: inline-flex; gap: 6px; } .cw-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2a2e; } .cw-dots i:nth-child(1){ background:#ff5f57; } .cw-dots i:nth-child(2){ background:#febc2e; } .cw-dots i:nth-child(3){ background:#28c840; }
.cw-tabs { display: flex; gap: 4px; margin-inline-start: 6px; }
.cw-tab { font-family: var(--mono); font-size: 12.5px; color: var(--fg-dim); cursor: pointer; background: none; border: 0; padding: 5px 11px; border-radius: 7px; transition: .2s; }
.cw-tab:hover { color: var(--fg-muted); } .cw-tab.active { color: var(--fg); background: var(--surface-2); }
.icon-btn { margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); color: var(--fg-dim); border-radius: 7px; padding: 6px; cursor: pointer; transition: .2s; }
.icon-btn:hover { color: var(--fg); border-color: var(--border-2); }
.cw-pane { display: none; margin: 0; padding: 18px 20px; font-size: 13.5px; line-height: 1.75; overflow-x: auto; }
.cw-pane.active { display: block; }
.kw{color:#c792ea}.fn{color:#82aaff}.ty{color:#ffcb6b}.str{color:#c3e88d}.num{color:#f78c6c}.cmt{color:#6272a4;font-style:italic}.out-prompt{color:var(--fg-dim)}.out-ok{color:var(--green)}.out-dim{color:var(--fg-dim)}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { max-width: var(--maxw); margin: 0 auto; padding: 100px 24px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 54px; }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(28px, 4.6vw, 44px); font-weight: 700; }
.section-head p { color: var(--fg-muted); margin-top: 14px; font-size: 16.5px; }
.lead { color: var(--fg-muted); font-size: 17px; max-width: 60ch; margin: 0 auto; text-align: center; }

/* ---------- feature cards (3D tilt) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; perspective: 1400px; }
.card {
  position: relative; padding: 26px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); transform-style: preserve-3d;
  transition: transform .25s var(--ease), border-color .3s, background .3s; will-change: transform;
}
.card::after { content:""; position:absolute; inset:0; border-radius:inherit; padding:1px; background:var(--grad); -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 .3s; }
.card:hover::after { opacity: 1; }
.card > * { transform: translateZ(28px); }
.card-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border); color: var(--accent-2); margin-bottom: 16px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--fg-muted); font-size: 14.5px; }
.card code { font-size: 12.5px; background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 5px; color: #cbd5e1; }

/* ---------- CLI ---------- */
.cli-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; }
.cli-text h2 { font-size: clamp(26px, 4vw, 42px); font-weight: 700; margin: 12px 0 14px; }
.cli-text p { color: var(--fg-muted); font-size: 16px; } .cli-text code { font-size: 13px; background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 5px; }
.cli-cta { margin-top: 22px; }
.terminal { border: 1px solid var(--border-2); border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(180deg, #0c0c0f, #070708); box-shadow: var(--shadow-glow); }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.term-dots { display: inline-flex; gap: 6px; } .term-dots i { width: 11px; height: 11px; border-radius: 50%; } .term-dots i:nth-child(1){background:#ff5f57}.term-dots i:nth-child(2){background:#febc2e}.term-dots i:nth-child(3){background:#28c840}
.term-title { font-family: var(--mono); font-size: 12.5px; color: var(--fg-dim); margin-inline-start: 4px; }
.term-body { margin: 0; padding: 18px 20px; font-size: 13.5px; line-height: 1.9; }
.t-line { display: block; white-space: pre; } .prompt { color: var(--accent-2); margin-inline-end: 8px; } .cmt { color: var(--fg-dim); }

/* ---------- parity ---------- */
.parity { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 34px; position: relative; overflow: hidden; }
.parity::after { content:""; position:absolute; inset:0; background:var(--grad-soft); opacity:.22; pointer-events:none; }
.parity-col { position: relative; z-index: 1; }
.parity-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.parity-head .dim { color: var(--fg-dim); font-family: var(--mono); font-size: 13px; }
.pill-sm { font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 100px; }
.pill-sm.interp { background: rgba(34,211,238,.15); color: var(--accent-2); border: 1px solid rgba(34,211,238,.3); }
.pill-sm.native { background: rgba(124,92,255,.16); color: #b9a6ff; border: 1px solid rgba(124,92,255,.34); }
.checks { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 11px; color: var(--fg-muted); font-size: 14.5px; }
.ck { color: var(--green); font-weight: 700; }
.parity-mid { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.parity-eq { font-size: 42px; font-weight: 300; color: var(--accent); line-height: 1; }
.parity-mid .dim { font-size: 11px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .1em; }
.parity-note { text-align: center; color: var(--fg-muted); max-width: 720px; margin: 26px auto 0; font-size: 15px; }

/* ---------- timeline ---------- */
.timeline { position: relative; max-width: 780px; margin: 0 auto; }
.timeline::before { content:""; position:absolute; inset-inline-start: 14px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; display: grid; grid-template-columns: auto auto 1fr; gap: 16px; align-items: center; padding: 15px 0 15px 40px; }
.tl-dot { position: absolute; inset-inline-start: 8px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--fg-dim); }
.tl-item.done .tl-dot { background: var(--green); border-color: var(--green); }
.tl-item.active .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(124,92,255,.22); }
.tl-ver { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--fg); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 7px; }
.tl-item.active .tl-ver { border-color: var(--accent); color: #cbbcff; }
.tl-t { color: var(--fg-muted); font-size: 14.5px; }

/* ---------- get started ---------- */
.gs-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; overflow: hidden; border: 1px solid var(--border-2); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(124,92,255,.08), rgba(34,211,238,.05)); }
.gs-left { padding: 42px; }
.gs-left h2 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; margin: 10px 0 12px; }
.gs-left p { color: var(--fg-muted); font-size: 15.5px; }
.gs-links { display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.gs-links a { color: var(--accent-2); font-weight: 600; font-size: 14px; }
.gs-links a:hover { color: #fff; }
.gs-right { padding: 42px; border-inline-start: 1px solid var(--border); background: rgba(0,0,0,.25); display: flex; flex-direction: column; justify-content: center; }
.install-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.inst-label { font-family: var(--mono); font-size: 12.5px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .08em; }
.inst-code { margin: 0; font-size: 13.5px; line-height: 1.95; color: #cbd5e1; white-space: pre; overflow-x: auto; }
.inst-code .prompt { color: var(--accent-2); }

/* ============================================================
   3D SCENE (playground / features)
   ============================================================ */
.scene-wrap { position: relative; border-radius: var(--radius-lg); border: 1px solid var(--border-2); overflow: hidden; background: radial-gradient(60% 60% at 50% 40%, rgba(124,92,255,.12), transparent 70%), var(--bg-1); min-height: 380px; }
.scene-canvas { display: block; width: 100%; height: 100%; }
.scene-hint { position: absolute; bottom: 14px; inset-inline: 0; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--fg-dim); pointer-events: none; }
.tilt-3d { transform-style: preserve-3d; }

/* ============================================================
   PAGE HERO (sub pages)
   ============================================================ */
.page-hero { max-width: var(--maxw); margin: 0 auto; padding: 70px 24px 30px; text-align: center; }
.page-hero h1 { font-size: clamp(34px, 5.6vw, 60px); font-weight: 700; }
.page-hero p { color: var(--fg-muted); font-size: 17px; max-width: 60ch; margin: 16px auto 0; }

/* ---------- download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dl-card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, transform .25s var(--ease); }
.dl-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.dl-card.span2 { grid-column: 1 / -1; }
.dl-card h3 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.dl-card p { color: var(--fg-muted); font-size: 14.5px; margin: 10px 0 16px; }
.dl-meta { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }
.dl-cmd { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 13px; color: #cbd5e1; }
.dl-cmd .prompt { color: var(--accent-2); }
.req-list { list-style: none; display: grid; grid-template-columns: repeat(2,1fr); gap: 10px 24px; margin-top: 8px; }
.req-list li { display: flex; align-items: center; gap: 9px; color: var(--fg-muted); font-size: 14.5px; }
.req-list .ck { color: var(--green); }

/* ---------- docs ---------- */
.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doc-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: .25s var(--ease); display: block; }
.doc-card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateY(-3px); }
.doc-card .dc-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent-2); margin-bottom: 14px; }
.doc-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.doc-card p { color: var(--fg-muted); font-size: 14px; }
.doc-card .dc-arrow { margin-top: 12px; font-size: 13px; color: var(--accent-2); font-weight: 600; }

/* ---------- playground editor ---------- */
.pg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.pg-editor { border: 1px solid var(--border-2); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-1); display: flex; flex-direction: column; }
.pg-ed-bar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.pg-ed-bar .fname { font-family: var(--mono); font-size: 13px; color: var(--fg-muted); }
.pg-ed-body { flex: 1; }
.pg-ed-body textarea { width: 100%; height: 100%; min-height: 340px; resize: none; border: 0; outline: none; background: transparent; color: #cbd5e1; font-family: var(--mono); font-size: 13.5px; line-height: 1.8; padding: 18px 20px; }
.pg-ed-foot { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--border); }
.pg-out { border: 1px solid var(--border-2); border-radius: var(--radius-lg); background: var(--bg-1); padding: 18px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.9; overflow: auto; min-height: 340px; }
.pg-out .ok { color: var(--green); } .pg-out .dim { color: var(--fg-dim); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); background: var(--bg-1); margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 32px; display: grid; grid-template-columns: 1.3fr 2fr; gap: 40px; }
.footer-tag { color: var(--fg-dim); font-size: 14px; margin-top: 14px; max-width: 30ch; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fcol h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-dim); margin-bottom: 14px; font-family: var(--font); }
.fcol a { display: block; color: var(--fg-muted); font-size: 14px; padding: 5px 0; transition: color .2s; }
.fcol a:hover { color: var(--fg); }
.footer-bottom { max-width: var(--maxw); margin: 0 auto; padding: 20px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--fg-dim); font-size: 13px; font-family: var(--mono); }

.to-top { position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 90; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; background: var(--grad); color: #0a0a0b; border: 0; font-size: 18px; font-weight: 700; box-shadow: 0 8px 24px -8px rgba(124,92,255,.7); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s, transform .3s; }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.cards .card.reveal { transition-delay: calc(var(--i,0) * 60ms); }

/* ============================================================
   RESPONSIVE (container queries + breakpoints)
   ============================================================ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav.open .nav-links { display: flex; flex-direction: column; position: absolute; top: 100%; inset-inline: 0; background: rgba(0,0,0,.96); border-bottom: 1px solid var(--border); padding: 12px; gap: 2px; backdrop-filter: blur(14px); }
  .cli-grid, .gs-card, .pg-grid { grid-template-columns: 1fr; gap: 0; }
  .gs-right { border-inline-start: 0; border-top: 1px solid var(--border); }
  .gs-left, .gs-right, .pg-editor, .pg-out { padding: 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .parity { grid-template-columns: 1fr; }
  .parity-mid { flex-direction: row; gap: 12px; padding: 6px 0; }
  .parity-eq { transform: rotate(90deg); }
  .dl-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .req-list { grid-template-columns: 1fr; }
  .section { padding: 74px 20px; }
  .gh-btn .t-label { display: none; }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 58px; }
  .nav-inner { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   EXTRA · light theme · docs search · benchmark · contributors · 404 · tour
   ============================================================ */
html[data-theme="light"] {
  --bg:#ffffff; --bg-1:#f5f6f8; --bg-2:#eef0f3;
  --surface: rgba(0,0,0,.025); --surface-2: rgba(0,0,0,.055);
  --border: rgba(0,0,0,.10); --border-2: rgba(0,0,0,.18);
  --fg:#0b0b0f; --fg-muted:#52525b; --fg-dim:#8a8a94;
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,.12), rgba(124,92,255,.12) 52%, rgba(217,70,239,.12));
}
html[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px);
}
html[data-theme="light"] .bg-glow { opacity: .55; }
html[data-theme="light"] .bg-noise { opacity: .04; }
html[data-theme="light"] .code-window,
html[data-theme="light"] .terminal,
html[data-theme="light"] .pg-editor,
html[data-theme="light"] .pg-out { background: linear-gradient(180deg,#fff,#fafafa); }

/* theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg); transition: .2s;
}
.theme-toggle:hover { border-color: var(--border-2); }

/* docs search */
.docs-search { max-width: 520px; margin: 0 auto 30px; position: relative; }
.docs-search input {
  width: 100%; padding: 13px 16px 13px 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--fg); font-size: 15px; font-family: var(--font); outline: none; transition: .2s;
}
.docs-search input:focus { border-color: var(--accent); }
.docs-search .ds-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--fg-dim); }
.docs-empty { text-align: center; color: var(--fg-dim); padding: 30px; display: none; }

/* benchmark */
.bench-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.bench-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 30px; }
.bench-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.bench-tasks { display: inline-flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.bench-tasks button {
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--fg-muted); cursor: pointer;
  background: none; border: 0; padding: 7px 13px; border-radius: 7px; transition: .2s;
}
.bench-tasks button.active { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.bench-bar { display: grid; grid-template-columns: 150px 1fr 64px; align-items: center; gap: 14px; margin: 13px 0; }
.bench-bar .bl { font-size: 14px; font-weight: 600; color: var(--fg); display: flex; align-items: center; gap: 9px; }
.bench-bar .bl .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.bench-track { height: 12px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.bench-fill { height: 100%; width: 0; border-radius: 8px; transition: width 1.1s var(--ease); }
.bench-bar .bv { font-family: var(--mono); font-size: 13px; color: var(--fg-muted); text-align: end; }
.bench-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; align-items: center; }
.bench-note { margin-top: 16px; font-size: 13.5px; color: var(--fg-dim); text-align: center; }

/* contributors */
.contrib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.contrib-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; transition: .25s var(--ease); }
.contrib-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.contrib-card img { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; border: 2px solid var(--border-2); display: block; }
.contrib-card h3 { font-size: 16px; font-weight: 700; }
.contrib-badge { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 20px; background: var(--grad-soft); border: 1px solid var(--border); color: var(--fg-muted); margin-top: 8px; }
.contrib-card .links { margin-top: 14px; }
.contrib-card .links a { font-size: 13px; color: var(--accent-2); font-weight: 600; }

/* 404 */
.nf { min-height: 72vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 40px; position: relative; }
.nf-code { font-family: var(--display); font-size: clamp(90px, 20vw, 200px); font-weight: 700; line-height: .85; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf-canvas { width: 100%; max-width: 440px; height: 230px; }
.nf h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; }
.nf p { color: var(--fg-muted); max-width: 46ch; }

/* core legend (playground) */
.core-legend { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 16px; font-size: 12.5px; color: var(--fg-muted); }
.core-legend span { display: inline-flex; align-items: center; gap: 7px; }
.core-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* guided tour */
.tour-spot {
  position: fixed; z-index: 300; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 100vmax rgba(0,0,0,.62);
  transition: all .3s var(--ease); display: none;
}
.tour-card { position: fixed; z-index: 301; width: min(330px, 90vw); background: var(--bg-1); border: 1px solid var(--border-2); border-radius: 14px; padding: 18px 18px 16px; box-shadow: var(--shadow-glow); display: none; }
.tour-card h4 { font-family: var(--display); font-size: 16px; margin-bottom: 8px; }
.tour-card p { font-size: 14px; color: var(--fg-muted); line-height: 1.6; }
.tour-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.tour-prog { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }
.tour-card .t-actions { display: flex; gap: 8px; }
@media (max-width: 560px) { .bench-bar { grid-template-columns: 110px 1fr 54px; } .bench-bar .bl { font-size: 13px; } }
