:root {
  --deep-ground: #1a1e2e;
  --dusk-start: #2a3045;
  --dusk-end: #4a6575;
  --warm-stone: #c4b5a0;
  --paper-grain: #eee8df;
  --proof-ink: #5a5e6e;
  --cool-mist: #9bb8c9;
  --moss-patina: #7a9e8a;
  --kiln-ember: #d4845a;
  --gap: clamp(1.5rem, 3vw, 3rem);
  --edge-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='8'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 .768 0 0 0 0 .710 0 0 0 0 .627 0 0 0 .28 0'/%3E%3C/filter%3E%3Crect width='18' height='18' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Design terms: (Google Intersection Observer (no libraries connecting should have `stroke-dashoffset` animated full length enters `getTotalLength( `threshold: 0.15`. timing: `600ms — creating mathematically precise typographic voice echoes domain's focus falling "code developer site." provides bridge philosophical */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.005em;
  color: var(--proof-ink);
  background:
    radial-gradient(ellipse at 15% 8%, rgba(155, 184, 201, 0.16), transparent 38%),
    radial-gradient(ellipse at 86% 18%, rgba(122, 158, 138, 0.12), transparent 36%),
    radial-gradient(ellipse at 48% 72%, rgba(212, 132, 90, 0.08), transparent 44%),
    linear-gradient(160deg, var(--deep-ground) 0%, var(--dusk-start) 48%, var(--dusk-end) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(238, 232, 223, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 232, 223, 0.025) 1px, transparent 1px);
  background-size: 12.5vw 12.5vw;
}

.scroll-progress {
  position: fixed;
  left: 2vw;
  top: 0;
  z-index: 20;
  width: 4px;
  height: 100vh;
  pointer-events: none;
}

.scroll-progress__track,
.scroll-progress__draw {
  fill: none;
  stroke-linecap: round;
}

.scroll-progress__track {
  stroke: rgba(196, 181, 160, 0.12);
  stroke-width: 1.2;
}

.scroll-progress__draw {
  stroke: rgba(122, 158, 138, 0.5);
  stroke-width: 2;
  filter: drop-shadow(0 0 3px rgba(122, 158, 138, 0.3));
}

.reasoning-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.reasoning-path {
  fill: none;
  stroke: rgba(155, 184, 201, 0.4);
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(155, 184, 201, 0.12));
}

.perspective-stage {
  position: relative;
  z-index: 3;
  perspective: 1200px;
  padding: clamp(3rem, 6vw, 7rem) clamp(1.5rem, 4vw, 5rem) clamp(5rem, 9vw, 9rem) clamp(4.5rem, 8vw, 8rem);
}

.proposition-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  max-width: 1480px;
  margin: 0 auto;
  transform-style: preserve-3d;
}

.proposition-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  transform-style: preserve-3d;
}

.proposition-block {
  --depth: 0;
  --rest-opacity: 1;
  grid-column: 1 / -1;
  position: relative;
  min-height: 40vh;
  padding: clamp(2rem, 4vw, 4.2rem);
  overflow: hidden;
  border: 1px solid rgba(196, 181, 160, 0.2);
  border-image: var(--edge-noise) 4 / 1px / 0 round;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  background-size: 220% 220%;
  background-position: 0% 0%;
  opacity: 0;
  filter: blur(var(--blur, 0));
  transform: translateZ(calc(var(--depth) * -20px)) translateY(30px);
  transition:
    opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: meshDrift var(--mesh-time, 20s) ease-in-out infinite;
  animation-delay: calc(var(--block-index, 0) * -3s);
}

.proposition-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(238, 232, 223, 0.08), transparent 34%),
    radial-gradient(circle at 16% 84%, rgba(238, 232, 223, 0.05), transparent 32%);
  mix-blend-mode: screen;
}

.proposition-block::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  opacity: 0.22;
  background-image: var(--edge-noise);
  mix-blend-mode: soft-light;
}

.proposition-block.is-visible {
  opacity: var(--rest-opacity);
  transform: translateZ(calc(var(--depth) * -20px)) translateY(0);
}

.depth-0 { --depth: 0; --rest-opacity: 1; --blur: 0px; }
.depth-1 { --depth: 1; --rest-opacity: 0.85; --blur: 0.5px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
.depth-2 { --depth: 2; --rest-opacity: 0.6; --blur: 1.5px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }

.row-two .proposition-block:first-child { grid-column: 1 / span 5; }
.row-two .proposition-block:last-child { grid-column: 6 / span 7; }
.split-uneven .proposition-block:first-child { grid-column: 1 / span 7; }
.split-uneven .proposition-block:last-child { grid-column: 8 / span 5; }
.row-three .proposition-block:nth-child(1) { grid-column: 1 / span 4; }
.row-three .proposition-block:nth-child(2) { grid-column: 5 / span 4; }
.row-three .proposition-block:nth-child(3) { grid-column: 9 / span 4; }

.block-axiom { min-height: 58vh; }
.block-wide { min-height: 46vh; }
.block-closing { min-height: 50vh; }
.small { min-height: 24vh; }

.mesh-a { --mesh-time: 21s; background: radial-gradient(ellipse at 20% 30%, rgba(155,184,201,0.30) 0%, transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(122,158,138,0.25) 0%, transparent 50%), radial-gradient(ellipse at 50% 50%, rgba(196,181,160,0.20) 0%, transparent 70%), linear-gradient(160deg, #1a1e2e 0%, #2a3045 100%); }
.mesh-b { --mesh-time: 24s; background: radial-gradient(ellipse at 12% 68%, rgba(212,132,90,0.24), transparent 55%), radial-gradient(ellipse at 78% 26%, rgba(155,184,201,0.22), transparent 58%), linear-gradient(144deg, #2a3045, #4a6575); }
.mesh-c { --mesh-time: 18s; background: radial-gradient(ellipse at 64% 20%, rgba(122,158,138,0.30), transparent 52%), radial-gradient(ellipse at 18% 72%, rgba(196,181,160,0.22), transparent 62%), linear-gradient(155deg, #1a1e2e, #2a3045); }
.mesh-d { --mesh-time: 25s; background: radial-gradient(ellipse at 30% 40%, rgba(196,181,160,0.20), transparent 65%), radial-gradient(ellipse at 75% 30%, rgba(212,132,90,0.15), transparent 50%), radial-gradient(ellipse at 50% 70%, rgba(155,184,201,0.10), transparent 60%), linear-gradient(160deg, #4a6575 0%, #2a3045 100%); }
.mesh-e { --mesh-time: 19s; background: radial-gradient(ellipse at 22% 25%, rgba(155,184,201,0.20), transparent 54%), radial-gradient(ellipse at 78% 76%, rgba(122,158,138,0.18), transparent 62%), linear-gradient(132deg, #2a3045, #1a1e2e); }
.mesh-f { --mesh-time: 23s; background: radial-gradient(ellipse at 76% 28%, rgba(212,132,90,0.26), transparent 46%), radial-gradient(ellipse at 30% 76%, rgba(238,232,223,0.13), transparent 60%), linear-gradient(170deg, #1a1e2e, #4a6575); }
.mesh-g { --mesh-time: 22s; background: radial-gradient(ellipse at 18% 28%, rgba(155,184,201,0.28), transparent 58%), radial-gradient(ellipse at 82% 50%, rgba(122,158,138,0.20), transparent 58%), radial-gradient(ellipse at 54% 88%, rgba(212,132,90,0.16), transparent 62%), linear-gradient(160deg, #2a3045, #1a1e2e); }
.mesh-h { --mesh-time: 20s; background: radial-gradient(ellipse at 32% 22%, rgba(196,181,160,0.24), transparent 58%), radial-gradient(ellipse at 82% 74%, rgba(155,184,201,0.18), transparent 56%), linear-gradient(145deg, #2a3045, #4a6575); }
.mesh-i { --mesh-time: 26s; background: radial-gradient(ellipse at 28% 70%, rgba(122,158,138,0.17), transparent 60%), radial-gradient(ellipse at 80% 22%, rgba(196,181,160,0.16), transparent 50%), linear-gradient(155deg, #4a6575, #2a3045); }
.mesh-j { --mesh-time: 24s; background: radial-gradient(ellipse at 12% 18%, rgba(238,232,223,0.14), transparent 46%), radial-gradient(ellipse at 76% 24%, rgba(155,184,201,0.28), transparent 52%), radial-gradient(ellipse at 42% 86%, rgba(212,132,90,0.18), transparent 58%), linear-gradient(160deg, #1a1e2e, #2a3045); }
.mesh-k { --mesh-time: 17s; background: radial-gradient(ellipse at 60% 20%, rgba(212,132,90,0.23), transparent 50%), radial-gradient(ellipse at 26% 80%, rgba(155,184,201,0.16), transparent 60%), linear-gradient(150deg, #1a1e2e, #2a3045); }
.mesh-l { --mesh-time: 21s; background: radial-gradient(ellipse at 26% 32%, rgba(122,158,138,0.22), transparent 58%), radial-gradient(ellipse at 78% 72%, rgba(196,181,160,0.16), transparent 56%), linear-gradient(150deg, #2a3045, #4a6575); }
.mesh-m { --mesh-time: 25s; background: radial-gradient(ellipse at 70% 34%, rgba(155,184,201,0.17), transparent 58%), radial-gradient(ellipse at 24% 72%, rgba(212,132,90,0.13), transparent 58%), linear-gradient(150deg, #4a6575, #2a3045); }
.mesh-n { --mesh-time: 23s; background: radial-gradient(ellipse at 20% 24%, rgba(155,184,201,0.25), transparent 58%), radial-gradient(ellipse at 80% 78%, rgba(122,158,138,0.20), transparent 58%), radial-gradient(ellipse at 48% 52%, rgba(196,181,160,0.15), transparent 70%), linear-gradient(160deg, #2a3045, #1a1e2e); }
.mesh-o { --mesh-time: 27s; background: radial-gradient(ellipse at 34% 24%, rgba(196,181,160,0.18), transparent 60%), radial-gradient(ellipse at 72% 82%, rgba(155,184,201,0.12), transparent 62%), linear-gradient(150deg, #4a6575, #2a3045); }
.mesh-p { --mesh-time: 19s; background: radial-gradient(ellipse at 72% 26%, rgba(212,132,90,0.22), transparent 50%), radial-gradient(ellipse at 22% 70%, rgba(122,158,138,0.20), transparent 62%), linear-gradient(160deg, #1a1e2e, #2a3045); }
.mesh-q { --mesh-time: 24s; background: radial-gradient(ellipse at 22% 26%, rgba(238,232,223,0.16), transparent 48%), radial-gradient(ellipse at 80% 70%, rgba(155,184,201,0.26), transparent 62%), radial-gradient(ellipse at 54% 54%, rgba(122,158,138,0.18), transparent 66%), linear-gradient(160deg, #1a1e2e, #2a3045); }

@keyframes meshDrift {
  0%, 100% { background-position: 0% 0%; }
  45% { background-position: 85% 55%; }
  70% { background-position: 25% 100%; }
}

.logic-label {
  margin: 0 0 1.2rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(212, 132, 90, 0.82);
}

h1, h2, h3, p { position: relative; z-index: 1; }

h1, h2, h3 {
  margin: 0 0 clamp(1rem, 2vw, 1.6rem);
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--proof-ink);
  transition: color 800ms ease;
}

h1 { font-size: clamp(2.4rem, 8vw, 7.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.6rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 2.15rem); }

.proposition-block.is-visible h1,
.proposition-block.is-visible h2,
.proposition-block.is-visible h3 { color: var(--paper-grain); }

p {
  max-width: 68ch;
  margin: 0 0 1rem;
}

p:last-child { margin-bottom: 0; }

.lead {
  max-width: 16ch;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  line-height: 1.35;
  color: rgba(238, 232, 223, 0.84);
}

.palette-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 2rem 0;
}

.palette-strip span {
  display: grid;
  min-height: 6rem;
  align-items: end;
  padding: 0.6rem;
  overflow: hidden;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(0.62rem, 0.9vw, 0.78rem);
  letter-spacing: 0.06em;
  color: rgba(238, 232, 223, 0.9);
  background: var(--swatch);
  border: 1px solid rgba(196, 181, 160, 0.2);
}

.palette-strip span:nth-child(6),
.palette-strip span:nth-child(8) { color: var(--deep-ground); }

@media (max-width: 900px) {
  .perspective-stage { padding-left: clamp(3.5rem, 9vw, 5rem); }
  .row-two .proposition-block,
  .split-uneven .proposition-block,
  .row-three .proposition-block { grid-column: 1 / -1 !important; }
  .palette-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .perspective-stage { padding-right: 1rem; padding-left: 3.2rem; }
  .proposition-block { min-height: 32vh; padding: 1.35rem; }
  .block-axiom, .block-closing { min-height: 44vh; }
  .palette-strip { grid-template-columns: 1fr 1fr; }
}
