/* ====================================================
   Lightbringer Studios — Redesign Prototype
   Theme: dark cinematic + cartographic
   ==================================================== */

:root {
  /* Type */
  --serif: "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Geist", "Söhne", "Inter Tight", sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Palette — Atlas (default) — matches TI Atlas brand: deep blue / cyan / silver */
  --bg: oklch(0.115 0.020 250);
  --bg-2: oklch(0.145 0.025 245);
  --surface: oklch(0.175 0.028 245);
  --surface-2: oklch(0.215 0.030 245);
  --line: oklch(0.28 0.030 240);
  --line-2: oklch(0.40 0.035 220);
  --text: oklch(0.97 0.010 230);
  --muted: oklch(0.72 0.025 230);
  --muted-2: oklch(0.55 0.025 230);
  --accent: oklch(0.82 0.135 220);
  --accent-2: oklch(0.62 0.115 220);
  --accent-ink: oklch(0.12 0.04 250);
  --map: oklch(0.78 0.12 195);

  /* Geometry */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --shadow-soft: 0 24px 60px -28px rgba(0,0,0,0.8);
}

/* Palette: Embers (alternative warm) */
[data-palette="embers"] {
  --bg: oklch(0.135 0.012 50);
  --bg-2: oklch(0.165 0.013 50);
  --surface: oklch(0.195 0.014 50);
  --surface-2: oklch(0.235 0.014 50);
  --line: oklch(0.30 0.012 55);
  --line-2: oklch(0.40 0.012 55);
  --text: oklch(0.96 0.006 60);
  --muted: oklch(0.68 0.010 50);
  --muted-2: oklch(0.52 0.010 50);
  --accent: oklch(0.82 0.135 75);
  --accent-2: oklch(0.62 0.10 75);
  --accent-ink: oklch(0.20 0.05 60);
  --map: oklch(0.74 0.085 195);
}

/* Palette: Cartograph (parchment) */
[data-palette="cartograph"] {
  --bg: oklch(0.95 0.018 85);
  --bg-2: oklch(0.92 0.020 85);
  --surface: oklch(0.97 0.015 85);
  --surface-2: oklch(0.99 0.010 85);
  --line: oklch(0.78 0.025 80);
  --line-2: oklch(0.62 0.030 70);
  --text: oklch(0.22 0.025 50);
  --muted: oklch(0.42 0.020 60);
  --muted-2: oklch(0.55 0.018 60);
  --accent: oklch(0.52 0.14 35);
  --accent-2: oklch(0.42 0.10 35);
  --accent-ink: oklch(0.98 0.008 80);
  --map: oklch(0.44 0.08 210);
}

/* Palette: Cobalt (alternative blue, brighter) */
[data-palette="cobalt"] {
  --bg: oklch(0.12 0.018 250);
  --bg-2: oklch(0.15 0.022 250);
  --surface: oklch(0.18 0.025 250);
  --surface-2: oklch(0.22 0.030 250);
  --line: oklch(0.30 0.025 240);
  --line-2: oklch(0.42 0.025 240);
  --text: oklch(0.97 0.008 240);
  --muted: oklch(0.68 0.020 240);
  --muted-2: oklch(0.52 0.020 240);
  --accent: oklch(0.78 0.13 220);
  --accent-2: oklch(0.60 0.11 220);
  --accent-ink: oklch(0.15 0.04 250);
  --map: oklch(0.78 0.11 195);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}
/* Film-grain noise — cinematic depth across the whole page */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.08 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay; opacity: 0.55;
}
[data-palette="cartograph"] body::before { mix-blend-mode: multiply; opacity: 0.35; }
#root > * { position: relative; z-index: 2; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: var(--mono); font-weight: 400; }

/* small caps label */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 10px; vertical-align: 1px;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}

/* container */
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.20em;
  text-transform: uppercase; color: var(--text);
  font-weight: 500;
}
/* Full wordmark lockup in the nav. The source PNG sits on solid
   black, so we use `mix-blend-mode: lighten` against the dark
   backdrop to make that black drop out cleanly. Cartograph (light)
   palette gets a plain inverted render instead. */
.brand-lockup {
  display: block;
  height: 60px; width: auto;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 0 14px color-mix(in oklab, var(--accent) 22%, transparent));
}
[data-palette="cartograph"] .brand-lockup {
  mix-blend-mode: normal;
  filter: invert(1) hue-rotate(180deg);
}
/* Footer lockup — bigger still, since it's the closing signature */
.brand-lockup.brand-lockup-foot { height: 84px; margin-left: -6px; }
.brand-mark {
  width: 32px; height: 32px;
  background-image: url("assets/lightbringer-crest.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 8px color-mix(in oklab, var(--accent) 40%, transparent));
}
[data-palette="cartograph"] .brand-mark { filter: invert(0.9) hue-rotate(180deg); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-link {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  background: transparent; color: var(--text);
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { background: color-mix(in oklab, var(--text) 6%, transparent); border-color: var(--text); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-primary:hover {
  background: color-mix(in oklab, var(--accent) 80%, white);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 84px 0 110px;
  border-bottom: 1px solid color-mix(in oklab, var(--line) 50%, transparent);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: -10% -20% auto auto;
  width: 70vmax; height: 70vmax; pointer-events: none;
  background: radial-gradient(circle at center, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%);
  filter: blur(40px); opacity: 0.5;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(54px, 6.4vw, 96px);
  line-height: 0.98; letter-spacing: -0.025em;
  margin: 28px 0 32px;
  text-wrap: pretty;
}
.hero h1 .ital { font-style: italic; color: var(--accent); }
.hero p.lede {
  font-size: 19px; line-height: 1.55; color: var(--muted);
  max-width: 52ch; margin: 0 0 36px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-meta {
  display: grid; grid-template-columns: repeat(3, auto); gap: 0;
  margin-top: 56px; padding-top: 24px;
  border-top: 1px dashed color-mix(in oklab, var(--line-2) 60%, transparent);
}
.hero-meta > div { padding-right: 32px; }
.hero-meta .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px;
}
.hero-meta .v { font-family: var(--serif); font-size: 22px; line-height: 1; }

/* Hero visual */
.hero-visual {
  position: relative; aspect-ratio: 16 / 9; max-width: 720px; margin-inline: auto;
  width: 100%;
}
.hero-visual svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 40px color-mix(in oklab, var(--accent) 22%, transparent)); }

/* Hero video — YouTube embed in cinematic frame */
.hero-video {
  position: relative; width: 100%; height: 100%;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  box-shadow: var(--shadow-soft), 0 0 60px -20px color-mix(in oklab, var(--accent) 35%, transparent);
}
.hero-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; border: 0;
}
.hero-video-ticks {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 16px;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--bg) 80%, transparent));
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  opacity: 0; transition: opacity .25s;
}
.hero-video:hover .hero-video-ticks { opacity: 1; }

/* coordinates overlay */
.coord-ticks {
  position: absolute; inset: 0; pointer-events: none;
  font-family: var(--mono); font-size: 10px; color: var(--muted-2);
  letter-spacing: 0.08em;
}
.coord-ticks .t { position: absolute; }

/* ---------- Section base ---------- */
section.s { padding: 110px 0; border-bottom: 1px solid color-mix(in oklab, var(--line) 50%, transparent); }
.s-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; margin-bottom: 60px; align-items: end; }
.s-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 4vw, 60px);
  line-height: 1.02; letter-spacing: -0.02em;
  margin: 18px 0 0;
  text-wrap: balance;
}
.s-title .ital { font-style: italic; color: var(--accent); }
.s-sub { color: var(--muted); font-size: 17px; max-width: 56ch; }

/* ---------- Featured product (Atlas) ---------- */
.atlas-card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.atlas-hero {
  position: relative; aspect-ratio: 16 / 7;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.atlas-hero svg { width: 100%; height: 100%; display: block; }
.atlas-hero-img {
  position: absolute; inset: 0;
  background-image: url("assets/atlas-hero-art.png");
  background-size: cover;
  background-position: center 30%;
}
.atlas-hero-img::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 70%, color-mix(in oklab, var(--bg) 55%, transparent) 100%);
}
.atlas-badge {
  position: absolute; top: 18px; left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text);
  backdrop-filter: blur(6px);
}
.atlas-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.atlas-body {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  padding: 44px 44px 48px;
}
.atlas-body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 44px; line-height: 1; letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.atlas-body p { color: var(--muted); margin: 0 0 28px; max-width: 52ch; }
.atlas-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag {
  display: inline-block; padding: 5px 10px; border-radius: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface-2) 50%, transparent);
}

.atlas-side {
  display: flex; flex-direction: column;
}
.atlas-side .stat {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.atlas-side .stat:last-child { border-bottom: 1px solid var(--line); }
.atlas-side .stat .row1 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 8px;
}
.atlas-side .stat .v {
  font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--text);
  letter-spacing: -0.02em;
}
.atlas-side .stat .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.atlas-side .stat .d { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* ---------- Module Explorer ---------- */
.modules {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px;
  align-items: start;
}
[data-modules-layout="grid"] .module-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
[data-modules-layout="list"] .module-list {
  display: flex; flex-direction: column; gap: 4px;
}
[data-modules-layout="pipeline"] .module-list {
  display: flex; flex-direction: column; gap: 2px;
}

.module-tile {
  position: relative; cursor: pointer;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  transition: all .2s ease;
  display: flex; flex-direction: row; align-items: center; gap: 16px;
  min-height: 78px;
  text-align: left;
}
[data-modules-layout="grid"] .module-tile {
  /* keep row layout but tighter padding */
  padding: 14px 14px;
  gap: 12px;
  min-height: 76px;
}
.module-tile:hover {
  border-color: var(--line-2);
  background: color-mix(in oklab, var(--surface-2) 75%, transparent);
  transform: translateY(-1px);
}
.module-tile.active {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 9%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent),
              0 8px 22px -16px color-mix(in oklab, var(--accent) 60%, transparent);
}
.module-tile .body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.module-tile .num {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--muted-2);
}
.module-tile.active .num { color: var(--accent); }
.module-tile .name {
  font-family: var(--serif); font-size: 22px; line-height: 1.05;
  letter-spacing: -0.01em;
}
[data-modules-layout="grid"] .module-tile .name { font-size: 18px; word-break: break-word; }
.module-tile .short {
  font-size: 12px; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
[data-modules-layout="grid"] .module-tile .short { display: none; }
.module-tile .mini {
  flex-shrink: 0;
  width: 60px; height: 60px;
  border-radius: 6px; overflow: hidden;
  background: var(--bg);
  border: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.module-tile.active .mini {
  border-color: color-mix(in oklab, var(--accent) 50%, transparent);
  box-shadow: 0 0 18px -6px color-mix(in oklab, var(--accent) 60%, transparent);
}
.module-tile .mini svg,
.module-tile .mini img {
  width: 100%; height: 100%; display: block; object-fit: contain;
}
.module-tile .mini img { padding: 4px; }

[data-modules-layout="pipeline"] .module-tile { padding-left: 22px; }
[data-modules-layout="pipeline"] .module-tile::before {
  content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px;
  width: 3px; background: var(--accent);
  opacity: 0; transition: opacity .2s;
  border-radius: var(--r-md) 0 0 var(--r-md);
}
[data-modules-layout="pipeline"] .module-tile.active::before { opacity: 1; }
[data-modules-layout="pipeline"] .module-tile .step-num {
  font-family: var(--mono); font-size: 12px; color: var(--muted-2);
  width: 28px; letter-spacing: 0.1em;
}
[data-modules-layout="pipeline"] .module-tile.active .step-num { color: var(--accent); }

/* Detail panel */
.module-detail {
  position: sticky; top: 90px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.module-detail .view {
  position: relative; aspect-ratio: 4 / 3;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.module-detail .view svg { width: 100%; height: 100%; display: block; }
.module-detail .view.view-render {
  /* Real Atlas layer render — show on a black inner stage like a viewport */
  background: #000;
}
.module-detail .view.view-render .view-img {
  width: 100%; height: 100%; display: block;
  object-fit: contain; object-position: center;
  /* subtle saturation lift so renders feel like the brand palette */
  filter: saturate(1.05) contrast(1.02);
}
/* faint vignette so the render reads as a framed viewport */
.module-detail .view.view-render::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%);
}
.module-detail .view .corner {
  position: absolute; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2);
}
.module-detail .view .corner.tl { top: 14px; left: 14px; }
.module-detail .view .corner.tr { top: 14px; right: 14px; }
.module-detail .view .corner.bl { bottom: 14px; left: 14px; }
.module-detail .view .corner.br { bottom: 14px; right: 14px; }

.module-detail .info { padding: 28px 32px 32px; }
.module-detail .info h4 {
  font-family: var(--serif); font-weight: 400;
  font-size: 36px; line-height: 1; letter-spacing: -0.015em;
  margin: 6px 0 14px;
}
.module-detail .info p { color: var(--muted); margin: 0 0 22px; }
.module-detail .props { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.module-detail .props .row {
  padding-top: 14px; border-top: 1px dashed color-mix(in oklab, var(--line-2) 60%, transparent);
}
.module-detail .props .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px;
}
.module-detail .props .v { font-family: var(--mono); font-size: 13px; color: var(--text); }

/* Code snippet inside the detail panel */
.module-detail .snippet { margin-top: 26px; }
.module-detail .snippet-eyebrow { margin-bottom: 10px; }
.code-block {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--bg) 70%, #000 30%);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px; line-height: 1.65;
}
.code-block .code-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  border-bottom: 1px solid var(--line);
}
.code-block .code-bar .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted-2); opacity: 0.55;
}
.code-block .code-bar .dot.d1 { background: oklch(0.62 0.16 25); opacity: 0.85; }
.code-block .code-bar .dot.d2 { background: oklch(0.78 0.14 85); opacity: 0.85; }
.code-block .code-bar .dot.d3 { background: oklch(0.68 0.14 150); opacity: 0.85; }
.code-block .code-bar .lang {
  margin-left: auto;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-2);
}
.code-block code {
  display: block;
  padding: 14px 14px 16px;
  color: var(--text);
  overflow-x: auto;
}
.code-block code::-webkit-scrollbar { height: 6px; }
.code-block code::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--muted-2) 40%, transparent);
  border-radius: 3px;
}
.code-block .ln {
  display: flex; gap: 14px; white-space: pre;
}
.code-block .ln .gutter {
  flex: none;
  color: color-mix(in oklab, var(--muted-2) 65%, transparent);
  user-select: none;
  text-align: right;
  min-width: 1.6em;
}
.code-block .ln .src { flex: 1; min-width: 0; }
/* tokens */
.code-block .tk-c  { color: color-mix(in oklab, var(--muted) 80%, transparent); font-style: italic; }
.code-block .tk-s  { color: oklch(0.80 0.11 145); }
.code-block .tk-n  { color: oklch(0.82 0.12 75); }
.code-block .tk-k  { color: oklch(0.78 0.13 320); }
.code-block .tk-ty { color: var(--accent); }
.code-block .tk-t,
.code-block .tk-w  { color: var(--text); }

/* ---------- Tech specs strip ---------- */
.specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.spec {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
}
.spec:last-child { border-right: 0; }
.spec .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px;
}
.spec .v { font-family: var(--serif); font-size: 28px; line-height: 1.05; letter-spacing: -0.015em; }
.spec .v .sub { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 0.05em; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gal-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
  transition: transform .25s, border-color .2s;
}
.gal-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.gal-card .pic { aspect-ratio: 4 / 3; background: var(--bg-2); position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.gal-card .pic svg { width: 100%; height: 100%; display: block; }
.gal-card .pic.pic-render { background: #08111e; }
.gal-card .pic.pic-render img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
  /* renders are square 1024² — cover crops a comfortable 4:3 from middle */
  filter: saturate(1.05) contrast(1.02);
  transition: transform .5s ease;
}
.gal-card:hover .pic.pic-render img { transform: scale(1.03); }
/* faint vignette to seat the render in the card */
.gal-card .pic.pic-render::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(0,0,0,0.5) 100%);
}
.gal-card .meta { padding: 18px 22px 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.gal-card .meta .name { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; }
.gal-card .meta .seed { font-family: var(--mono); font-size: 11px; color: var(--muted-2); letter-spacing: 0.12em; }
.gal-card .meta .by { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }

/* ---------- Roadmap ---------- */
.roadmap { position: relative; }
.roadmap .axis {
  position: absolute; left: 0; right: 0; top: 28px; height: 1px;
  background: color-mix(in oklab, var(--line-2) 60%, transparent);
}
.roadmap .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.roadmap .item { position: relative; padding-top: 56px; }
.roadmap .item .node {
  position: absolute; left: 0; top: 21px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-2);
}
.roadmap .item.done .node { background: var(--accent); border-color: var(--accent); }
.roadmap .item.active .node { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 20%, transparent); }
.roadmap .item .when {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px;
}
.roadmap .item.done .when { color: var(--accent); }
.roadmap .item .what {
  font-family: var(--serif); font-size: 21px; line-height: 1.15; letter-spacing: -0.01em;
  margin-bottom: 14px; text-wrap: balance;
}
.roadmap .item .desc { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left;
  display: flex; align-items: baseline; justify-content: space-between; gap: 32px;
  padding: 24px 0;
  font-family: var(--serif); font-size: 24px; letter-spacing: -0.01em;
  color: var(--text);
}
.faq-q .plus {
  font-family: var(--mono); font-size: 18px; color: var(--muted-2);
  transition: transform .25s;
}
.faq-item.open .faq-q .plus { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
  color: var(--muted);
}
.faq-item.open .faq-a { max-height: 320px; }
.faq-a .inner { padding: 0 0 26px; max-width: 70ch; line-height: 1.6; }

/* ---------- Connect ---------- */
.connect {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start;
}
.newsletter {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 36px 36px 32px;
}
.newsletter h4 {
  font-family: var(--serif); font-weight: 400; font-size: 30px;
  letter-spacing: -0.015em; margin: 8px 0 12px;
}
.newsletter p { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.news-input {
  display: flex; gap: 0; border: 1px solid var(--line-2); border-radius: 999px;
  overflow: hidden;
}
.news-input input {
  flex: 1; padding: 12px 18px; background: transparent; border: 0; outline: 0;
  font-family: var(--mono); font-size: 13px; color: var(--text);
}
.news-input input::placeholder { color: var(--muted-2); }
.news-input button {
  padding: 10px 22px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
}
.news-input button:hover { background: color-mix(in oklab, var(--accent) 85%, white); }

.connect-links { display: flex; flex-direction: column; gap: 10px; }
.connect-card {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .2s, transform .15s, background .2s;
}
.connect-card:hover {
  border-color: var(--accent); transform: translateX(4px);
  background: color-mix(in oklab, var(--accent) 6%, var(--surface));
}
.connect-card .ico {
  width: 44px; height: 44px; border-radius: 8px;
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); color: var(--accent); font-size: 16px;
}
.connect-card .title { font-family: var(--serif); font-size: 20px; }
.connect-card .sub { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.connect-card .arr { font-family: var(--mono); color: var(--muted-2); font-size: 18px; }

/* ---------- Footer ---------- */
footer.foot {
  padding: 60px 0 50px;
  border-top: 1px solid var(--line);
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.foot p { color: var(--muted); font-size: 14px; max-width: 36ch; }
.foot .col h6 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted-2); margin: 6px 0 18px;
}
.foot .col a { display: block; color: var(--text); font-size: 14px; padding: 4px 0; }
.foot .col a:hover { color: var(--accent); }
.foot-bottom {
  margin-top: 56px; padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--muted-2);
}

/* ---------- API + Studio card grids (default desktop) ---------- */
.api-grid { grid-template-columns: repeat(4, 1fr); }
.studio-grid { grid-template-columns: repeat(3, 1fr); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid, .atlas-body, .modules, .connect, .foot-grid { grid-template-columns: 1fr; gap: 40px; }
  .s-head { grid-template-columns: 1fr; gap: 18px; }
  .api-grid { grid-template-columns: 1fr 1fr; gap: 24px 32px; }
  .studio-grid { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs .spec:nth-child(2n) { border-right: 0; }
  .specs .spec:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .gallery, .roadmap .row { grid-template-columns: 1fr 1fr; }
  [data-modules-layout="grid"] .module-list { grid-template-columns: repeat(2, 1fr); }
  .module-detail { position: static; }
  .hero-visual { max-width: 480px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .specs { grid-template-columns: 1fr; }
  .specs .spec { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .specs .spec:last-child { border-bottom: 0; }
  .gallery, .roadmap .row { grid-template-columns: 1fr; }
  .api-grid { grid-template-columns: 1fr; gap: 22px; }
  .nav-links { display: none; }
  section.s { padding: 70px 0; }
  .atlas-body { padding: 32px 24px; }
  .hero h1 { font-size: 48px; }
}
