/* =============================================================
   MYTHIK — Spec-driven framework landing
   Design system + composition
   ============================================================= */

/* ---- 1. Design tokens ---------------------------------------- */
:root {
  /* Color: anchored on absolute black + warm metallic gold */
  --ink-0:  #000000;
  --ink-1:  #050505;
  --ink-2:  #0a0a0a;
  --ink-3:  #121212;
  --ink-4:  #1a1a1a;
  --line:   rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --paper:        #ffffff;
  --paper-soft:   rgba(255, 255, 255, 0.94);
  --paper-mid:    rgba(255, 255, 255, 0.72);
  --paper-low:    rgba(255, 255, 255, 0.58);
  --paper-faint:  rgba(255, 255, 255, 0.38);

  --gold-bright:  #fff2bc;
  --gold:         #f3d58a;
  --gold-mid:     #c9973a;
  --gold-deep:    #6f4516;
  --gold-glow:    rgba(243, 213, 138, 0.34);
  --gold-line:    rgba(243, 213, 138, 0.22);
  --gold-tint:    rgba(243, 213, 138, 0.08);

  --metal: linear-gradient(135deg, #fff6cf 0%, #f3d58a 28%, #c9973a 54%, #6f4516 78%, #ffe9a3 100%);
  --metal-soft: linear-gradient(135deg, #fff6cf 0%, #f3d58a 50%, #c9973a 100%);

  /* Code colors */
  --code-bg:      #07070a;
  --code-fg:      #e8e6df;
  --code-key:     #f3d58a;
  --code-string:  #b6e3b6;
  --code-prop:    #ffd56b;
  --code-num:     #d6b8ff;
  --code-comment: #6b6b73;
  --code-punct:   #6f6f78;

  /* Typography */
  --font-display: "Bespoke Serif", "Editorial New", "Cormorant Garamond", Georgia, serif;
  --font-body:    "General Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Type scale (modular, hand-tuned) */
  --t-eyebrow:  12px;
  --t-mono-sm:  12px;
  --t-body-sm:  14px;
  --t-body:     16px;
  --t-body-lg:  18px;
  --t-display-sm: 28px;
  --t-display:    40px;
  --t-display-lg: 56px;
  --t-display-xl: 84px;
  --t-display-2xl: 112px;

  /* Spacing rhythm (8px grid + section air) */
  --gap-xs: 8px;
  --gap-s:  16px;
  --gap-m:  24px;
  --gap-l:  40px;
  --gap-xl: 64px;
  --gap-2xl: 96px;
  --gap-3xl: 144px;

  /* Container */
  --container-max: 1240px;
  --container-pad: 32px;

  /* Easing */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  color: var(--paper);
  background: var(--ink-0);
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; background: var(--ink-0); }

/* Anchored section offset — fixed navbar (73px) covers the top of the section
   when scrolling to a hash. scroll-padding-top on html handles most cases,
   but full-bleed sections (gate-section, runtime-section) override the
   inherited behavior, so we set scroll-margin-top explicitly per id. */
section[id] { scroll-margin-top: 88px; }

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--paper);
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--gold);
  color: var(--ink-0);
}

/* ---- 2. Site-wide grain overlay -----------------------------
   Uses the PNG asset (white background + dark grain), inverted
   via filter so it becomes black background + light grain, then
   composed with `screen` so the black drops out and only the
   light grain remains visible over our dark UI. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.22;
  filter: invert(1) contrast(1.4);
  mix-blend-mode: screen;
  background-image: url("./assets/grain-texture.png");
  background-size: 256px 256px;
  background-repeat: repeat;
}

/* Body-wide subtle vignette so content never floats on flat black. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, transparent 0%, transparent 38%, rgba(0,0,0,0.55) 100%);
}

/* ---- 3. Typography primitives -------------------------------- */
h1, h2, h3, h4, p, code { margin: 0; letter-spacing: 0; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-feature-settings: "ss01", "ss02", "liga", "kern";
}

h1 {
  font-size: clamp(48px, 8vw, var(--t-display-2xl));
  line-height: 0.96;
  background: linear-gradient(160deg, #ffffff 0%, #fff8dc 30%, #f3d58a 65%, rgba(243, 213, 138, 0.12) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}

h2 {
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 1.04;
  color: var(--paper);
  text-wrap: balance;
}

h3 {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--paper);
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-feature-settings: "calt", "liga";
}

p code, h2 code, h3 code, strong code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(243, 213, 138, 0.08);
  color: var(--gold-bright);
  font-size: 0.86em;
}

/* Title key inline accents */
.title-key {
  display: inline-block;
  white-space: nowrap;
}

.title-key--gold {
  background: linear-gradient(135deg, #fff3c7 0%, #f3d58a 36%, #c9973a 84%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 36px rgba(243, 213, 138, 0.18);
}

.title-key--mono {
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--gold-bright);
  vertical-align: 0.06em;
}

.title-key--warm {
  font-style: italic;
  color: #f3d58a;
  font-family: var(--font-display);
}

.title-key--brand {
  position: relative;
  background: linear-gradient(135deg, #fff3c7 0%, #f3d58a 50%, #fff3c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-key--brand::after {
  content: "";
  position: absolute;
  left: 0.04em; right: 0.04em;
  bottom: -0.08em;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

/* Eyebrow / kicker */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.eyebrow--center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.eyebrow--center::before {
  flex: 1;
  width: auto;
  background: linear-gradient(90deg, transparent, rgba(243, 213, 138, 0.4));
}
.eyebrow--center::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(243, 213, 138, 0.4), transparent);
}

/* Body paragraphs */
p { color: var(--paper-mid); font-size: var(--t-body); line-height: 1.65; }

.lede { font-size: var(--t-body-lg); line-height: 1.55; color: var(--paper-soft); max-width: 56ch; }

/* ---- 4. Layout primitives ------------------------------------ */
.section {
  position: relative;
  width: min(var(--container-max), calc(100% - var(--container-pad) * 2));
  margin: 0 auto;
  padding: var(--gap-3xl) 0;
}

.section--full  { width: 100%; max-width: none; padding-left: 0; padding-right: 0; }

.section-heading {
  display: flex;
  flex-direction: column;
  gap: var(--gap-m);
  max-width: 820px;
  margin: 0 auto var(--gap-2xl);
  text-align: center;
  align-items: center;
}

.section-heading h2 { max-width: 22ch; }
.section-heading p { max-width: 54ch; }

/* ---- 5. Site hero ------------------------------------------- */
.site-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--ink-0);
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  object-position: center 38%;
  filter: saturate(1.05) contrast(1.12) brightness(0.92);
  transform: scale(1.04);
  animation: heroDrift 32s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.08) translate3d(-1.2%, -0.8%, 0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 18%, transparent 0%, rgba(0,0,0,0.32) 42%, rgba(0,0,0,0.92) 78%),
    linear-gradient(180deg, rgba(0,0,0,0.48) 0%, transparent 22%, transparent 60%, var(--ink-0) 100%);
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(243, 213, 138, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 213, 138, 0.06) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 64%);
  opacity: 0.18;
}

/* Cursor light */
.cursor-light {
  position: fixed;
  pointer-events: none;
  z-index: 5;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 213, 138, 0.16) 0%, transparent 60%);
  transform: translate3d(var(--cx, 50vw), var(--cy, 50vh), 0) translate(-50%, -50%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
}

.has-pointer .cursor-light { opacity: 1; }

@media (max-width: 900px) {
  .cursor-light { display: none; }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px 56px;
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out), backdrop-filter 240ms var(--ease-out), padding 240ms var(--ease-out);
}

.navbar--scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 32px rgba(243, 213, 138, 0.18);
}

.logo-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(243, 213, 138, 0.24));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--paper-mid);
  transition: color 200ms var(--ease-out);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease-out);
}

.nav-links a:hover {
  color: var(--gold-bright);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--paper-mid);
  transition: color 200ms var(--ease-out), transform 200ms var(--ease-out), background-color 200ms var(--ease-out);
}

.nav-icon:hover {
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-1px);
}

.nav-icon:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.nav-icon__svg {
  display: block;
}

.pill-button {
  --mag-x: 0px;
  --mag-y: 0px;
  --hover-y: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  isolation: isolate;
  overflow: hidden;
  transform: translate(var(--mag-x), calc(var(--mag-y) + var(--hover-y)));
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
  cursor: pointer;
}

.pill-button:hover {
  --hover-y: -2px;
  box-shadow: 0 0 42px var(--gold-glow), 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: #ffffff;
}

.pill-button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.nav-links a:focus-visible,
.ghost-link:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 4px;
}

.pill-button__inner {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 12px 30px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pill-button__glow {
  position: absolute;
  top: -10px;
  left: 18%;
  z-index: 1;
  width: 64%;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.85) 50%, transparent 100%);
  filter: blur(8px);
  opacity: 0.86;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.pill-button--dark .pill-button__inner {
  background: var(--ink-0);
  color: var(--paper);
}

.pill-button--light .pill-button__inner {
  background: var(--metal);
  color: var(--ink-0);
}

.arrow-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translate(-1px, 1px);
  transition: transform 220ms var(--ease-out);
}

.pill-button:hover .arrow-icon {
  transform: rotate(-45deg) translate(2px, -2px);
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  width: 100%;
  padding: 140px 24px 96px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: rgba(243, 213, 138, 0.04);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.hero-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 18px var(--gold-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 1080px;
}

.hero-copy h1 {
  max-width: 18ch;
}

.hero-copy .lede {
  max-width: 60ch;
  color: var(--paper-mid);
  font-size: 18px;
  line-height: 1.55;
}

.hero-tagline {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--paper-soft);
}

.hero-tagline span {
  white-space: nowrap;
}

.hero-tagline em {
  background: var(--metal-soft);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.hero-tagline .sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex: 0 0 auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ghost-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  color: var(--paper-mid);
  font-size: 14px;
  font-weight: 500;
  transition: color 200ms var(--ease-out);
}

.ghost-link::after {
  content: "→";
  font-family: var(--font-mono);
  transition: transform 240ms var(--ease-out);
}

.ghost-link:hover { color: var(--gold-bright); }
.ghost-link:hover::after { transform: translateX(4px); }

/* Hero scroll indicator */
.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
  z-index: 3;
}

.scroll-indicator__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, var(--gold) 50%, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ---- 6. Intro section (asymmetric authority) ----------------- */
.intro-section {
  padding-top: var(--gap-2xl);
  padding-bottom: var(--gap-3xl);
}

.intro-eyebrow {
  display: inline-flex;
  margin-bottom: 36px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.intro-headline {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 80px;
  align-items: end;
}

.intro-headline h2 {
  font-size: clamp(40px, 5.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 14ch;
}

.intro-headline-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 18px;
  max-width: 42ch;
}

.intro-headline-side p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--paper-mid);
}


/* ---- 7. Code section (window chrome + syntax) ---------------- */
.code-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--gap-xl);
  align-items: stretch;
}

.code-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.code-copy h2 { max-width: 18ch; }
.code-copy p { max-width: 46ch; }

.code-window {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--code-bg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 48px -16px rgba(0, 0, 0, 0.6),
    0 60px 120px -40px rgba(243, 213, 138, 0.08);
}

.code-window__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.code-window__dots {
  display: flex;
  gap: 7px;
}

.code-window__dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.code-window__dots span:nth-child(1) { background: rgba(232, 100, 100, 0.6); }
.code-window__dots span:nth-child(2) { background: rgba(232, 196, 100, 0.6); }
.code-window__dots span:nth-child(3) { background: rgba(120, 200, 120, 0.6); }

.code-window__file {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-low);
  letter-spacing: 0.02em;
}

.code-window__body {
  padding: 22px 26px;
  overflow: auto;
  max-height: 60vh;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--code-fg);
  flex: 1;
}

.code-window__body pre {
  margin: 0;
  font-family: inherit;
}

.code-window__body:focus-visible {
  outline: 2px solid var(--gold-line);
  outline-offset: -2px;
}

/* Inline syntax tokens */
.tok-key    { color: var(--code-key); }
.tok-str    { color: var(--code-string); }
.tok-prop   { color: var(--code-prop); }
.tok-num    { color: var(--code-num); }
.tok-com    { color: var(--code-comment); font-style: italic; }
.tok-punct  { color: var(--code-punct); }

/* ---- 8. Whole app section ------------------------------------ */
.whole-app-section { padding-top: var(--gap-2xl); }

.app-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}

.shell-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(243, 213, 138, 0.08), transparent 38%),
    var(--ink-1);
  min-height: 380px;
}

.shell-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.shell-card pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--paper-soft);
  overflow: auto;
}

.shell-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
}

.shell-list p {
  margin: 0;
  padding: 14px 16px;
  background: var(--ink-2);
  color: var(--paper-low);
  font-size: 13px;
  line-height: 1.4;
}

/* ---- 9. Language section ------------------------------------- */
.language-section { padding-top: var(--gap-2xl); }

.language-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.language-card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--ink-1);
  overflow: hidden;
  transition: border-color 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.language-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transition: width 480ms var(--ease-out);
}

.language-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
}

.language-card:hover::before { width: 100%; }

.language-card--bright {
  background:
    radial-gradient(circle at 50% 0%, rgba(243, 213, 138, 0.14), transparent 56%),
    var(--ink-1);
  border-color: var(--gold-line);
}

.language-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 36px;
  display: block;
}

.language-card h3 { font-size: 21px; margin-bottom: 12px; }

.language-card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--paper-low);
}

.vocabulary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--gold-line);
}

.vocabulary-strip span {
  flex: 1 1 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--ink-1);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
  transition: background 280ms var(--ease-out);
}

.vocabulary-strip span:hover {
  background: radial-gradient(circle at 50% 50%, rgba(243, 213, 138, 0.12), transparent 70%), var(--ink-2);
}

/* Pull quotes */
.pull-quote {
  position: relative;
  width: min(100% - 32px, 920px);
  margin: 96px auto 0;
  padding: 56px 64px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse at 18% 0%, rgba(255, 242, 188, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(18, 15, 9, 0.6), rgba(0, 0, 0, 0.32));
  text-align: center;
}

.pull-quote::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright) 50%, transparent);
  opacity: 0.6;
}

.pull-quote p:first-of-type {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--paper-soft);
  margin-bottom: 18px;
}

.pull-quote p:last-of-type {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--paper-mid);
  max-width: 56ch;
  margin: 0 auto;
}

.pull-quote em {
  background: var(--metal-soft);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

/* ---- 10. Validation Gate (cinematic main act) ---------------- */
.gate-section {
  position: relative;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  isolation: isolate;
  overflow: hidden;
}

.gate-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gate-section__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.62;
  filter: contrast(1.06) saturate(1.1) blur(0.4px);
  image-rendering: auto;
}

.gate-section__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.46) 50%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(180deg, var(--ink-0) 0%, transparent 14%, transparent 86%, var(--ink-0) 100%);
}

.gate-section__inner {
  position: relative;
  z-index: 1;
  width: min(var(--container-max), calc(100% - var(--container-pad) * 2));
  margin: 0 auto;
  padding: var(--gap-3xl) 0 calc(var(--gap-3xl) - 24px);
  display: flex;
  flex-direction: column;
  gap: var(--gap-2xl);
}

.gate-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.gate-step {
  position: relative;
  padding: 24px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
}

.gate-step__num {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.gate-step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--paper);
  margin-bottom: 8px;
}

.gate-step p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--paper-low);
}

.gate-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 10px;
  height: 1px;
  background: var(--gold);
  z-index: 2;
  box-shadow: 0 0 6px var(--gold);
}

.gate-step--accept {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(243, 213, 138, 0.16), rgba(0, 0, 0, 0.6));
  box-shadow: 0 0 32px rgba(243, 213, 138, 0.18) inset, 0 8px 32px rgba(243, 213, 138, 0.12);
}

.gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gate-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.gate-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
}

.gate-card h3 {
  margin-bottom: 12px;
  color: var(--gold-bright);
  font-size: 18px;
  font-weight: 500;
}

.gate-card p {
  font-size: 14.5px;
  color: var(--paper-mid);
}

/* ---- 11. CLI loop ------------------------------------------- */
.cli-loop-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--gap-xl);
  align-items: start;
}

.cli-loop-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 12px;
}

.cli-loop-copy h2 {
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.cli-terminal {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  background: var(--ink-1);
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.6);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--paper-low);
}

.terminal-header__dots {
  display: flex;
  gap: 7px;
  margin-right: 8px;
}

.terminal-header__dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.terminal-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
}

.terminal-line:last-child { border-bottom: none; }

.terminal-line__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--metal);
  color: var(--ink-0);
  font-size: 11px;
  font-weight: 700;
}

.terminal-line__cmd {
  color: var(--paper-soft);
}

.terminal-line__cmd .prompt { color: var(--gold); }

.safety-rails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  grid-column: 1 / -1;
}

.safety-rails > div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.safety-rails strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-bright);
}

.safety-rails p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--paper-low);
}

/* ---- 12. Versioning ----------------------------------------- */
.versioning-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.versioning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.versioning-grid article {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.versioning-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-bright);
}

.versioning-grid p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper-mid);
}

/* ---- 13. Delivery (no-rebuild) ------------------------------ */
.delivery-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.delivery-grid article {
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  transition: border-color 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.delivery-grid article:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
}

.delivery-grid .num {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 10px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.delivery-grid h3 {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 500;
}

.delivery-grid p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--paper-low);
}

.delivery-caveat {
  width: min(100% - 32px, 880px);
  margin: 0 auto;
  padding: 22px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  line-height: 1.65;
  color: var(--paper-mid);
}

.delivery-caveat strong { color: var(--gold-bright); }

/* ---- 14. Retrieval ------------------------------------------ */
.retrieval-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.retrieval-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.retrieval-card {
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.retrieval-card--primary {
  border-color: var(--gold-line);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 242, 188, 0.1), transparent 44%),
    linear-gradient(180deg, rgba(18, 15, 9, 0.5), rgba(0, 0, 0, 0.28));
}

.retrieval-card__path {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 11px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.retrieval-card h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 14px;
}

.retrieval-card > p {
  margin-bottom: 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--paper-mid);
}

.retrieval-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.retrieval-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--paper-soft);
}

.retrieval-list li:last-child { border-bottom: 0; }

.retrieval-foot {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--gold-line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper-low);
}

.retrieval-foot em { color: var(--gold-bright); font-style: normal; }

.retrieval-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}

.retrieval-table td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper-soft);
}

.retrieval-table td:last-child {
  text-align: right;
  color: var(--gold-bright);
}

.retrieval-callout {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 28px 32px;
  border-left: 2px solid var(--gold-bright);
  background: rgba(255, 242, 188, 0.04);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.005em;
  line-height: 1.55;
  color: var(--paper-soft);
}

/* ---- 15. Number strip (3 hero + 6 secondary) ---------------- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
}

.proof-strip__hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.proof-strip__hero > div {
  padding: 48px 32px;
  background:
    radial-gradient(circle at 50% 0%, rgba(243, 213, 138, 0.08), transparent 60%),
    var(--ink-1);
  text-align: center;
}

.proof-strip__hero strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.proof-strip__hero span {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-low);
}

.proof-strip__minor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.proof-strip__minor > div {
  padding: 24px 18px;
  background: var(--ink-1);
  text-align: center;
  transition: background 280ms var(--ease-out);
}

.proof-strip__minor > div:hover {
  background: radial-gradient(circle at 50% 0%, rgba(243, 213, 138, 0.06), transparent 70%), var(--ink-2);
}

.proof-strip__minor strong {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.proof-strip__minor span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--paper-low);
}

/* ---- 16. Resilience ----------------------------------------- */
.resilience-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: var(--gap-xl);
  align-items: start;
}

.resilience-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 110px;
}

.resilience-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.resilience-steps {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--gold-line);
}

.resilience-steps > div {
  display: grid;
  grid-template-columns: 56px minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: center;
  padding: 22px 26px;
  background: var(--ink-1);
}

.resilience-steps span {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.resilience-steps strong {
  font-size: 16px;
  font-weight: 500;
  color: var(--paper);
}

.resilience-steps p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--paper-low);
}

.error-panel {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  overflow: auto;
}

/* ---- 17. Loop ----------------------------------------------- */
.loop-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.loop-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.loop-stages li {
  position: relative;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.loop-stages li:nth-child(2) {
  border-color: var(--gold-line);
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 242, 188, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(18, 15, 9, 0.5), rgba(0, 0, 0, 0.28));
}

.loop-stages > li > span {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 10px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
}

.loop-stages h3 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 500;
}

.loop-stages p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--paper-low);
}

.loop-stages li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -16px;
  z-index: 2;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--gold);
}

.loop-caveat {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  line-height: 1.65;
  color: var(--paper-mid);
}

.loop-caveat strong { color: var(--gold-bright); }

/* ---- 18. Features grid -------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, transparent 0 70%, rgba(243, 213, 138, 0.05) 70% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  transition: border-color 320ms var(--ease-out), transform 320ms var(--ease-out), background 320ms var(--ease-out);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: left 600ms var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-line);
  background:
    radial-gradient(circle at 30% 0%, rgba(243, 213, 138, 0.1), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.feature-card:hover::before { left: 100%; }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 28px;
  margin-bottom: 56px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.feature-card h3 { margin-bottom: 12px; font-size: 19px; }

.feature-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--paper-low);
}

/* ---- 19. Auth ----------------------------------------------- */
.auth-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.auth-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-pillars article {
  padding: 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
}

.auth-pillars strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-bright);
}

.auth-pillars p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--paper-mid);
}

/* ---- 20. Plugin --------------------------------------------- */
.plugin-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.plugin-grid article {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  transition: border-color 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.plugin-grid article:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
}

.plugin-grid > article > code {
  display: block;
  margin-bottom: 10px;
  padding: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-bright);
}

.plugin-grid p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--paper-mid);
}

.plugin-grid p code {
  font-size: 12px;
}

/* ---- 21. Server / runtime ----------------------------------- */
.runtime-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--gap-xl);
  align-items: center;
}

.runtime-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pipeline {
  display: flex;
  flex-direction: column;
}

.pipeline-node {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-1);
  transition: transform 280ms var(--ease-out), border-color 280ms var(--ease-out), background 280ms var(--ease-out);
}

.pipeline-node:hover {
  transform: translateX(6px);
  border-color: var(--gold-line);
  background:
    radial-gradient(circle at 0% 50%, rgba(243, 213, 138, 0.1), transparent 38%),
    var(--ink-2);
}

.pipeline-node__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--metal);
  color: var(--ink-0);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.pipeline-node strong {
  display: block;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 6px;
}

.pipeline-node p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--paper-low);
}

.pipeline-line {
  width: 1px;
  height: 32px;
  margin-left: 44px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

/* ---- 22. CRUD ----------------------------------------------- */
.crud-section,
.rls-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.crud-layout,
.rls-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
}

.crud-routes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crud-routes article {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 14px 18px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
}

.crud-routes article > p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--paper-mid);
}

.crud-routes article > code {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper-soft);
}

.crud-method {
  padding: 5px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  min-width: 70px;
}

.crud-method--post   { background: rgba(106,184,106,.18); color: #a8e6a8; border: 1px solid rgba(106,184,106,.42); }
.crud-method--put    { background: rgba(243,213,138,.18); color: var(--gold-bright); border: 1px solid var(--gold-line); }
.crud-method--delete { background: rgba(232,116,116,.16); color: #f1a8a8; border: 1px solid rgba(232,116,116,.4); }

.crud-pillars,
.rls-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rls-pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.crud-pillars > div,
.rls-pillars > div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
}

.crud-pillars strong,
.rls-pillars strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-bright);
}

.crud-pillars p,
.rls-pillars p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--paper-mid);
}

.rls-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rls-modes article {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.rls-mode-tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.rls-modes h3 { font-size: 17px; margin-bottom: 10px; }
.rls-modes p { font-size: 13.5px; line-height: 1.6; color: var(--paper-mid); }

/* ---- 23. Server demo ---------------------------------------- */
.server-demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.server-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--gold-line);
}

.server-proof-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--ink-1);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- 24. Architecture --------------------------------------- */
.architecture-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: var(--gap-xl);
  align-items: start;
}

.architecture-copy { display: flex; flex-direction: column; gap: 22px; }

.ownership-table {
  display: grid;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--gold-line);
}

.ownership-table [role="row"] {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.2fr;
  gap: 1px;
  background: var(--gold-line);
}

.ownership-table [role="row"] + [role="row"] { margin-top: 1px; }

.ownership-table [role="cell"] {
  padding: 18px 20px;
  background: var(--ink-1);
  color: var(--paper-mid);
  font-size: 13.5px;
  line-height: 1.5;
}

.ownership-table strong[role="cell"] {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---- 25. AI-first ------------------------------------------- */
.ai-first-section { display: flex; flex-direction: column; gap: var(--gap-xl); }

.ai-first-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ai-first-grid article {
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  transition: border-color 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.ai-first-grid article:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
}

.ai-first-grid > article > span {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 10px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
}

.ai-first-grid h3 { font-size: 17px; margin-bottom: 12px; }

.ai-first-grid p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper-mid);
}

/* ---- 26. Story (human voice) -------------------------------- */
.story-section {
  position: relative;
  width: min(var(--container-max), calc(100% - var(--container-pad) * 2));
  margin: 0 auto;
  padding: var(--gap-3xl) var(--gap-m);
}

.story-content {
  max-width: 720px;
  margin: 0 auto;
}

.story-content .eyebrow {
  margin-bottom: 32px;
}

.story-body p {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.55;
  color: var(--paper-soft);
}

.story-body p:last-child {
  margin-bottom: 0;
  color: var(--paper-mid);
  font-style: italic;
}

.story-body p:first-child::first-letter {
  font-size: 1.4em;
  font-weight: 500;
  color: var(--gold-bright);
  margin-right: 4px;
}

/* ---- 27. Section divider ------------------------------------ */
.section-divider {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin: 0;
  pointer-events: none;
}

.section-divider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: contrast(1.05) saturate(1.1) blur(0.5px);
  image-rendering: auto;
}

.section-divider::before,
.section-divider::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  z-index: 2;
  pointer-events: none;
}

.section-divider::before {
  top: 0;
  background: linear-gradient(180deg, var(--ink-0), transparent);
}

.section-divider::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--ink-0), transparent);
}

/* ---- 28. CTA ------------------------------------------------ */
.cta-section {
  position: relative;
  width: min(var(--container-max), calc(100% - var(--container-pad) * 2));
  margin: var(--gap-2xl) auto 0;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-xl);
  background: var(--ink-0);
  isolation: isolate;
}

.cta-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  opacity: 0.6;
  filter: contrast(1.08) saturate(1.05);
  transform: scale(1.05);
  animation: heroDrift 38s ease-in-out infinite alternate;
}

.cta-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.3) 60%, var(--ink-0) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.6) 100%);
}

.cta-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 640px;
  padding: 64px 32px;
  text-align: center;
}

.cta-content h2 { max-width: 18ch; }

.cta-content > p {
  max-width: 56ch;
  font-size: 17px;
  color: var(--paper-soft);
}

.install-command {
  width: min(100%, 580px);
  margin: 0;
  padding: 18px 24px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold-bright);
  letter-spacing: 0.01em;
  text-align: left;
  position: relative;
}

.install-command::before {
  content: "$";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: 600;
}

.install-command code {
  display: block;
  padding-left: 18px;
  white-space: nowrap;
  overflow-x: auto;
}

.cta-tagline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--paper-soft);
}

.cta-tagline em {
  background: var(--metal-soft);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.cta-tagline .sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---- 29. Footer --------------------------------------------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(var(--container-max), calc(100% - var(--container-pad) * 2));
  margin: 0 auto;
  padding: 64px 0 80px;
}

.footer p {
  max-width: 480px;
  text-align: right;
  font-size: 13.5px;
  color: var(--paper-low);
}

/* ---- 30. Reveal & motion ------------------------------------ */
.has-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 800ms var(--ease-out),
    transform 800ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { --reveal-delay: 90ms; }
.reveal--delay-2 { --reveal-delay: 180ms; }
.reveal--delay-3 { --reveal-delay: 270ms; }
.reveal--delay-4 { --reveal-delay: 360ms; }

.scale-title {
  opacity: var(--title-opacity, 1);
  transform: scale(var(--title-scale, 1));
  transform-origin: center top;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .scale-title { opacity: 1 !important; transform: none !important; }
  .hero-image { animation: none; }
}

/* ---- 31. Responsive ----------------------------------------- */
@media (max-width: 1180px) {
  .navbar { padding: 22px 36px; }

  .gate-flow,
  .loop-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .gate-flow .gate-step:not(:last-child)::after,
  .loop-stages li:not(:last-child)::after { content: ""; }

  .delivery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plugin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-first-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rls-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .intro-headline { grid-template-columns: 1fr; gap: 32px; }
  .intro-headline-side { padding-bottom: 0; }

  .code-section,
  .runtime-section,
  .cli-loop-section,
  .resilience-section,
  .architecture-section,
  .crud-layout,
  .rls-layout,
  .auth-layout,
  .app-shell-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .resilience-copy { position: static; }

  .feature-grid,
  .language-grid,
  .versioning-grid,
  .ai-first-grid,
  .delivery-grid,
  .gate-flow,
  .gate-grid,
  .loop-stages,
  .crud-pillars,
  .rls-pillars,
  .auth-pillars,
  .plugin-grid,
  .rls-modes {
    grid-template-columns: 1fr;
  }

  .safety-rails { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .proof-strip__hero,
  .proof-strip__minor { grid-template-columns: 1fr; }
  .proof-strip__minor { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .ownership-table [role="row"] { grid-template-columns: 1fr; }
  .ownership-table [role="cell"] + [role="cell"] { border-left: 0; }

  .resilience-steps > div { grid-template-columns: 1fr; gap: 8px; }

  .terminal-line { grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }

  .footer { flex-direction: column; align-items: flex-start; }
  .footer p { text-align: left; }
}

@media (max-width: 640px) {
  .navbar { padding: 18px 20px; }
  .nav-links { display: none; }

  .section { padding: var(--gap-2xl) 0; }

  .hero-content { padding: 100px 20px 80px; }

  .pull-quote { padding: 36px 28px; }
  .pull-quote p:first-of-type { font-size: 22px; }

  .hero-tagline { flex-direction: column; gap: 8px; font-size: 18px; }
  .hero-tagline .sep { display: none; }

  .cta-tagline { flex-direction: column; gap: 6px; }
  .cta-tagline .sep { display: none; }

  .story-body p { font-size: 18px; }

  .gate-section__inner { padding: var(--gap-2xl) 0; }
}
