:root {
  --paper: #f4f0e8;
  --ivory: #ebe6dc;
  --rule: rgba(42, 42, 40, 0.12);
  --graphite: #2a2a28;
  --ink: #121211;
  --mute: #6b6a66;
  --steel: #8a8984;
  --cobalt: #2456d8;
  --cobalt-soft: #4a74e0;
  --amber: #c97b3a;
  --pad: clamp(1.2rem, 4vw, 4rem);
  --nav-h: 4rem;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--graphite);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.9rem;
}
.meta-light { color: rgba(244, 240, 232, 0.55); }

.dek {
  max-width: 36rem;
  color: var(--mute);
  margin-top: 0.85rem;
}

.sec-head {
  padding: 0 var(--pad);
  max-width: 40rem;
  margin-bottom: 2rem;
}
.sec-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0 1.2rem;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--cobalt); }
.btn-cobalt { background: var(--cobalt); color: #fff; }
.btn-cobalt:hover { background: var(--ink); }
.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--graphite);
}
.btn-ghost:hover { border-color: var(--ink); }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

/* NAV */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--nav-h);
  padding: 0 var(--pad);
  background: rgba(244, 240, 232, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px);
  color: var(--ink);
}
.nav.is-dark {
  background: rgba(18, 18, 17, 0.94);
  color: var(--paper);
  border-bottom-color: rgba(244, 240, 232, 0.12);
}
.nav-brand {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}
.brand-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.brand-logo--footer {
  height: 64px;
  max-width: 180px;
}
.nav-links {
  display: none;
  flex: 1;
  justify-content: center;
  gap: 1.15rem;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
}
.nav-links a:hover { color: var(--cobalt); }
.nav.is-dark .nav-links a:hover { color: #8fb0ff; }
.nav-index {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: inherit;
}
.nav-menu {
  margin-left: auto;
  appearance: none;
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  min-height: 2.6rem;
  padding: 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--paper);
  padding: calc(var(--nav-h) + 1.5rem) var(--pad);
}
.drawer[hidden] { display: none; }
.drawer a {
  display: block;
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  padding: 0.45rem 0;
  color: var(--ink);
}

/* HERO */
.hero { background: var(--paper); }
.hero-pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
  padding-top: var(--nav-h);
  box-sizing: border-box;
}
.blueprint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
.bp-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.bp-node { opacity: 0; fill: var(--paper); stroke: var(--graphite); stroke-width: 1.25; }
.bp-dim { opacity: 0; }

.hero-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 40rem;
  padding: 1.5rem var(--pad) 3.5rem;
  box-sizing: border-box;
}
.hero-title {
  font-size: clamp(2.4rem, 6.5vmin, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.92;
  color: var(--ink);
  text-transform: uppercase;
}
.hero-title span { display: block; }
.t-next {
  color: var(--mute);
  font-weight: 400;
  letter-spacing: -0.04em;
}
.hero-lede {
  margin-top: 1.2rem;
  max-width: 32rem;
  color: var(--mute);
}

/* ORIGIN */
.origin {
  background: var(--ivory);
  border-top: 1px solid var(--rule);
}
.origin-pin {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 2rem) 0 3rem;
  display: flex;
  flex-direction: column;
}
.elevation {
  margin-top: auto;
  padding: 0 var(--pad);
  display: grid;
  gap: 0;
}
.layer {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  align-items: end;
  min-height: 4.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-bottom: 0;
  background: var(--paper);
  transform-origin: bottom center;
}
.layer:last-child { border-bottom: 1px solid var(--rule); }
.layer-no {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cobalt);
}
.layer-year {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}
.layer h3 {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.layer-cap {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.layer-cap .layer-no,
.layer-cap .layer-year { color: #8fb0ff; }
.elevation-cap {
  padding: 1.25rem var(--pad) 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.elevation-cap strong {
  font-size: 1.4rem;
  color: var(--cobalt);
  margin-right: 0.4rem;
}

/* DOMAINS PLAN */
.domains {
  padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.plan {
  position: relative;
  margin: 0 var(--pad);
  min-height: 70vh;
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, minmax(90px, 1fr));
  gap: 0;
}
.mod {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--paper);
  text-align: left;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  transition: background 0.3s var(--ease), transform 0.35s var(--ease), border-color 0.3s ease, z-index 0s;
  position: relative;
  overflow: hidden;
}
.mod-id {
  position: absolute;
  top: 0.85rem;
  left: 1rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--steel);
}
.mod strong {
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.1;
}
.mod em {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--mute);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), opacity 0.3s ease, margin 0.3s ease;
}
.mod:hover,
.mod:focus-visible,
.mod.is-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  z-index: 2;
  transform: scale(1.02);
}
.mod:hover .mod-id,
.mod:focus-visible .mod-id,
.mod.is-on .mod-id { color: #8fb0ff; }
.mod:hover em,
.mod:focus-visible em,
.mod.is-on em {
  max-height: 4rem;
  opacity: 1;
  margin-top: 0.25rem;
  color: rgba(244, 240, 232, 0.7);
}
.mod::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cobalt);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s var(--ease);
}
.mod:hover::after,
.mod:focus-visible::after,
.mod.is-on::after { transform: scaleY(1); }

.mod-a { grid-column: 1 / 4; grid-row: 1 / 3; }
.mod-b { grid-column: 4 / 7; grid-row: 1 / 2; }
.mod-c { grid-column: 4 / 6; grid-row: 2 / 4; }
.mod-d { grid-column: 1 / 3; grid-row: 3 / 5; }
.mod-e { grid-column: 3 / 5; grid-row: 4 / 5; }
.mod-f { grid-column: 6 / 7; grid-row: 2 / 5; }

/* STACK */
.stack {
  padding: calc(var(--nav-h) + 2rem) 0 3rem;
  background: var(--ivory);
  border-top: 1px solid var(--rule);
}
.stack-pin { padding: 0 var(--pad); }
.stack-layers {
  display: grid;
  gap: 0;
  max-width: 52rem;
}
.slab {
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--rule);
  border-bottom: 0;
  background: var(--paper);
  transform-origin: center top;
}
.slab:last-child { border-bottom: 1px solid var(--rule); }
.slab h3 {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.slab p { color: var(--mute); font-size: 0.95rem; }
.slab.is-hot {
  border-left: 3px solid var(--cobalt);
  background: #fff;
}

/* INTEL */
.intel {
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.intel-pin {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 2rem) var(--pad) 3rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.intel-head {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 12ch;
  text-transform: uppercase;
}
.cloud {
  position: absolute;
  inset: 28% var(--pad) 22%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-content: center;
  justify-content: center;
  opacity: 0.55;
}
.cloud span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--steel);
  transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.cloud span.keep {
  color: var(--cobalt);
  opacity: 1;
  font-weight: 500;
}
.filter-stage {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.intel-result {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0;
}

/* PIPELINE */
.pipeline {
  padding: calc(var(--nav-h) + 2rem) 0 3rem;
  background: var(--ivory);
  border-top: 1px solid var(--rule);
}
.pipe-pin { padding: 0 var(--pad); overflow: hidden; }
.pipe {
  display: flex;
  gap: 0;
  width: max-content;
  min-width: 100%;
}
.stage {
  flex: 0 0 min(70vw, 220px);
  min-height: 42vh;
  padding: 1.5rem 1.2rem;
  border: 1px solid var(--rule);
  border-right: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.4;
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.stage:last-child { border-right: 1px solid var(--rule); }
.stage span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--steel);
}
.stage strong {
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.15;
}
.stage.is-active {
  opacity: 1;
  background: #fff;
  border-color: var(--cobalt);
  box-shadow: inset 0 0 0 1px var(--cobalt);
}
.stage.is-done {
  opacity: 0.85;
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.stage.is-done span { color: #8fb0ff; }

/* SHOWUP */
.showup {
  background: #1a1a18;
  color: var(--paper);
}
.showup-pin {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 2rem) var(--pad) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.showup-eq {
  font-size: clamp(2.4rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-transform: uppercase;
}
.eq-op {
  display: block;
  color: var(--amber);
  font-weight: 400;
  margin: 0.15em 0;
}
.morph {
  position: relative;
  height: 2.8rem;
  margin: 2rem 0 1.5rem;
  overflow: hidden;
}
.mw {
  position: absolute;
  left: 0;
  top: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--cobalt-soft);
  opacity: 0;
  transform: translateY(110%);
}
.mw.is-on { opacity: 1; transform: none; }
.showup-reveal { opacity: 0; max-width: 34rem; }
.showup-brand {
  font-family: var(--mono);
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--amber);
  margin-bottom: 0.6rem;
}
.showup-line {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.showup-copy { color: rgba(244, 240, 232, 0.65); }

/* GLOBAL */
.global {
  padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.net {
  position: relative;
  margin: 0 var(--pad);
  min-height: 56vh;
  border: 1px solid var(--rule);
  background:
    linear-gradient(rgba(42, 42, 40, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 42, 40, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.net-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.net-path {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 1.25;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.7;
}
.node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.75rem 0.9rem;
  text-align: left;
  min-width: 7.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.node::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  background: var(--cobalt);
  margin-bottom: 0.45rem;
}
.node strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.node span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.node:hover,
.node:focus-visible {
  border-color: var(--cobalt);
  transform: translate(-50%, -50%) scale(1.04);
}

/* SCALE */
.scale {
  padding: calc(var(--nav-h) + 2rem) var(--pad) 4rem;
  background: var(--ivory);
  border-top: 1px solid var(--rule);
}
.scale-block {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.big-num {
  font-size: clamp(4.5rem, 16vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--ink);
}
.big-label {
  margin-top: 0.6rem;
  font-size: 1.05rem;
  color: var(--mute);
  max-width: 20rem;
}
.big-label em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-left: 0.4rem;
}

/* WHY */
.why {
  padding: calc(var(--nav-h) + 2rem) 0 3rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.why-grid {
  margin: 0 var(--pad);
  display: grid;
  gap: 0;
  border: 1px solid var(--rule);
}
.why-mod {
  padding: 1.6rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s ease;
}
.why-mod:last-child { border-bottom: 0; }
.why-mod span {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--cobalt);
}
.why-mod h3 {
  margin: 0.45rem 0 0.4rem;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.why-mod p { color: var(--mute); max-width: 32rem; }
.why-mod:hover { background: var(--ivory); }

/* FINALE */
.finale {
  position: relative;
  padding: calc(var(--nav-h) + 3rem) var(--pad) 5rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  overflow: hidden;
}
.finale-bp {
  position: absolute;
  left: 0;
  right: 0;
  top: 30%;
  opacity: 0.55;
  pointer-events: none;
}
.finale-bp svg { width: 100%; height: 180px; }
.finale-path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.finale-title {
  position: relative;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-transform: uppercase;
  color: var(--ink);
  max-width: 10ch;
}
.finale-title span { display: block; }
.finale .dek { position: relative; }

.footer {
  padding: 2.5rem var(--pad) 3rem;
  background: var(--ivory);
  border-top: 1px solid var(--rule);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
}
.footer nav a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.footer nav a:hover { color: var(--cobalt); }
.footer-locs {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--steel);
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-menu,
  .drawer { display: none !important; }
  .nav-index { margin-left: 0; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why-mod:nth-child(odd) { border-right: 1px solid var(--rule); }
  .why-mod:nth-child(1),
  .why-mod:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .why-mod:nth-child(3),
  .why-mod:nth-child(4) { border-bottom: 0; }
}

@media (max-width: 899px) {
  .plan {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .mod {
    min-height: 120px;
  }
  .mod-a, .mod-b, .mod-c, .mod-d, .mod-e, .mod-f {
    grid-column: auto;
    grid-row: auto;
  }
  .net { min-height: 0; padding: 0.5rem 0 1rem; }
  .net-svg { display: none; }
  .node {
    position: relative;
    left: auto !important;
    top: auto !important;
    transform: none;
    width: calc(100% - 1.5rem);
    margin: 0.5rem 0.75rem;
  }
  .node:hover,
  .node:focus-visible { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .bp-path,
  .net-path,
  .finale-path { stroke-dashoffset: 0 !important; }
  .bp-node,
  .bp-dim,
  .intel-result,
  .showup-reveal { opacity: 1 !important; }
  .mw { position: relative; opacity: 1; transform: none; display: inline-block; margin-right: 0.75rem; }
  .morph { height: auto; overflow: visible; }
}
