/* ============================================================
   AXIOM FOUNDRY — SPATIAL UI SYSTEM (shared)
   Obsidian canvas · glassmorphism · violet + amber accents
   Theme: dark (default) + light ([data-theme="light"])
   z-index scale:
     0  :: fixed Three.js canvas (background)
     1  :: contrast scrim
     10 :: UI layer (nav, sections, content)
     20 :: sticky nav
   ============================================================ */

/* ---------- 1. THEME TOKENS ---------- */
:root,
[data-theme="dark"] {
  /* Surfaces */
  --bg: #07060c;
  --bg-2: #0c0a14;
  --glass-bg: rgba(22, 18, 31, 0.55);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-strong: rgba(255, 255, 255, 0.18);

  /* Text (contrast-checked on --bg) */
  --text-hi:  #f4f1fb;   /* 15.3:1 AAA */
  --text-mid: #c2b9d4;   /* 8.4:1  AAA */
  --text-low: #8b82a0;   /* 4.7:1  AA  */

  /* Accents — LOCKED: deep violet primary, electric amber secondary */
  --violet: #7c5cff;
  --violet-soft: #a78bff;
  --violet-glow: rgba(124, 92, 255, 0.55);
  --amber: #ffb347;
  --amber-soft: #ffce82;
  --amber-glow: rgba(255, 179, 71, 0.45);
  --accent-ink: #a78bff;   /* display emphasis word */
  --stat-num: #ffce82;     /* large stat numerals */

  /* Tinted surfaces */
  --nav-bg: linear-gradient(180deg, rgba(12,10,20,0.72), rgba(12,10,20,0.40));
  --band-bg: linear-gradient(90deg, rgba(124,92,255,0.07), rgba(255,179,71,0.07));
  --footer-bg: rgba(7,6,12,0.6);
  --divider: rgba(255,255,255,0.10);

  /* Scrim under text for WCAG contrast over the 3D scene */
  --scrim-top: rgba(7,6,12,0.45);
  --scrim-bottom: rgba(7,6,12,0.85);

  /* Code artifact panel stays dark in both themes (contained terminal device) */
  --code-bg: #0a0813;
  --code-text: #d9d2ec;
  --code-dim: #6f6884;
  --code-key: #a78bff;
  --code-str: #ffce82;
  --code-num: #7be0c0;

  /* Shadows */
  --shadow-soft: rgba(0,0,0,0.45);
  --shadow-hard: rgba(0,0,0,0.6);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #efedf6;
  --bg-2: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(20, 16, 40, 0.10);
  --glass-border-strong: rgba(20, 16, 40, 0.16);

  --text-hi:  #171422;   /* 15.8:1 AAA on #efedf6 */
  --text-mid: #46405a;   /* 8.1:1  AAA */
  --text-low: #6a6480;   /* 4.6:1  AA  */

  /* Accents unchanged in hue; amber deepened for text legibility on light */
  --violet: #7c5cff;
  --violet-soft: #8a6bff;
  --violet-glow: rgba(124, 92, 255, 0.40);
  --amber: #ffb347;
  --amber-soft: #c8771a;
  --amber-glow: rgba(255, 179, 71, 0.35);
  --accent-ink: #5a3fd6;   /* deeper violet for contrast on light */
  --stat-num: #a85a0c;     /* deep amber for contrast on light glass */

  --nav-bg: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.48));
  --band-bg: linear-gradient(90deg, rgba(124,92,255,0.08), rgba(255,179,71,0.10));
  --footer-bg: rgba(255,255,255,0.55);
  --divider: rgba(20,16,40,0.10);

  --scrim-top: rgba(239,237,246,0.40);
  --scrim-bottom: rgba(239,237,246,0.88);

  --code-bg: #0c0a14;
  --code-text: #d9d2ec;
  --code-dim: #6f6884;
  --code-key: #a78bff;
  --code-str: #ffce82;
  --code-num: #7be0c0;

  --shadow-soft: rgba(60, 45, 110, 0.18);
  --shadow-hard: rgba(60, 45, 110, 0.28);

  color-scheme: light;
}

/* Radii — single scale (shape consistency lock) */
:root {
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-quick: cubic-bezier(0.2, 0.0, 0.0, 1); /* 150ms state-confirmation */
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-hi);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--violet-glow); color: #fff; }

/* Visible focus for keyboard users (WCAG 2.2) */
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 3. LAYER STACK ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}
#bg-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 0%, var(--scrim-top) 60%, var(--bg) 100%),
    linear-gradient(180deg, var(--scrim-top) 0%, transparent 30%, transparent 70%, var(--scrim-bottom) 100%);
  transition: background 0.4s var(--ease-out);
}
.ui-layer { position: relative; z-index: 10; }

/* ---------- 4. TYPOGRAPHY ---------- */
.display {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--text-hi);
}
.mono-label {
  font-family: "JetBrains Mono", monospace;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--text-low);
  display: inline-flex;
  align-items: center;
}
.mono-label .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber-glow);
  margin-right: 0.6em;
}

/* ---------- 5. CONTAINER ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-block: 14px;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--glass-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-hi);
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--violet) 0%, #3a2a78 100%);
  display: grid; place-items: center;
  border: 1px solid var(--glass-border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 6px 20px var(--violet-glow);
  position: relative;
  flex-shrink: 0;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 5px;
  border-bottom-color: transparent;
  border-right-color: transparent;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-mid);
  transition: color 0.15s var(--ease-quick);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text-hi); }

.nav-right { display: flex; align-items: center; gap: 12px; }

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 14px var(--shadow-soft);
  color: var(--text-hi);
  transition: transform 0.15s var(--ease-quick), border-color 0.15s var(--ease-quick);
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--violet-soft); }
.theme-toggle:active { transform: scale(0.96); }
.theme-toggle i { font-size: 1.05rem; line-height: 1; }
.theme-toggle .ph-moon { display: none; }
.theme-toggle .ph-sun { display: block; }
[data-theme="light"] .theme-toggle .ph-moon { display: block; }
[data-theme="light"] .theme-toggle .ph-sun { display: none; }

/* ============================================================
   HARDWARE-KEY BUTTONS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.15s var(--ease-quick), background 0.15s var(--ease-quick);
  isolation: isolate;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  color: #1a1208;                       /* dark text on amber: 9.8:1 AA */
  background: linear-gradient(180deg, #ffce82 0%, var(--amber) 55%, #e89a2c 100%);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -2px 4px rgba(120,70,0,0.4), 0 8px 22px var(--amber-glow), 0 2px 0 rgba(0,0,0,0.3);
}
.btn-primary:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), inset 0 -2px 4px rgba(120,70,0,0.4), 0 10px 30px var(--amber-glow), 0 2px 0 rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
.btn-primary:active { transform: scale(0.98); box-shadow: inset 0 2px 6px rgba(120,70,0,0.6), 0 4px 12px var(--amber-glow); }
.btn-ghost {
  color: var(--text-hi);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 14px var(--shadow-soft);
}
.btn-ghost:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
  border-color: var(--violet-soft);
  transform: translateY(-1px);
}
[data-theme="light"] .btn-ghost {
  background: linear-gradient(180deg, rgba(20,16,40,0.06), rgba(20,16,40,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 4px 14px var(--shadow-soft);
}
.btn-small { padding: 9px 18px; font-size: 0.74rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 96px;
  padding-bottom: 64px;
}
.hero-eyebrow { margin-bottom: 36px; opacity: 0; transform: translateY(12px); animation: rise 0.9s var(--ease-out) 0.15s forwards; }
.hero-title { font-size: clamp(2.8rem, 9vw, 7rem); margin-bottom: 28px; opacity: 0; transform: translateY(20px); animation: rise 1.1s var(--ease-out) 0.3s forwards; }
.hero-title em { font-style: italic; font-weight: 500; color: var(--accent-ink); }
.hero-sub { max-width: 560px; font-size: clamp(0.95rem, 1.4vw, 1.06rem); color: var(--text-mid); line-height: 1.65; margin-bottom: 44px; opacity: 0; transform: translateY(16px); animation: rise 0.9s var(--ease-out) 0.5s forwards; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; opacity: 0; transform: translateY(16px); animation: rise 0.9s var(--ease-out) 0.7s forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   SYSTEM STATUS BAND (full-bleed marquee)
   ============================================================ */
.status-band {
  position: relative;
  z-index: 10;
  padding-block: 20px;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  background: var(--band-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.status-track { display: flex; gap: 56px; white-space: nowrap; width: max-content; animation: marquee 32s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.status-item { display: inline-flex; align-items: center; gap: 12px; font-family: "JetBrains Mono", monospace; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mid); }
.status-item .dot { width: 5px; height: 5px; border-radius: 50%; }
.status-item .dot.violet { background: var(--violet); box-shadow: 0 0 8px var(--violet-glow); }
.status-item .dot.amber  { background: var(--amber);  box-shadow: 0 0 8px var(--amber-glow); }

/* ============================================================
   SECTION SHELL
   ============================================================ */
section.block { position: relative; z-index: 10; padding-block: clamp(80px, 12vh, 140px); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-top: 14px; }
.section-head p { margin-top: 18px; color: var(--text-mid); font-size: 1rem; line-height: 1.7; max-width: 60ch; }
.section-head.center p { margin-inline: auto; }

/* ============================================================
   ISOMETRIC BENTO (capabilities)
   ============================================================ */
.bento-scene { perspective: 1600px; perspective-origin: 50% 30%; }
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-4deg);
  transition: transform 0.6s var(--ease-out);
}
.bento-card {
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(0);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-out);
  padding: 32px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)), var(--glass-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 18px 50px var(--shadow-soft);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.bento-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 80% at 80% 0%, var(--card-tint, transparent), transparent 60%);
  opacity: 0.5; transition: opacity 0.45s var(--ease-out); pointer-events: none;
}
.bento-card:hover {
  transform: translateZ(60px) scale(1.015);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 0 0 1px var(--card-glow, var(--violet-soft)), 0 36px 80px var(--shadow-hard), 0 0 50px var(--card-glow-shadow, var(--violet-glow));
}
.bento-card:hover::before { opacity: 1; }
.card-tag { margin-bottom: 22px; }
.bento-card h3 { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 16px; color: var(--text-hi); }
.bento-card p { color: var(--text-mid); font-size: 0.94rem; line-height: 1.65; margin-bottom: 26px; }
.card-stat { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--divider); display: flex; align-items: baseline; gap: 12px; }
.card-stat .num { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.6rem; color: var(--stat-num); }
.card-stat .label { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-low); }
.bento-card.b2b { --card-tint: rgba(124,92,255,0.25);  --card-glow: var(--violet-soft); --card-glow-shadow: var(--violet-glow); }
.bento-card.b2c { --card-tint: rgba(255,179,71,0.22);  --card-glow: var(--amber-soft);  --card-glow-shadow: var(--amber-glow); }
.bento-card.d2c { --card-tint: rgba(167,139,255,0.20); --card-glow: var(--violet-soft); --card-glow-shadow: var(--violet-glow); }

/* ============================================================
   ARCHITECTURE — layer stack (distinct family)
   ============================================================ */
.arch-stack { display: flex; flex-direction: column; gap: 12px; max-width: 1040px; margin-inline: auto; }
.layer {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)), var(--glass-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 10px 30px var(--shadow-soft);
  transition: transform 0.2s var(--ease-quick), box-shadow 0.2s var(--ease-quick), border-color 0.2s var(--ease-quick);
  cursor: default;
}
.layer:hover { transform: translateX(10px); border-color: var(--violet-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 0 0 1px var(--violet-soft), 0 16px 40px var(--shadow-hard), 0 0 40px var(--violet-glow); }
.layer .idx { font-family: "JetBrains Mono", monospace; font-size: 0.74rem; letter-spacing: 0.12em; color: var(--text-low); }
.layer .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.layer .name { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; color: var(--text-hi); }
.layer .desc { font-family: "JetBrains Mono", monospace; font-size: 0.82rem; color: var(--text-mid); }
.markets { display: flex; gap: 8px; flex-shrink: 0; }
.pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border-strong);
  color: var(--text-mid);
  background: rgba(255,255,255,0.04);
}
[data-theme="light"] .pill { background: rgba(20,16,40,0.03); }
.pill.violet { color: var(--violet-soft); border-color: var(--violet-soft); }
.pill.amber  { color: var(--stat-num); border-color: var(--amber); }
[data-theme="light"] .pill.violet { color: var(--accent-ink); border-color: var(--accent-ink); }
[data-theme="light"] .pill.amber  { color: var(--stat-num); border-color: var(--stat-num); }

/* ============================================================
   PROOF — code artifact + metrics (distinct family)
   ============================================================ */
.proof-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: stretch; }

/* code panel — contained terminal device (dark in both themes) */
.code-panel {
  border-radius: var(--r-lg);
  background: var(--code-bg);
  border: 1px solid var(--glass-border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 24px 60px var(--shadow-hard);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--code-dim);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--code-num);
  text-transform: uppercase;
}
.status-badge .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--code-num);
  box-shadow: 0 0 8px var(--code-num);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.code-body {
  padding: 22px 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.85;
  color: var(--code-text);
  flex: 1;
  overflow-x: auto;
}
.code-body .ln { color: var(--code-dim); user-select: none; display: inline-block; width: 1.6em; }
.code-body .k { color: var(--code-key); }
.code-body .s { color: var(--code-str); }
.code-body .n { color: var(--code-num); }
.code-body .c { color: var(--code-dim); font-style: italic; }

/* metrics side */
.metrics { display: flex; flex-direction: column; gap: 16px; }
.metric {
  padding: 26px 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)), var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 12px 30px var(--shadow-soft);
}
.metric .num { font-family: "Playfair Display", serif; font-weight: 700; font-size: 2.6rem; letter-spacing: -0.03em; color: var(--stat-num); line-height: 1; }
.metric .label { font-family: "JetBrains Mono", monospace; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-low); margin-top: 8px; }
.metric .note { color: var(--text-mid); font-size: 0.86rem; line-height: 1.6; margin-top: 10px; }
.illustrative { font-size: 0.68rem; color: var(--text-low); letter-spacing: 0.06em; margin-top: 4px; display: block; }

/* ============================================================
   PROCESS — timeline (distinct family)
   ============================================================ */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 22px; left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--amber));
  opacity: 0.5;
}
.step { position: relative; padding: 0 18px; }
.step .node {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)), var(--bg-2);
  border: 1px solid var(--glass-border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 18px var(--shadow-soft);
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-ink);
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
}
.step h3 { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; color: var(--text-hi); margin-bottom: 8px; }
.step p { color: var(--text-mid); font-size: 0.86rem; line-height: 1.6; }

/* ============================================================
   WORK TEASER (distinct family)
   ============================================================ */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 40px; }
.work-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)), var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 16px 40px var(--shadow-soft);
  transition: transform 0.2s var(--ease-quick), box-shadow 0.2s var(--ease-quick), border-color 0.2s var(--ease-quick);
}
.work-card:hover { transform: translateY(-6px); border-color: var(--violet-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 26px 60px var(--shadow-hard), 0 0 40px var(--violet-glow); }
.work-card .thumb { aspect-ratio: 16/10; overflow: hidden; position: relative; background: var(--bg-2); display: block; }
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(0.3) contrast(1.05); transition: transform 0.4s var(--ease-out); }
.work-card:hover .thumb img { transform: scale(1.05); }
.work-card .body { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.work-card .tag { font-family: "JetBrains Mono", monospace; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet-soft); }
[data-theme="light"] .work-card .tag { color: var(--accent-ink); }
.work-card h3 { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--text-hi); }
.work-card p { color: var(--text-mid); font-size: 0.84rem; line-height: 1.55; }
.work-link-row { display: flex; justify-content: center; }

/* ============================================================
   ASYMMETRIC CTA PANEL
   ============================================================ */
.cta-panel { position: relative; z-index: 10; padding-inline: 24px; margin-bottom: clamp(60px, 10vh, 110px); }
.cta-inner {
  max-width: 1240px;
  margin-inline: auto;
  position: relative;
  padding: clamp(40px, 7vw, 80px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(100% 120% at 100% 0%, var(--violet-glow), transparent 55%),
    radial-gradient(80% 120% at 0% 100%, var(--amber-glow), transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    var(--glass-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 30px 80px var(--shadow-hard);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta-inner h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 18px; }
.cta-inner p { color: var(--text-mid); max-width: 52ch; line-height: 1.7; }
.cta-actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta-meta { margin-top: 12px; font-family: "JetBrains Mono", monospace; font-size: 0.74rem; letter-spacing: 0.08em; color: var(--text-low); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 10;
  padding-block: 60px 40px;
  border-top: 1px solid var(--divider);
  background: var(--footer-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer h4 { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-low); margin-bottom: 18px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer a { color: var(--text-mid); font-size: 0.88rem; transition: color 0.15s var(--ease-quick); }
.footer a:hover { color: var(--text-hi); }
.footer-brand p { color: var(--text-mid); font-size: 0.88rem; line-height: 1.7; margin-top: 16px; max-width: 36ch; }
.footer-bottom { padding-top: 28px; border-top: 1px solid var(--divider); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom span { font-family: "JetBrains Mono", monospace; font-size: 0.76rem; color: var(--text-low); }

/* ============================================================
   PAGE HEADER (work.html sub-hero)
   ============================================================ */
.page-hero {
  position: relative;
  z-index: 10;
  padding-top: clamp(70px, 12vh, 120px);
  padding-bottom: clamp(40px, 6vh, 70px);
}
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin-top: 18px; }
.page-hero p { max-width: 56ch; color: var(--text-mid); line-height: 1.7; margin-top: 20px; font-size: 1.02rem; }

/* case study detail layout */
.case {
  position: relative;
  z-index: 10;
  padding-block: clamp(48px, 7vh, 72px);
  border-top: 1px solid var(--divider);
}
.case-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.case .meta { position: sticky; top: 100px; }
.case .meta .tag { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet-soft); }
[data-theme="light"] .case .meta .tag { color: var(--accent-ink); }
.case .meta h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-top: 10px; margin-bottom: 18px; }
.case .meta dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin-top: 24px; }
.case .meta dt { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-low); }
.case .meta dd { font-family: "JetBrains Mono", monospace; font-size: 0.86rem; color: var(--text-mid); }
.case .copy p { color: var(--text-mid); font-size: 1rem; line-height: 1.8; margin-bottom: 18px; }
.case .copy .quote { font-family: "Playfair Display", serif; font-style: italic; font-size: 1.5rem; line-height: 1.4; color: var(--text-hi); border-left: 2px solid var(--accent-ink); padding-left: 22px; margin: 28px 0; }
.case .copy .attr { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--text-low); margin-top: 8px; }
.case .figure { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--glass-border); margin: 26px 0; }
.case .figure img { width: 100%; display: block; filter: grayscale(0.25) contrast(1.05); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .bento-grid { grid-template-columns: 1fr; transform: none; perspective: none; }
  .bento-card:hover { transform: scale(1.02); }
  .proof-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 36px 0; }
  .timeline::before { display: none; }
  .case-grid { grid-template-columns: 1fr; }
  .case .meta { position: static; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .layer { grid-template-columns: 1fr; gap: 8px; }
  .layer .markets { flex-wrap: wrap; }
  .hero { padding-top: 80px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .timeline { grid-template-columns: 1fr; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-eyebrow, .hero-title, .hero-sub, .hero-cta { opacity: 1; transform: none; }
  .bento-grid { transform: none; }
  .status-track { animation: none; }
  .status-badge .pulse { animation: none; }
  #bg-canvas { display: none; }
}

/* ---------- SOLID FALLBACK (transparency-reduced) ---------- */
@media (prefers-reduced-transparency: reduce) {
  :root, [data-theme="dark"] { --glass-bg: rgba(22, 18, 31, 0.96); }
  [data-theme="light"] { --glass-bg: rgba(255, 255, 255, 0.96); }
  .nav, .bento-card, .cta-inner, .footer, .layer, .metric, .work-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
