/* Lock Labs flagship concept — Draft 2
   System: black stage · white clarity · red action (#E02B20/#B21F16) · Titanium Steel structure (#6E7781)
   Type: Archivo display · Inter body · JetBrains Mono readouts. Motion: machine precision.
   Draft 2: unified hero composition · light Engine register · portfolio proof cards · steel as structure. */

:root {
  --red: #E02B20;
  --red-deep: #B21F16;
  --steel: #6E7781;
  --steel-hi: #9AA3AC;
  --steel-lo: #3D444C;
  --steel-ink: #4E565E;
  --black: #000000;
  --black-2: #0C0C0C;
  --white: #FFFFFF;
  --dim: #B7BEC6;
  --paper: #F2F4F6;
  --ink: #0C0C0C;
  --ink-2: #3E454C;
  --line: rgba(110, 119, 129, 0.28);
  --line-light: rgba(110, 119, 129, 0.38);
  --font-d: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-t: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-m: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.page {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-t);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
[id] { scroll-margin-top: 96px; }
::selection { background: var(--red); color: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--steel-hi);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-size: 0.9rem; color: var(--dim); transition: color 180ms var(--ease); }
.nav a:hover { color: var(--white); }
.util-link {
  font-size: 0.82rem;
  color: var(--steel-hi);
  padding-left: 20px;
  border-left: 1px solid var(--line);
  transition: color 180ms var(--ease);
  white-space: nowrap;
}
.util-link:hover { color: var(--white); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-t);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 7px;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease),
    color 180ms var(--ease), transform 180ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-ghost { border: 1px solid var(--steel); color: var(--white); }
.btn-ghost:hover { border-color: var(--steel-hi); }
.btn-steel { background: var(--steel); color: var(--white); }
.btn-steel:hover { background: #5E6771; }
.hdr-util { padding: 8px 14px; font-size: 0.82rem; margin-left: 6px; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.hdr-cta { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- type helpers ---------- */
.kicker {
  font-family: var(--font-m);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-hi);
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--steel);
  margin-right: 12px;
  vertical-align: 1px;
}
/* hero kicker boot sequence — transient system-status green, NOT a palette color */
.hero .kicker {
  transition: color 500ms var(--ease), text-shadow 500ms var(--ease), transform 60ms var(--ease);
}
.hero .kicker::before { transition: background-color 500ms var(--ease); }
.hero .kicker.k-impulse { transform: translateX(2px); }
.hero .kicker.k-green {
  color: #63E68B;
  text-shadow: 0 0 14px rgba(99, 230, 139, 0.4);
  transition: color 120ms var(--ease), text-shadow 120ms var(--ease);
}
.hero .kicker.k-green::before { background: #63E68B; transition: background-color 120ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .hero .kicker, .hero .kicker::before { transition: none !important; transform: none !important; }
}
h1, h2 { font-family: var(--font-d); font-weight: 800; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); line-height: 1.06; margin: 18px 0 20px; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.12; margin: 14px 0 12px; }
.sub { color: var(--dim); max-width: 56ch; }

/* ---------- hero: one composition, copy + globe interlocked ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: clip;
  background:
    radial-gradient(1000px 640px at 70% 46%, rgba(110, 119, 129, 0.11), transparent 62%),
    var(--black);
}
.hero-in {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 92px 24px;
  width: 100%;
}
.hero-copy { max-width: 600px; }
.lede { color: var(--dim); font-size: 1.06rem; max-width: 50ch; }
.cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.caps2 {
  margin-top: 34px;
  font-family: var(--font-m);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--steel-hi);
}
.hero-globe { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-globe canvas {
  position: absolute;
  top: 50%;
  right: -6vw;
  transform: translateY(-50%);
  width: min(57vw, 940px);
  aspect-ratio: 1;
  height: auto;
  pointer-events: auto;
  cursor: grab;
  touch-action: pan-y;
}
.hero-globe canvas.dragging { cursor: grabbing; }
.globe-scrim { display: none; }

/* ---------- traced section rules (Titanium measurement lines) ---------- */
.engine, .portfolio, .moat, .partner { position: relative; }
.engine::before, .portfolio::before, .moat::before, .partner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform-origin: 0 50%;
}
.engine::before { height: 2px; background: var(--steel); }
.portfolio::before { height: 2px; background: var(--steel-lo); }
.moat::before { height: 1px; background: var(--line); }
.partner::before { height: 1px; background: rgba(224, 43, 32, 0.5); }

/* ---------- engine — the LIGHT technical register ---------- */
.engine {
  background: var(--paper);
  color: var(--ink);
  padding: 96px 0;
}
.engine .kicker { color: var(--steel-ink); }
.engine .kicker::before { background: var(--steel-ink); }
.engine .sub { color: var(--ink-2); }
.caps8 { list-style: none; margin-top: 40px; border-bottom: 1px solid var(--line-light); }
.cap-h { margin: 0; }
.cap-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 22px;
  padding: 22px 10px;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 200ms var(--ease);
}
.cap-btn:hover { background: #FFFFFF; }
.cap-btn:focus-visible { outline: 2px solid var(--steel-ink); outline-offset: -2px; border-radius: 4px; }
.pn {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--steel);
  letter-spacing: -0.02em;
}
.cap-t { font-family: var(--font-d); font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.cap-m {
  font-family: var(--font-m);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-ink);
  white-space: nowrap;
}
.cap-x { position: relative; width: 12px; height: 12px; justify-self: end; }
.cap-x::before, .cap-x::after {
  content: "";
  position: absolute;
  background: var(--steel-ink);
  transition: transform 250ms var(--ease);
}
.cap-x::before { left: 0; right: 0; top: 5px; height: 2px; }
.cap-x::after { top: 0; bottom: 0; left: 5px; width: 2px; }
.cap.open .cap-x::after { transform: scaleY(0); }
.cap.p-red .pn { color: var(--red); }
.cap-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms var(--ease);
}
.cap.open .cap-panel { grid-template-rows: 1fr; }
.cap-inner { overflow: hidden; min-height: 0; padding: 0 10px 0 128px; }
.cap.open .cap-inner { padding-bottom: 28px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.pill {
  font-family: var(--font-m);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-ink);
  border: 1px solid var(--line-light);
  background: #FFFFFF;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.pill:hover:not(.on) { border-color: var(--steel); }
.pill.on { background: var(--steel); border-color: var(--steel); color: #FFFFFF; }
.pill:focus-visible { outline: 2px solid var(--steel-ink); outline-offset: 2px; }
.pend-tag {
  display: inline-block;
  font-family: var(--font-m);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--steel-ink);
  border: 1px dashed var(--steel);
  border-radius: 5px;
  padding: 5px 10px;
  margin-bottom: 14px;
}
.pill-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; max-width: 880px; }
.pill-dl dt {
  font-family: var(--font-m);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-ink);
  margin-bottom: 5px;
}
.pill-dl dd { color: #2E353B; font-size: 0.93rem; }
.pill-dl dd.pend { color: var(--steel); opacity: 0.8; }

/* ---------- portfolio — proof cards (dark) ---------- */
.portfolio { background: var(--black); padding: 96px 0; }
.cardsP {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.pcard {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #07080A;
  transition: border-color 220ms var(--ease), transform 220ms var(--ease);
}
a.pcard:hover { border-color: var(--steel-hi); transform: translateY(-3px); }
.pchrome {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.pchrome i { width: 7px; height: 7px; border-radius: 50%; background: var(--steel-lo); }
.pchrome span {
  font-family: var(--font-m);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--steel);
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pshot { display: block; position: relative; aspect-ratio: 16 / 10.4; overflow: hidden; }
.pshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 600ms var(--ease);
}
a.pcard:hover .pshot img { transform: translateY(-3.5%) scale(1.02); }
.pshot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.82) 100%);
}
.pmeta { position: absolute; left: 16px; right: 16px; bottom: 13px; z-index: 2; }
.ptag {
  font-family: var(--font-m);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel-hi);
  display: block;
}
.pname { font-family: var(--font-d); font-weight: 700; font-size: 1.3rem; color: var(--white); }
/* engagement-role chips — render only when data-roles is populated with VERIFIED roles */
.proles { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.proles:empty { display: none; }
.proles i {
  font-style: normal;
  font-family: var(--font-m);
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--dim);
  border: 1px solid rgba(154, 163, 172, 0.45);
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 7px;
  border-radius: 999px;
}
.pcard::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 7px;
  height: 7px;
  background: transparent;
  z-index: 3;
  transition: background-color 220ms var(--ease);
}
a.pcard:hover::before { background: var(--red); }
.pcard.no-site .pbody {
  aspect-ratio: 16 / 12.1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(110, 119, 129, 0.14), rgba(110, 119, 129, 0.03)),
    #0A0B0D;
}
.pcard.no-site .ptag { color: var(--steel); }
.pconf, .pnote {
  display: block;
  font-family: var(--font-m);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-hi);
  margin-top: 5px;
  opacity: 0.85;
}
.ev-viz {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-family: var(--font-m);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(214, 222, 230, 0.85);
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 8px;
  border-radius: 4px;
}
.ev-media.has-img { position: relative; }
.ev-feature .ev-body .quiet-link { margin-top: 10px; }
.conf-note {
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--dim);
  border-left: 2px solid var(--steel);
  padding-left: 14px;
  max-width: 64ch;
}

/* ---------- moat (dark) — evidence grid with reserved media slots ---------- */
.moat { background: var(--black-2); padding: 92px 0; }
.ev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 16px;
  margin-top: 40px;
}
.ev {
  border: 1px solid var(--line);
  border-top: 2px solid var(--steel);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ev-feature { grid-column: span 2; grid-row: span 2; }
.ev-feature.is-red { border-top-color: var(--red); }
.ev-wide { grid-column: 1 / -1; }
.ev-wide .ev-body { display: flex; align-items: baseline; gap: 18px; padding: 16px 20px; }
.ev-wide .ev-body strong { margin-bottom: 0; white-space: nowrap; }
.ev-media.has-img { padding: 0; border-style: solid; border-color: var(--line); background: none; }
.ev-media.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-body { padding: 18px 20px 20px; }
.ev-body strong { font-family: var(--font-d); font-weight: 700; display: block; margin-bottom: 6px; }
.ev-body p { color: var(--dim); font-size: 0.9rem; }
.ev-media {
  position: relative;
  flex: 1;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(110, 119, 129, 0.09) 0 10px, transparent 10px 20px),
    linear-gradient(160deg, rgba(110, 119, 129, 0.08), rgba(0, 0, 0, 0.2));
  border-bottom: 1px solid var(--line);
}
.ev-media.sm { min-height: 96px; flex: none; }
.ev-media::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(110, 119, 129, 0.45);
  border-radius: 6px;
  pointer-events: none;
}
.ev-slot {
  font-family: var(--font-m);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--steel);
  text-align: center;
  padding: 0 22px;
  line-height: 1.8;
}
.ev-feature .ev-media .ev-slot { font-size: 0.64rem; }

/* ---------- partner ---------- */
.partner {
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(224, 43, 32, 0.09), transparent 70%),
    var(--black);
  padding: 100px 0;
  text-align: center;
}
.partner .sub { margin: 0 auto; }
.partner .cta-row { margin-top: 32px; }
.note-mono {
  margin-top: 16px;
  font-family: var(--font-m);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-lo);
}

/* ---------- routing + footer ---------- */
.routing { background: var(--black-2); border-top: 1px solid var(--line); padding: 64px 0; }
.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.route { border: 1px solid var(--line); border-left: 2px solid var(--steel); border-radius: 10px; padding: 22px; }
.route p:not(.kicker) { color: var(--dim); font-size: 0.92rem; margin-top: 8px; }
.quiet-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--steel-hi);
  transition: color 180ms var(--ease);
}
.quiet-link:hover { color: var(--white); }

.ftr { background: var(--black); border-top: 1px solid var(--line); padding: 30px 0 36px; }
.ftr-in { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ftr p { color: var(--steel); font-size: 0.82rem; }
.mono-tag {
  font-family: var(--font-m);
  font-size: 0.66rem !important;
  letter-spacing: 0.14em;
  color: var(--steel-lo) !important;
}

/* ==========================================================================
   MOTION GRAMMAR — machine precision, three tiers:
   1) native scroll-driven (animation-timeline: view()) — full grammar
   2) IntersectionObserver fallback (.in classes) — equivalent choreography
   3) reduced motion — instant, static, complete
   ========================================================================== */

@property --tr { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --rule { syntax: "<number>"; inherits: true; initial-value: 1; }

/* ----- base reveal (generic elements: kickers, headings, subs, notes) ----- */
.rv { opacity: 0; transform: translateY(14px); }
.rv.in { opacity: 1; transform: none; transition: opacity 480ms var(--ease), transform 480ms var(--ease); }

/* ----- ENGINE rows: number resolves → divider traces → content resolves ----- */
.cap { position: relative; }
.cap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-light);
  transform: scaleX(var(--rule, 1));
  transform-origin: 0 50%;
}
.cap.rv { opacity: 1; transform: none; }
.cap.rv .pn, .cap.rv .cap-t, .cap.rv .cap-m, .cap.rv .cap-x { opacity: 0; transform: translateY(8px); }
.cap.rv:not(.in)::before { transform: scaleX(0); }
.cap.rv.in::before { transform: scaleX(1); transition: transform 520ms var(--ease) 70ms; }
.cap.rv.in .pn { opacity: 1; transform: none; transition: opacity 360ms var(--ease), transform 360ms var(--ease); }
.cap.rv.in .cap-t, .cap.rv.in .cap-m, .cap.rv.in .cap-x {
  opacity: 1; transform: none;
  transition: opacity 380ms var(--ease) 140ms, transform 380ms var(--ease) 140ms;
}

/* ----- PORTFOLIO cards: depth resolve, column-staggered ----- */
.pcard.rv { transform: translateY(16px) scale(0.977); }
.pcard.rv.in { transform: none; transition: opacity 520ms var(--ease), transform 520ms var(--ease); }
.cardsP .pcard.rv.in:nth-child(3n + 2) { transition-delay: 80ms; }
.cardsP .pcard.rv.in:nth-child(3n) { transition-delay: 160ms; }

/* ----- INFRASTRUCTURE: primary proof strongest, supports follow ----- */
.ev { position: relative; }
.ev-feature.rv { transform: translateY(18px) scale(0.985); }
.ev-feature.rv.in { transform: none; transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
.ev-grid .ev.rv.in:nth-child(2) { transition-delay: 120ms; }
.ev-grid .ev.rv.in:nth-child(3) { transition-delay: 190ms; }
.ev-grid .ev.rv.in:nth-child(4) { transition-delay: 260ms; }
.ev-grid .ev.rv.in:nth-child(5) { transition-delay: 330ms; }
.ev-grid .ev.rv.in:nth-child(6) { transition-delay: 400ms; }
.ev-grid .ev.rv.in:nth-child(7) { transition-delay: 470ms; }

/* ----- native scroll-driven grammar ----- */
@supports (animation-timeline: view()) {
  .rv, .rv.in { opacity: 1; transform: none; transition: none; }
  .rv {
    animation: rv-in 1ms linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
  .cap.rv { animation: none; }
  .cap.rv .pn, .cap.rv .cap-t, .cap.rv .cap-m, .cap.rv .cap-x { opacity: 1; transform: none; }
  .cap.rv .pn { animation: rv-in 1ms linear both; animation-timeline: view(); animation-range: entry 0% cover 16%; }
  .cap.rv::before { animation: trace-x 1ms linear both; animation-timeline: view(); animation-range: entry 2% cover 20%; }
  .cap.rv .cap-t, .cap.rv .cap-m, .cap.rv .cap-x { animation: rv-in 1ms linear both; animation-timeline: view(); animation-range: entry 8% cover 28%; }
  .pcard.rv { animation: rv-depth 1ms linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  .cardsP .pcard.rv:nth-child(3n + 2) { animation-range: entry 4% cover 32%; }
  .cardsP .pcard.rv:nth-child(3n) { animation-range: entry 8% cover 36%; }
  .ev-feature.rv { animation: rv-feature 1ms linear both; animation-timeline: view(); animation-range: entry 0% cover 34%; }
  .ev-grid .ev.rv:not(.ev-feature) { animation: rv-in 1ms linear both; animation-timeline: view(); }
  .ev-grid .ev.rv:nth-child(2) { animation-range: entry 4% cover 28%; }
  .ev-grid .ev.rv:nth-child(3) { animation-range: entry 8% cover 32%; }
  .ev-grid .ev.rv:nth-child(4) { animation-range: entry 10% cover 34%; }
  .ev-grid .ev.rv:nth-child(5) { animation-range: entry 12% cover 36%; }
  .ev-grid .ev.rv:nth-child(6) { animation-range: entry 14% cover 38%; }
  .ev-grid .ev.rv:nth-child(7) { animation-range: entry 16% cover 40%; }
  /* section measurement-lines trace with scroll (consumed by ::before scaleX) */
  .engine, .portfolio, .moat, .partner {
    animation: rule-trace 1ms linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
  @keyframes rule-trace { from { --rule: 0; } to { --rule: 1; } }
  @keyframes trace-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes rv-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes rv-depth {
    from { opacity: 0; transform: translateY(16px) scale(0.977); }
    to { opacity: 1; transform: none; }
  }
  @keyframes rv-feature {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: none; }
  }
}

/* ----- PRECISION TRACER — 1px Titanium highlight travels once, resolves.
        Targets: selected Engine pill, opened capability row, Distributor Login. ----- */
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .pill, .cap-btn, .hdr-util { position: relative; }
  .pill.on::after, .cap.open .cap-btn::after,
  .hdr-util:hover::after, .hdr-util:focus-visible::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    background: conic-gradient(from calc(var(--tr) - 40deg),
      transparent 0deg 4deg,
      rgba(154, 163, 172, 0.5) 26deg,
      rgba(236, 241, 246, 0.95) 36deg,
      #E02B20 40deg,
      transparent 44deg 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: trace-run 640ms cubic-bezier(0.3, 0.7, 0.2, 1) forwards;
  }
  .cap.open .cap-btn::after { border-radius: 6px; }
  @keyframes trace-run {
    0% { --tr: 0deg; opacity: 1; }
    78% { opacity: 1; }
    100% { --tr: 360deg; opacity: 0; }
  }
  .dbg-trace .pill.on::after, .dbg-trace .cap.open .cap-btn::after { animation-duration: 60s; }
}

/* ----- MATERIAL LIGHTING — pointer-origin Titanium specular, dark cards,
        desktop-fine-pointer only, zero idle cost (JS gates + attaches) ----- */
@media (hover: hover) and (pointer: fine) {
  .pcard::after, .moat .ev:not(.ev-feature):not(.ev-has-media):not(.ev-wide)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 40%),
      rgba(154, 163, 172, 0.09), transparent 62%);
    opacity: 0;
    transition: opacity 280ms var(--ease);
  }
  .pcard.lit::after, .moat .ev.lit::after { opacity: 1; }
}

/* ----- performance containment (below-the-fold sections) ----- */
.portfolio, .moat, .partner, .routing { content-visibility: auto; }
/* capture aid only (?cv=0): full-page screenshot tools can't trigger cv:auto relevancy */
.dbg-cv .portfolio, .dbg-cv .moat, .dbg-cv .partner, .dbg-cv .routing { content-visibility: visible; }
.portfolio { contain-intrinsic-size: auto 1250px; }
.moat { contain-intrinsic-size: auto 1000px; }
.partner { contain-intrinsic-size: auto 560px; }
.routing { contain-intrinsic-size: auto 380px; }

/* ----- reduced motion: instant, static, complete ----- */
@media (prefers-reduced-motion: reduce) {
  .rv, .rv.in, .cap.rv .pn, .cap.rv .cap-t, .cap.rv .cap-m, .cap.rv .cap-x, .pcard.rv, .ev-feature.rv {
    opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important;
  }
  .cap::before, .engine::before, .portfolio::before, .moat::before, .partner::before {
    transform: scaleX(1) !important; animation: none !important; transition: none !important;
  }
  .engine, .portfolio, .moat, .partner { animation: none !important; }
  .pill.on::after, .cap.open .cap-btn::after, .hdr-util:hover::after, .hdr-util:focus-visible::after {
    animation: none !important; opacity: 0 !important;
  }
  .pcard::after, .moat .ev::after { transition: none !important; opacity: 0 !important; }
  .btn, .pcard, .pshot img, .nav a, .quiet-link, .cap-btn, .cap-panel, .cap-x::before, .cap-x::after, .pill { transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cardsP { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cap-m { display: none; }
  .cap-inner { padding-left: 96px; }
}
@media (max-width: 880px) {
  .nav { display: none; }
  .hdr-util { display: none; }
  .hdr-in { gap: 14px; justify-content: space-between; padding: 12px 20px; }
  .brand img { height: 34px; }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero-in { padding: 52px 20px 0; order: 1; }
  .hero-copy { max-width: none; }
  .br-d { display: none; }
  .hero-globe {
    position: relative;
    inset: auto;
    order: 2;
    height: 58vw;
    min-height: 310px;
    max-height: 440px;
    margin-top: 4px;
  }
  .hero-globe canvas {
    top: 0;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(128vw, 580px);
  }
  .globe-scrim {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--black) 0%, transparent 20%, transparent 74%, var(--black) 100%);
    pointer-events: none;
  }
  .caps2 { font-size: 0.66rem; letter-spacing: 0.18em; }
  .cap-btn { grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 12px; padding: 18px 4px; }
  .pn { font-size: 1.3rem; }
  .cap-t { font-size: 1rem; }
  .cap-inner { padding: 0 4px 0 4px; }
  .cap.open .cap-inner { padding-bottom: 22px; }
  .pill-dl { grid-template-columns: 1fr; gap: 12px; }
  .cardsP { grid-template-columns: 1fr; }
  .ev-grid { grid-template-columns: 1fr; }
  .ev-feature { grid-column: auto; grid-row: auto; }
  .ev-media { min-height: 150px; }
  .routes { grid-template-columns: 1fr; }
  .portfolio, .moat { padding: 64px 0; }
  /* hero → Engine transition: the light register must enter the viewport promptly */
  .hero-globe { height: 52vw; min-height: 280px; max-height: 400px; }
  .engine { padding: 44px 0 64px; }
  .engine h2 { margin: 10px 0 8px; }
  .phases { margin-top: 24px; }
  .partner { padding: 72px 0; }
  .ftr-in { flex-direction: column; }
}
@media (max-width: 480px) {
  .hdr-cta { padding: 8px 12px; font-size: 0.78rem; }
}
