/* =====================================================================
   ROVEWORKS · shared design system
   Brand stays exactly as it was: pure black, pure white, Archivo
   (condensed, heavy, uppercase for display). Everything here adds depth
   and motion on top of that palette, never new colours.
   ===================================================================== */

:root {
  --bg: #000000;
  --panel: #0a0a0a;
  --panel-2: #0e0e0e;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.56);
  --faint: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --glass: rgba(8, 8, 8, 0.72);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --maxw: 1180px;
  --maxw-wide: 1440px;
  --nav-h: 76px;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  font-weight: 420;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: #fff; color: #000; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap-wide { width: 100%; max-width: var(--maxw-wide); margin: 0 auto; padding: 0 28px; }
@media (max-width: 480px) { .wrap, .wrap-wide { padding: 0 16px; } }

.display {
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.92;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--faint);
}
.mono { font-family: var(--mono); letter-spacing: 0; }

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

/* ---------- the 3D layer ---------- */
#rw-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  display: block;
  pointer-events: none;
}
/* film grain, keeps the black from looking flat */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 200;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: #000;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}
.btn:hover { color: #fff; }
.btn:hover::before { transform: none; }
.btn .arrow { display: inline-block; transition: transform 0.45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--ghost::before { background: #fff; }
.btn--ghost:hover { color: #000; border-color: #fff; }
.btn--lg { padding: 18px 34px; font-size: 17px; }
.btn .btn-in { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- nav ---------- */
.rw-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.6s var(--ease);
}
.rw-nav.scrolled {
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.rw-nav.tucked { transform: translateY(-100%); }
.menu-open .rw-nav { transform: none; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.rw-nav-in {
  height: 100%;
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
@media (max-width: 480px) { .rw-nav-in { padding: 0 16px; } }
.rw-logo {
  font-weight: 800;
  font-stretch: 78%;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.rw-logo .dot { display: inline-block; transition: transform 0.6s var(--ease); }
.rw-logo:hover .dot { transform: translateX(5px); }
.rw-links { display: flex; align-items: center; gap: 34px; }
.rw-links .l {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.3s var(--ease);
}
.rw-links .l::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.rw-links .l:hover, .rw-links .l[aria-current="page"] { color: var(--fg); }
.rw-links .l:hover::after, .rw-links .l[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.rw-nav .nav-cta { padding: 11px 20px; font-size: 14px; }
.rw-progress {
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: #fff;
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
.rw-burger {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  position: relative;
}
.rw-burger i {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.rw-burger i:nth-child(1) { top: 18px; }
.rw-burger i:nth-child(2) { top: 25px; }
.menu-open .rw-burger i:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.menu-open .rw-burger i:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }
@media (max-width: 899px) {
  .rw-links .l { display: none; }
  .rw-burger { display: inline-block; }
  .rw-links { gap: 14px; }
}
@media (max-width: 380px) { .rw-nav .nav-cta { padding: 10px 14px; font-size: 13px; } }

.rw-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 32px) 16px 32px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease-io), visibility 0s linear 0.8s;
}
.menu-open .rw-menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.8s var(--ease-io), visibility 0s; }
.rw-menu nav { display: flex; flex-direction: column; }
.rw-menu nav a {
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  font-size: clamp(44px, 13vw, 86px);
  line-height: 1.02;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.8s var(--ease), opacity 0.8s var(--ease);
}
.rw-menu nav a small { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--faint); }
.menu-open .rw-menu nav a { transform: none; opacity: 1; }
.menu-open .rw-menu nav a:nth-child(2) { transition-delay: 0.05s; }
.menu-open .rw-menu nav a:nth-child(3) { transition-delay: 0.1s; }
.menu-open .rw-menu nav a:nth-child(4) { transition-delay: 0.15s; }
.menu-open .rw-menu nav a:nth-child(5) { transition-delay: 0.2s; }
.rw-menu .meta { color: var(--faint); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rw-spacer { height: var(--nav-h); }

/* ---------- cursor (fine pointers only, added by JS) ---------- */
.rw-cursor, .rw-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
}
.rw-cursor { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.rw-ring {
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  transition: width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), background 0.45s var(--ease), border-color 0.45s var(--ease), opacity 0.3s;
}
.rw-ring span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.rw-ring.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: #fff; }
.rw-ring.is-label { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: #fff; border-color: #fff; mix-blend-mode: normal; }
.rw-ring.is-label span { opacity: 1; }
.rw-ring.is-hidden, .rw-cursor.is-hidden { opacity: 0; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
html.has-cursor input, html.has-cursor textarea { cursor: text; }

/* ---------- page transition ---------- */
html.rw-entering body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #fff;
}
.rw-curtain {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateY(100%);
}
.rw-curtain b {
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  font-size: clamp(48px, 10vw, 120px);
  line-height: 1;
}

/* ---------- split text + reveals (only when JS is running) ---------- */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0 0.1em; margin: -0.04em 0 -0.1em; }
.sw > span { display: inline-block; will-change: transform; }
.js [data-split]:not(.is-split) { visibility: hidden; }
.js .is-split .sw > span { transform: translateY(112%) rotate(4deg); transform-origin: 0 100%; }
.js .is-split.in .sw > span {
  transform: none;
  transition: transform 1.15s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms + var(--d, 0ms));
}
.js .rv { opacity: 0; transform: translateY(34px); }
.js .rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
}

/* ---------- footer ---------- */
.rw-foot {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 96px 0 32px;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9) 60%);
}
.rw-foot-top {
  display: grid;
  gap: 56px;
  padding-bottom: 72px;
}
@media (min-width: 900px) { .rw-foot-top { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.rw-foot-cta .eyebrow { margin-bottom: 18px; }
.rw-foot-cta a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  font-size: clamp(42px, 6.4vw, 92px);
  line-height: 0.92;
  background: linear-gradient(#fff, #fff) left bottom / 0 2px no-repeat;
  transition: background-size 0.7s var(--ease);
  padding-bottom: 6px;
}
.rw-foot-cta a:hover { background-size: 100% 2px; }
.rw-foot-cta a .arrow { display: inline-block; transition: transform 0.6s var(--ease); }
.rw-foot-cta a:hover .arrow { transform: translate(8px, -8px) rotate(-45deg); }
.rw-foot-cta p { color: var(--muted); margin-top: 22px; max-width: 420px; }
.rw-foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
@media (min-width: 640px) { .rw-foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rw-foot-cols h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 16px;
}
.rw-foot-cols a { display: block; width: fit-content; font-size: 14px; color: var(--muted); padding: 4px 0; transition: color 0.25s var(--ease), transform 0.4s var(--ease); }
.rw-foot-cols a:hover { color: var(--fg); transform: translateX(4px); }
.rw-foot-mark {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  font-size: clamp(64px, 17.6vw, 262px);
  line-height: 0.8;
  letter-spacing: -0.01em;
  user-select: none;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  padding-top: 0.08em;
}
.rw-foot-mark span { display: inline-block; }
.rw-foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  margin-top: 28px;
  font-size: 13px;
  color: var(--faint);
}
.rw-foot-bottom a:hover { color: var(--fg); }

/* =====================================================================
   HOME
   ===================================================================== */
.h-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
}
.h-hero-in {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: calc(var(--nav-h) + 26px);
  padding-bottom: 40px;
  min-height: 100%;
  flex: 1;
}
.h-hero-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.h-hero-top .mono { font-size: 12px; color: var(--faint); }
.h-hero-main { margin-top: auto; }
.h-title { font-size: clamp(40px, 9.4vw, 150px); }
.h-title .ln { display: block; overflow: hidden; padding: 0.04em 0 0.08em; margin: -0.04em 0 -0.08em; }
.h-title .ln > span { display: inline-block; animation: rise 1.4s var(--ease) both; }
.h-title .ln:nth-child(2) > span { animation-delay: 0.12s; }
@keyframes rise { from { transform: translateY(110%) rotate(3deg); transform-origin: 0 100%; } to { transform: none; } }
.h-hero-bottom {
  display: grid;
  gap: 28px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  animation: fadeUp 1.2s var(--ease) 0.4s both;
}
@media (min-width: 900px) { .h-hero-bottom { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.hero-sub { max-width: 600px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.h-scroll {
  position: absolute;
  right: 28px;
  top: 50%;
  display: none;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  writing-mode: vertical-rl;
}
.h-scroll i { width: 1px; height: 64px; background: var(--line-strong); position: relative; overflow: hidden; }
.h-scroll i::after { content: ""; position: absolute; inset: 0; background: #fff; animation: drip 2.2s var(--ease-io) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@media (min-width: 1100px) { .h-scroll { display: flex; } }

/* marquee */
.h-marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}
.mq { display: flex; white-space: nowrap; overflow: hidden; }
.mq + .mq { margin-top: 8px; }
.mq-track { display: flex; flex-shrink: 0; animation: mq 46s linear infinite; }
.mq--rev .mq-track { animation-direction: reverse; animation-duration: 54s; }
.mq-track span {
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1.05;
  padding: 0 0.3em;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.mq-track span::after { content: ""; width: 0.22em; height: 0.22em; background: #fff; border-radius: 50%; margin-left: 0.3em; }
.mq--outline .mq-track span { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.55); }
.mq--outline .mq-track span::after { background: transparent; border: 1px solid rgba(255, 255, 255, 0.55); }
@keyframes mq { to { transform: translateX(-50%); } }

/* statement */
.section-pad { padding: 128px 0; }
@media (max-width: 760px) { .section-pad { padding: 88px 0; } }
.h-statement .kicker { display: flex; gap: 14px; align-items: center; margin-bottom: 36px; }
.h-statement .kicker .mono { font-size: 12px; color: var(--faint); }
.h-big {
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  font-size: clamp(40px, 6.8vw, 104px);
  line-height: 0.95;
  max-width: 15ch;
}
.h-big .wd { display: inline-block; }
.js .h-big[data-scrub] .wd { opacity: 0.14; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 96px;
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  position: relative;
  padding: 28px 24px 30px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 760px) {
  .stat { border-bottom: none; border-right: 1px solid var(--line); padding: 28px 24px 30px; }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: none; }
}
.stat .n { font-family: var(--mono); font-size: 11px; color: var(--faint); display: block; margin-bottom: 26px; }
.stat .k { font-weight: 700; font-stretch: 82%; font-size: 17px; letter-spacing: 0.02em; text-transform: uppercase; }
.stat .v { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* section heads */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.section-head h2 { font-size: clamp(44px, 7.4vw, 112px); }
.section-head p { color: var(--muted); max-width: 380px; font-size: 16px; }
.section-head .mono { display: block; font-size: 12px; color: var(--faint); margin-bottom: 18px; }

/* services: 3D tilt cards */
.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  perspective: 1400px;
}
@media (min-width: 760px) { .services { grid-template-columns: 1fr 1fr; gap: 20px; } }
.service {
  position: relative;
  padding: 40px 38px 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform-style: preserve-3d;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s var(--ease);
}
.service:hover { border-color: var(--line-strong); }
.service::before {
  /* moving light that follows the cursor */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.service:hover::before { opacity: 1; }
.service .top { display: flex; justify-content: space-between; align-items: center; transform: translateZ(30px); }
.service .num { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.service .glyph {
  width: 54px; height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.7s var(--ease), background 0.5s var(--ease), color 0.5s var(--ease);
}
.service .glyph svg { width: 22px; height: 22px; }
.service:hover .glyph { background: #fff; color: #000; transform: rotate(-45deg); }
.service h3 {
  font-size: clamp(32px, 4vw, 52px);
  margin: auto 0 16px;
  padding-top: 64px;
  font-weight: 800;
  font-stretch: 76%;
  text-transform: uppercase;
  line-height: 0.95;
  transform: translateZ(50px);
}
.service p { color: var(--muted); font-size: 16px; max-width: 440px; transform: translateZ(30px); }
.service ul {
  list-style: none;
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transform: translateZ(24px);
}
.service ul li {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: 999px;
}
.service .stretched { position: absolute; inset: 0; z-index: 2; }
.service .stretched span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* process: horizontal on desktop */
.h-process { padding: 128px 0 0; }
.h-process-pin { padding-bottom: 96px; }
.h-track { display: grid; gap: 16px; }
.h-step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px 32px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 340px;
}
.h-step .idx {
  font-weight: 800;
  font-stretch: 76%;
  font-size: clamp(96px, 12vw, 180px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
}
.h-step h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; font-stretch: 76%; text-transform: uppercase; line-height: 1; margin-top: auto; }
.h-step p { color: var(--muted); font-size: 16px; max-width: 440px; }
.h-step .meta { font-family: var(--mono); font-size: 12px; color: var(--faint); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.h-step .meta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12); }
.h-progress { height: 1px; background: var(--line); margin-top: 40px; position: relative; display: none; }
.h-progress i { position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
@media (min-width: 900px) {
  .h-process.is-pinned .h-process-pin { height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 8px) 0 48px; overflow: hidden; }
  .h-process.is-pinned .section-head { margin-bottom: 40px; }
  .h-process.is-pinned .h-track {
    display: flex;
    gap: 20px;
    width: max-content;
    max-width: none;
    margin: 0;
    padding-left: max(28px, calc((100vw - var(--maxw)) / 2 + 28px));
    padding-right: 28px;
  }
  .h-process.is-pinned .h-step { width: min(560px, 44vw); min-height: 400px; flex-shrink: 0; }
  .h-process.is-pinned .h-progress { display: block; }
  .h-step--end { width: min(420px, 32vw) !important; background: #fff !important; color: #000; justify-content: space-between; }
  .h-step--end p { color: rgba(0, 0, 0, 0.6); }
}
@media (min-width: 900px) { .h-track:not(.is-h) { grid-template-columns: repeat(3, 1fr); } }
.h-track:not(.is-h) .h-step--end { display: none; }
.h-step--end .btn { align-self: flex-start; }
.h-step--end .btn { background: #000; color: #fff; border-color: #000; }
.h-step--end .btn::before { background: #fff; }
.h-step--end .btn:hover { color: #000; }

/* systems teaser */
.h-sys-list { list-style: none; border-top: 1px solid var(--line); counter-reset: s; }
.h-sys-list li { border-bottom: 1px solid var(--line); }
.h-sys-list a {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px 0;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease), padding 0.5s var(--ease);
}
@media (min-width: 760px) { .h-sys-list a { grid-template-columns: 64px minmax(0, 1fr) 200px 40px; padding: 26px 0; } }
.h-sys-list a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  clip-path: inset(50% 0 50% 0);
  transition: clip-path 0.55s var(--ease);
}
.h-sys-list a:hover { color: #000; padding-left: 20px; padding-right: 20px; }
.h-sys-list a:hover::before { clip-path: inset(0 0 0 0); }
.h-sys-list .n { font-family: var(--mono); font-size: 12px; color: var(--faint); transition: color 0.5s; }
.h-sys-list .t { font-weight: 700; font-stretch: 84%; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.1; letter-spacing: -0.01em; }
.h-sys-list .a { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); display: none; transition: color 0.5s; }
@media (min-width: 760px) { .h-sys-list .a { display: block; } }
.h-sys-list .arrow { justify-self: end; transition: transform 0.5s var(--ease); }
.h-sys-list a:hover .n, .h-sys-list a:hover .a { color: rgba(0, 0, 0, 0.55); }
.h-sys-list a:hover .arrow { transform: rotate(-45deg); }
.h-sys-more { margin-top: 40px; }

/* closing */
.cta-final { text-align: center; padding: 180px 0 160px; position: relative; }
.cta-final h2 { font-size: clamp(40px, 11.6vw, 180px); margin-bottom: 34px; }
.cta-final p { color: var(--muted); max-width: 520px; margin: 0 auto 40px; font-size: 18px; }
.cta-final .eyebrow { margin-bottom: 30px; }

/* =====================================================================
   SERVICE PAGES  (body.tpl-service)  ·  styles the existing markup
   ===================================================================== */
.tpl-service main > section { padding: 96px 0; border-top: 1px solid var(--line); position: relative; }
.tpl-service .narrow { max-width: 780px; }
.tpl-service main > section.hero {
  border-top: none;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  padding: 64px 0 72px;
}
.tpl-service .hero .wrap { width: 100%; }
.tpl-service .hero h1 { font-size: clamp(48px, 8.6vw, 136px); margin: 22px 0 30px; max-width: 16ch; }
.tpl-service .hero h1 .stroke { display: block; }
.tpl-service .lede { max-width: 660px; font-size: clamp(17px, 1.9vw, 21px); color: var(--muted); }
.tpl-service .hero-actions { margin-top: 36px; }
.tpl-service h2 { font-size: clamp(36px, 5.6vw, 72px); margin-bottom: 24px; }
.tpl-service h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.tpl-service p { color: var(--muted); margin-bottom: 16px; }
.tpl-service .narrow p:last-child { margin-bottom: 0; }
.tpl-service strong { color: var(--fg); font-weight: 600; }

.tpl-service .grid2 { display: grid; gap: 16px; margin-top: 48px; perspective: 1400px; }
@media (min-width: 760px) { .tpl-service .grid2 { grid-template-columns: 1fr 1fr; gap: 20px; } }
.tpl-service .card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 34px 32px;
  overflow: hidden;
  counter-increment: card;
  transform-style: preserve-3d;
  transition: border-color 0.4s var(--ease);
}
.tpl-service .grid2 { counter-reset: card; }
.tpl-service .card::after {
  content: counter(card, decimal-leading-zero);
  position: absolute;
  top: 30px; right: 30px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}
.tpl-service .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.tpl-service .card:hover { border-color: var(--line-strong); }
.tpl-service .card:hover::before { opacity: 1; }
.tpl-service .card h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; font-stretch: 80%; text-transform: uppercase; line-height: 1.05; padding-right: 40px; margin-bottom: 14px; }
.tpl-service .card p { margin-bottom: 0; font-size: 16px; }
.tpl-service .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tpl-service .tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: 999px;
}

.tpl-service .steps { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 760px) { .tpl-service .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.tpl-service .step {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 30px 28px 32px;
}
.tpl-service .step .idx {
  font-weight: 800;
  font-stretch: 76%;
  font-size: 88px;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
  margin-bottom: 36px;
}
.tpl-service .step h3 { text-transform: uppercase; font-weight: 800; font-stretch: 80%; font-size: 24px; }
.tpl-service .step p { margin-bottom: 0; font-size: 16px; }

.tpl-service .result {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 36px 34px;
  margin: 34px 0 0;
  overflow: hidden;
}
.tpl-service .result::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #fff; }
.tpl-service .result .big { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; font-stretch: 76%; line-height: 1; color: #fff; }
.tpl-service .result p { margin: 14px 0 0; font-size: 16px; }

.tpl-service .siblings { display: grid; gap: 0; margin-top: 40px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .tpl-service .siblings { grid-template-columns: repeat(3, 1fr); border-top: none; gap: 16px; } }
.tpl-service .sibling {
  position: relative;
  display: block;
  padding: 28px 24px 30px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease);
}
@media (min-width: 760px) { .tpl-service .sibling { border: 1px solid var(--line); border-radius: 6px; min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; background: var(--glass); } }
.tpl-service .sibling::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
}
.tpl-service .sibling:hover { color: #000; }
.tpl-service .sibling:hover::before { transform: none; }
.tpl-service .sibling .st { font-weight: 800; font-stretch: 78%; text-transform: uppercase; font-size: 26px; line-height: 1; }
.tpl-service .sibling .sp { color: var(--muted); font-size: 14px; margin-top: 10px; transition: color 0.5s var(--ease); }
.tpl-service .sibling:hover .sp { color: rgba(0, 0, 0, 0.6); }

.tpl-service .cta { padding: 160px 0; }
.tpl-service .cta h2 { font-size: clamp(48px, 9vw, 140px); margin-bottom: 26px; }
.tpl-service .cta p { font-size: 18px; max-width: 560px; }

/* privacy page reuses its own styles; just give it room under the nav */
.tpl-legacy main { position: relative; }

/* =====================================================================
   SYSTEMS / STUDIES  (body.tpl-legacy) · light-touch enhancements
   ===================================================================== */
.tpl-legacy .page-head { padding-top: 96px; }
.tpl-legacy .page-head h1 { font-size: clamp(52px, 9vw, 144px); }
.tpl-legacy .sys .body,
.tpl-legacy .entry { position: relative; }
.tpl-legacy .sample { background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 6px; }
.tpl-legacy .sys .side .idx { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.7); font-size: 72px; }
.tpl-legacy .sys .flow li { transition: background 0.4s var(--ease); }
.tpl-legacy .toc a { position: relative; }
.tpl-legacy .toc a:hover .n { color: #fff; }
.tpl-legacy footer.site { display: none; }
.tpl-legacy .cta { position: relative; }
.js .bars .fill { transform: scaleX(0); transform-origin: 0 50%; }
.js .bars.in .fill { transform: none; transition: transform 1.3s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 150ms); }

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html:not(.lenis) { scroll-behavior: auto; }
  .js .rv, .js .is-split .sw > span, .js .bars .fill { opacity: 1 !important; transform: none !important; }
  .js [data-split]:not(.is-split) { visibility: visible; }
  .js .h-big[data-scrub] .wd { opacity: 1; }
  body::after { display: none; }
}

/* ---------- small screens: give the hero mark room ---------- */
@media (max-width: 640px) {
  .h-hero-top .mono { display: none; }
  .h-hero-bottom { gap: 22px; margin-top: 26px; padding-top: 22px; }
  .hero-sub { font-size: 16px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn--lg { padding: 15px 22px; font-size: 15px; }
  .tpl-service main > section.hero { padding-top: 150px; }
}

/* long code samples must scroll inside their box, never widen the page */
.tpl-legacy .sys > *, .tpl-legacy .sys .body { min-width: 0; }
.tpl-legacy .sample { max-width: 100%; }
