/* =============================================================
   THE BUILDING HANDBOOK — marketing site
   Echoes the handbook's editorial/technical aesthetic.
   ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

@font-face {
  font-family: 'Gotham';
  src: url('fonts/Gotham-Book.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: url('fonts/Gotham-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: url('fonts/Gotham-Black.otf') format('opentype');
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --ink:        #0a0a0a;
  --paper:      #f4f1ea;       /* warm off-white, manual paper */
  --paper-2:    #ebe6da;
  --charcoal:   #414042;
  --teal:       #1680A5;
  --mid-navy:   #184172;
  --deep-navy:  #18234E;

  /* Section colors — pulled straight from the handbook */
  --c-opr:  #BF8F00;
  --c-tr:   #36454F;
  --c-ps:   #2E7D32;
  --c-dr:   #E74C3C;
  --c-sr:   #C0392B;
  --c-pft:  #922B21;
  --c-gi:   #7BA2D4;
  --c-fpt:  #4472C4;
  --c-sr5c: #2F5496;
  --c-tab:  #1B3A6B;
  --c-om:   #8E44AD;
  --c-wi:   #5B2C6F;

  --font-display: 'Barlow Condensed', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.2, 0.0, 0.0, 1.0);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* =========== NAV =========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 64px; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; font-size: 15px;
  color: #fff;
}
.nav-brand .mark {
  width: 22px; height: 22px;
  background: var(--paper);
  position: relative;
}
.nav-brand .mark::before,
.nav-brand .mark::after {
  content: ""; position: absolute; background: var(--ink);
}
.nav-brand .mark::before { left: 3px; right: 3px; top: 5px; height: 1.5px; }
.nav-brand .mark::after  { left: 3px; right: 3px; top: 10px; height: 1.5px; box-shadow: 0 5px 0 var(--ink); }

.nav-meta {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
  display: flex; gap: 24px; align-items: center;
}
.nav-cta {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 700;
  color: var(--ink); background: var(--paper);
  padding: 9px 16px; border-radius: 2px;
  transition: transform .15s var(--ease-out), background .15s;
  cursor: pointer;
}
.nav-cta:hover { background: #fff; transform: translateY(-1px); }

/* =========== SECTION CHROME =========== */
.section {
  position: relative;
  padding: 120px 48px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.section.paper {
  background: var(--paper);
  color: var(--ink);
  border-top-color: rgba(0,0,0,.08);
}
.section .container {
  max-width: 1280px;
  margin: 0 auto;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .28em;
  text-transform: uppercase; font-weight: 700;
  color: var(--teal);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
}
.eyebrow .dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; }
.section.paper .eyebrow { color: var(--mid-navy); }
.section.paper .eyebrow .dot { background: var(--mid-navy); }

.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 1.0;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 0 0 28px;
}
.h-display em { font-style: normal; color: var(--teal); }
.section.paper .h-display em { color: var(--mid-navy); }
.lead {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  max-width: 60ch;
  color: rgba(255,255,255,.78);
  margin: 24px 0 0;
  text-wrap: pretty;
}
.section.paper .lead { color: var(--charcoal); }

/* =========== UTILITY =========== */
.mono-line {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .24em;
  text-transform: uppercase; font-weight: 500;
  color: rgba(255,255,255,.45);
}
.section.paper .mono-line { color: var(--charcoal); opacity: .6; }
.hairline {
  border: 0; height: 1px;
  background: rgba(255,255,255,.12);
  margin: 0;
}
.section.paper .hairline { background: rgba(0,0,0,.12); }

/* =============================================================
   HERO
   ============================================================= */
.hero {
  min-height: 100vh;
  position: relative;
  background: var(--ink);
  overflow: hidden;
  display: flex; flex-direction: column;
  padding: 96px 48px 48px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('assets/building.png');
  background-size: cover;
  background-position: center 40%;
  opacity: .14;
  filter: grayscale(.4) contrast(1.05);
  z-index: 0;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, transparent, rgba(10,10,10,.6) 70%),
    linear-gradient(180deg, rgba(10,10,10,.4) 0%, rgba(10,10,10,.95) 90%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black, transparent 80%);
}

.hero-top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: 12px 0 0;
}
.hero-top .stamp { color: var(--paper); font-weight: 700; }

.hero-body {
  position: relative; z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 40px;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(72px, 10vw, 160px);
  line-height: .92;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0;
}
.hero-headline .l {
  display: block;
  overflow: hidden;
}
.hero-headline .l > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1.1s var(--ease-out) forwards;
}
.hero-headline .l1 > span { animation-delay: .05s; }
.hero-headline .l2 > span { animation-delay: .18s; }
.hero-headline .l3 > span { animation-delay: .31s; }
.hero-headline .accent { color: var(--teal); position: relative; }

.hero-sub {
  margin-top: 28px;
  max-width: 48ch;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,.72);
  opacity: 0;
  animation: fade .8s ease forwards .8s;
}
.hero-pitch {
  margin-top: 36px;
  display: flex; gap: 16px; align-items: center;
  opacity: 0;
  animation: fade .8s ease forwards 1.0s;
}
.hero-pitch .cta-primary {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; font-weight: 700;
  background: var(--paper); color: var(--ink);
  padding: 16px 24px;
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: transform .15s var(--ease-out);
}
.hero-pitch .cta-primary:hover { transform: translateY(-2px); }
.hero-pitch .cta-primary .arr {
  display: inline-block; transition: transform .2s;
}
.hero-pitch .cta-primary:hover .arr { transform: translateX(4px); }
.hero-pitch .cta-secondary {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  padding: 14px 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.hero-pitch .cta-secondary:hover { color: #fff; border-bottom-color: #fff; }

.hero-stats {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.12);
  opacity: 0;
  animation: fade .8s ease forwards 1.3s;
}
.hero-stat { padding-right: 24px; border-right: 1px solid rgba(255,255,255,.08); }
.hero-stat:last-child { border-right: 0; }
.hero-stat .v {
  font-family: var(--font-display);
  font-weight: 800; font-size: 44px;
  color: var(--paper);
  line-height: 1;
  letter-spacing: -.01em;
}
.hero-stat .v .sm { font-size: 22px; vertical-align: top; margin-left: 2px; opacity: .7; }
.hero-stat .k {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
  margin-top: 8px;
}

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }

/* =============================================================
   HERO BOOK — the animated handbook
   ============================================================= */
.book-stage {
  position: relative;
  width: 100%; height: 520px;
  display: flex; align-items: center; justify-content: center;
  perspective: 2400px;
  perspective-origin: 50% 50%;
}
.book {
  position: relative;
  width: 360px; height: 480px;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-22deg);
  animation: bookSpin 18s linear infinite;
}
@keyframes bookSpin {
  0%   { transform: rotateX(8deg) rotateY(-22deg); }
  50%  { transform: rotateX(8deg) rotateY(22deg); }
  100% { transform: rotateX(8deg) rotateY(-22deg); }
}
.book .cover {
  position: absolute; inset: 0;
  background: var(--ink);
  border: 1px solid #1d1d1d;
  box-shadow:
    0 30px 60px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,255,255,.04);
  transform: translateZ(20px);
  display: flex; flex-direction: column;
  padding: 32px 24px;
  overflow: hidden;
}
.book .cover::before {
  content: ""; position: absolute;
  inset: 0;
  background-image: url('assets/building.png');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  opacity: .35;
  mix-blend-mode: screen;
  filter: grayscale(.6) contrast(1.1);
}
.book .cover-stamp {
  position: relative;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .28em;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  display: flex; justify-content: space-between;
}
.book .cover-title {
  position: relative;
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 48px;
  line-height: .95;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}
.book .cover-title .the {
  font-size: 14px;
  letter-spacing: .18em;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.7);
}
.book .cover-title .line { display: block; }
.book .cover-foot {
  position: relative;
  margin-top: 28px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8.5px; letter-spacing: .22em;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 12px;
}
.book .spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 40px;
  background: var(--ink);
  transform: translateX(-20px) rotateY(-90deg);
  transform-origin: right center;
  border-right: 1px solid #222;
}
.book .spine::before {
  content: ""; position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.06), transparent 30%, transparent 70%, rgba(0,0,0,.4));
}
.book .pages {
  position: absolute;
  right: 6px; top: 4px; bottom: 4px;
  width: 28px;
  background:
    repeating-linear-gradient(180deg, var(--paper) 0 1px, #d8d3c5 1px 2px);
  transform: translateZ(12px) translateX(2px);
}
/* tabs along the right edge — each section color */
.book .tab {
  position: absolute;
  right: -6px;
  width: 14px; height: 26px;
  background: var(--tab-c, var(--c-opr));
  transform: translateZ(16px);
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
  animation: tabIn .6s var(--ease-out) backwards;
}
@keyframes tabIn {
  from { transform: translateZ(16px) translateX(20px); opacity: 0; }
  to   { transform: translateZ(16px) translateX(0); opacity: 1; }
}

/* Floating chapter chips around the book */
.book-orbits {
  position: absolute; inset: 0;
  pointer-events: none;
}
.orbit-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  padding: 6px 10px;
  background: var(--chip-c, var(--c-opr));
  white-space: nowrap;
  opacity: 0;
  animation: chipFloat 4s ease-in-out infinite;
}
@keyframes chipFloat {
  0%, 100% { transform: translateY(-4px); opacity: .9; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* =============================================================
   MARQUEE — section codes ticker
   ============================================================= */
.marquee {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  padding: 22px 0;
}
.marquee-track {
  display: flex; gap: 56px;
  animation: marqueeScroll 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
}
.marquee-item .code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--m-c, var(--c-opr));
  color: #fff;
}
.marquee-item .sep {
  color: rgba(255,255,255,.2);
  font-family: var(--font-display);
  font-weight: 400;
}

/* =============================================================
   PROBLEM — binders to handbook
   ============================================================= */
.problem {
  background: var(--paper);
  color: var(--ink);
  padding: 140px 48px;
  overflow: hidden;
}
.problem-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.problem h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.8vw, 68px);
  line-height: 1.02;
  letter-spacing: -.005em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.problem h2 .strike {
  position: relative;
  display: inline-block;
}
.problem h2 .strike::after {
  content: "";
  position: absolute;
  left: -4px; right: -4px; top: 52%;
  height: 6px;
  background: var(--c-sr);
  transform: scaleX(0);
  transform-origin: left;
  animation: strike 1.2s var(--ease-out) forwards;
  animation-delay: var(--strike-delay, .3s);
}
@keyframes strike { to { transform: scaleX(1); } }

/* The binder/handbook visual */
.swap-stage {
  position: relative;
  height: 480px;
  display: flex; align-items: center; justify-content: center;
}
.binders {
  position: relative;
  width: 420px; height: 360px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  animation: bindersDissolve 8s ease-in-out infinite;
}
@keyframes bindersDissolve {
  0%, 38% { opacity: 1; transform: scale(1); filter: blur(0); }
  50%, 90% { opacity: 0; transform: scale(.85); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
.binder {
  background: var(--b-c, #6b5d4a);
  position: relative;
  box-shadow:
    inset -6px 0 0 rgba(0,0,0,.25),
    inset 6px 0 0 rgba(255,255,255,.08),
    0 6px 16px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  border-radius: 1px 3px 3px 1px;
  overflow: hidden;
}
.binder::before {
  content: ""; position: absolute;
  left: 50%; transform: translateX(-50%);
  top: 10%; bottom: 10%;
  width: 78%;
  background: rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(0,0,0,.18);
  pointer-events: none;
}
.binder-label {
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--ink);
  padding: 4px 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  max-width: 90%;
}
.binder.more {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.25);
}
.binder.more::before { display: none; }
.binder.more .binder-label {
  background: transparent;
  color: var(--charcoal);
  opacity: .55;
  letter-spacing: .22em;
}

.handbook-out {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  animation: handbookIn 8s ease-in-out infinite;
  opacity: 0;
}
@keyframes handbookIn {
  0%, 42% { opacity: 0; transform: scale(.9); filter: blur(8px); }
  54%, 88% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(.9); filter: blur(8px); }
}
.handbook-mini {
  width: 260px; height: 360px;
  background: var(--ink);
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
  display: flex; flex-direction: column;
  padding: 22px 18px;
  overflow: hidden;
}
.handbook-mini::before {
  content: ""; position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(180deg,
    var(--c-opr) 0 8.33%, var(--c-tr) 8.33% 16.66%, var(--c-ps) 16.66% 25%,
    var(--c-dr) 25% 33.33%, var(--c-sr) 33.33% 41.66%, var(--c-pft) 41.66% 50%,
    var(--c-gi) 50% 58.33%, var(--c-fpt) 58.33% 66.66%, var(--c-sr5c) 66.66% 75%,
    var(--c-tab) 75% 83.33%, var(--c-om) 83.33% 91.66%, var(--c-wi) 91.66% 100%);
}
.handbook-mini .hm-stamp {
  font-family: var(--font-mono);
  font-size: 8px; letter-spacing: .24em;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  display: flex; justify-content: space-between;
}
.handbook-mini .hm-title {
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  line-height: .95;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}
.handbook-mini .hm-title .the {
  display: block;
  font-size: 10px; letter-spacing: .18em;
  font-weight: 700; margin-bottom: 6px;
  color: rgba(255,255,255,.65);
}
.handbook-mini .hm-title .line { display: block; }
.handbook-mini .hm-foot {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 7.5px; letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 10px;
  display: flex; justify-content: space-between;
}

.transition-arrow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .24em;
  text-transform: uppercase; font-weight: 700;
  color: var(--charcoal);
  background: var(--paper);
  padding: 8px 14px;
  border: 1px solid var(--charcoal);
  pointer-events: none;
  animation: arrFade 8s ease-in-out infinite;
  opacity: 0;
}
@keyframes arrFade {
  0%, 38% { opacity: 0; }
  44%, 50% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* =============================================================
   STRUCTURE — six-part chapter grid
   ============================================================= */
.structure {
  background: var(--ink);
  color: var(--paper);
  padding: 140px 48px;
}
.structure .container { max-width: 1280px; margin: 0 auto; }
.structure-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.six-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
}
.six-cell {
  background: var(--ink);
  padding: 28px 22px 32px;
  position: relative;
  min-height: 280px;
  display: flex; flex-direction: column;
  cursor: default;
  transition: background .25s var(--ease-out);
}
.six-cell::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--cell-c, var(--c-opr));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.six-cell:hover { background: #141414; }
.six-cell:hover::before { transform: scaleX(1); }
.six-cell .num {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  color: rgba(255,255,255,.4);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.six-cell .num .accent { color: var(--cell-c, var(--c-opr)); font-weight: 700; }
.six-cell h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 14px;
}
.six-cell p {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,.65);
  margin: 0;
  text-wrap: pretty;
}

.chapter-rail {
  margin-top: 64px;
  padding: 24px 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.06);
}
.rail-cell {
  background: var(--ink);
  padding: 14px 12px;
  border-top: 3px solid var(--rc, var(--c-opr));
}
.rail-cell .rcd {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .18em;
  font-weight: 700; color: var(--rc, var(--c-opr));
  text-transform: uppercase;
}
.rail-cell .rcn {
  font-family: var(--font-display);
  font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: .02em;
  margin-top: 6px;
  color: rgba(255,255,255,.85);
}

/* =============================================================
   AI DEMO
   ============================================================= */
.ai {
  background: var(--paper);
  color: var(--ink);
  padding: 140px 48px;
}
.ai .container { max-width: 1280px; margin: 0 auto; }
.ai-head { max-width: 720px; margin-bottom: 56px; }
.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: stretch;
}
.ai-side {
  display: flex; flex-direction: column; gap: 24px;
}
.ai-side .feature {
  border-top: 1px solid rgba(0,0,0,.15);
  padding-top: 20px;
}
.ai-side .feature .code {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .2em;
  font-weight: 700; color: var(--teal);
  text-transform: uppercase; margin-bottom: 8px;
}
.ai-side .feature h4 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 24px;
  text-transform: uppercase; letter-spacing: 0;
  margin: 0 0 6px;
}
.ai-side .feature p {
  margin: 0;
  font-size: 14px; line-height: 1.55;
  color: var(--charcoal);
}

/* Chat window */
.chat {
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 24px 60px rgba(24,35,78,.12);
  display: flex; flex-direction: column;
  min-height: 520px;
  overflow: hidden;
}
.chat-head {
  background: var(--deep-navy);
  color: #fff;
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase;
}
.chat-head .dots { display: flex; gap: 6px; }
.chat-head .dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.25);
}
.chat-head .dots span:first-child { background: var(--c-dr); }
.chat-head .proj-tag {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .2em;
  color: rgba(255,255,255,.6);
}
.chat-body {
  flex: 1;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #fff 0%, #fafaf7 100%);
}
.bubble {
  max-width: 86%;
  font-size: 14px; line-height: 1.55;
  font-family: var(--font-body);
}
.bubble.user {
  align-self: flex-end;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px;
  border-radius: 14px 14px 2px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .01em;
}
.bubble.user .caret {
  display: inline-block; width: 1px; height: 14px;
  background: var(--paper); vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.bubble.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  padding: 14px 18px;
  border-radius: 2px 14px 14px 14px;
  color: var(--ink);
  max-width: 90%;
}
.bubble.bot .ans { margin: 0; }
.bubble.bot .src {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed rgba(0,0,0,.15);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em;
  color: var(--mid-navy);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.bubble.bot .src .lbl { color: rgba(0,0,0,.5); text-transform: uppercase; letter-spacing: .22em; margin-right: 4px; }
.bubble.bot .src .cite {
  background: var(--gray-100, #eceef1);
  padding: 3px 8px;
  border-left: 2px solid var(--teal);
  font-weight: 600;
  color: var(--ink);
}
.typing-dots {
  display: inline-flex; gap: 4px; padding: 4px 0;
}
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--charcoal); opacity: .35;
  animation: tdots 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes tdots {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.chat-presets {
  border-top: 1px solid rgba(0,0,0,.1);
  padding: 14px 18px;
  display: flex; gap: 8px; flex-wrap: wrap;
  background: #fafaf7;
}
.preset {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .04em;
  font-weight: 500;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  color: var(--charcoal);
  cursor: pointer;
  transition: all .15s var(--ease-out);
  white-space: nowrap;
}
.preset:hover { border-color: var(--teal); color: var(--teal); }
.preset.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* =============================================================
   WHY / CREDIBILITY
   ============================================================= */
.why {
  background: var(--deep-navy);
  color: var(--paper);
  padding: 140px 48px;
  position: relative;
  overflow: hidden;
}
.why::before {
  content: ""; position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 80% 30%, black, transparent 70%);
}
.why .container {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
}
.why h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 0 0 32px;
  text-wrap: balance;
}
.why p {
  font-size: 17px; line-height: 1.6;
  color: rgba(255,255,255,.78);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.why-spec {
  border-left: 2px solid var(--teal);
  padding: 8px 0 8px 24px;
  margin-top: 32px;
}
.why-spec .eyebrow { color: var(--teal); margin-bottom: 12px; }
.why-spec p { font-size: 15px; color: rgba(255,255,255,.85); }
.why-counter {
  display: flex; flex-direction: column;
  gap: 1px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.1);
}
.why-counter .row {
  background: var(--deep-navy);
  padding: 28px 28px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 24px;
}
.why-counter .row .k {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .22em;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
}
.why-counter .row .v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--paper);
}
.why-counter .row .v .sm { font-size: 24px; opacity: .55; margin-left: 2px; }
.why-counter .row .lbl {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,.65);
  text-align: right;
  max-width: 26ch;
  line-height: 1.4;
}

/* =============================================================
   FINAL CTA
   ============================================================= */
.final {
  background: var(--paper);
  color: var(--ink);
  padding: 140px 48px 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final .pitch {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 0;
  max-width: 18ch;
  margin-inline: auto;
  text-wrap: balance;
}
.final .pitch .a { display: block; opacity: .25; margin-bottom: .25em; }
.final .pitch .b { display: block; }
.final .pitch .answer-back {
  color: var(--mid-navy);
  position: relative;
}
.final .pitch .answer-back::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -8px;
  height: 6px;
  background: var(--teal);
}
.final-cta {
  margin-top: 56px;
  display: inline-flex; align-items: center; gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: .22em;
  text-transform: uppercase; font-weight: 700;
  background: var(--ink); color: var(--paper);
  padding: 22px 32px;
  cursor: pointer;
  transition: transform .15s var(--ease-out);
}
.final-cta:hover { transform: translateY(-2px); }
.final-cta .arr { transition: transform .2s; }
.final-cta:hover .arr { transform: translateX(6px); }
.final-meta {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--charcoal); opacity: .6;
}

/* =============================================================
   FOOTER
   ============================================================= */
.foot {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: 56px 48px 36px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
}
.foot .container {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.foot h5 {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .24em;
  color: rgba(255,255,255,.4);
  margin: 0 0 16px;
  text-transform: uppercase;
}
.foot a { display: block; padding: 6px 0; color: rgba(255,255,255,.7); }
.foot a:hover { color: #fff; }
.foot-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  line-height: .92;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 14px;
}
.foot-tag {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255,255,255,.55);
  max-width: 36ch;
  line-height: 1.5;
}
.foot-line {
  max-width: 1280px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: .22em;
  color: rgba(255,255,255,.4);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1000px) {
  .hero-body, .problem-grid, .structure-head, .ai-grid, .why-grid {
    grid-template-columns: 1fr; gap: 48px;
  }
  .six-grid { grid-template-columns: repeat(2, 1fr); }
  .chapter-rail { grid-template-columns: repeat(6, 1fr); }
  .why-counter .row { grid-template-columns: 1fr; gap: 8px; }
  .why-counter .row .lbl { text-align: left; }
  .foot .container { grid-template-columns: 1fr 1fr; }
  .nav-meta { display: none; }
}
@media (max-width: 600px) {
  .section, .problem, .structure, .ai, .why, .final { padding-left: 24px; padding-right: 24px; }
  .nav { padding: 0 16px; }
  .six-grid { grid-template-columns: 1fr; }
  .chapter-rail { grid-template-columns: repeat(3, 1fr); }
  .foot .container { grid-template-columns: 1fr; }
}
