/* Heightmap Studio website - shared styles */

:root {
  --bg: #0b0a09;
  --bg2: #100f0d;
  --surface: #161513;
  --surface2: #1d1b18;
  --surface3: #27241f;
  --line: #2a2722;
  --line2: #3b3730;
  --accent: #dc9e21;
  --accent2: #f2c04a;
  --accent-soft: rgba(220, 158, 33, 0.14);
  --accent-glow: rgba(220, 158, 33, 0.35);
  --blue: #4a8fd4;
  --green: #4caf6f;
  --red: #e06a5a;
  --text: #f4efe6;
  --text2: #b4ac9f;
  --text3: #7b7368;
  --maxw: 1200px;
  --radius: 14px;
  --nav-h: 68px;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #140f04; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 22px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  user-select: none;
}

.wrap { width: min(var(--maxw), calc(100% - 48px)); margin: 0 auto; }

/* ---------- Background atmosphere ---------- */
.atmos {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 70% -10%, rgba(220, 158, 33, 0.13), transparent 60%),
    radial-gradient(800px 500px at 5% 20%, rgba(106, 168, 232, 0.07), transparent 60%),
    var(--bg);
}
.atmos canvas { position: absolute; inset: -10%; width: 120%; height: 120%; opacity: 0.55; animation: drift 90s linear infinite alternate; }
.atmos::after {
  content: ''; position: absolute; inset: 0;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05; mix-blend-mode: overlay;
}
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3%, -2%, 0) scale(1.06); } }
/* Idle page: the drift stops (site.js adds `settled` after 20 s). */
.settled .atmos canvas { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .atmos canvas { animation: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h); display: flex; align-items: center;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled, html.docs .nav {
  background: rgba(11, 10, 9, 0.78); border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav .wrap { display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; margin-right: 18px; }
.brand img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px; color: var(--text2);
  font-size: 14px; font-weight: 500; transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.active { color: var(--accent2); }
.nav-link.disabled { color: var(--text3); cursor: default; }
.nav-link.disabled:hover { background: none; color: var(--text3); }
.nav-link .soon { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.8px; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent2); }
.nav .spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; color: var(--text2); }
.nav-burger:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 49;
  padding: 10px 24px 22px; background: rgba(11, 10, 9, 0.96); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px); display: none; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 10px; border-radius: 8px; color: var(--text2); font-weight: 500; }
.mobile-menu a:hover, .mobile-menu a.active { background: rgba(255,255,255,0.05); color: var(--text); }
.mobile-menu .row { display: flex; gap: 8px; margin-top: 10px; }
.mobile-menu .row .btn { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: #17120a;
  font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s, border-color 0.15s, box-shadow 0.2s, color 0.15s;
}
.btn:hover { background: var(--accent2); border-color: var(--accent2); box-shadow: 0 8px 30px -8px var(--accent-glow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .material-symbols-outlined { font-size: 18px; }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line2); }
.btn.ghost:hover { border-color: var(--text3); background: rgba(255,255,255,0.04); box-shadow: none; }
.btn.soft { background: var(--accent-soft); color: var(--accent2); border-color: transparent; }
.btn.soft:hover { background: rgba(220,158,33,0.22); box-shadow: none; }
/* Discord blurple, from Discord's brand colours. */
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.discord:hover { background: #4752c4; border-color: #4752c4; box-shadow: 0 8px 30px -8px rgba(88, 101, 242, 0.5); }
.btn .discord-logo { width: 18px; height: 18px; flex: 0 0 auto; }

.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line2);
  color: var(--text2); font-size: 13px; font-weight: 500; background: var(--surface);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--text3); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #17120a; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px;
  border: 1px solid var(--line2); border-radius: 999px; background: rgba(22, 21, 19, 0.7);
  color: var(--text2); font-size: 13px; font-weight: 500; backdrop-filter: blur(6px);
}
.eyebrow .material-symbols-outlined { font-size: 16px; color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.05; font-weight: 700; }
h1 { font-size: clamp(42px, 6.8vw, 84px); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.6vw, 56px); }
h3 { font-size: clamp(24px, 3vw, 34px); }
.grad {
  background: linear-gradient(100deg, var(--accent) 0%, #ffd77a 50%, var(--accent) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
/* A headline word that cycles through data-words (site.js). */
/* The padding gives descenders (g, y) room inside the box the gradient text is painted in; the margin takes it back. */
.rotate-word { display: inline-block; padding: 0.06em 0 0.2em; margin: -0.06em 0 -0.2em; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.rotate.out .rotate-word { opacity: 0; transform: translateY(-0.35em); }
.rotate.enter .rotate-word { opacity: 0; transform: translateY(0.35em); transition: none; }
.lead { color: var(--text2); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; }
.mono { font-family: var(--font-mono); }
code, kbd { font-family: var(--font-mono); font-size: 0.86em; padding: 2px 6px; border-radius: 6px; background: var(--surface3); border: 1px solid var(--line2); color: var(--text); }
kbd { min-width: 26px; text-align: center; display: inline-block; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.5); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal.from-left { transform: translateX(-34px); }
.reveal.from-right { transform: translateX(34px); }
.reveal.scale { transform: scale(0.94) translateY(12px); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + 72px) 0 20px; }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.hero h1 { max-width: 980px; }
.hero .lead { max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; color: var(--text3); font-family: var(--font-mono); font-size: 12.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .material-symbols-outlined { font-size: 15px; color: var(--accent); }

/* Home hero: the 3D map is a full-viewport background behind the copy. The copy lets
   drags fall through to the map except on its buttons. */
.hero:has(.hero-3d) { min-height: 100vh; min-height: 100svh; overflow: hidden; }
.hero:has(.hero-3d) .wrap { position: relative; z-index: 2; pointer-events: none; }
.hero:has(.hero-3d) .hero-copy a, .hero:has(.hero-3d) .hero-copy button { pointer-events: auto; }
.hero:has(.hero-3d) .lead { color: var(--text); }
.hero:has(.hero-3d) .btn.ghost { background: rgba(16,15,13,0.82); backdrop-filter: blur(8px); }
.hero:has(.hero-3d) .btn.ghost:hover { background: rgba(28,26,23,0.9); }
.hero-3d { position: absolute; inset: 0; z-index: 0; cursor: grab; }
.hero-3d::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-3d:active { cursor: grabbing; }
.hero-3d::before {
  content: ''; position: absolute; left: 50%; top: 62%; width: 80%; height: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(220,158,33,0.18), transparent 70%);
  filter: blur(40px); pointer-events: none; z-index: 0;
}
.hero-3d-inner { position: absolute; inset: 0; z-index: 1; }
.hero-3d canvas { position: relative; width: 100% !important; height: 100% !important; }

/* Home intro: starts on black, the map fades in while it spins and tilts into place,
   the black veil lifts to reveal the page, then the text fades in. JS drives --intro-map and --intro-veil. */
html.intro { overflow: hidden; }
html.intro body::before { content: ''; position: fixed; inset: 0; z-index: 70; background: #000; opacity: var(--intro-veil, 1); pointer-events: none; }
html.intro .hero-3d { z-index: 71; opacity: var(--intro-map, 0); }
html.intro .hero:has(.hero-3d) .wrap { z-index: 72; }
html.intro-hold .hero .reveal, html.intro-hold .hero-3d .hint { opacity: 0 !important; transform: translateY(26px) !important; }
.hero-3d .hint {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(16,15,13,0.75); border: 1px solid var(--line2); color: var(--text2);
  font-size: 13px; backdrop-filter: blur(8px); pointer-events: none; white-space: nowrap;
  transition: opacity 0.4s;
}
.hero-3d .hint .material-symbols-outlined { font-size: 17px; color: var(--accent); }
.hero-3d.touched .hint { opacity: 0; }

/* ---------- Strip ---------- */
.strip { padding: 24px 0 20px; }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: center; color: var(--text3); font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.4px; }
.strip .item { display: inline-flex; align-items: center; gap: 8px; }
.strip .item .material-symbols-outlined { font-size: 18px; color: var(--accent); opacity: 0.9; }
.strip .item b { color: var(--text2); font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: 110px 0; position: relative; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.section-head.left { margin-left: 0; text-align: left; align-items: flex-start; }
.section-head p { color: var(--text2); font-size: 18px; }
.page-head { padding: calc(var(--nav-h) + 72px) 0 10px; }
.page-head .section-head { margin-bottom: 10px; }

/* Pipeline */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.pipeline::before { content: ''; position: absolute; left: 8%; right: 8%; top: 34px; height: 2px; background: var(--line2); z-index: 0; }
.pipeline::after { content: ''; position: absolute; left: 8%; top: 34px; height: 2px; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 14px var(--accent-glow); transition: width 1.6s var(--ease); z-index: 0; }
.pipeline.in::after { width: 84%; }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.step .ico { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 18px; background: var(--surface); border: 1px solid var(--line2); color: var(--accent); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.step .ico .material-symbols-outlined { font-size: 30px; }
.step:hover .ico { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 40px -10px var(--accent-glow); }
.step h4 { font-size: 15px; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }
.step p { font-size: 13px; color: var(--text3); line-height: 1.45; max-width: 160px; }
@media (max-width: 900px) { .pipeline { grid-template-columns: repeat(3, 1fr); gap: 28px 12px; } .pipeline::before, .pipeline::after { display: none; } }
@media (max-width: 520px) { .pipeline { grid-template-columns: repeat(2, 1fr); } }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; padding: 60px 0; }
.feature.flip { grid-template-columns: 1.15fr 1fr; }
.feature.flip .feature-copy { order: 2; }
.feature.flip .feature-media { order: 1; }
.feature.wide { grid-template-columns: 1fr; gap: 28px; }
.feature.wide .feature-copy { max-width: 760px; }
.feature-copy { display: flex; flex-direction: column; gap: 18px; }
.feature-copy p { color: var(--text2); font-size: 17px; }
.feature-copy ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.feature-copy li { position: relative; padding-left: 30px; color: var(--text2); font-size: 15.5px; }
.feature-copy li::before { content: ''; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 5px; background: var(--accent-soft); border: 1px solid rgba(220,158,33,0.4); }
.feature-copy li::after { content: ''; position: absolute; left: 5px; top: 11px; width: 6px; height: 6px; background: var(--accent); border-radius: 2px; }
.feature-copy li b { color: var(--text); font-weight: 600; }
.feature-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent2); font-weight: 600; font-size: 14px; }
.text-link .material-symbols-outlined { font-size: 18px; transition: transform 0.2s var(--ease); }
.text-link:hover .material-symbols-outlined { transform: translateX(4px); }

.feature-media { position: relative; }
.shot { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line2); background: var(--surface); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8); transform-style: preserve-3d; will-change: transform; transition: transform 0.4s var(--ease), box-shadow 0.4s; }
.shot img { width: 100%; height: auto; }
.shot.glow::before { content: ''; position: absolute; inset: -40%; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(220,158,33,0.16), transparent 40%); pointer-events: none; z-index: 1; opacity: 0; transition: opacity 0.3s; }
.shot.glow:hover::before { opacity: 1; }
.shot .tag { position: absolute; left: 14px; top: 14px; z-index: 2; padding: 5px 10px; border-radius: 999px; background: rgba(16,15,13,0.8); border: 1px solid var(--line2); color: var(--text2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.6px; backdrop-filter: blur(6px); }
.shot .tag b { color: var(--accent2); font-weight: 600; }
.media-caption { margin-top: 12px; color: var(--text3); font-size: 13px; text-align: center; font-family: var(--font-mono); }
@media (max-width: 960px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .feature.flip .feature-copy { order: 1; }
  .feature.flip .feature-media { order: 2; }
}

/* ---------- 3D viewports (no window chrome) ---------- */
.viewport { position: relative; }
.viewport-stage {
  position: relative; height: clamp(360px, 48vw, 600px);
  cursor: grab; touch-action: none;
}
.viewport-stage:active, .viewport-stage.dragging { cursor: grabbing; }
.viewport-stage::before {
  content: ''; position: absolute; left: 50%; top: 58%; width: 70%; height: 46%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(220,158,33,0.2), transparent 70%);
  filter: blur(30px); pointer-events: none;
}
.viewport-stage canvas { position: relative; width: 100% !important; height: 100% !important; }
.viewport .chip-row.center { justify-content: center; margin-top: 8px; }
.viewport-status { text-align: center; min-height: 20px; margin-top: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text3); }
.viewport.busy .viewport-stage canvas { opacity: 0.55; transition: opacity 0.3s; }
.stage-hint {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(16,15,13,0.75); border: 1px solid var(--line2); color: var(--text2);
  font-size: 13px; backdrop-filter: blur(8px); pointer-events: none; white-space: nowrap;
  transition: opacity 0.4s;
}
.stage-hint .material-symbols-outlined { font-size: 17px; color: var(--accent); }
.viewport-stage.touched .stage-hint { opacity: 0; }

/* Track editor overlay: the carved path and its points over the 3D view */
.track-overlay { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.track-overlay .path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.9; filter: drop-shadow(0 0 3px rgba(0,0,0,0.7)); }
.track-overlay .anchor { fill: #fff; stroke: #111; stroke-width: 2; }
.track-overlay .anchor.first { fill: var(--accent); }

/* Jump editor overlay: anchors, handles and the profile line over the 3D view */
.jump-overlay { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.jump-overlay .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(0,0,0,0.7)); }
.jump-overlay .hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: copy; }
.jump-overlay .stem { stroke: var(--blue); stroke-width: 1.5; }
.jump-overlay .handle { fill: var(--blue); stroke: #0b0a09; stroke-width: 2; pointer-events: all; cursor: grab; }
.jump-overlay .anchor { fill: #fff; stroke: #111; stroke-width: 2; pointer-events: all; cursor: grab; transition: fill 0.12s; }
.jump-overlay .anchor:hover { fill: var(--accent2); }
.jump-overlay .anchor.on { fill: var(--accent); }
.viewport-stage.dragging .jump-overlay .anchor, .viewport-stage.dragging .jump-overlay .handle { cursor: grabbing; }

/* ---------- App-style sliders (mirror of the app's Slider component) ---------- */
.hs-group { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin: 6px 0 2px; }
.hs-param { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 6px; align-items: stretch; }
.hs-shell {
  --tone: #b9b9b9;
  position: relative; display: flex; align-items: center; min-width: 0; height: 26px; padding: 0 8px;
  background: var(--surface2); border: 1px solid var(--line2); border-radius: 5px; overflow: hidden; cursor: pointer;
}
.hs-shell.positive { --tone: var(--green); }
.hs-shell.negative { --tone: var(--blue); }
.hs-shell::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); background: color-mix(in srgb, var(--tone) 16%, var(--surface2)); pointer-events: none; }
.hs-shell:focus-within { border-color: var(--tone); }
.hs-name { position: relative; z-index: 2; color: var(--tone); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.hs-shell input[type=range] {
  -webkit-appearance: none; appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3;
  background: transparent; margin: 0; outline: none; cursor: pointer;
}
.hs-shell input[type=range]::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.hs-shell input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 26px; margin-top: 0; background: color-mix(in srgb, var(--tone) 70%, var(--surface2)); border-radius: 2px; box-shadow: 0 0 4px color-mix(in srgb, var(--tone) 45%, transparent); }
.hs-shell input[type=range]::-moz-range-track { height: 100%; background: transparent; }
.hs-shell input[type=range]::-moz-range-thumb { width: 2px; height: 26px; border: 0; background: color-mix(in srgb, var(--tone) 70%, var(--surface2)); border-radius: 2px; }
.hs-val { --tone: #b9b9b9; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; height: 26px; background: var(--surface3); border: 1px solid var(--line2); border-radius: 5px; overflow: hidden; }
.hs-val.positive { --tone: var(--green); }
.hs-val.negative { --tone: var(--blue); }
.hs-val:focus-within { border-color: var(--tone); }
.hs-num { min-width: 0; height: 100%; border: 0; outline: none; color: var(--tone); background: transparent; font-family: var(--font-mono); font-size: 12px; text-align: right; padding: 0 2px 0 4px; }
.hs-unit { align-self: center; color: color-mix(in srgb, var(--tone) 78%, var(--text3)); font-family: var(--font-mono); font-size: 12px; padding-right: 4px; }

/* Brush palette (Sculpt) */
.brush-panel { border: 1px solid var(--line2); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8); }
.brush-panel-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text3); }
.brush-panel-head .material-symbols-outlined { font-size: 16px; color: var(--accent); }
.brush-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px; }
.brush { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px 9px; border-radius: 10px; border: 1px solid transparent; color: var(--text2); font-size: 11.5px; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s; }
.brush .material-symbols-outlined { font-size: 22px; color: var(--text2); transition: color 0.15s; }
.brush:hover { background: var(--surface2); color: var(--text); transform: translateY(-1px); }
.brush.active { background: var(--accent-soft); border-color: rgba(220,158,33,0.45); color: var(--text); }
.brush.active .material-symbols-outlined, .brush:hover .material-symbols-outlined { color: var(--accent2); }
.brush-detail { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); height: 230px; }
.brush-detail .copy { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.brush-detail .copy h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
.brush-detail .copy h4 kbd { font-size: 10px; }
.brush-detail .copy p { font-size: 13.5px; color: var(--text2); line-height: 1.5; flex: 1; overflow: hidden; }
.brush-detail .copy .params { display: flex; flex-wrap: wrap; gap: 5px; }
.brush-detail .copy .params span { font-family: var(--font-mono); font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: var(--surface3); color: var(--text2); }
.brush-detail svg { width: 100%; height: 100%; background: var(--surface2); border-left: 1px solid var(--line); }
@media (max-width: 560px) {
  .brush-detail { grid-template-columns: 1fr; height: auto; }
  .brush-detail svg { border-left: 0; border-top: 1px solid var(--line); height: 160px; }
}

/* Cross-section widget (Ruts) */

/* Layer stack (non-destructive) */
.stack-section { overflow: hidden; }
.stack-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.stack { position: relative; height: 420px; perspective: 1200px; }
.stack .layer {
  /* Lifting the cards up to 240px toward the viewer raises the stack about 220px on screen, so the
     base sits half of that below center to keep the whole stack centered. */
  position: absolute; left: 50%; top: calc(50% + 110px); width: min(420px, 90%); height: 190px;
  margin-left: calc(min(420px, 90%) / -2); margin-top: -95px;
  border-radius: 14px; border: 1px solid var(--line2);
  background: linear-gradient(135deg, rgba(40,37,32,0.95), rgba(22,21,19,0.95));
  box-shadow: 0 30px 50px -20px rgba(0,0,0,0.8);
  transform: rotateX(58deg) rotateZ(-32deg) translateZ(var(--z, 0px));
  transition: transform 0.9s var(--ease), opacity 0.9s var(--ease); opacity: 0;
  display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  font-size: 13px; color: var(--text2); backdrop-filter: blur(4px);
}
.stack .layer .material-symbols-outlined { color: var(--accent); font-size: 20px; }
.stack .layer b { color: var(--text); font-weight: 600; font-size: 14px; display: block; }
.stack .layer small { font-family: var(--font-mono); font-size: 11px; color: var(--text3); }
.stack .layer.grid-bg { background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(135deg, rgba(40,37,32,0.95), rgba(22,21,19,0.95)); background-size: 24px 24px, 24px 24px, 100% 100%; }
.stack.in .layer { opacity: 1; }
.stack:not(.in) .layer { transform: rotateX(58deg) rotateZ(-32deg) translateZ(-120px); }
.stack .layer:hover { transform: rotateX(58deg) rotateZ(-32deg) translateZ(calc(var(--z, 0px) + 30px)); border-color: var(--accent); }
.stack-copy h3 { margin-bottom: 14px; }
.stack-copy p { color: var(--text2); font-size: 17px; margin-bottom: 14px; }
.stack-copy .pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-family: var(--font-mono); font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line2); color: var(--text2); }
.pill em { font-style: normal; color: var(--text3); margin-right: 4px; }
@media (max-width: 960px) { .stack-wrap { grid-template-columns: 1fr; gap: 20px; } .stack { height: 360px; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 26px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; transition: border-color 0.2s, transform 0.3s var(--ease); }
.stat:hover { border-color: var(--line2); transform: translateY(-3px); }
.stat .big { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.03em; color: var(--text); line-height: 1; }
.stat .big em { font-style: normal; color: var(--accent); }
.stat .lbl { font-size: 14px; color: var(--text2); font-weight: 500; }
.stat .sub { font-size: 12.5px; color: var(--text3); font-family: var(--font-mono); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { position: relative; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; overflow: hidden; transition: border-color 0.25s, transform 0.3s var(--ease); }
.card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(220,158,33,0.1), transparent 60%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.card:hover { border-color: var(--line2); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent2); }
.card h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.card p { font-size: 14px; color: var(--text2); line-height: 1.55; }
.card .soon { position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent2); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(22,21,19,0.7), rgba(11,10,9,0.4)); }

/* ---------- Features page: wide side-by-side chapters, bento tiles ---------- */
.fx-hero { padding: calc(var(--nav-h) + 96px) 0 72px; text-align: center; }
.fx-hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.fx-hero h1 { max-width: 900px; text-wrap: balance; }
.fx-hero p { font-size: 18px; color: var(--text2); max-width: 640px; text-wrap: pretty; }


.fx-chapter { padding: clamp(90px, 13vh, 150px) 0; }

/* Copy on one side, media on the other; .flip swaps sides */
.fx-split { --maxw: 1440px; display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(40px, 5vw, 88px); align-items: center; }
.fx-split.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
.fx-split.flip .fx-split-copy { order: 2; }
.fx-split.flip .fx-split-media { order: 1; }
.fx-split + .fx-split { margin-top: clamp(64px, 9vh, 110px); }
.fx-split-copy { display: flex; flex-direction: column; gap: 18px; }
.fx-split-copy p { color: var(--text2); font-size: 17px; }
.fx-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.fx-split-media .shot, .fx-split-media .brush-panel { border-radius: 20px; }
.fx-split-media .brush-detail { height: 270px; }
@media (max-width: 960px) {
  .fx-split, .fx-split.flip { grid-template-columns: 1fr; }
  .fx-split.flip .fx-split-copy { order: 1; }
  .fx-split.flip .fx-split-media { order: 2; }
}

/* Built-in online libraries named under a feature's copy */
.fx-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-sources .src { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border: 1px solid var(--line2); border-radius: 999px; background: var(--surface); color: var(--text2); font-size: 12.5px; font-weight: 500; }
.fx-sources .src img { height: 16px; width: auto; }

/* 3D stage inside a split column */
.fx-stage .viewport-stage { height: clamp(380px, 62vh, 700px); }


/* Bento tiles */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.bento .tile { padding: 26px; border-radius: 20px; min-height: 190px; justify-content: flex-end; gap: 10px; }
.bento .tile > .material-symbols-outlined { position: absolute; top: 24px; left: 26px; font-size: 28px; color: var(--accent2); }
.bento .tile.span2 { grid-column: span 2; }
.bento .tile h4 { font-size: 17px; }
.bento .tile b { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.bento .tile b.big { font-size: clamp(32px, 4.6vw, 56px); background: linear-gradient(100deg, var(--accent) 0%, #ffd77a 50%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bento .tile b.mid { font-size: clamp(22px, 2.2vw, 28px); color: var(--text); }
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento .tile.span2 { grid-column: auto; }
}

/* CTA */
.cta { padding: 120px 0; text-align: center; }
.cta-box { position: relative; padding: 72px 32px; border-radius: 24px; border: 1px solid var(--line2); background: radial-gradient(700px 300px at 50% 120%, rgba(220,158,33,0.22), transparent 60%), var(--surface); overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cta-box::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(600px 300px at 50% 100%, #000, transparent 70%); -webkit-mask-image: radial-gradient(600px 300px at 50% 100%, #000, transparent 70%); pointer-events: none; }
.cta-box > * { position: relative; }
.cta-box p { color: var(--text2); font-size: 18px; max-width: 560px; }

/* Footer */
footer { padding: 54px 0 34px; border-top: 1px solid var(--line); color: var(--text3); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 36px; }
.foot-grid .brand img { height: 28px; }
.foot-grid p { margin-top: 12px; max-width: 320px; font-size: 13.5px; line-height: 1.55; }
.foot-grid h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text2); margin-bottom: 12px; }
.foot-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.foot-grid a:hover { color: var(--accent2); }
.foot-grid .soon { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent2); margin-left: 6px; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12.5px; }
.foot-bottom .mono { color: var(--text3); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 7, 6, 0.78); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { width: 100%; max-width: 760px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 32px; border-radius: 18px; border: 1px solid var(--line2); background: var(--surface); box-shadow: 0 40px 100px rgba(0,0,0,0.7); transform: translateY(14px) scale(0.98); transition: transform 0.3s var(--ease); position: relative; }
.modal-overlay.active .modal { transform: none; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--text3); }
.modal-close:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.modal h3 { font-size: 24px; margin-bottom: 8px; }
.modal > p { color: var(--text2); font-size: 15px; margin-bottom: 20px; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.platform { padding: 20px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface2); display: flex; flex-direction: column; gap: 8px; transition: border-color 0.2s, box-shadow 0.2s; }
.platform.highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.platform .material-symbols-outlined { font-size: 28px; color: var(--accent); }
.platform h4 { font-family: var(--font-body); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.platform p { font-size: 13.5px; color: var(--text2); flex: 1; }
.platform small { font-family: var(--font-mono); font-size: 11px; color: var(--text3); }
.platform .experimental { display: block; margin-bottom: 4px; color: var(--accent2); font-weight: 500; }
.unblock { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.unblock summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--text2); list-style: none; display: flex; align-items: center; gap: 8px; }
.unblock summary::-webkit-details-marker { display: none; }
.unblock summary .material-symbols-outlined { font-size: 18px; color: var(--accent); transition: transform 0.2s; }
.unblock[open] summary .material-symbols-outlined { transform: rotate(90deg); }
.unblock .modal-grid { padding: 0 16px 16px; }
.modal-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; align-items: start; }
.modal-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text2); font-size: 14px; }
.modal-steps li::marker { color: var(--accent); font-family: var(--font-mono); font-weight: 600; }
.modal-steps b { color: var(--text); }
.modal-img { border-radius: 10px; overflow: hidden; border: 1px solid var(--line2); background: #fff; }
.modal-note { font-size: 12.5px; color: var(--text3); margin-top: 14px; font-family: var(--font-mono); }
@media (max-width: 680px) { .modal-grid, .platforms { grid-template-columns: 1fr; } .modal { padding: 24px; } }

/* ---------- Docs layout ---------- */
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 190px; gap: 48px; padding-top: calc(var(--nav-h) + 36px); padding-bottom: 100px; }
.docs-side { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
.docs-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line2); margin-bottom: 18px; }
.docs-search .material-symbols-outlined { font-size: 18px; color: var(--text3); }
.docs-search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; min-width: 0; }
.docs-search input::placeholder { color: var(--text3); }
.docs-search kbd { font-size: 10px; }
.docs-nav h5 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text3); margin: 18px 0 8px 10px; }
.docs-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.docs-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text2); font-size: 14px; border-left: 2px solid transparent; transition: color 0.15s, background 0.15s, border-color 0.15s; }
.docs-nav a .material-symbols-outlined { font-size: 17px; color: var(--text3); }
.docs-nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.docs-nav a.active { color: var(--accent2); background: var(--accent-soft); border-left-color: var(--accent); }
.docs-nav a.active .material-symbols-outlined { color: var(--accent2); }
.docs-nav li.hidden { display: none; }
.docs-nav .no-results { padding: 10px; color: var(--text3); font-size: 13px; display: none; }
.docs-main { min-width: 0; }
.docs-main > header { margin-bottom: 42px; }
.docs-main > header h1 { font-size: clamp(36px, 5vw, 56px); margin: 10px 0 14px; }
.docs-main > header p { color: var(--text2); font-size: 18px; max-width: 640px; }
.doc-section { padding: 10px 0 48px; border-bottom: 1px solid var(--line); margin-bottom: 42px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.doc-section:last-child { border-bottom: 0; }
.doc-section h2 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.doc-section h2 .material-symbols-outlined { font-size: 28px; color: var(--accent); }
.doc-section h3 { font-size: 19px; margin: 30px 0 10px; font-family: var(--font-body); letter-spacing: 0; font-weight: 600; scroll-margin-top: calc(var(--nav-h) + 24px); }
.doc-section h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text3); margin: 20px 0 8px; }
.doc-section p { color: var(--text2); margin-bottom: 12px; font-size: 15.5px; }
.doc-section p b, .doc-section li b { color: var(--text); font-weight: 600; }
.doc-section ul, .doc-section ol { margin: 0 0 14px 20px; color: var(--text2); display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.doc-section li::marker { color: var(--accent); }
.doc-section .lead-p { font-size: 17px; color: var(--text2); }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line2); margin: 16px 0; font-size: 14.5px; color: var(--text2); }
.callout .material-symbols-outlined { color: var(--accent); flex-shrink: 0; font-size: 20px; margin-top: 2px; }
.callout.tip .material-symbols-outlined { color: var(--green); }
.callout.warn .material-symbols-outlined { color: var(--red); }
.callout p { margin: 0; }
.callout p + p { margin-top: 6px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; }
.doc-table th, .doc-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text3); font-weight: 600; }
.doc-table td { color: var(--text2); }
.doc-table td:first-child { color: var(--text); white-space: nowrap; }
.doc-table.kbd td:first-child { font-family: var(--font-mono); }
.doc-table tr:hover td { background: rgba(255,255,255,0.02); }
.doc-scroll { overflow-x: auto; margin: 10px 0 18px; }
.doc-scroll .doc-table { margin: 0; }
.doc-code { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; color: var(--text); background: var(--surface); border: 1px solid var(--line2); border-radius: 12px; padding: 14px 16px; margin: 10px 0 18px; overflow-x: auto; white-space: pre; tab-size: 2; }
.param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 10px 0 18px; }
.param { padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.param b { display: block; font-size: 13.5px; color: var(--text); font-weight: 600; margin-bottom: 3px; }
.param span { font-size: 13px; color: var(--text2); line-height: 1.45; display: block; }
.doc-steps { counter-reset: s; list-style: none; margin: 10px 0 18px 0; display: flex; flex-direction: column; gap: 10px; }
.doc-steps li { position: relative; padding: 12px 14px 12px 52px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text2); font-size: 14.5px; }
.doc-steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); position: absolute; left: 14px; top: 11px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.doc-steps li b { color: var(--text); }
.docs-toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; font-size: 13px; }
.docs-toc h5 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.docs-toc ul { list-style: none; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); }
.docs-toc a { display: block; padding: 2px 0 2px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text3); transition: color 0.15s, border-color 0.15s; }
.docs-toc a:hover { color: var(--text); }
.docs-toc a.active { color: var(--accent2); border-left-color: var(--accent); }
.doc-footer-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
mark.hit { background: rgba(220,158,33,0.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.docs-mobile-toggle { display: none; }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: 230px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 820px) {
  .docs-layout { grid-template-columns: 1fr; gap: 20px; }
  .docs-side { position: static; max-height: none; overflow: visible; display: none; }
  .docs-side.open { display: block; }
  .docs-mobile-toggle { display: inline-flex; }
}

/* Back to top + progress */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface2); border: 1px solid var(--line2); color: var(--text2); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease), color 0.15s, border-color 0.15s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent2); border-color: var(--accent); }
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); z-index: 60; box-shadow: 0 0 10px var(--accent-glow); }

/* Utilities */
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
@media (max-width: 860px) {
  .nav-links, .nav-actions .ghost, .nav-actions .discord { display: none; }
  .nav-burger { display: inline-flex; }
  .hide-mobile { display: none !important; }
  section { padding: 76px 0; }
  .wrap { width: min(var(--maxw), calc(100% - 32px)); }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .page-head { padding-top: calc(var(--nav-h) + 40px); }
}

/* ---------- Pricing ---------- */
.pricing-section { padding: 50px 0 110px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 880px; margin: 0 auto; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 18px;
  padding: 34px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line2);
}
.plan.featured {
  border-color: rgba(220,158,33,0.55);
  background: radial-gradient(500px 220px at 50% -10%, rgba(220,158,33,0.16), transparent 70%), var(--surface);
  box-shadow: 0 30px 80px -30px var(--accent-glow);
}
.plan-name { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.plan-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-price .amount { font-family: var(--font-display); font-size: clamp(44px, 6vw, 60px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan-price .per { color: var(--text3); font-size: 14px; }
.plan-for { color: var(--text2); font-size: 15.5px; }
.plan-list { list-style: none; display: flex; flex-direction: column; gap: 11px; padding: 18px 0; border-top: 1px solid var(--line); flex: 1; }
.plan-list li { display: flex; align-items: center; gap: 10px; color: var(--text2); font-size: 15px; }
.plan-list .material-symbols-outlined { font-size: 19px; color: var(--green); }
.plans-note { text-align: center; margin-top: 28px; color: var(--text3); font-size: 14px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } .plan { padding: 26px; } }

/* ---------- Plugins ---------- */
.plugins-section { padding: 50px 0 110px; }
.plugin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 880px; margin: 0 auto; }
.plugin-card { gap: 14px; }
.plugin-top { display: flex; align-items: center; gap: 14px; }
.plugin-logo { width: 56px; height: 56px; flex: none; border-radius: 14px; border: 1px solid var(--line2); object-fit: cover; background: var(--surface2, #000); }
.plugin-version { font-family: var(--font-mono); font-size: 12px; color: var(--text3); }
.plugin-card p { flex: 1; }
.plugin-needs { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text3); font-size: 13px; }
.plugin-needs .material-symbols-outlined { font-size: 18px; color: var(--accent2); }
.plugins-steps { padding: 90px 0; }
.plugin-own { grid-column: 1 / -1; }
.plugin-logo-icon { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent2); }
.plugin-logo-icon .material-symbols-outlined { font-size: 28px; }
.plugin-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .plugin-grid { grid-template-columns: 1fr; } }

/* ---------- Lite mode (weak machines, site.js) ---------- */
/* No drift, noise blend or blurred glass: each redraws the page every frame. */
.lite .atmos canvas { animation: none; }
.lite .atmos::after { display: none; }
.lite *, .lite *::before, .lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.lite .nav.scrolled, html.lite.docs .nav { background: rgba(11, 10, 9, 0.96); }
.lite .grad { animation: none; }

/* ---------- No WebGL: a note in place of each 3D demo ---------- */
.no-webgl .viewport-stage { cursor: default; }
.stage-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; text-align: center; border: 1px dashed var(--line2); border-radius: var(--radius); color: var(--text3); font-size: 14px;
}
.stage-fallback .material-symbols-outlined { font-size: 36px; color: var(--accent); }
.stage-fallback b { color: var(--text2); font-weight: 600; }
