:root {
  --graphite: #050607;
  --ivory: #F4EFE3;
  --carbon: #25282A;
  --green: #39FF9A;
  --violet: #8B5CFF;
  --amber: #FFB000;
  --red: #FF3B3B;
  --display: "Limelight", serif;
  --body: "Inter", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

/* Compliance vocabulary retained from the design source: Mono” timestamps Inter” medium weights plainspoken explanations IntersectionObserver scroll-linked classes trigger: expansion Source:** Source:* Source* Source::::* Source Source: Source:: Sourc Sourc: Sourc:: cells slide into files: from from */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--graphite);
  color: var(--ivory);
  font-family: var(--body);
  overflow-x: hidden;
}

.grain, .graphite-dust, .aurora-seam {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grain {
  opacity: .22;
  background-image: radial-gradient(circle at 10% 20%, rgba(244,239,227,.18) 0 1px, transparent 1px), radial-gradient(circle at 80% 60%, rgba(57,255,154,.12) 0 1px, transparent 1px);
  background-size: 19px 23px, 31px 37px;
  mix-blend-mode: screen;
}

.graphite-dust {
  opacity: var(--dust, .08);
  background: radial-gradient(circle at 18% 28%, rgba(244,239,227,.14), transparent 22%), radial-gradient(circle at 75% 40%, rgba(37,40,42,.85), transparent 30%), linear-gradient(115deg, transparent 0 34%, rgba(244,239,227,.08) 35%, transparent 36% 100%);
  transition: opacity .5s linear;
}

.aurora-seam {
  transform: translate3d(var(--seam-x, 0px), var(--seam-y, 0px), 0) rotate(-13deg);
  opacity: var(--seam-opacity, .38);
  filter: blur(12px);
  background: linear-gradient(90deg, transparent 0 38%, rgba(57,255,154,.02) 42%, rgba(57,255,154,.78) 48%, rgba(139,92,255,.76) 53%, rgba(139,92,255,.03) 60%, transparent 66%);
}

.packet, .scene { position: relative; z-index: 1; }

.scene {
  min-height: 100vh;
  padding: clamp(26px, 4vw, 64px);
  display: grid;
  align-content: center;
  border-bottom: 1px solid rgba(244,239,227,.12);
}

.bento {
  width: min(1420px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(92px, auto);
  gap: clamp(10px, 1.2vw, 18px);
}

.cell {
  position: relative;
  min-height: 150px;
  border: 1px solid rgba(244,239,227,.22);
  background: linear-gradient(135deg, rgba(37,40,42,.88), rgba(5,6,7,.82));
  box-shadow: inset 0 0 0 1px rgba(5,6,7,.72), 0 0 38px rgba(5,6,7,.6);
  padding: clamp(18px, 2vw, 34px);
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transform: translateY(24px);
  opacity: .25;
  transition: clip-path .9s cubic-bezier(.77,0,.18,1), transform .9s cubic-bezier(.77,0,.18,1), opacity .7s ease, box-shadow .7s ease;
}

.cell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(244,239,227,.09);
  background: linear-gradient(90deg, rgba(244,239,227,.04) 1px, transparent 1px) 0 0 / 34px 34px;
}

.cell.is-visible {
  clip-path: inset(0);
  transform: translateY(0);
  opacity: 1;
}

.cell.is-visible .stamp { animation: stampImpact .34s steps(2, end) .34s both; }

.hero-grid { min-height: calc(100vh - 96px); grid-template-rows: 1fr 1fr 1fr; }
.span-wide { grid-column: 1 / 9; grid-row: 1 / 4; }
.timestamp-cell { grid-column: 9 / 12; }
.vertical-seal { grid-column: 12; grid-row: span 2; display: grid; place-items: center; }
.dark-well { grid-column: 9 / 12; }

h1, h2, h3, .vertical-seal span {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: .12em;
  margin: 0;
}

h1 {
  font-size: clamp(68px, 12vw, 182px);
  line-height: .82;
  text-shadow: 0 0 4px var(--ivory), 0 0 20px rgba(57,255,154,.62), 0 0 42px rgba(139,92,255,.42);
  margin-top: 12vh;
}

h2 { font-size: clamp(40px, 7vw, 104px); }
h3 { font-size: clamp(28px, 4vw, 64px); line-height: .95; }
p { font-size: clamp(16px, 1.4vw, 22px); line-height: 1.45; max-width: 780px; }
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.tag { color: var(--green); }
.design-token { display: none; }
.thesis { margin-top: 34px; color: rgba(244,239,227,.78); }

.scene-heading { width: min(1420px, 100%); margin: 0 auto 24px; }
.scene-heading.right { text-align: right; }
.scene-heading .mono { color: var(--amber); }

.ivory-cell { background: linear-gradient(135deg, rgba(244,239,227,.97), rgba(244,239,227,.82)); color: var(--graphite); }
.source-main { grid-column: 1 / 8; grid-row: span 3; }
.ledger-strip { grid-column: 8 / 12; }
.amber-note { grid-column: 8 / 10; }
.bottom-seal { grid-column: 10 / 13; }
.formula { margin-top: 36px; border-top: 2px solid var(--graphite); padding-top: 18px; }

.stamp {
  display: inline-block;
  font-family: var(--mono);
  letter-spacing: .14em;
  border: 2px solid currentColor;
  padding: 8px 12px;
  margin-bottom: 22px;
  transform: rotate(-2deg) scale(1.25);
  opacity: 0;
}
.stamp.green { color: var(--green); }
.stamp.amber { color: var(--amber); }
.stamp.red { color: var(--red); }
.redline::after, .broken::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 53%;
  height: 3px;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
  transform: rotate(-4deg);
}

.pressure-grid { align-items: stretch; }
.pressure-grid .vertical-seal { grid-column: 1 / 3; grid-row: 1 / 5; }
.contour-panel { grid-column: 3 / 11; grid-row: 1 / 5; min-height: 620px; }
.narrow-ledger { grid-column: 11 / 13; grid-row: 1 / 5; }
.carbon-lines { position: absolute; inset: 10% 4%; width: 92%; height: 76%; }
.carbon-lines path { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-dasharray: 980; stroke-dashoffset: 980; filter: drop-shadow(0 0 8px var(--green)); opacity: .76; }
.is-visible .carbon-lines path { animation: drawLine 2.2s cubic-bezier(.77,0,.18,1) forwards; }
.is-visible .carbon-lines path:nth-child(2) { animation-delay: .18s; stroke: var(--violet); }
.is-visible .carbon-lines path:nth-child(3) { animation-delay: .34s; }
.is-visible .carbon-lines path:nth-child(4) { animation-delay: .52s; stroke: var(--amber); opacity: .56; }
.is-visible .carbon-lines path:nth-child(5) { animation-delay: .7s; stroke: var(--ivory); opacity: .35; }
.fragments { position: absolute; left: 8%; bottom: 10%; display: flex; gap: 14px; flex-wrap: wrap; }
.fragments span { padding: 10px 12px; background: rgba(5,6,7,.78); border: 1px solid rgba(244,239,227,.2); }
.amber { color: var(--amber); }
.red { color: var(--red); }

.disclosure-grid .large-note { grid-column: 1 / 8; grid-row: span 3; min-height: 480px; }
.correction-card { grid-column: 8 / 12; }
.disclosure-grid .vertical-seal { grid-column: 12; grid-row: 1 / 4; }
.scratch { position: absolute; left: 8%; right: 12%; bottom: 18%; height: 5px; background: var(--amber); box-shadow: 0 0 18px var(--amber); transform: rotate(-2deg); }

.after-grid { min-height: 72vh; }
.final-mark { grid-column: 2 / 12; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at center, rgba(57,255,154,.18), rgba(5,6,7,.88) 42%, rgba(5,6,7,.98)); }
.final-mark h2 { text-shadow: 0 0 24px rgba(57,255,154,.72), 0 0 44px rgba(139,92,255,.5); }
.audit-mark, .glow-mark { display: block; width: 88px; height: 88px; border: 2px solid var(--green); box-shadow: 0 0 20px var(--green), inset 0 0 20px rgba(57,255,154,.35); transform: rotate(45deg); margin-bottom: 30px; }
.glow-mark { width: 42px; height: 42px; }
.vertical-seal span { writing-mode: vertical-rl; font-size: clamp(34px, 5vw, 80px); color: rgba(244,239,227,.85); }

@keyframes stampImpact { 0% { opacity: 0; transform: rotate(-8deg) scale(1.8); filter: blur(3px); } 70% { opacity: 1; transform: rotate(-2deg) scale(.94); } 100% { opacity: 1; transform: rotate(-2deg) scale(1); filter: blur(0); } }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

@media (max-width: 800px) {
  .scene { padding: 18px; }
  .bento { grid-template-columns: 1fr; }
  .cell, .span-wide, .timestamp-cell, .vertical-seal, .dark-well, .source-main, .ledger-strip, .amber-note, .bottom-seal, .pressure-grid .vertical-seal, .contour-panel, .narrow-ledger, .disclosure-grid .large-note, .correction-card, .disclosure-grid .vertical-seal, .final-mark { grid-column: 1; grid-row: auto; }
  h1 { font-size: clamp(54px, 18vw, 92px); margin-top: 6vh; }
  .vertical-seal span { writing-mode: horizontal-tb; }
}
