:root {
  --bg: #f7f6f2;
  --paper: #ffffff;
  --ink: #151515;
  --muted: #66645f;
  --soft: #e7e2d9;
  --line: #d8d1c5;
  --accent: #5f6f64;
  --accent-dark: #2f3b34;
  --sand: #e0ded6;
  --grid: rgba(21, 21, 21, 0.055);
  --shadow: 0 20px 60px rgba(20, 20, 20, 0.08);
  --radius: 5px;
  --container: 1440px;
  --header-container: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px), var(--bg);
  background-size: 44px 44px;
  color: var(--ink);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 20px;
  line-height: 1.65;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.site-header .container {
  width: min(var(--header-container), calc(100% - 40px));
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -50px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  z-index: 20;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 246, 242, 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 248px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-weight: 800;
  letter-spacing: -0.06em;
  font-size: 21px;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-text small {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 2px;
  font-size: 15px;
  white-space: nowrap;
}

.nav-link {
  font-weight: 700;
  text-decoration: none;
  padding: 8px 8px;
  color: var(--muted);
  border-radius: 5px;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  background: var(--sand);
  color: var(--ink);
  outline: none;
}

.hero {
  padding: 86px 0 58px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: 56px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(3.5rem, 8vw, 7.9rem);
  font-weight: 650;
  max-width: 940px;
}

h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.4rem, 4.8vw, 4.8rem);
  font-weight: 650;
}

h3 {
  font-size: clamp(1.35rem, 1.7vw, 1.72rem);
  letter-spacing: -0.025em;
}

.hero-subtitle {
  margin: 26px 0 0;
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  max-width: 760px;
  color: var(--accent-dark);
}

.hero-copy p:not(.eyebrow):not(.hero-subtitle) {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.3rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  border: 1px solid var(--ink);
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}
.button-primary {
  background: var(--ink);
  color: white;
}
.button-secondary {
  background: transparent;
  color: var(--ink);
}
.button-secondary:hover {
  background: var(--sand);
}

.framework-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
  border-radius: var(--radius);
}

.framework-title {
  margin: 0 0 18px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 800;
}

.framework-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.framework-stack li {
  position: relative;
  padding: 15px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 5px;
}

.framework-stack span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 5px;
}

.framework-stack strong {
  display: block;
  line-height: 1.25;
}

.framework-stack p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.45;
}

.content-section {
  padding: 74px 0;
  border-bottom: 1px solid var(--line);
}

.content-section .container,
.content-section {
  scroll-margin-top: 96px;
}

.content-section {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.65fr) minmax(0, 0.85fr);
  gap: 50px;
}

.section-heading {
  position: -webkit-sticky;
  position: sticky;
  top: 110px;
  align-self: start;
  margin-right: 100px;
}

.section-body > p:first-child {
  margin-top: 0;
}
.section-body p {
  color: var(--muted);
  margin: 0 0 18px;
}

.lede {
  font-size: 1.5rem;
  color: var(--accent-dark) !important;
}

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

.card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius);
}

.card p {
  margin-bottom: 0;
}

.card-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 18px;
}
.card-title {
  margin: 0 0 12px;
  font-size: clamp(1.36rem, 2.3vw, 1.72rem);
}
.quote-block {
  margin: 30px 0;
  padding: 28px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.65);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.74rem, 3.6vw, 2.82rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.check-list,
.plain-list {
  columns: 2;
  gap: 44px;
  margin: 22px 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.check-list li,
.plain-list li {
  break-inside: avoid;
  margin: 0 0 8px;
}

.process-list {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.process-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 5px;
}

.process-list li::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 15px;
}

.process-list strong {
  display: block;
  margin-bottom: 3px;
}
.process-list span {
  display: block;
  color: var(--muted);
}

.matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.matrix-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 22px;
}

.matrix-item span {
  display: block;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.pathway {
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pathway .eyebrow {
  margin-bottom: 12px;
}

.inline-cta {
  margin-top: 30px;
}

.placeholder-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.placeholder-list li {
  border: 1px dashed var(--line);
  padding: 16px 18px;
  border-radius: 5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.contact-box {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
}

.contact-box p {
  margin-bottom: 0;
}

.site-footer {
  padding: 42px 0;
  background: var(--ink);
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 28px;
}

.site-footer p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.site-footer span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.52);
}

.site-footer strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.52);
}

.site-footer a {
  text-decoration: none;
  color: inherit;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: var(--footer-fg);
}

.site-footer a:focus-visible {
  color: var(--footer-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: 2px solid var(--footer-fg);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }
  .site-nav {
    justify-content: flex-start;
  }
  .hero-grid,
  .content-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    position: static;
  }
  .hero {
    padding-top: 58px;
  }
}

@media (max-width: 720px) {
  .container,
  .content-section {
    width: min(100% - 28px, var(--container));
  }
  .brand {
    min-width: 0;
    align-items: flex-start;
  }
  .brand-text small {
    max-width: 220px;
  }
  .nav-link {
    padding: 8px 9px;
  }
  .cards-grid,
  .matrix,
  .pathways,
  .contact-panel {
    grid-template-columns: 1fr;
  }
  .check-list,
  .plain-list {
    columns: 1;
  }
  .content-section {
    padding: 54px 0;
    gap: 24px;
  }
  .process-list li {
    grid-template-columns: 1fr;
  }
}

/* Immersive brownfield scroll scene
   Static HTML/CSS/JS implementation: no React, no build step. */
:root {
  --industrial-ink: #21231f;
  --rust: #8b5f42;
  --oxide: #b39a7c;
  --moss: #6d7d63;
  --blueprint: #2f3b34;
}

.site-header {
  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(20, 20, 20, 0.06);
  background: rgba(247, 246, 242, 0.96);
}

.immersive-brownfield {
  --scene-progress: 0;
  --reading-opacity: 0;
  --future-opacity: 0;
  --grid-opacity: 0.18;
  --terrain-scale: 1;
  position: relative;
  min-height: 430vh;
  overflow: clip;
  background: #ede9df;
  border-bottom: 1px solid var(--line);
}

.immersive-stage {
  position: -webkit-sticky;
  position: sticky;
  top: 84px;
  min-height: calc(100vh - 84px);
  overflow: hidden;
  background:
    radial-gradient(
      circle at 78% 20%,
      rgba(255, 255, 255, 0.72),
      transparent 28%
    ),
    linear-gradient(180deg, #f7f5ee 0%, #e9e2d5 48%, #d8cebe 100%);
}

.brownfield-world {
  position: absolute;
  inset: 0;
  transform: scale(calc(1 + (var(--scene-progress) * 0.08)));
  transform-origin: 50% 65%;
  transition: transform 90ms linear;
}

.world-horizon {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(247, 246, 242, 0) 0 48%,
      rgba(54, 52, 45, 0.08) 49%,
      rgba(54, 52, 45, 0.14) 50%,
      transparent 52%
    ),
    radial-gradient(ellipse at 50% 68%, rgba(52, 46, 38, 0.28), transparent 48%);
}

.world-sky-grid,
.terrain-plane::after {
  position: absolute;
  content: "";
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 59, 52, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 59, 52, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: calc(0.12 + (var(--scene-progress) * 0.28));
  mix-blend-mode: multiply;
}

.industrial-silhouette {
  position: absolute;
  left: 4vw;
  right: 4vw;
  bottom: 39%;
  height: 210px;
  opacity: calc(0.58 - (var(--future-opacity) * 0.18));
  transform: translateY(calc(var(--scene-progress) * -22px));
  filter: blur(calc(var(--future-opacity) * 0.7px));
}

.industrial-silhouette span {
  position: absolute;
  bottom: 0;
  display: block;
}
.chimney {
  width: 24px;
  height: 172px;
  background: rgba(33, 35, 31, 0.55);
}
.chimney-one {
  left: 8%;
}
.chimney-two {
  left: 17%;
  height: 128px;
  opacity: 0.52;
}
.factory-block {
  background: rgba(33, 35, 31, 0.42);
  border-top: 1px solid rgba(33, 35, 31, 0.24);
}
.block-one {
  left: 22%;
  width: 210px;
  height: 78px;
  clip-path: polygon(
    0 28%,
    18% 28%,
    24% 0,
    40% 28%,
    100% 28%,
    100% 100%,
    0 100%
  );
}
.block-two {
  left: 43%;
  width: 270px;
  height: 92px;
  clip-path: polygon(
    0 35%,
    12% 35%,
    18% 8%,
    25% 35%,
    100% 35%,
    100% 100%,
    0 100%
  );
}
.tank {
  width: 128px;
  height: 72px;
  border-radius: 50% 50% 10px 10px;
  background: rgba(33, 35, 31, 0.34);
}
.tank-one {
  right: 18%;
}
.crane-arm {
  right: 4%;
  width: 260px;
  height: 8px;
  bottom: 132px !important;
  background: rgba(33, 35, 31, 0.42);
  transform: rotate(-14deg);
  transform-origin: 10% 50%;
}
.crane-arm::before {
  content: "";
  position: absolute;
  left: 7%;
  top: -78px;
  width: 9px;
  height: 155px;
  background: rgba(33, 35, 31, 0.36);
  transform: rotate(14deg);
}
.crane-arm::after {
  content: "";
  position: absolute;
  right: 18%;
  top: 7px;
  width: 1px;
  height: 58px;
  background: rgba(33, 35, 31, 0.36);
}

.terrain-plane {
  position: absolute;
  left: -8vw;
  right: -8vw;
  bottom: -18vh;
  height: 58vh;
  transform: perspective(900px) rotateX(62deg)
    translateY(calc(var(--scene-progress) * -34px));
  transform-origin: center top;
  background:
    linear-gradient(
      118deg,
      rgba(47, 59, 52, 0.08),
      transparent 28%,
      rgba(139, 95, 66, 0.09) 62%,
      rgba(255, 255, 255, 0.12)
    ),
    linear-gradient(90deg, rgba(57, 52, 43, 0.15), rgba(255, 255, 255, 0.2));
  border-top: 1px solid rgba(47, 59, 52, 0.16);
  box-shadow: inset 0 42px 90px rgba(47, 43, 36, 0.18);
}

.rail-line {
  position: absolute;
  height: 2px;
  left: 5%;
  right: 4%;
  background: rgba(33, 35, 31, 0.26);
  transform-origin: left center;
}
.rail-line::before,
.rail-line::after {
  content: "";
  position: absolute;
  inset: -9px 0 auto;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(33, 35, 31, 0.16) 0 15px,
    transparent 15px 30px
  );
}
.rail-one {
  top: 39%;
  transform: rotate(-7deg);
}
.rail-two {
  top: 56%;
  transform: rotate(3deg);
  opacity: 0.68;
}

.plot,
.ruin,
.future-block,
.green-corridor {
  position: absolute;
  border: 1px solid rgba(47, 59, 52, 0.18);
  background: rgba(255, 255, 255, 0.22);
}
.plot {
  opacity: calc(0.22 + (var(--reading-opacity) * 0.48));
}
.plot-a {
  left: 16%;
  top: 16%;
  width: 18%;
  height: 22%;
  transform: rotate(-5deg);
}
.plot-b {
  left: 41%;
  top: 24%;
  width: 20%;
  height: 26%;
  transform: rotate(6deg);
}
.plot-c {
  left: 66%;
  top: 14%;
  width: 18%;
  height: 22%;
  transform: rotate(-8deg);
}

.ruin {
  background: rgba(86, 70, 55, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  opacity: calc(0.68 - (var(--future-opacity) * 0.34));
}
.ruin-one {
  left: 20%;
  top: 28%;
  width: 10%;
  height: 18%;
  transform: rotate(-12deg);
}
.ruin-two {
  left: 47%;
  top: 44%;
  width: 13%;
  height: 15%;
  transform: rotate(8deg);
}
.ruin-three {
  right: 20%;
  top: 31%;
  width: 11%;
  height: 18%;
  transform: rotate(-4deg);
}

.future-block {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(47, 59, 52, 0.34);
  box-shadow: 0 16px 40px rgba(47, 59, 52, 0.12);
  opacity: var(--future-opacity);
}
.future-one {
  left: 24%;
  top: 21%;
  width: 11%;
  height: 22%;
  transform: rotate(-4deg);
}
.future-two {
  left: 52%;
  top: 27%;
  width: 13%;
  height: 25%;
  transform: rotate(5deg);
}
.future-three {
  right: 23%;
  top: 18%;
  width: 9%;
  height: 19%;
  transform: rotate(-7deg);
}
.green-corridor {
  height: 12%;
  border-radius: 999px;
  background: rgba(109, 125, 99, 0.34);
  border-color: rgba(109, 125, 99, 0.5);
  opacity: calc(var(--future-opacity) * 0.95);
}
.corridor-one {
  left: 30%;
  right: 18%;
  top: 56%;
  transform: rotate(-7deg);
}
.corridor-two {
  left: 14%;
  right: 54%;
  top: 62%;
  transform: rotate(10deg);
}

.site-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: calc(0.22 + (var(--reading-opacity) * 0.68));
}
.trace {
  fill: none;
  stroke: url(#traceGradient);
  stroke-width: 2;
  stroke-dasharray: 8 12;
  stroke-linecap: round;
  animation: traceMove 18s linear infinite;
}
.trace-secondary {
  opacity: 0.56;
  animation-duration: 24s;
}
.trace-uncertain {
  opacity: 0.34;
  stroke-dasharray: 4 14;
  animation-duration: 30s;
}
.nodes circle {
  fill: #2f3b34;
  opacity: calc(0.15 + (var(--reading-opacity) * 0.65));
}
.decision-matrix-svg {
  opacity: calc(var(--reading-opacity) * 0.86);
}
.decision-matrix-svg rect,
.decision-matrix-svg path {
  fill: rgba(255, 255, 255, 0.42);
  stroke: rgba(47, 59, 52, 0.42);
  stroke-width: 1.3;
}
.decision-matrix-svg text {
  font:
    700 15px Inter,
    sans-serif;
  letter-spacing: 0.18em;
  fill: rgba(47, 59, 52, 0.62);
}

@keyframes traceMove {
  to {
    stroke-dashoffset: -220;
  }
}

.orientation-compass {
  position: absolute;
  right: clamp(24px, 7vw, 110px);
  top: clamp(116px, 20vh, 190px);
  width: 154px;
  aspect-ratio: 1;
  border: 1px solid rgba(47, 59, 52, 0.38);
  border-radius: 999px;
  display: grid;
  place-items: center;
  opacity: calc(0.2 + (var(--reading-opacity) * 0.58));
  transform: rotate(calc(var(--scene-progress) * 78deg));
}
.orientation-compass::before,
.orientation-compass::after {
  content: "";
  position: absolute;
  background: rgba(47, 59, 52, 0.42);
}
.orientation-compass::before {
  width: 1px;
  height: 116%;
}
.orientation-compass::after {
  width: 116%;
  height: 1px;
}
.orientation-compass span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(247, 246, 242, 0.78);
  font-size: 12.5px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(47, 59, 52, 0.88);
  font-weight: 800;
  transform: rotate(calc(var(--scene-progress) * -78deg));
}

.scene-progress-meter {
  position: absolute;
  left: clamp(18px, 3vw, 54px);
  bottom: clamp(18px, 5vh, 52px);
  width: min(360px, calc(100vw - 36px));
  height: 2px;
  background: rgba(47, 59, 52, 0.18);
}
.scene-progress-meter span {
  display: block;
  height: 100%;
  width: calc(var(--scene-progress) * 100%);
  background: rgba(47, 59, 52, 0.72);
}

.immersive-content {
  position: relative;
  z-index: 2;
  min-height: 430vh;
  pointer-events: none;
}
.immersive-content a {
  pointer-events: auto;
}

.immersive-intro {
  min-height: calc(100vh - 84px);
  width: min(940px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 0;
}
.immersive-intro h1 {
  text-wrap: balance;
  text-shadow: 0 14px 50px rgba(247, 246, 242, 0.84);
}
.immersive-intro .hero-subtitle {
  max-width: 760px;
  background: rgba(247, 246, 242, 0.58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 12px 16px;
  border-left: 3px solid rgba(47, 59, 52, 0.52);
}

.immersive-intro .interface-note {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
}

.scene-steps {
  min-height: 320vh;
  display: grid;
  align-content: start;
  gap: 58vh;
  padding: 10vh 0 72vh;
}
.scene-card {
  width: min(560px, 100%);
  margin-left: auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(47, 59, 52, 0.18);
  background: rgba(247, 246, 242, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(33, 35, 31, 0.12);
  border-radius: 5px;
  opacity: 0.62;
  transform: translateY(22px);
  transition:
    opacity 360ms ease,
    transform 360ms ease,
    border-color 360ms ease;
}
.scene-card.is-active {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(47, 59, 52, 0.44);
}
.scene-card:nth-child(even) {
  margin-left: 0;
  margin-right: auto;
}
.scene-kicker {
  display: block;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  font-weight: 800;
}
.scene-card h2 {
  font-size: clamp(2.36rem, 4.8vw, 5.2rem);
  text-wrap: balance;
}
.scene-card p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.27rem;
}

.hero-after-immersive {
  background: var(--bg);
}

body.scene-residual .brownfield-world {
  --reading-opacity: 0.12;
  --future-opacity: 0;
}
body.scene-decision-gap .brownfield-world {
  --reading-opacity: 0.42;
  --future-opacity: 0.06;
}
body.scene-abs-reading .brownfield-world {
  --reading-opacity: 0.82;
  --future-opacity: 0.22;
}
body.scene-transformation .brownfield-world {
  --reading-opacity: 0.94;
  --future-opacity: 0.78;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* WebGL brownfield world layer
   Three.js renders into this canvas. The older CSS landscape remains as a graceful fallback. */
.brownfield-webgl-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  background: transparent;
  transition: opacity 900ms ease;
}

.webgl-status-label {
  position: absolute;
  left: clamp(18px, 3vw, 54px);
  top: clamp(104px, 14vh, 150px);
  z-index: 2;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  background: var(--scene-panel-soft);
  color: var(--accent-dark);
  font-size: 12.5px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 700ms ease,
    transform 700ms ease,
    border-color 240ms ease,
    background 240ms ease;
  pointer-events: none;
}

body.webgl-ready .brownfield-webgl-canvas {
  opacity: 1;
}

body.webgl-ready .webgl-status-label {
  opacity: 0.72;
  transform: translateY(0);
}

body.webgl-ready .brownfield-world {
  opacity: 0.22;
  mix-blend-mode: multiply;
}

[data-theme="dark"] body.webgl-ready .brownfield-world,
body.webgl-ready[data-theme="dark"] .brownfield-world,
[data-theme="dark"] .brownfield-world {
  mix-blend-mode: screen;
}

body.webgl-ready .industrial-silhouette,
body.webgl-ready .terrain-plane,
body.webgl-ready .world-horizon {
  opacity: 0.14;
}

body.webgl-ready .site-overlay,
body.webgl-ready .orientation-compass,
body.webgl-ready .scene-progress-meter {
  opacity: 0.78;
}

@media (max-width: 980px) {
  body.webgl-ready .brownfield-webgl-canvas {
    opacity: 0.72;
  }

  .webgl-status-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .immersive-brownfield {
    min-height: auto;
  }
  .immersive-stage {
    position: relative;
    top: 0;
    min-height: 72vh;
  }
  .immersive-content,
  .immersive-intro,
  .scene-steps {
    min-height: auto;
  }
  .scene-steps {
    gap: 24px;
    padding: 40px 0;
  }
  .scene-card,
  .scene-card:nth-child(even) {
    margin-left: 0;
    margin-right: auto;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .immersive-stage {
    top: 0;
    min-height: 100vh;
  }
  .immersive-brownfield {
    min-height: auto;
  }
  .immersive-content {
    min-height: auto;
    padding-bottom: 46px;
  }
  .immersive-intro {
    min-height: 82vh;
    padding-top: 120px;
  }
  .scene-steps {
    min-height: auto;
    gap: 28px;
    padding: 28px 0 0;
  }
  .scene-card,
  .scene-card:nth-child(even) {
    margin-left: 0;
    margin-right: 0;
  }
  .industrial-silhouette {
    bottom: 42%;
    opacity: 0.42;
  }
  .orientation-compass {
    width: 112px;
    right: 20px;
    top: 120px;
  }
  .orientation-compass span {
    width: 72px;
  }
}

@media (max-width: 720px) {
  .immersive-intro {
    min-height: 78vh;
    padding-top: 86px;
  }
  .immersive-intro .hero-subtitle {
    padding: 10px 12px;
  }
  .scene-card {
    padding: 22px;
    border-radius: 22px;
  }
  .site-overlay {
    opacity: 0.42;
  }
  .industrial-silhouette {
    left: -24vw;
    right: -24vw;
    transform: scale(0.82);
  }
  .terrain-plane {
    left: -52vw;
    right: -52vw;
    height: 54vh;
  }
  .orientation-compass {
    display: none;
  }
}

/* Light / dark design switch
   Uses CSS variables so the whole static website can change palette without a build step. */
:root {
  color-scheme: light;
  --primary-bg: #151515;
  --primary-fg: #ffffff;
  --primary-border: #151515;
  --footer-bg: #151515;
  --footer-fg: #ffffff;
  --footer-muted: rgba(255, 255, 255, 0.68);
  --footer-label: rgba(255, 255, 255, 0.52);
  --header-bg: rgba(247, 246, 242, 0.9);
  --header-bg-solid: rgba(247, 246, 242, 0.96);
  --surface-alpha: rgba(255, 255, 255, 0.72);
  --surface-alpha-strong: rgba(255, 255, 255, 0.86);
  --surface-alpha-soft: rgba(255, 255, 255, 0.5);
  --quote-bg: rgba(255, 255, 255, 0.65);
  --focus-ring: rgba(95, 111, 100, 0.6);
  --scene-base: #ede9df;
  --scene-sky-1: #f7f5ee;
  --scene-sky-2: #e9e2d5;
  --scene-sky-3: #d8cebe;
  --scene-glow: rgba(255, 255, 255, 0.72);
  --scene-panel: rgba(247, 246, 242, 0.78);
  --scene-panel-soft: rgba(247, 246, 242, 0.58);
  --terrain-ink: rgba(33, 35, 31, 0.55);
  --terrain-ink-soft: rgba(33, 35, 31, 0.34);
  --future-bg: rgba(255, 255, 255, 0.62);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e100f;
  --paper: #171a18;
  --ink: #f5f3ea;
  --muted: #b8b3a8;
  --soft: #242820;
  --line: #343a34;
  --accent: #aebba7;
  --accent-dark: #f0eadc;
  --sand: #445241;
  --grid: rgba(255, 255, 255, 0.052);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --industrial-ink: #f4efe3;
  --rust: #c7a07d;
  --oxide: #937d67;
  --moss: #9aad90;
  --blueprint: #d7ddcf;
  --primary-bg: #f5f3ea;
  --primary-fg: #0e100f;
  --primary-border: #f5f3ea;
  --footer-bg: #f5f3ea;
  --footer-fg: #111411;
  --footer-muted: rgba(17, 20, 17, 0.68);
  --footer-label: rgba(17, 20, 17, 0.52);
  --header-bg: rgba(14, 16, 15, 0.88);
  --header-bg-solid: rgba(14, 16, 15, 0.96);
  --surface-alpha: rgba(23, 26, 24, 0.78);
  --surface-alpha-strong: rgba(28, 32, 29, 0.92);
  --surface-alpha-soft: rgba(23, 26, 24, 0.58);
  --quote-bg: rgba(23, 26, 24, 0.72);
  --focus-ring: rgba(245, 243, 234, 0.28);
  --scene-base: #111412;
  --scene-sky-1: #0e100f;
  --scene-sky-2: #171a18;
  --scene-sky-3: #20251f;
  --scene-glow: rgba(255, 255, 255, 0.08);
  --scene-panel: rgba(18, 21, 19, 0.78);
  --scene-panel-soft: rgba(18, 21, 19, 0.66);
  --terrain-ink: rgba(245, 243, 234, 0.42);
  --terrain-ink-soft: rgba(245, 243, 234, 0.24);
  --future-bg: rgba(245, 243, 234, 0.24);
}

.site-header {
  background: var(--header-bg);
}

.site-header.is-scrolled {
  background: var(--header-bg-solid);
}

.header-inner {
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: 4px;
  flex: 0 0 auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 10px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-alpha-strong);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(20, 20, 20, 0.06);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
  outline: none;
}

.theme-toggle-dot {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--primary-bg);
  box-shadow: inset 0 0 0 1px var(--primary-border);
}

.theme-toggle-dot::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: var(--primary-fg);
  opacity: 0.92;
  transform: translateX(0);
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

[data-theme="dark"] .theme-toggle-dot::after {
  opacity: 0.35;
  transform: translateX(4px) scale(0.86);
}

.theme-toggle-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.theme-toggle-value {
  min-width: 34px;
  font-weight: 800;
  color: var(--ink);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-alpha-strong);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(20, 20, 20, 0.06);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
  outline: none;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 5px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-lines::before {
  top: -5px;
}

.menu-toggle-lines::after {
  top: 5px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  transform: translateY(-5px) rotate(-45deg);
}

.menu-toggle-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.button-primary {
  background: var(--primary-bg);
  color: var(--primary-fg);
  border-color: var(--primary-border);
}

.button-secondary:hover,
.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  background: var(--sand);
}

.framework-card,
.card,
.matrix-item,
.pathway,
.contact-box,
.process-list li {
  background: var(--surface-alpha);
}

.framework-stack li {
  background: var(--paper);
}

.quote-block {
  background: var(--quote-bg);
}

.placeholder-list li {
  background: var(--surface-alpha-soft);
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
}

.site-footer p {
  color: var(--footer-muted);
}

.site-footer span {
  color: var(--footer-label);
}

.site-footer strong {
  color: var(--footer-label);
}

.immersive-brownfield {
  background: var(--scene-base);
}

.immersive-stage {
  background:
    radial-gradient(circle at 78% 20%, var(--scene-glow), transparent 28%),
    linear-gradient(
      180deg,
      var(--scene-sky-1) 0%,
      var(--scene-sky-2) 48%,
      var(--scene-sky-3) 100%
    );
}

.immersive-intro h1 {
  text-shadow: 0 14px 50px var(--scene-panel-soft);
}

.immersive-intro .hero-subtitle,
.orientation-compass span,
.scene-card {
  background: var(--scene-panel);
}

.chimney,
.factory-block,
.crane-arm,
.crane-arm::before,
.crane-arm::after {
  background: var(--terrain-ink);
}

.tank,
.ruin {
  background: var(--terrain-ink-soft);
}

.future-block {
  background: var(--future-bg);
}

[data-theme="dark"] .terrain-plane {
  background:
    linear-gradient(
      118deg,
      rgba(215, 221, 207, 0.09),
      transparent 28%,
      rgba(199, 160, 125, 0.08) 62%,
      rgba(245, 243, 234, 0.04)
    ),
    linear-gradient(
      90deg,
      rgba(245, 243, 234, 0.07),
      rgba(255, 255, 255, 0.025)
    );
  box-shadow: inset 0 42px 90px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .site-overlay,
[data-theme="dark"] .world-sky-grid,
[data-theme="dark"] .terrain-plane::after {
  mix-blend-mode: screen;
}

[data-theme="dark"] .decision-matrix-svg text {
  fill: rgba(245, 243, 234, 0.72);
}

[data-theme="dark"] .decision-matrix-svg rect,
[data-theme="dark"] .decision-matrix-svg path {
  fill: rgba(23, 26, 24, 0.42);
  stroke: rgba(245, 243, 234, 0.32);
}

[data-theme="dark"] .nodes circle {
  fill: #f5f3ea;
}

[data-theme="dark"] .scene-progress-meter {
  background: rgba(245, 243, 234, 0.2);
}

[data-theme="dark"] .scene-progress-meter span {
  background: rgba(245, 243, 234, 0.76);
}

@media (max-width: 1260px) {
  .header-inner {
    gap: 16px;
  }
  .site-nav {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-start;
  }
  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 980px) {
  .header-inner {
    align-items: center;
    flex-wrap: wrap;
    flex-direction: row;
    padding: 14px 0;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    margin-top: 10px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-alpha-strong);
    box-shadow: 0 14px 35px rgba(20, 20, 20, 0.1);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav .nav-link {
    width: 100%;
    border-radius: 5px;
    padding: 10px 12px;
  }

  .header-actions {
    margin-left: auto;
    gap: 8px;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  .theme-toggle {
    min-height: 36px;
    padding-right: 9px;
  }
  .theme-toggle-label {
    display: none;
  }
  .theme-toggle-value {
    min-width: 32px;
  }
}

/* PATCH: stronger orientation overlay contrast
   Darker in light mode, brighter/whiter in dark mode.
   This affects animated SVG traces and the rotating orientation compass only. */

:root {
  --agk-trace-main: rgba(31, 38, 33, 0.78);
  --agk-trace-secondary: rgba(31, 38, 33, 0.62);
  --agk-trace-uncertain: rgba(31, 38, 33, 0.48);
  --agk-trace-shadow: rgba(247, 246, 242, 0.55);

  --agk-node-fill: rgba(31, 38, 33, 0.92);
  --agk-matrix-stroke: rgba(31, 38, 33, 0.68);
  --agk-matrix-text: rgba(31, 38, 33, 0.86);

  --agk-compass-border: rgba(31, 38, 33, 0.58);
  --agk-compass-line: rgba(31, 38, 33, 0.64);
  --agk-compass-text: rgba(31, 38, 33, 0.94);
  --agk-compass-panel: rgba(247, 246, 242, 0.76);
  --agk-compass-shadow: rgba(247, 246, 242, 0.5);
}

[data-theme="dark"] {
  --agk-trace-main: rgba(255, 255, 255, 0.9);
  --agk-trace-secondary: rgba(255, 255, 255, 0.72);
  --agk-trace-uncertain: rgba(255, 255, 255, 0.56);
  --agk-trace-shadow: rgba(255, 255, 255, 0.18);

  --agk-node-fill: rgba(255, 255, 255, 0.95);
  --agk-matrix-stroke: rgba(255, 255, 255, 0.58);
  --agk-matrix-text: rgba(255, 255, 255, 0.86);

  --agk-compass-border: rgba(255, 255, 255, 0.54);
  --agk-compass-line: rgba(255, 255, 255, 0.62);
  --agk-compass-text: rgba(255, 255, 255, 0.92);
  --agk-compass-panel: rgba(18, 21, 19, 0.66);
  --agk-compass-shadow: rgba(255, 255, 255, 0.12);
}

/* Animated SVG planning / decision lines */
.site-overlay {
  opacity: calc(0.34 + (var(--reading-opacity) * 0.72));
}

.trace {
  stroke: var(--agk-trace-main);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 7px var(--agk-trace-shadow));
}

.trace-secondary {
  opacity: 0.82;
  stroke: var(--agk-trace-secondary);
}

.trace-uncertain {
  opacity: 0.64;
  stroke: var(--agk-trace-uncertain);
}

.nodes circle {
  fill: var(--agk-node-fill);
  opacity: calc(0.34 + (var(--reading-opacity) * 0.66));
}

.decision-matrix-svg rect,
.decision-matrix-svg path {
  stroke: var(--agk-matrix-stroke);
}

.decision-matrix-svg text {
  fill: var(--agk-matrix-text);
}

/* Rotating orientation compass and text */
.orientation-compass {
  border-color: var(--agk-compass-border);
  opacity: calc(0.32 + (var(--reading-opacity) * 0.68));
  filter: drop-shadow(0 0 16px var(--agk-compass-shadow));
}

.orientation-compass::before,
.orientation-compass::after {
  background: var(--agk-compass-line);
}

.orientation-compass span {
  background: var(--agk-compass-panel);
  color: var(--agk-compass-text);
  box-shadow: 0 0 0 1px var(--agk-compass-border);
}

/* When WebGL is active, keep overlays readable above the 3D scene */
body.webgl-ready .site-overlay,
body.webgl-ready .orientation-compass,
body.webgl-ready .scene-progress-meter {
  opacity: 0.92;
}

/* Dark mode: make overlay visually crisp, not grey-muddy */
[data-theme="dark"] .site-overlay {
  mix-blend-mode: screen;
}

[data-theme="dark"] .trace {
  filter: drop-shadow(0 0 10px var(--agk-trace-shadow));
}

[data-theme="dark"] .orientation-compass {
  filter: drop-shadow(0 0 18px var(--agk-compass-shadow));
}

/* Keep mobile subtle enough so it does not overpower the hero */
@media (max-width: 720px) {
  .site-overlay {
    opacity: 0.54;
  }

  body.webgl-ready .site-overlay {
    opacity: 0.58;
  }
}
