:root {
  --black: #0e0e0e;
  --mid: #181818;
  --navy: #0D1B2A;
  --red: #a8201a;
  --white: #F5F7F9;
  --ice: #aaccdb;
  --sans: "Hanken Grotesk", Arial, sans-serif;
  --serif: "EB Garamond", Georgia, serif;
  --line-dark: rgba(245, 247, 249, 0.14);
  --line-light: rgba(14, 14, 14, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  overflow-x: hidden;
  width: 100%;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.motion-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 18%;
  height: 1px;
  background: rgba(245, 247, 249, 0.14);
  transform: translateX(-100%);
  animation: scan 7s linear infinite;
}

.scan-line.delayed {
  top: 72%;
  animation-delay: 2.8s;
}

.data-pulse {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--red);
  opacity: 0.7;
  animation: pulseMove 9s steps(20) infinite;
}

.pulse-a {
  top: 32%;
  left: 8%;
}

.pulse-b {
  top: 58%;
  left: 76%;
  background: var(--ice);
  animation-delay: 1.6s;
}

.pulse-c {
  top: 82%;
  left: 32%;
  background: var(--white);
  animation-delay: 3.2s;
}

.site-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(56px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 18px 28px;
  background: rgba(14, 14, 14, 0.84);
  border-bottom: 1px solid var(--line-dark);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
}

.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}

.meta,
.eyebrow,
.hero-meta,
.page-footer,
#pageIndicator,
.nav-dot,
.segment {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.meta {
  color: rgba(245, 247, 249, 0.48);
}

.chapter-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  border: 1px solid var(--line-dark);
}

.nav-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 38px;
  color: rgba(245, 247, 249, 0.58);
  background: transparent;
  transition: background 180ms ease, color 180ms ease;
}

.nav-dot.active,
.nav-dot:hover {
  background: var(--white);
  color: var(--black);
}

.shell-actions {
  display: flex;
  justify-content: flex-end;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--red);
  color: var(--white);
  transform: translateY(-2px);
  outline: 1px solid var(--white);
  outline-offset: 3px;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

main {
  position: relative;
  z-index: 1;
}

.chapter {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-margin-top: 82px;
  padding: 108px 34px 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.chapter-grid {
  width: min(1380px, 100%);
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.cell {
  min-width: 0;
  min-height: 0;
  padding: 38px;
  overflow: hidden;
}

.dark-cell {
  background: var(--black);
  color: var(--white);
}

.mid-cell {
  background: var(--mid);
  color: var(--white);
}

.navy-cell {
  background: var(--navy);
  color: var(--white);
}

.red-cell {
  background: var(--red);
  color: var(--white);
}

.white-cell {
  background: var(--white);
  color: var(--black);
}

.eyebrow {
  margin: 0 0 18px;
  color: rgba(14, 14, 14, 0.48);
}

.dark-cell .eyebrow,
.mid-cell .eyebrow,
.red-cell .eyebrow {
  color: rgba(245, 247, 249, 0.44);
}

.red-text {
  color: var(--red);
}

.ice-text {
  color: var(--ice);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

h1 {
  max-width: 880px;
  font-size: 74px;
  line-height: 0.98;
}

h2 {
  max-width: 1080px;
  font-size: 54px;
  line-height: 1.02;
}

h3 {
  font-size: 34px;
  line-height: 1.08;
}

p {
  margin: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero-copy,
.narrative-cell p,
.thesis-cell p,
.arch-detail p,
.gate-cell p,
.kill-cell p,
.balance-cell p,
.scope-cell li {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.38;
}

.hero-copy {
  max-width: 800px;
  margin-top: 28px;
  color: rgba(245, 247, 249, 0.74);
}

.hero-meta {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.hero-meta span {
  padding: 18px;
  color: rgba(245, 247, 249, 0.64);
}

.cover-grid {
  grid-template-columns: 1.35fr 0.65fr;
  grid-template-rows: minmax(390px, auto) minmax(240px, auto);
}

.hero-cell {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.redaction-list,
.number-list {
  margin: 0;
  padding-left: 20px;
}

.redaction-list li,
.number-list li {
  margin: 0 0 14px;
  color: rgba(245, 247, 249, 0.76);
  font-size: 16px;
  line-height: 1.55;
}

.number-list li {
  color: rgba(245, 247, 249, 0.82);
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.mini-metrics div {
  min-height: 110px;
  padding: 22px;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-metrics strong,
.stat-block strong {
  font-family: var(--serif);
  font-size: 54px;
  font-weight: 500;
  line-height: 1;
}

.mini-metrics span,
.stat-block span {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(245, 247, 249, 0.58);
  text-transform: uppercase;
  font-weight: 800;
}

.section-head {
  width: min(1380px, 100%);
  margin: 0 auto 28px;
  padding-top: 10px;
  border-top: 1px solid var(--line-dark);
}

.section-head .eyebrow {
  color: rgba(245, 247, 249, 0.48);
}

.diagnosis-grid {
  grid-template-columns: 1fr 0.9fr;
  grid-template-rows: auto auto;
}

.narrative-cell {
  grid-row: span 2;
}

.narrative-cell p + p {
  margin-top: 26px;
}

.large-callout {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.02;
  font-weight: 500;
}

.small-copy {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(245, 247, 249, 0.72);
}

.stat-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  background: var(--line-dark);
}

.stat-context {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 28px;
  background: var(--mid);
  color: rgba(245, 247, 249, 0.58);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-block {
  min-height: 160px;
  padding: 28px;
  background: var(--mid);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.state-grid {
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: auto auto;
}

.table-cell {
  grid-row: span 2;
}

.responsive-table {
  overflow-x: auto;
}

th,
td {
  padding: 18px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
  line-height: 1.45;
}

th {
  color: rgba(245, 247, 249, 0.58);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
}

td {
  color: rgba(245, 247, 249, 0.78);
}

.readiness-bars {
  display: grid;
  gap: 20px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 110px;
  align-items: center;
  gap: 16px;
  min-height: 42px;
}

.bar-row span,
.bar-row b {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(14, 14, 14, 0.74);
}

.bar-row b {
  text-align: right;
  color: var(--black);
}

.bar-row i {
  display: block;
  height: 14px;
  background: rgba(14, 14, 14, 0.08);
  position: relative;
  overflow: hidden;
}

.bar-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms ease;
}

.in-view .bar-row i::after {
  transform: scaleX(1);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(245, 247, 249, 0.18);
  border: 1px solid rgba(245, 247, 249, 0.18);
}

.heat-cell {
  min-height: 94px;
  padding: 14px;
  cursor: pointer;
  background: rgba(14, 14, 14, 0.22);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}

.heat-cell:hover,
.heat-cell:focus-visible,
.heat-cell.active-heat {
  transform: translateY(-2px);
  outline: 1px solid var(--white);
  outline-offset: 2px;
}

.heat-cell.hot {
  background: var(--black);
}

.heat-cell.warm {
  background: rgba(14, 14, 14, 0.58);
}

.heat-cell.cool {
  background: var(--navy);
}

.heat-note {
  margin-top: 22px;
  min-height: 58px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.32;
  color: rgba(245, 247, 249, 0.76);
}

.arch-grid {
  grid-template-columns: 1.25fr 0.75fr;
  grid-template-rows: 360px auto;
}

.arch-stage {
  grid-row: span 2;
  padding: 0;
}

.architecture {
  position: relative;
  min-height: 640px;
  height: 100%;
  background: var(--white);
}

.node {
  position: absolute;
  z-index: 2;
  width: 190px;
  min-height: 126px;
  padding: 18px;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.node strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.05;
}

.node span {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(245, 247, 249, 0.66);
}

.node:hover,
.node:focus-visible,
.node.active-node {
  transform: translateY(-5px);
  background: var(--red);
  color: var(--white);
  outline: 1px solid var(--black);
  outline-offset: 4px;
}

.node-shopify {
  left: 8%;
  top: 14%;
}

.node-intacct {
  right: 8%;
  top: 14%;
}

.node-layer {
  left: 50%;
  top: 39%;
  transform: translateX(-50%);
  background: var(--navy);
}

.node-layer:hover,
.node-layer:focus-visible,
.node-layer.active-node {
  transform: translateX(-50%) translateY(-5px);
}

.node-anydb {
  left: 10%;
  bottom: 12%;
  background: var(--mid);
}

.node-dtc {
  right: 8%;
  bottom: 12%;
  background: var(--mid);
}

.arch-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.flow-line {
  fill: none;
  stroke: var(--red);
  stroke-width: 3;
  stroke-dasharray: 12 12;
  opacity: 0.22;
  animation: flow 1.9s linear infinite;
  transition: opacity 220ms ease, stroke-width 220ms ease;
}

.line-b,
.line-d {
  stroke: var(--navy);
}

.line-e {
  stroke: var(--black);
  opacity: 0.54;
}

.flow-line.active-flow-line {
  opacity: 1;
  stroke: var(--red);
  stroke-width: 5;
}

.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(245, 247, 249, 0.14);
  border: 1px solid rgba(245, 247, 249, 0.14);
}

.verdict-grid span,
.verdict-grid strong {
  padding: 16px;
  background: rgba(14, 14, 14, 0.26);
  font-size: 14px;
  line-height: 1.4;
}

.verdict-grid span {
  color: rgba(245, 247, 249, 0.62);
}

.verdict-grid strong {
  font-weight: 800;
  color: var(--white);
}

.roadmap-grid {
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: auto auto;
}

.roadmap-cell {
  grid-row: span 2;
}

.timeline {
  display: grid;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.timeline-step {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  min-height: 92px;
  padding: 20px;
  background: var(--mid);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, transform 180ms ease;
}

.timeline-step span {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  color: rgba(245, 247, 249, 0.45);
  grid-row: span 2;
}

.timeline-step strong {
  font-size: 17px;
  line-height: 1.2;
}

.timeline-step em {
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(245, 247, 249, 0.58);
}

.timeline-step:hover,
.timeline-step:focus-visible,
.timeline-step.active-step {
  background: var(--red);
  transform: translateX(5px);
  outline: 1px solid var(--white);
  outline-offset: 2px;
}

.risk-list {
  display: grid;
  gap: 1px;
  background: rgba(245, 247, 249, 0.18);
  border: 1px solid rgba(245, 247, 249, 0.18);
}

.risk-list div {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 16px;
  padding: 18px;
  background: rgba(14, 14, 14, 0.24);
}

.risk-list strong,
.risk-list span {
  font-size: 14px;
  line-height: 1.45;
}

.risk-list span {
  color: rgba(245, 247, 249, 0.76);
}

.text-command {
  display: inline-block;
  margin: 2px 0 24px;
  padding: 14px 18px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.text-command:hover,
.text-command:focus-visible {
  background: var(--black);
  color: var(--white);
  transform: translateY(-2px);
  outline: 1px solid var(--white);
  outline-offset: 3px;
}

#flowStatus {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.28;
  color: rgba(245, 247, 249, 0.82);
}

.value-grid {
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: auto auto;
}

.value-story {
  grid-row: span 2;
}

.value-story p:not(.eyebrow),
.usage-detail p,
.proof-stack span {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.42;
}

.value-story p + p {
  margin-top: 24px;
}

.assumption-note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
  color: rgba(14, 14, 14, 0.54);
  font-size: 13px;
  line-height: 1.55;
  font-family: var(--sans);
  font-weight: 700;
}

.outcome-rows,
.proof-stack {
  display: grid;
  gap: 1px;
  background: rgba(245, 247, 249, 0.14);
  border: 1px solid rgba(245, 247, 249, 0.14);
}

.outcome-rows div,
.proof-stack div {
  padding: 20px;
  background: rgba(14, 14, 14, 0.24);
  display: grid;
  gap: 8px;
}

.outcome-rows strong,
.proof-stack strong {
  font-size: 14px;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--white);
}

.outcome-rows span {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(245, 247, 249, 0.72);
}

.usage-grid {
  grid-template-columns: 0.88fr 1.12fr;
  grid-template-rows: auto auto;
}

.usage-stack {
  display: grid;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.usage-step {
  min-height: 96px;
  padding: 20px;
  background: var(--mid);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: center;
  transition: background 180ms ease, transform 180ms ease;
}

.usage-step strong {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  color: rgba(245, 247, 249, 0.48);
}

.usage-step span {
  font-size: 15px;
  line-height: 1.42;
  color: rgba(245, 247, 249, 0.72);
}

.usage-step:hover,
.usage-step:focus-visible,
.usage-step.active-usage {
  background: var(--red);
  transform: translateX(5px);
  outline: 1px solid var(--white);
  outline-offset: 2px;
}

.usage-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.usage-detail h3 {
  margin-bottom: 20px;
}

.asset-list {
  margin: 0;
  padding-left: 20px;
}

.asset-list li {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.58;
  color: rgba(245, 247, 249, 0.76);
}

.trace-grid {
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: auto auto;
}

.trace-grid .table-cell {
  grid-row: span 2;
}

.trace-grid .white-cell th {
  color: rgba(14, 14, 14, 0.48);
}

.trace-grid .white-cell td {
  color: rgba(14, 14, 14, 0.74);
}

.proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-stack {
  background: var(--line-light);
  border-color: var(--line-light);
}

.proof-stack div {
  background: rgba(14, 14, 14, 0.05);
  grid-template-columns: 48px 1fr;
  align-items: start;
}

.proof-stack strong {
  color: var(--red);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.proof-stack span {
  color: rgba(14, 14, 14, 0.78);
  font-size: 20px;
}

.dashboard {
  padding-bottom: 86px;
}

.dashboard-controls {
  width: min(1380px, 100%);
  margin: 0 auto 1px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.segmented {
  display: flex;
  background: var(--black);
}

.segment {
  min-width: 150px;
  padding: 16px 18px;
  cursor: pointer;
  background: var(--mid);
  color: rgba(245, 247, 249, 0.6);
  border-right: 1px solid var(--line-dark);
  transition: background 180ms ease, color 180ms ease;
}

.segment:hover,
.segment:focus-visible,
.segment.active-segment {
  background: var(--white);
  color: var(--black);
  outline: 1px solid var(--red);
  outline-offset: -1px;
}

#scenarioCopy {
  margin: 0;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(245, 247, 249, 0.68);
  background: var(--black);
}

.decision-strip {
  width: min(1380px, 100%);
  margin: 0 auto 1px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border-left: 1px solid var(--line-dark);
  border-right: 1px solid var(--line-dark);
}

.decision-strip div {
  min-height: 132px;
  padding: 24px;
  background: var(--mid);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.decision-strip span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(245, 247, 249, 0.48);
}

.decision-strip strong {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.02;
  color: var(--white);
}

.decision-strip em {
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(245, 247, 249, 0.62);
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-cell {
  min-height: 438px;
}

.chart-cell canvas {
  display: block;
  width: 100%;
  height: 220px;
}

.chart-insight {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-dark);
  display: grid;
  gap: 8px;
}

.chart-insight strong {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(245, 247, 249, 0.58);
}

.chart-insight p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(245, 247, 249, 0.72);
}

.light-insight {
  border-top-color: var(--line-light);
}

.light-insight strong {
  color: rgba(14, 14, 14, 0.48);
}

.light-insight p {
  color: rgba(14, 14, 14, 0.72);
}

.final-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-controls {
  position: fixed;
  right: 84px;
  top: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: 42px auto 42px;
  align-items: center;
  gap: 1px;
  border: 1px solid var(--line-dark);
  background: var(--line-dark);
}

#pageIndicator {
  min-width: 84px;
  height: 42px;
  display: grid;
  place-items: center;
  color: rgba(245, 247, 249, 0.78);
  background: var(--black);
}

.page-footer {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--line-dark);
  color: rgba(245, 247, 249, 0.42);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.in-view,
.in-view .reveal {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 100ms;
}

.delay-2 {
  transition-delay: 190ms;
}

.delay-3 {
  transition-delay: 280ms;
}

@keyframes scan {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes pulseMove {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  50% {
    transform: translate(120px, -70px) scale(1.25);
    opacity: 0.45;
  }
  100% {
    transform: translate(240px, 90px) scale(0.6);
    opacity: 0;
  }
}

@keyframes flow {
  to {
    stroke-dashoffset: -24;
  }
}

@media (max-width: 1080px) {
  .site-shell {
    grid-template-columns: 1fr auto;
  }

  .chapter-nav {
    display: none;
  }

  .cover-grid,
  .diagnosis-grid,
  .state-grid,
  .arch-grid,
  .roadmap-grid,
  .value-grid,
  .usage-grid,
  .trace-grid,
  .proof-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero-cell,
  .narrative-cell,
  .table-cell,
  .arch-stage,
  .roadmap-cell,
  .value-story,
  .trace-grid .table-cell {
    grid-row: auto;
  }

  h1 {
    font-size: 54px;
  }

  h2 {
    font-size: 42px;
  }

  .architecture {
    min-height: 660px;
  }

  .dashboard-controls {
    grid-template-columns: 1fr;
  }

  .decision-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  html {
    scroll-snap-type: none;
  }

  .site-shell {
    padding: 14px 16px;
  }

  .wordmark {
    font-size: 20px;
  }

  .chapter {
    min-height: auto;
    padding: 92px 16px 72px;
  }

  .cell {
    padding: 24px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 28px;
  }

  .hero-copy,
  .narrative-cell p,
  .thesis-cell p,
  .arch-detail p,
  .gate-cell p,
  .kill-cell p,
  .balance-cell p,
  .scope-cell li {
    font-size: 20px;
  }

  .hero-meta,
  .mini-metrics,
  .stat-row,
  .heatmap {
    grid-template-columns: 1fr;
  }

  .stat-row {
    display: grid;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bar-row b {
    text-align: left;
  }

  .architecture {
    min-height: 850px;
  }

  .node {
    left: 50%;
    right: auto;
    width: 78%;
    transform: translateX(-50%);
  }

  .node:hover,
  .node:focus-visible,
  .node.active-node {
    transform: translateX(-50%) translateY(-5px);
  }

  .node-shopify {
    top: 5%;
  }

  .node-layer {
    top: 25%;
  }

  .node-intacct {
    top: 45%;
  }

  .node-anydb {
    top: 65%;
    bottom: auto;
  }

  .node-dtc {
    top: 82%;
    bottom: auto;
  }

  .arch-lines {
    opacity: 0.25;
  }

  .timeline-step,
  .risk-list div,
  .usage-step,
  .proof-stack div {
    grid-template-columns: 1fr;
  }

  .page-controls {
    display: none;
  }

  .page-footer {
    left: 16px;
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms;
    animation-iteration-count: 1;
    scroll-behavior: auto;
    transition-duration: 1ms;
  }
}

@media print {
  html {
    scroll-snap-type: none;
  }

  body {
    background: var(--white);
  }

  .site-shell,
  .page-controls,
  .motion-field,
  .dashboard-controls {
    display: none;
  }

  .chapter {
    min-height: 100vh;
    padding: 36px 28px 54px;
    page-break-after: always;
    break-after: page;
  }

  .chapter-grid {
    width: 100%;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .page-footer {
    color: rgba(14, 14, 14, 0.48);
    border-top-color: rgba(14, 14, 14, 0.16);
  }
}
