:root {
  --pressure-orange: #D95F18;
  --charred-concrete: #181512;
  --wet-cement: #B9B0A3;
  --oxide-rust: #8F2E16;
  --deep-water-black: #071014;
  --bubble-glass: #BFE7E2;
  --paper-ledger: #F1E1C8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Inter Tight", Inter, Arial, sans-serif;
}

/* Compliance tokens: Mono** labels Tight** compact interface fragments where neutral needed. */

@keyframes bubble-rise {
  from { transform: translateY(40px); opacity: .16; }
  to { transform: translateY(-40px); opacity: .58; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--charred-concrete);
  color: var(--paper-ledger);
  font-family: var(--sans);
  overflow: hidden;
}

button { font: inherit; color: inherit; }

.pressure-shell {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(185,176,163,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(185,176,163,.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 12%, rgba(191,231,226,.12), transparent 24%),
    var(--charred-concrete);
  background-size: 12.5vw 12.5vh, 12.5vw 12.5vh, auto, auto;
}

.edge-nav {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--wet-cement);
  pointer-events: none;
}

.pressure-ticks {
  position: fixed;
  z-index: 21;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 22px;
}

.tick {
  width: 48px;
  height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tick span {
  display: block;
  height: 2px;
  background: var(--wet-cement);
  opacity: .45;
  transition: width .35s ease, background .35s ease, opacity .35s ease;
}

.tick.active span {
  width: 48px;
  background: var(--pressure-orange);
  opacity: 1;
}

.seam {
  position: fixed;
  z-index: 12;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 72px;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 0 20px rgba(217,95,24,.55));
}

.seam svg { width: 100%; height: 100%; }

#seamPath {
  fill: none;
  stroke: var(--pressure-orange);
  stroke-width: 6;
  stroke-linecap: square;
}

.needle {
  position: absolute;
  left: 33px;
  top: 12%;
  width: 6px;
  height: 86px;
  background: var(--pressure-orange);
  transform-origin: top center;
  transition: top .7s cubic-bezier(.2,.7,.05,1), transform .7s ease;
}

.tanks {
  height: 100vh;
  transition: transform 900ms cubic-bezier(.76,0,.24,1);
}

.tank {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  isolation: isolate;
}

.tank::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, transparent 0 11.8vh, rgba(185,176,163,.18) 12vh 12.2vh),
    radial-gradient(circle at 24% 70%, rgba(191,231,226,.1), transparent 25%),
    linear-gradient(90deg, rgba(24,21,18,.94), rgba(7,16,20,.96));
}

.split {
  position: relative;
  min-height: 100vh;
  padding: 11vh 7vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.left { border-right: 10px solid rgba(217,95,24,.15); }
.right { background: rgba(7,16,20,.34); }

h1, h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.06em;
}

h1 { font-size: clamp(6rem, 20vw, 24rem); }
h2 { font-size: clamp(4.2rem, 10vw, 13rem); color: var(--paper-ledger); }

.intake h1 {
  color: transparent;
  -webkit-text-stroke: 2px var(--paper-ledger);
  opacity: .9;
}

.build-mass h1 { transform: translateX(8vw); }
.buy-mass h1 { transform: translateX(-8vw); text-align: right; }

.stamp, .annotation, .ledger, .bracket, .cost-slab, .sealed, .paper-stack, .verdict-readout {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.stamp { color: var(--pressure-orange); font-size: 12px; margin: 0 0 24px; }
.stamp.large { font-size: clamp(2rem, 5vw, 7rem); color: rgba(217,95,24,.72); }

.inspection-note {
  position: absolute;
  z-index: 14;
  left: 50%;
  bottom: 13vh;
  width: min(540px, 72vw);
  transform: translateX(-50%);
  padding: 26px 28px;
  background: rgba(241,225,200,.92);
  color: var(--charred-concrete);
  border: 3px solid var(--pressure-orange);
  box-shadow: 18px 18px 0 rgba(143,46,22,.55);
}

.inspection-note span, .paper-stack span { display: block; font-family: var(--mono); font-size: 11px; color: var(--oxide-rust); text-transform: uppercase; }
.inspection-note strong { display: block; font-family: var(--serif); font-size: clamp(2rem, 5vw, 5rem); line-height: .9; }

.ledger, .annotation {
  max-width: 520px;
  color: var(--wet-cement);
  font-size: clamp(.9rem, 1.3vw, 1.2rem);
  line-height: 1.55;
}

.ledger {
  background: rgba(241,225,200,.1);
  border-left: 6px solid var(--pressure-orange);
  padding: 24px;
}

.narrow { max-width: 360px; }
.cost-slab, .sealed, .paper-stack {
  width: min(460px, 80%);
  margin-top: 38px;
  padding: 30px;
  border: 2px solid rgba(185,176,163,.48);
  background: rgba(24,21,18,.72);
  color: var(--paper-ledger);
  box-shadow: inset 0 -22px 0 rgba(7,16,20,.34);
}

.paper-stack { background: var(--paper-ledger); color: var(--charred-concrete); transform: rotate(-3deg); }
.paper-stack p { font-family: var(--serif); font-size: 2rem; line-height: 1; text-transform: none; letter-spacing: -.03em; }

.slab, .scaffold, .crate, .half-built, .exit-map, .gauge, .flatline {
  position: absolute;
  border: 2px solid rgba(185,176,163,.38);
}

.slab-one { left: 4vw; bottom: 8vh; width: 28vw; height: 14vh; background: rgba(185,176,163,.18); }
.scaffold { left: 10vw; top: 21vh; width: 17vw; height: 42vh; background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(185,176,163,.32) 24px 28px); }
.crate { right: 8vw; padding: 18px; font-family: var(--mono); color: var(--wet-cement); background: rgba(7,16,20,.82); }
.crate-one { top: 20vh; width: 24vw; height: 15vh; }
.crate-two { bottom: 14vh; width: 18vw; height: 12vh; }
.gauge { right: 15vw; bottom: 16vh; width: 160px; height: 160px; border-radius: 50%; }
.gauge i { position: absolute; width: 4px; height: 72px; background: var(--pressure-orange); left: 78px; top: 18px; transform: rotate(42deg); transform-origin: bottom; }
.half-built { left: 14vw; bottom: 16vh; width: 25vw; height: 24vh; background: repeating-linear-gradient(45deg, rgba(191,231,226,.12) 0 8px, transparent 8px 22px); }
.exit-map { position: relative; display: flex; gap: 18px; flex-wrap: wrap; max-width: 430px; border: 0; margin-top: 34px; }
.exit-map span { padding: 18px 26px; border: 3px solid var(--pressure-orange); font-family: var(--mono); color: var(--paper-ledger); }
.flatline { position: relative; width: min(440px, 80%); height: 4px; background: var(--oxide-rust); border: 0; margin: 42px 0; }

.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20vh;
  height: 90px;
  opacity: .72;
  background: repeating-radial-gradient(ellipse at center, transparent 0 18px, rgba(191,231,226,.32) 20px 22px, transparent 24px 42px);
  clip-path: polygon(0 54%, 10% 42%, 20% 58%, 30% 40%, 40% 59%, 50% 43%, 60% 62%, 70% 38%, 80% 57%, 90% 46%, 100% 56%, 100% 100%, 0 100%);
}
.jagged { clip-path: polygon(0 70%, 8% 25%, 15% 72%, 24% 30%, 31% 76%, 41% 24%, 50% 79%, 58% 28%, 68% 72%, 79% 18%, 91% 70%, 100% 38%, 100% 100%, 0 100%); }
.splitwave { clip-path: polygon(0 55%, 14% 42%, 26% 62%, 38% 45%, 50% 64%, 50% 22%, 61% 60%, 73% 35%, 86% 64%, 100% 46%, 100% 100%, 0 100%); }
.flat { height: 18px; background: var(--oxide-rust); clip-path: none; }

.bubble-cluster, .bubble-cluster::before, .bubble-cluster::after {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--bubble-glass);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(191,231,226,.32), 35px -50px 0 -4px rgba(191,231,226,.22), -22px -96px 0 -6px rgba(191,231,226,.2);
}
.bubble-cluster::before, .bubble-cluster::after { content: ""; }
.bubble-cluster::before { transform: translate(52px, -18px) scale(.7); }
.bubble-cluster::after { transform: translate(-30px, 42px) scale(1.35); }
.cluster-a { left: 16%; bottom: 18%; }
.cluster-b { right: 18%; bottom: 22%; }
.cluster-c { left: 44%; top: 56%; }
.cluster-d { right: 30%; top: 30%; }
.cluster-e { left: 52%; bottom: 18%; }
.tank.active .bubble-cluster { animation: bubble-rise 5.5s ease-in-out infinite alternate; }

.reveal {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(28px) scaleY(.94);
  transition: opacity 850ms ease, filter 850ms ease, transform 850ms cubic-bezier(.2,.7,.05,1);
}

.tank.active .reveal {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scaleY(1);
}

.vendor-pull { box-shadow: inset 34px 0 0 rgba(217,95,24,.18); }

.matrix-shell {
  position: absolute;
  z-index: 14;
  left: 50%;
  top: 50%;
  width: min(820px, 78vw);
  transform: translate(-50%, -50%);
  padding: clamp(24px, 4vw, 56px);
  background: rgba(24,21,18,.9);
  border: 4px solid var(--wet-cement);
  box-shadow: 24px 24px 0 rgba(217,95,24,.52), inset 0 0 0 12px rgba(7,16,20,.5);
}

.matrix-shell.reveal { transform: translate(-50%, calc(-50% + 28px)) scaleY(.94); }
.verdict.active .matrix-shell.reveal { transform: translate(-50%, -50%) scaleY(1); }

.matrix-head h2 { font-size: clamp(3rem, 8vw, 8rem); }
.factor-matrix { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 34px 0; }
.factor-matrix button {
  min-height: 116px;
  border: 2px solid rgba(185,176,163,.55);
  background: rgba(7,16,20,.72);
  color: var(--paper-ledger);
  font-family: var(--mono);
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.factor-matrix button:hover, .factor-matrix button.active {
  transform: translateY(-10px) rotate(-1deg);
  background: rgba(217,95,24,.2);
  border-color: var(--pressure-orange);
}
.verdict-readout { display: flex; justify-content: space-between; color: var(--bubble-glass); }
.verdict-readout strong { color: var(--pressure-orange); }
.final-build h1, .final-buy h1 { opacity: .13; }

@media (max-width: 820px) {
  .tank { grid-template-columns: 1fr; }
  .split { min-height: 50vh; padding: 8vh 8vw; }
  .right { min-height: 50vh; }
  h1 { font-size: clamp(5rem, 28vw, 11rem); }
  .factor-matrix { grid-template-columns: 1fr; }
  .factor-matrix button { min-height: 58px; }
  .pressure-ticks { right: 8px; }
}
