/* ============================================================
   AMBROSIA — styles
   Ink #0B0D10 · Raised #151A21 · Nectar #D4A24A · Bone #E9E4D8 · Slate #7D8A96
   Display: Marcellus · Text/UI: Space Grotesk
   ============================================================ */

:root {
  --ink: #0B0D10;
  --raised: #151A21;
  --nectar: #D4A24A;
  --nectar-dim: #C08F3B;
  --bone: #E9E4D8;
  --slate: #7D8A96;
  --line: rgba(233, 228, 216, 0.08);
  --line-strong: rgba(233, 228, 216, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Marcellus", "Times New Roman", serif;
  --font-text: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--nectar); color: var(--ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: rgba(125, 138, 150, 0.35); border-radius: 5px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--nectar); color: var(--ink);
  padding: 10px 18px; z-index: 200; font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- primitives ---------- */

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px;
}


.label {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 500;
}

.label .num { color: var(--nectar); margin-right: 10px; }

.section {
  padding: 120px 0;
  scroll-margin-top: 72px;
  position: relative;
}

.section + .section { border-top: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 72px; }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-top: 20px;
  color: var(--bone);
}

.section-head p {
  margin-top: 18px;
  color: var(--slate);
  font-size: 16px;
  max-width: 56ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.btn-primary { background: var(--nectar); color: var(--ink); }
.btn-primary:hover { background: var(--nectar-dim); }

.btn-ghost { border-color: var(--line-strong); color: var(--bone); background: transparent; }
.btn-ghost:hover { border-color: rgba(233, 228, 216, 0.4); }

.btn-ghost .arrow { transition: transform 0.25s var(--ease); }
.btn-ghost:hover .arrow { transform: translateX(3px); }

:is(a, button, input, select):focus-visible {
  outline: 1px solid var(--nectar);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- film grain, hero only ---------- */
/* lives in the same radial pocket as the dot grid, fading out well
   before the copy column; background-position jumps in discrete
   steps so it flickers like film rather than panning */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;                     /* above dots and viz, below the copy */
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='110'%20height='110'%3E%3Cfilter%20id='n'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='1'%20stitchTiles='stitch'%20seed='7'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%201%200%200%200%200%201%200%200%200%200%201%201.2%200%200%200%20-0.45'/%3E%3C/filter%3E%3Crect%20width='110'%20height='110'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  image-rendering: pixelated;
  opacity: 0.11;
  -webkit-mask-image: radial-gradient(720px 640px at 74% 46%, rgba(0,0,0,0.95), transparent 72%);
  mask-image: radial-gradient(720px 640px at 74% 46%, rgba(0,0,0,0.95), transparent 72%);
  animation: grainShift 1.6s steps(10) infinite;
}

@keyframes grainShift {
  0%, 100% { background-position: 0 0; }
  10% { background-position: -37px -19px; }
  20% { background-position: 61px -43px; }
  30% { background-position: -22px 58px; }
  40% { background-position: 44px 17px; }
  50% { background-position: -75px -32px; }
  60% { background-position: 13px 71px; }
  70% { background-position: -58px -64px; }
  80% { background-position: 79px 39px; }
  90% { background-position: -12px -84px; }
}

/* ---------- reveal on scroll ----------
   Hidden only under html.js (set by script.js), so content is never
   lost if scripting is off or the script fails to load. */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  background: rgba(11, 13, 16, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}
.brand svg { width: 21px; height: auto; color: var(--bone); }
.brand .wordmark {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.32em;
  color: var(--bone);
  transform: translateY(1px); /* optical: Marcellus caps sit high */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--slate);
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--bone); }

.nav .btn { padding: 9px 20px; font-size: 13px; }

/* ---------- hero ---------- */

.hero {
  min-height: clamp(640px, 100svh, 940px);
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

/* faint technical dot grid, masked to the hero's right */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(233, 228, 216, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(720px 640px at 74% 46%, rgba(0,0,0,0.9), transparent 70%);
  mask-image: radial-gradient(720px 640px at 74% 46%, rgba(0,0,0,0.9), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  align-items: center;
  gap: 48px;
  width: 100%;
}

.hero-copy { position: relative; z-index: 2; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 5.5vw, 76px);
  line-height: 1.06;
  letter-spacing: 0.015em;
  color: var(--bone);
}

.hero h1 span { display: block; color: var(--nectar); }

.hero-sub {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--slate);
  font-size: 16.5px;
}

.hero-ctas {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-viz-wrap {
  position: relative;
  min-width: 0;
}

.hero-viz {
  width: 100%;
  height: auto;
  cursor: pointer;
  touch-action: manipulation;
}

/* ---------- product / three steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.step {
  padding: 44px 40px 52px 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.step + .step { padding-left: 40px; border-left: 1px solid var(--line); }
.step:last-child { padding-right: 0; }

.step-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--nectar);
  letter-spacing: 0.1em;
  margin-bottom: 26px;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.step p { color: var(--slate); font-size: 14.5px; max-width: 34ch; }

.step-figure { margin-top: auto; padding-top: 40px; height: 168px; box-sizing: content-box; }
.step-figure svg { width: 100%; height: 100%; }

/* shared strokes for the small diagrams */
.fig-line { stroke: rgba(233, 228, 216, 0.26); stroke-width: 1; fill: none; }
.fig-line-dotted { stroke: rgba(233, 228, 216, 0.22); stroke-width: 1; stroke-dasharray: 2 4; fill: none; }
.fig-box { fill: var(--raised); stroke: var(--line-strong); stroke-width: 1; rx: 4; }
.fig-row { stroke: rgba(125, 138, 150, 0.45); stroke-width: 1; }
.fig-pill { fill: var(--raised); stroke: var(--line-strong); stroke-width: 1; }
.fig-node { fill: var(--ink); stroke: rgba(233, 228, 216, 0.6); stroke-width: 1.2; }
.fig-node-gold { fill: var(--ink); stroke: var(--nectar); stroke-width: 1.3; }
.fig-mark { fill: none; stroke: rgba(233, 228, 216, 0.9); stroke-width: 3.1; stroke-linecap: round; }
.fig-text {
  font-family: var(--font-text);
  font-size: 9px;
  letter-spacing: 0.12em;
  fill: var(--slate);
}
.fig-text-sm { font-size: 7.5px; }
.fig-text-mid { text-anchor: middle; }
.fig-edge-label {
  font-family: var(--font-text);
  font-size: 7px;
  letter-spacing: 0.14em;
  fill: var(--slate);
  opacity: 0.8;
}
.fig-gold-line { stroke: var(--nectar); stroke-width: 1.2; fill: none; }

/* diagrams draw themselves in as their step reveals */
html.js .fig-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.js .step.is-in .fig-draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s var(--ease) 0.35s;
}
html.js .fig-fade { opacity: 0; }
html.js .step.is-in .fig-fade {
  opacity: 1;
  transition: opacity 0.9s var(--ease) 0.9s;
}

.build-loop {
  margin-top: 20px;
  padding: 30px 0 0;
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.6fr);
  gap: 54px;
  align-items: end;
}
.build-loop-copy > p:last-child {
  color: var(--slate);
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 48ch;
  margin-top: 10px;
}
.build-loop-stages {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  list-style: none;
}
.build-loop-stages li {
  position: relative;
  border-top: 1px solid var(--line-strong);
  padding: 17px 8px 0 0;
  color: var(--bone);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.build-loop-stages li::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--slate);
}
.build-loop-stages li:first-child::before,
.build-loop-stages li:last-child::before { background: var(--nectar); }
.build-loop-stages span {
  display: block;
  color: var(--slate);
  font-size: 8px;
  margin-bottom: 4px;
}

/* ---------- industry entry points ---------- */

.industries-section { overflow: hidden; }

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

.industry-card {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px 36px 30px;
  background: var(--raised);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.industry-card:hover {
  border-color: rgba(233, 228, 216, 0.25);
  transform: translateY(-3px);
}

.industry-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.card-arrow { color: var(--slate); font-size: 18px; }

.industry-card h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  max-width: 15ch;
  margin-top: 48px;
}
.industry-card > p:not(.industry-link) {
  color: var(--slate);
  font-size: 14.5px;
  max-width: 49ch;
  margin-top: 18px;
}

.industry-flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 42px 0 30px;
}
.industry-flow span {
  color: var(--slate);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.industry-flow i {
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), rgba(212, 162, 74, 0.55));
  position: relative;
}
.industry-flow i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--nectar);
}
.industry-link {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--bone);
  font-size: 13px;
}
.industry-link span { color: var(--nectar); }

/* ---------- traceability demo ---------- */

.demo-shell {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  /* break out of the text container so the board breathes */
  width: min(1332px, calc(100vw - 48px));
  margin-left: calc((100% - min(1332px, 100vw - 48px)) / 2);
}

.demo-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.demo-titlebar .left {
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; color: var(--slate); letter-spacing: 0.03em;
}
.demo-titlebar .left svg { width: 20px; height: auto; color: var(--bone); opacity: 0.9; }

/* module tabs: the same graph, other lenses */
.demo-tabs { display: flex; align-items: center; gap: 20px; margin-left: 10px; }
.demo-tabs .tab {
  position: relative;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--slate);
  white-space: nowrap;
  opacity: 0.85;
}
.demo-tabs .tab.active { color: var(--bone); font-weight: 500; opacity: 1; }
.demo-tabs .tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -15px;
  height: 2px;
  background: var(--nectar);
}

.demo-search {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--slate);
  letter-spacing: 0.04em;
  min-width: 0;
}
.demo-search .code { color: var(--bone); }
.demo-search svg { width: 12px; height: 12px; stroke: var(--slate); flex: none; }

.demo-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
}

.demo-board-scroll { overflow-x: auto; }

.demo-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0 26px;
  padding: 24px 24px 28px;
  min-width: 940px;
  min-height: 400px;
}

.demo-col { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }

.demo-col-head {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  padding-bottom: 4px;
  white-space: nowrap;
}
.demo-col-head span { display: block; letter-spacing: 0.08em; text-transform: none; margin-top: 2px; }

.demo-spacer { flex: 1 1 auto; min-height: 0; }

.node-card {
  background: var(--ink);
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  border-radius: 7px;
  padding: 10px 12px;
  text-align: left;
  font-family: var(--font-text);
  color: var(--bone);
  width: 100%;
  transition: opacity 0.45s var(--ease), border-color 0.45s var(--ease),
              background 0.45s var(--ease);
  position: relative;
}

.node-card .code {
  font-size: 12px; font-weight: 500; letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 7px;
}
.node-card .sub { font-size: 11px; color: var(--slate); margin-top: 3px; line-height: 1.5; }
.node-card .meta { font-size: 10.5px; color: var(--slate); margin-top: 2px; }

.node-badge {
  display: none;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nectar);
  border: 1px solid rgba(212, 162, 74, 0.45);
  padding: 2px 7px;
  border-radius: 999px;
  position: absolute;
  top: -9px;
  right: 9px;
  background: var(--ink);
}

.advisory-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nectar);
  flex: none;
  animation: adv-pulse 2.4s ease-in-out infinite;
}
@keyframes adv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 162, 74, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(212, 162, 74, 0); }
}

button.node-card { cursor: pointer; }
button.node-card:hover { border-color: rgba(212, 162, 74, 0.5); }

/* trace states */
.demo-board.is-tracing .node-card { opacity: 0.32; }
.demo-board.is-tracing .node-card.lit { opacity: 1; }
.node-card.lit { border-left-color: var(--nectar); background: var(--raised); }
.node-card.lit .node-badge { display: inline-block; }
.node-card.src { border-left-color: var(--nectar); }

.demo-edges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.demo-edges path {
  fill: none;
  stroke: rgba(125, 138, 150, 0.28);
  stroke-width: 1;
  transition: stroke 0.4s var(--ease), opacity 0.4s var(--ease);
}
.demo-board.is-tracing .demo-edges path { opacity: 0.35; }
.demo-edges path.traced {
  stroke: var(--nectar);
  stroke-width: 1.4;
  opacity: 1;
}

/* side panel */
.demo-side {
  border-left: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.demo-side .label { font-size: 10px; }

.kde-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--ink);
}

.kde-card .tlc {
  font-size: 14px; font-weight: 500; letter-spacing: 0.03em;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.status-chip {
  font-size: 8.5px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--nectar);
  border: 1px solid rgba(212, 162, 74, 0.45);
  padding: 2.5px 8px; border-radius: 999px;
  white-space: nowrap;
}

.kde-rows { margin-top: 12px; display: grid; gap: 7px; }
.kde-row {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 11.5px;
}
.kde-row .k { color: var(--slate); }
.kde-row .v { color: var(--bone); text-align: right; }

.cte-list { display: grid; gap: 0; }
.cte-item {
  display: flex; gap: 12px;
  padding: 9px 2px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line);
}
.cte-item:last-child { border-bottom: 0; }
.cte-item .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--slate); margin-top: 6px; flex: none;
}
.cte-item .t { color: var(--bone); }
.cte-item .d { color: var(--slate); font-size: 10.5px; margin-top: 1px; }

.demo-trace-btn { width: 100%; justify-content: center; }

.impact { display: none; }
.impact.is-on { display: block; }

.impact-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.impact-stat:last-of-type { border-bottom: 0; }
.impact-stat .k { color: var(--slate); }
.impact-stat .v { color: var(--bone); font-weight: 500; }
.impact-stat .v.gold { color: var(--nectar); }

.impact-note {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--slate);
  line-height: 1.6;
}

.impact-time {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nectar);
}

.impact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.impact-actions .chip {
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--slate);
  white-space: nowrap;
}

.demo-reset {
  background: none; border: none;
  color: var(--slate);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  padding: 8px 4px;             /* keeps the tap target at 24px+ */
  margin: 6px 0 0 -4px;
  transition: color 0.25s var(--ease);
}
.demo-reset:hover { color: var(--bone); }

/* what traceability unlocks */
.unlock-block {
  margin-top: 26px;
  /* match the demo shell's breakout width */
  width: min(1332px, calc(100vw - 48px));
  margin-left: calc((100% - min(1332px, 100vw - 48px)) / 2);
}
.unlock-head { padding: 34px 4px 0; }
.unlock-head .label { margin-bottom: 0; }
.unlock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.unlock-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 28px 28px;
  background: transparent;
}
.unlock-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18.5px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--bone);
  margin-bottom: 10px;
}
.unlock-card p { font-size: 13.5px; color: var(--slate); }

/* ---------- why ontology ---------- */

.pull-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.18;
  letter-spacing: 0.015em;
  color: var(--bone);
  max-width: 21ch;
}
.pull-quote em { font-style: normal; color: var(--slate); }

.ontology-intro {
  margin-top: 24px;
  max-width: 58ch;
  color: var(--slate);
  font-size: 16px;
}

.ontology-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.compare-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 34px;
  background: var(--raised);
  display: flex;
  flex-direction: column;
}
.compare-card.plain { background: transparent; }

.compare-card .label { margin-bottom: 22px; }
.compare-card figure { flex: 1; display: flex; align-items: center; margin: 0 0 24px; }
.compare-card figure svg { width: 100%; height: auto; }
.compare-card p { color: var(--slate); font-size: 14px; max-width: 44ch; }
.compare-card p b { color: var(--bone); font-weight: 500; }

/* ---------- vision ---------- */

.vision-diagram { margin-top: 8px; }

.stage-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stage {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 32px 32px;
}
.stage-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--nectar);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.stage h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  color: var(--bone);
}
.stage p { color: var(--slate); font-size: 14px; max-width: 40ch; }

.foundation-links { height: 56px; }
.foundation-links svg { width: 100%; height: 100%; }
.foundation-links path { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.foundation-links path.gold { stroke: rgba(212, 162, 74, 0.55); }

.foundation-slab {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--raised);
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.foundation-slab .name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.14em;
}
.foundation-slab .desc { font-size: 12.5px; color: var(--slate); text-align: right; max-width: 52ch; }

/* ---------- industry pages ---------- */

.page-hero {
  min-height: 720px;
  padding: 130px 0 72px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(233, 228, 216, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(640px 520px at 76% 48%, black, transparent 72%);
  mask-image: radial-gradient(640px 520px at 76% 48%, black, transparent 72%);
  pointer-events: none;
}
.page-hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  align-items: center;
  gap: 76px;
  position: relative;
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--slate);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.breadcrumb i { width: 24px; height: 1px; background: var(--nectar); }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(46px, 5.4vw, 68px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0.012em;
}
.page-hero-copy > p:not(.breadcrumb) {
  color: var(--slate);
  font-size: 16.5px;
  max-width: 49ch;
  margin-top: 28px;
}
.page-hero-copy .hero-ctas { margin-top: 38px; }

.system-map {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(21, 26, 33, 0.72);
  padding: 24px;
  min-width: 0;
}
.system-map-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.system-map-head span:last-child { color: var(--slate); font-size: 10px; letter-spacing: 0.12em; }
.system-map svg { width: 100%; height: auto; margin-top: 18px; }
.map-edge { fill: none; stroke: rgba(125, 138, 150, 0.42); stroke-width: 1; }
.map-edge.hot { stroke: rgba(212, 162, 74, 0.68); }
.map-node { fill: var(--ink); stroke: rgba(233, 228, 216, 0.22); stroke-width: 1; }
.map-node.hot { stroke: var(--nectar); }
.map-label { fill: var(--slate); font-family: var(--font-text); font-size: 8px; letter-spacing: 0.09em; text-anchor: middle; }
.map-value { fill: var(--bone); font-family: var(--font-text); font-size: 9.5px; text-anchor: middle; }
.map-pulse { fill: var(--nectar); }
.system-map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 10.5px;
  color: var(--slate);
}
.system-map-foot strong { color: var(--bone); font-weight: 500; }

.compact-section { padding: 112px 0; }
.split-statement {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 90px;
  align-items: start;
}
.split-statement h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.16;
}
.split-copy { border-left: 1px solid var(--line-strong); padding-left: 34px; }
.split-copy p { color: var(--slate); font-size: 15px; }
.split-copy p + p { margin-top: 18px; }

.model-rail {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 58px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.model-object {
  min-height: 132px;
  padding: 24px 18px;
  background: var(--raised);
  position: relative;
}
.model-object + .model-object { border-left: 1px solid var(--line); }
.model-object::after {
  content: "→";
  position: absolute;
  right: -9px;
  top: 54px;
  z-index: 2;
  color: var(--nectar);
  background: var(--raised);
  font-size: 12px;
}
.model-object:last-child::after { display: none; }
.model-object .label { font-size: 8.5px; }
.model-object strong { display: block; margin-top: 26px; font-size: 13px; font-weight: 500; color: var(--bone); }
.model-object small { display: block; color: var(--slate); font-size: 10.5px; margin-top: 4px; }

.workflow-steps .step { min-height: 330px; }
.workflow-steps .step-tag {
  margin-top: auto;
  padding-top: 38px;
  color: var(--nectar);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.application-card {
  padding: 28px 28px 30px;
  min-height: 180px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.application-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  margin-top: 34px;
}
.application-card p { color: var(--slate); font-size: 13px; margin-top: 9px; }

.industry-switcher {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.industry-switcher a {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--slate);
  font-size: 11px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.industry-switcher a:hover { color: var(--bone); border-color: rgba(233, 228, 216, 0.35); }


/* ---------- contact / final CTA ---------- */

.contact-wrap {
  max-width: 760px;
  text-align: center;
}

.contact-wrap h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.12;
  letter-spacing: 0.015em;
  margin-top: 22px;
}

.contact-copy {
  margin: 26px auto 0;
  color: var(--slate);
  font-size: 16px;
  max-width: 54ch;
}
.contact-copy + .contact-copy { margin-top: 14px; }

.contact-ctas {
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}

.contact-email {
  color: var(--slate);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--line-strong);
  transition: color 0.25s var(--ease);
}
.contact-email:hover { color: var(--bone); }

.contact-foot {
  margin-top: 26px;
  font-size: 12px;
  color: var(--slate);
  opacity: 0.8;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 44px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer .brand svg { width: 21px; }
.footer .brand .wordmark { font-size: 13px; }

.footer-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12.5px;
  color: var(--slate);
  flex-wrap: wrap;
}
.footer-meta a { transition: color 0.25s var(--ease); }
.footer-meta a:hover { color: var(--bone); }

/* ---------- hero SVG internals ---------- */

.hv-arc {
  fill: none;
  stroke: var(--bone);
  stroke-linecap: round;
}

.hv-edge {
  fill: none;
  stroke: rgba(233, 228, 216, 0.2);
  stroke-width: 1;
}
.hv-edge.faint { stroke: rgba(233, 228, 216, 0.09); }
.hv-edge.hot { stroke: rgba(233, 228, 216, 0.55); }

.hv-node { fill: var(--bone); }
.hv-node.gold { fill: var(--nectar); }

.hv-type-label {
  font-family: var(--font-text);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  fill: var(--slate);
  text-transform: uppercase;
  text-anchor: middle;
}

.hv-edge-label {
  font-family: var(--font-text);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  fill: var(--slate);
  text-transform: uppercase;
  text-anchor: middle;
  opacity: 0.85;
}

.hv-meta-label {
  font-family: var(--font-text);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  fill: var(--slate);
  text-transform: uppercase;
  opacity: 0.85;
}

.hv-horizon {
  stroke: rgba(233, 228, 216, 0.14);
  stroke-width: 1;
}

.hv-chip-text {
  font-family: var(--font-text);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  fill: var(--bone);
}
.hv-chip-rect {
  fill: var(--raised);
  stroke: var(--line-strong);
  stroke-width: 1;
}

.hv-pulse { fill: rgba(233, 228, 216, 0.7); }
.hv-pulse.gold { fill: var(--nectar); }

/* the twin: digital material — crisp squares, dashed signal edges */
.hv-twin-node { fill: rgba(141, 155, 168, 0.95); shape-rendering: crispEdges; }
.hv-twin-node.gold { fill: rgba(212, 162, 74, 0.95); }
.hv-twin-edge {
  fill: none;
  stroke: rgba(125, 138, 150, 0.48);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 1080px) {
  .demo-body { grid-template-columns: 1fr; }
  .demo-side {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
  }
  .demo-side > .label { grid-column: 1 / -1; margin-bottom: -8px; }
}

@media (max-width: 920px) {
  .container { padding: 0 24px; }
  .section { padding: 100px 0; }
  .section-head { margin-bottom: 52px; }

  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12.5px; }
  .nav .brand .wordmark { display: none; }

  .hero { padding: 120px 0 60px; min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero::before {
    -webkit-mask-image: radial-gradient(520px 480px at 50% 72%, rgba(0,0,0,0.9), transparent 70%);
    mask-image: radial-gradient(520px 480px at 50% 72%, rgba(0,0,0,0.9), transparent 70%);
  }
  .hero::after {
    -webkit-mask-image: radial-gradient(520px 480px at 50% 72%, rgba(0,0,0,0.95), transparent 72%);
    mask-image: radial-gradient(520px 480px at 50% 72%, rgba(0,0,0,0.95), transparent 72%);
  }
  .hero-viz-wrap { max-width: 560px; margin: 0 auto; }

  .industry-grid { grid-template-columns: 1fr; }
  .industry-card { min-height: 390px; }
  .build-loop { grid-template-columns: 1fr; gap: 30px; }

  .page-hero { min-height: auto; padding: 126px 0 76px; }
  .page-hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .page-hero-copy { max-width: 720px; }
  .system-map { max-width: 720px; }
  .split-statement { grid-template-columns: 1fr; gap: 40px; }
  .split-copy { max-width: 650px; }
  .model-rail { grid-template-columns: repeat(4, 1fr); }
  .model-object:nth-child(5) { border-left: 0; }
  .model-object:nth-child(n+5) { border-top: 1px solid var(--line); }
  .application-grid { grid-template-columns: repeat(2, 1fr); }

  .steps { grid-template-columns: 1fr; border-top: 0; }
  .step { padding: 36px 0; border-top: 1px solid var(--line); }
  .step + .step { padding-left: 0; border-left: 0; }
  .step p { max-width: 60ch; }
  .step-figure { max-width: 420px; }

  .unlock-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .demo-tabs .tab:nth-child(n+5) { display: none; }

  .ontology-grid { grid-template-columns: 1fr; margin-top: 56px; }

  .stage-cards { grid-template-columns: 1fr; }
  .foundation-links { display: none; }
  .foundation-slab { margin-top: 20px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .foundation-slab .desc { text-align: left; }

  .demo-side { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 54px); }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .nav-links li.link { display: none; }
  .unlock-grid { grid-template-columns: 1fr; }
  .demo-tabs .tab:nth-child(n+3) { display: none; }
  .demo-search { display: none; }
  .nav .btn { padding: 8px 14px; font-size: 12px; }
  .nav .brand .wordmark { display: inline; letter-spacing: 0.24em; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .build-loop-stages { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .industry-card { min-height: 360px; padding: 28px 24px 24px; }
  .industry-card h3 { margin-top: 36px; }
  .industry-flow { grid-template-columns: 1fr; gap: 8px; padding: 34px 0 24px; }
  .industry-flow i { width: 1px; height: 14px; margin-left: 4px; background: var(--line-strong); }
  .industry-flow i::after { left: -2px; right: auto; top: auto; bottom: -1px; }
  .page-hero-grid { gap: 38px; }
  .system-map { padding: 16px; }
  .system-map-head span:last-child { display: none; }
  .compact-section { padding: 84px 0; }
  .split-copy { border-left: 0; border-top: 1px solid var(--line-strong); padding: 24px 0 0; }
  .model-rail { grid-template-columns: 1fr 1fr; }
  .model-object { min-height: 112px; }
  .model-object:nth-child(odd) { border-left: 0; }
  .model-object:nth-child(n+3) { border-top: 1px solid var(--line); }
  .model-object::after { display: none; }
  .application-grid { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .advisory-dot { animation: none; }
  .hero::after { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
