/* ===== Design tokens ===== */
:root {
  --bg: #12161C;
  --bg-2: #161b22;
  --text: #EDE9E0;
  --text-dim: rgba(237, 233, 224, 0.72);
  --text-faint: rgba(237, 233, 224, 0.5);
  --accent: #E3A008;
  --accent-dim: rgba(227, 160, 8, 0.35);
  --rule: rgba(237, 233, 224, 0.14);
  --rule-strong: rgba(237, 233, 224, 0.28);
  --font-display: "IBM Plex Serif", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 0.8, 0.3, 1);
  --edge: clamp(1.5rem, 6vw, 6rem);
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, blockquote, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, textarea { font-family: inherit; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem var(--edge);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), backdrop-filter 0.5s;
}
.site-header.is-scrolled {
  padding: 0.9rem var(--edge);
  background: rgba(18, 22, 28, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wordmark {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}
.site-nav a:hover { color: var(--accent); }
.site-header .header-cta {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}
.site-header .header-cta:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Shared section rhythm ===== */
section {
  position: relative;
  padding: clamp(5rem, 11vw, 8.5rem) var(--edge);
}
.section-inner { max-width: 1240px; margin: 0 auto; }
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4rem); max-width: 760px; }
.section-head h2, .why-content h2, .about h2, .contact h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  line-height: 1.12;
}
.lede { color: var(--text-dim); font-size: clamp(1rem, 1.4vw, 1.12rem); max-width: 640px; margin-top: 1.1rem; }
.fine { color: var(--text-faint); font-size: 0.85rem; margin-top: 1rem; max-width: 560px; }
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.eyebrow .num { font-family: var(--font-display); letter-spacing: 0.06em; color: var(--text-faint); }
.mini-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.text-link { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; transition: color 0.3s, border-color 0.3s; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }
.text-link.big { font-family: var(--font-display); font-size: 1.15rem; display: inline-block; margin-top: 1.5rem; }

/* 3D depth reveal: elements rise out of the page plane */
.reveal {
  opacity: 0;
  transform: perspective(1200px) translate3d(0, 26px, -70px) rotateX(7deg);
  transform-origin: 50% 100%;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: perspective(1200px) translate3d(0, 0, 0) rotateX(0deg); }

/* pointer tilt */
.tilt { transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease); will-change: transform; }
.tilt.is-tilting { transition: transform 0.12s linear; }
.reveal.tilt.is-visible.is-tilting { /* pointer transform wins over the reveal end state */ }

/* ===== Hero ===== */
.hero { position: relative; height: 420vh; padding: 0; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 0.9s var(--ease); will-change: transform; }
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18,22,28,0.18) 0%, rgba(18,22,28,0.5) 62%, rgba(18,22,28,0.9) 100%);
}
#hero-webgl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-content {
  --px: 0px; --py: 0px; --rise: 0px;
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.4rem;
  max-width: 820px; padding: 0 1.5rem;
  transform: translate3d(var(--px), calc(var(--py) + var(--rise)), 0);
  transition: transform 0.7s var(--ease);
  text-shadow: 0 2px 24px rgba(18,22,28,0.6);
}
.hero-mark {
  font-family: var(--font-display); font-size: clamp(0.7rem, 1.5vw, 0.9rem); letter-spacing: 0.5em; color: var(--text-dim);
  opacity: 0; animation: track-in 1.6s 0.2s var(--ease) forwards;
}
.hero-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent);
  opacity: 0; transform: translateY(12px); animation: rise-in 1s 0.8s var(--ease) forwards;
}
.hero-headline {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(2.3rem, 5.6vw, 4.4rem); line-height: 1.08;
  opacity: 0; transform: translateY(18px); animation: rise-in 1.1s 1s var(--ease) forwards;
}
.hero-subline {
  font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--text-dim); max-width: 600px;
  opacity: 0; transform: translateY(14px); animation: rise-in 1.1s 1.25s var(--ease) forwards;
}
.hero-actions {
  display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; justify-content: center; margin-top: 0.4rem;
  opacity: 0; transform: translateY(12px); animation: rise-in 1.1s 1.5s var(--ease) forwards;
}
.cta {
  display: inline-block; padding: 0.9rem 2rem;
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  text-decoration: none; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.cta:hover { background: var(--accent); color: var(--bg); transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(227,160,8,0.6); }
.cta-ghost { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--text-dim); border-bottom: 1px solid var(--rule-strong); padding-bottom: 3px; transition: color 0.3s; }
.cta-ghost:hover { color: var(--text); }

.scroll-cue {
  position: absolute; bottom: 2.4rem; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint);
  opacity: 0; animation: fade-in 1s 2.1s var(--ease) forwards;
}
.scroll-cue.is-hidden { opacity: 0 !important; transition: opacity 0.4s var(--ease); }
.scroll-cue span { width: 1px; height: 32px; background: var(--rule-strong); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; top: -100%; left: 0; right: 0; height: 100%; background: var(--accent); animation: cue-drop 1.8s ease-in-out infinite; }

@keyframes track-in { from { opacity: 0; letter-spacing: 1.1em; } to { opacity: 1; letter-spacing: 0.5em; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cue-drop { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }

/* ===== Stats ===== */
.stats { padding-top: clamp(4rem, 8vw, 6rem); padding-bottom: clamp(4rem, 8vw, 6rem); }
.stats .section-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; perspective: 1200px; }
.stat { text-align: center; padding: 1.5rem 1rem; border-left: 1px solid var(--rule); }
.stat:first-child { border-left: 0; }
.stat-number {
  font-family: var(--font-display); font-size: clamp(2.4rem, 4.6vw, 3.6rem); color: var(--accent); font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(227,160,8,0.45), 0 2px 0 rgba(227,160,8,0.32), 0 3px 0 rgba(227,160,8,0.2), 0 4px 0 rgba(227,160,8,0.1), 0 12px 30px rgba(227,160,8,0.18);
}
.stat-label { margin-top: 0.7rem; font-size: 0.88rem; color: var(--text-dim); max-width: 220px; margin-left: auto; margin-right: auto; }

/* ===== Video-background sections ===== */
.media-section { min-height: 92vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,22,28,0.72) 0%, rgba(18,22,28,0.5) 45%, rgba(18,22,28,0.85) 100%); }
.section-webgl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.bg-plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; transform: scale(1.1); will-change: transform; }
.why { min-height: 100vh; align-items: flex-end; padding-bottom: clamp(5rem, 12vh, 9rem); }
/* dark where the copy sits (left), open over the dashboard (right) so its labels stay readable */
.why .media-scrim {
  background:
    linear-gradient(90deg, rgba(18,22,28,0.94) 0%, rgba(18,22,28,0.72) 38%, rgba(18,22,28,0.22) 70%, rgba(18,22,28,0.12) 100%),
    linear-gradient(180deg, rgba(18,22,28,0.55) 0%, transparent 22%, transparent 72%, rgba(18,22,28,0.85) 100%);
}
@media (max-width: 780px) {
  /* copy spans the full width on phones: keep the dashboard clear on top, darken under the text */
  .why .media-scrim { background: linear-gradient(180deg, rgba(18,22,28,0.45) 0%, rgba(18,22,28,0.3) 30%, rgba(18,22,28,0.9) 52%, rgba(18,22,28,0.97) 100%); }
}
.why-content { position: relative; z-index: 2; max-width: 760px; margin-right: auto; text-shadow: 0 2px 20px rgba(18,22,28,0.7); }
.why-content p { margin-top: 1.4rem; color: var(--text-dim); font-size: clamp(1rem, 1.4vw, 1.12rem); }

/* ===== Services ===== */
.service-row {
  display: grid; grid-template-columns: 3.5rem minmax(0, 16rem) minmax(0, 1fr); gap: 2rem; align-items: baseline;
  padding: 2.1rem 1rem; margin: 0 -1rem; border-top: 1px solid var(--rule);
  transition-property: transform, opacity, background;
}
.service-list .service-row:last-child { border-bottom: 1px solid var(--rule); }
.service-row.is-tilting { background: linear-gradient(90deg, rgba(237,233,224,0.035), transparent 70%); }
.service-index { font-family: var(--font-display); color: var(--accent); font-size: 0.9rem; }
.service-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 1.9vw, 1.45rem); }
.service-desc { color: var(--text-dim); font-size: 1rem; max-width: 640px; }

/* ===== Selected work ===== */
.work { padding-top: clamp(5rem, 11vw, 8.5rem); }
.work-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 3rem; align-items: center; max-width: none; }
.screen {
  position: relative; border: 1px solid var(--rule); background: var(--bg-2); padding: 0.5rem;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(237,233,224,0.03);
  transform: perspective(1000px) rotateY(-10deg) rotateX(3deg);
}
.screen video { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.screen::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -28px; height: 28px; background: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 70%); filter: blur(6px); }

.ribbon { position: relative; margin: 1rem 0; padding: 0; overflow: hidden; perspective: 900px; }
.ribbon-label { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; z-index: 2; font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 82%, transparent); padding: 0 3rem 0 var(--edge); }
.ribbon-stage { transform-style: preserve-3d; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ribbon-a .ribbon-stage { transform: rotateX(16deg); }
.ribbon-b .ribbon-stage { transform: rotateX(-14deg); }
.ribbon-track { display: flex; gap: 0; width: max-content; animation: ribbon 70s linear infinite; }
.ribbon-b .ribbon-track { animation-direction: reverse; animation-duration: 58s; }
.ribbon-track span { padding: 1rem 1.6rem; font-size: 0.85rem; letter-spacing: 0.05em; color: var(--text-dim); white-space: nowrap; border-left: 1px solid var(--rule); }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes ribbon { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.build { padding: clamp(3rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule); }
.build:first-of-type { margin-top: clamp(2rem, 5vw, 3.5rem); }
.build-head { display: flex; gap: 1.2rem; align-items: baseline; margin-bottom: 1rem; }
.build-tag { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.build-kicker { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); }
.build h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.15; }
.agent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.2rem; perspective: 1200px; }
.agent { position: relative; padding: 1.6rem 1.5rem 1.6rem; border: 1px solid var(--rule); background: linear-gradient(160deg, rgba(237,233,224,0.03), transparent 60%); }
.agent.is-tilting { border-color: var(--rule-strong); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8); }
.agent-num { font-family: var(--font-display); color: var(--accent); font-size: 0.85rem; display: block; margin-bottom: 0.8rem; }
.agent h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; margin-bottom: 0.6rem; }
.agent p { color: var(--text-dim); font-size: 0.95rem; }
.build-block { margin-top: 2.6rem; }
.build-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.flow { display: flex; align-items: stretch; gap: 1rem; flex-wrap: wrap; perspective: 1000px; }
.flow-step { flex: 1 1 180px; display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.2rem; border: 1px solid var(--rule); font-size: 0.95rem; }
.flow-step .role { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.flow-arrow { align-self: center; color: var(--accent); font-size: 1.2rem; }
.qbars li { display: grid; grid-template-columns: 6.5rem 1fr auto; align-items: center; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); font-size: 0.9rem; }
.qbars li:last-child { border-bottom: 1px solid var(--rule); }
.qbars i { display: block; height: 4px; background: var(--rule); position: relative; }
.qbars i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--accent); box-shadow: 0 0 12px rgba(227,160,8,0.5); }
.qbars i.later::after { background: var(--accent-dim); box-shadow: none; }
.qbars em { font-style: normal; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--text-faint); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips li { padding: 0.5rem 0.9rem; border: 1px solid var(--rule-strong); font-size: 0.82rem; letter-spacing: 0.04em; transition: transform 0.4s var(--ease), border-color 0.4s; }
.chips li:hover { transform: translateY(-3px); border-color: var(--accent); }
.lab { margin-top: 2.2rem; padding: 1.3rem 1.5rem; border-left: 2px solid var(--accent); color: var(--text-dim); font-size: 0.95rem; max-width: 760px; }
.lab .mini-label { display: inline; margin: 0 0.6rem 0 0; }

/* Fabric diagram: stages step forward in Z */
.fabric { perspective: 1400px; margin-top: 0.5rem; }
.fabric-stage { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4rem; transform-style: preserve-3d; transform: rotateY(-7deg) rotateX(4deg); transition: transform 0.9s var(--ease); }
.fabric:hover .fabric-stage { transform: rotateY(-2deg) rotateX(1deg); }
.fnode, .fnode-stack { transform: translateZ(calc(var(--z, 0) * 26px)); transform-style: preserve-3d; position: relative; }
.fnode { display: flex; flex-direction: column; justify-content: center; padding: 1.1rem 1.2rem; border: 1px solid var(--rule-strong); background: rgba(22, 27, 34, 0.92); box-shadow: 0 24px 40px -24px rgba(0,0,0,0.9); }
.fnode b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1rem; margin-bottom: 0.3rem; }
.fnode span { font-size: 0.8rem; color: var(--text-dim); }
.fnode-stack { display: grid; gap: 0.8rem; }
.fnode-stack .fnode { transform: none; }
.fabric-stage > .fnode::after { content: "→"; position: absolute; right: -0.7rem; top: 50%; transform: translate(50%, -50%); color: var(--accent); font-size: 1.25rem; line-height: 1; text-shadow: 0 0 10px rgba(227,160,8,0.6); }
.governed { text-align: center; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.68rem; margin: 1.6rem auto 0; max-width: none; }

/* ===== Books: 3D shelf ===== */
.shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2.2rem; margin-top: 1rem; perspective: 1600px; }
.book-slot { text-align: left; }
.book-float { animation: float 7s ease-in-out infinite; }
.book-slot:nth-child(2) .book-float { animation-delay: -1.5s; }
.book-slot:nth-child(3) .book-float { animation-delay: -3s; }
.book-slot:nth-child(4) .book-float { animation-delay: -4.5s; }
.book-slot:nth-child(5) .book-float { animation-delay: -6s; }
/* six-sided hardcover: front, back, spine, page edge, top, bottom — thickness set per book by depth.js */
.book {
  --thick: 24px; --angle: 30deg;
  position: relative; aspect-ratio: 8.5 / 11; width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(4deg) rotateY(var(--angle));
  outline: none; cursor: grab;
}
.face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face-front { transform: translateZ(calc(var(--thick) / 2)); border-radius: 2px 6px 6px 2px; box-shadow: 0 40px 60px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(237,233,224,0.08); }
.face-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,0.12) 0%, transparent 28%, transparent 72%, rgba(0,0,0,0.22)); pointer-events: none; }
.face-back { transform: rotateY(180deg) translateZ(calc(var(--thick) / 2)); border-radius: 6px 2px 2px 6px; box-shadow: 0 0 0 1px rgba(237,233,224,0.08); }
.face-back::after { content: ""; position: absolute; inset: 0; background: linear-gradient(260deg, rgba(255,255,255,0.1) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.25)); pointer-events: none; }
.face-spine { width: var(--thick); right: auto; transform: translateX(calc(var(--thick) / -2)) rotateY(-90deg); box-shadow: inset 0 0 0 1px rgba(237,233,224,0.06); }
.face-pages {
  width: var(--thick); left: auto; transform: translateX(calc(var(--thick) / 2)) rotateY(90deg);
  background: repeating-linear-gradient(90deg, #e6e1d6 0, #e6e1d6 1px, #cfc9bd 1px, #cfc9bd 2px);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.35);
}
.face-top { height: var(--thick); bottom: auto; transform: translateY(calc(var(--thick) / -2)) rotateX(90deg); background: repeating-linear-gradient(0deg, #ebe6db 0, #ebe6db 1px, #d3cdc1 1px, #d3cdc1 2px); }
.face-bottom { height: var(--thick); top: auto; transform: translateY(calc(var(--thick) / 2)) rotateX(-90deg); background: repeating-linear-gradient(0deg, #d8d2c6 0, #d8d2c6 1px, #bfb9ad 1px, #bfb9ad 2px); }
.shelf-hint { margin-top: 1.8rem; }
.book-slot h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; line-height: 1.3; margin-top: 1.6rem; }
.book-slot p { color: var(--text-dim); font-size: 0.86rem; margin-top: 0.3rem; }
.book-meta { display: block; margin-top: 0.6rem; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--text-faint); }
.book-slot > a { display: inline-block; margin-top: 0.9rem; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.on-request { margin-top: clamp(3rem, 7vw, 5rem); padding-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); max-width: 680px; }
.on-request h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.2; }
.on-request p { color: var(--text-dim); margin: 1rem 0 1.8rem; }

/* ===== Approach: a staircase of agent tiers ===== */
.stairs { margin-top: 0.5rem; }
.tier {
  position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 1.5rem; align-items: start;
  margin-left: calc(var(--i) * 4.5%); margin-bottom: 14px; padding: 1.6rem 1.6rem 1.7rem;
  border-top: 1px solid var(--rule-strong);
  background: linear-gradient(90deg, rgba(237,233,224,0.05), rgba(237,233,224,0.015) 60%, rgba(237,233,224,0.005));
  transform-origin: 50% 0;
  transform: perspective(1200px) rotateX(6deg);
  box-shadow: 0 30px 50px -36px rgba(0,0,0,0.9);
  transition: transform 0.6s var(--ease), background 0.6s var(--ease);
}
/* the riser: a foreshortened amber edge under each tread */
.tier::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
  background: linear-gradient(180deg, rgba(227,160,8,0.5), rgba(227,160,8,0.06));
  clip-path: polygon(0 0, 100% 0, 99.2% 100%, 0.8% 100%);
  pointer-events: none;
}
.tier:hover { transform: perspective(1200px) rotateX(2deg) translateY(-4px); background: linear-gradient(90deg, rgba(237,233,224,0.08), rgba(237,233,224,0.025) 60%, rgba(237,233,224,0.01)); }
.tier-num { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); line-height: 1; }
.tier h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; }
.tier p { color: var(--text-dim); font-size: 0.95rem; margin-top: 0.3rem; }
.tier .you-get { color: var(--text); font-size: 0.9rem; margin-top: 0.6rem; }
.tier .you-get b { font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.68rem; color: var(--accent); margin-right: 0.4rem; }
.tier > a { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); text-decoration: none; white-space: nowrap; margin-top: 0.4rem; }
.callouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: clamp(3rem, 6vw, 4.5rem); perspective: 1200px; }
.callout { padding: 1.6rem 1.5rem; border: 1px solid var(--rule); }
.callout h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; line-height: 1.3; }
.callout p { color: var(--text-dim); font-size: 0.93rem; margin-top: 0.7rem; }

/* ===== Toolkit ===== */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); perspective: 1200px; }
.stack-col { padding: 2rem 1.6rem; border-left: 1px solid var(--rule); }
.stack-col:first-child { border-left: 0; }
.stack-col li { font-size: 0.92rem; color: var(--text-dim); padding: 0.35rem 0; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.role-line { color: var(--accent); font-size: 0.85rem; letter-spacing: 0.08em; margin: 0.8rem 0 1.4rem; }
.about-main p + p { margin-top: 1rem; color: var(--text-dim); }
.about-main > p:not(.role-line) { color: var(--text-dim); }
.about-main .text-link { display: inline-block; margin-top: 1.6rem; }
.about-side { display: grid; gap: 1.2rem; perspective: 1200px; }
.about-card { padding: 1.4rem 1.5rem; border: 1px solid var(--rule); }
.about-card li { font-size: 0.9rem; color: var(--text-dim); padding: 0.3rem 0; border-top: 1px solid var(--rule); }
.about-card li:first-child { border-top: 0; }

/* ===== Testimonial ===== */
.testimonial-content { position: relative; z-index: 2; text-align: center; max-width: 780px; margin: 0 auto; padding: 2.5rem; }
.testimonial-content .stars { color: var(--accent); letter-spacing: 0.35em; font-size: 1rem; margin-bottom: 1.75rem; }
.testimonial-content blockquote { font-family: var(--font-display); font-size: clamp(1.3rem, 2.5vw, 1.85rem); line-height: 1.5; font-weight: 400; text-shadow: 0 2px 20px rgba(18,22,28,0.7); }
.testimonial-content cite { display: block; margin-top: 1.75rem; font-style: normal; font-size: 0.85rem; letter-spacing: 0.06em; color: var(--text-dim); }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.enquiry { display: grid; gap: 1.4rem; padding: 2rem; border: 1px solid var(--rule); background: linear-gradient(160deg, rgba(237,233,224,0.03), transparent 60%); }
.enquiry label { display: grid; gap: 0.45rem; }
.enquiry label span { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); }
.enquiry input, .enquiry textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong);
  color: var(--text); font-size: 1rem; padding: 0.5rem 0; outline: none; resize: vertical;
  transition: border-color 0.3s;
}
.enquiry input:focus, .enquiry textarea:focus { border-color: var(--accent); }
/* keep browser autofill on the dark form instead of light-blue bars */
.enquiry input:-webkit-autofill,
.enquiry input:-webkit-autofill:hover,
.enquiry input:-webkit-autofill:focus,
.enquiry textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #15191f inset;
  box-shadow: 0 0 0 1000px #15191f inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}
.enquiry .cta { justify-self: start; }
.enquiry .cta:disabled { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.enquiry input.is-invalid, .enquiry textarea.is-invalid { border-color: #e0836b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.signup-note { min-height: 1.4em; font-size: 0.85rem; color: var(--accent); }
.signup-note.is-error { color: #e0836b; }
.signup-note a { color: inherit; text-decoration: underline; }

/* ===== Video pause/play toggle ===== */
.vid-toggle {
  position: absolute; right: 0.9rem; bottom: 0.9rem; z-index: 5;
  padding: 0.35rem 0.75rem;
  background: rgba(18, 22, 28, 0.62); color: var(--text-dim);
  border: 1px solid var(--rule-strong);
  font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.vid-toggle:hover, .vid-toggle:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.media-section .vid-toggle { right: var(--edge); bottom: 1.6rem; }

/* ===== Footer ===== */
.site-footer { padding: clamp(4rem, 8vw, 6rem) var(--edge) 2.5rem; border-top: 1px solid var(--rule); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 3rem; }
.footer-wordmark { font-family: var(--font-display); letter-spacing: 0.24em; font-size: 0.8rem; margin-bottom: 1rem; }
.footer-brand p { color: var(--text-dim); font-size: 0.92rem; max-width: 320px; margin-bottom: 1rem; }
.footer-brand a { font-size: 0.9rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.footer-col { display: grid; align-content: start; gap: 0.55rem; }
.footer-col a { font-size: 0.9rem; color: var(--text-dim); text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent); }
.footer-col a b { display: block; font-weight: 500; color: var(--text); }
.footer-col a small { display: block; font-size: 0.8rem; color: var(--text-faint); margin: 0.2rem 0 0.4rem; line-height: 1.5; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.footer-bottom a { font-size: 0.85rem; color: var(--text-dim); text-decoration: none; }
.footer-copyright, .footer-tag { font-size: 0.78rem; color: var(--text-faint); }
.footer-tag { letter-spacing: 0.2em; text-transform: uppercase; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .shelf { grid-template-columns: repeat(3, 1fr); row-gap: 3rem; }
  .fabric-stage { grid-template-columns: repeat(3, 1fr); transform: none; }
  .fabric-stage > .fnode::after { display: none; }
  .fnode, .fnode-stack { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
  .work-head { grid-template-columns: 1fr; }
  .screen { max-width: 420px; }
  .agent-grid, .callouts { grid-template-columns: 1fr; }
  .build-cols { grid-template-columns: 1fr; gap: 2rem; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .stack-col:nth-child(3) { border-left: 0; }
  .stack-col:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats .section-inner { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 780px) {
  .hero { height: 340vh; }
  .service-row { grid-template-columns: 2.5rem 1fr; }
  .service-name { grid-column: 2; }
  .service-desc { grid-column: 1 / -1; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .fabric-stage { grid-template-columns: 1fr; gap: 0.8rem; }
  .fnode { min-height: 0; }
  .tier { grid-template-columns: 2.4rem 1fr; margin-left: calc(var(--i) * 2%); }
  .tier > a { grid-column: 2; }
  .stairs.is-visible { transform: none; }
  .tier, .tier:hover { transform: none; }
  .stack-grid { grid-template-columns: 1fr; }
  .stack-col { border-left: 0; border-top: 1px solid var(--rule); }
  .stack-col:first-child { border-top: 0; }
  .stats .section-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .stat { border-left: 0; border-top: 1px solid var(--rule); }
  .stat:first-child { border-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .ribbon-a .ribbon-stage, .ribbon-b .ribbon-stage { transform: none; }
  .ribbon-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark, .hero-eyebrow, .hero-headline, .hero-subline, .hero-actions, .scroll-cue, .book-float, .ribbon-track {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
  .tilt { transition: none !important; }
}
