/* Reactivity Solutions — dark cinematic studio
 * Graphite black, one lime "signal" accent, the real project renders at full
 * width, Geist set large and tight, and light that reacts to the cursor.
 * Light comes from three sources only: the cursor spotlight, each project's
 * own bloom, and 1px rim highlights on raised surfaces.
 *
 * Order: fonts → tokens → base → primitives → header → hero → work →
 *        services → process → approach → contact → dialog →
 *        footer → motion → reduced motion.
 */

/* ---------- Fonts (SIL OFL 1.1, self-hosted; see assets/fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Metric-matched fallback so the swap to Geist does not shift the layout. */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Layered surfaces: each step is about +3% luminance. */
  --bg-0: #08080a;
  --bg-1: #0d0d10;
  --bg-2: #131316;
  --bg-3: #1a1a1e;
  --bg-4: #222227;

  /* Hairlines: white at low alpha, so they pick up whatever is behind. */
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.22);
  --rim: rgba(255, 255, 255, 0.06);

  --fg: #ededef;
  --fg-2: #a1a1aa;
  --fg-3: #8a8a93;
  --fg-4: #55555d; /* decorative only */

  /* The one accent: "signal lime" (taken from the click2seat and Tiporra UI). */
  --accent: #c5f23a;
  --accent-hi: #d6fa62;
  --accent-ink: #0a0b05;
  --accent-dim: rgba(197, 242, 58, 0.14);
  --accent-line: rgba(197, 242, 58, 0.45);

  /* Project light: used only inside each work panel and its deck card. */
  --p-wellnest: #2fd3a8;
  --p-click2seat: #3e6bff;
  --p-tiporra: #e52eb6;

  --danger: #ff6b5e;
  --success: var(--accent);

  --f-text: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --t-display: clamp(2.75rem, 1.1rem + 5.2vw, 6rem);
  --t-h2: clamp(2.375rem, 1.3rem + 3.2vw, 4.75rem);
  --t-work: clamp(2.75rem, 1.5rem + 5.2vw, 7.5rem);
  --t-h3: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem);
  --t-lead: clamp(1.0625rem, 0.98rem + 0.45vw, 1.3125rem);

  --container: 1320px;
  --pad: clamp(16px, 4vw, 48px);
  --bleed: clamp(8px, 1.2vw, 20px);
  --section-y: clamp(64px, 7vw, 104px);
  --header-h: 64px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --d-fast: 160ms;
  --d-base: 280ms;
  --d-slow: 600ms;
  --d-cine: 1100ms;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-0);
  overflow-x: clip;
  scrollbar-color: #2a2a30 var(--bg-0);
  scrollbar-width: thin;
}
html.motion-ok {
  scroll-behavior: smooth;
}
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-0);
}
::-webkit-scrollbar-thumb {
  background: #2a2a30;
  border: 3px solid var(--bg-0);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a42;
}
/* Anchor targets clear the fixed header. Set on targets, not as
   scroll-padding on html, so header controls never trigger a scroll. */
main [id],
input,
textarea {
  scroll-margin-top: calc(var(--header-h) + 24px);
}
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg-0);
  color: var(--fg-2);
  font: 400 1rem/1.6 var(--f-text);
  font-feature-settings: "ss01", "cv11";
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Film grain over everything: a static 160px noise tile, never animated. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background: url("../images/grain.png") 0 0 / 160px 160px;
}
body.menu-open,
body.preview-open {
  overflow: hidden;
}
main {
  overflow-x: clip;
}
h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure,
fieldset,
legend {
  margin: 0;
  padding: 0;
}
ol,
ul {
  list-style: none;
}
h1,
h2,
h3 {
  color: var(--fg);
  font-weight: 600;
  font-synthesis: none;
  text-wrap: balance;
}
p,
li {
  text-wrap: pretty;
}
img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section {
  position: relative;
  padding-block: var(--section-y);
}
/* Where two sections meet, the gap collapses: density comes from content. */
.section + .section {
  padding-top: calc(var(--section-y) * 0.55);
}
/* The technology band sits tight between Services and Process. */
.services-section,
.process-section,
.approach-section {
  padding-bottom: clamp(48px, 5vw, 72px);
}

/* ---------- Primitives ---------- */
.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1.2 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.label-num {
  color: var(--fg);
}
.label-num::before {
  content: "[";
  color: var(--fg-3);
}
.label-num::after {
  content: "]";
  color: var(--fg-3);
}
.label-text {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.label-num + .label-text::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--line-3);
}
.label--plain {
  display: block;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 500 10.5px/1 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: rgba(255, 255, 255, 0.03);
}
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.line > span {
  display: inline-block;
}
.dim {
  color: var(--fg-3);
}
.section-head {
  margin-bottom: clamp(40px, 4.5vw, 64px);
}
.section-head h2 {
  margin-top: 28px;
  font-size: var(--t-h2);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.section-head .lead {
  margin-top: 28px;
  max-width: 44ch;
  font-size: var(--t-lead);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--fg-2);
}
.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 64px;
}
.section-note {
  max-width: 38ch;
  padding-bottom: 6px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-3);
}
.section-note .chip {
  margin-right: 6px;
  vertical-align: 2px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 14px/1 var(--f-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out),
    box-shadow var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out), color var(--d-base);
}
.button:active {
  transform: scale(0.98);
}
.button--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
}
.button--lg {
  height: 52px;
  padding: 0 22px;
  font-size: 15px;
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.primary:hover {
  background: var(--accent-hi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 24px -8px rgba(197, 242, 58, 0.45);
  transform: translateY(-1px);
}
.ghost {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg);
  box-shadow: inset 0 1px 0 var(--rim);
}
.ghost:hover {
  border-color: var(--line-3);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.arrow {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--d-base) var(--ease-out);
}
.button:hover .arrow,
.text-link:hover .arrow {
  transform: translateX(3px);
}
.arrow--up {
  transform: none;
}
.back-to-top:hover .arrow--up {
  transform: translateY(-3px);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font-weight: 500;
}
.text-link > span,
button.text-link {
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size var(--d-slow) var(--ease-out);
}
.text-link:hover > span,
button.text-link:hover {
  background-size: 100% 1px;
}
.signal {
  position: relative;
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.signal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ripple 2.4s var(--ease-out) infinite;
}

/* Raised surface: gradient fill, hairline, rim light, and a border plus
   spotlight that follow the cursor (fx.js sets --mx / --my per element). */
.surface {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, var(--bg-2), color-mix(in oklab, var(--bg-2) 70%, var(--bg-0)));
  border: 1px solid var(--line-2);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 var(--rim), 0 1px 0 rgba(0, 0, 0, 0.4), 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}
.surface::before,
.work-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 255, 255, 0.4), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--d-base);
}
.surface::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 255, 255, 0.05), transparent 40%);
  opacity: 0;
  transition: opacity var(--d-base);
}
@media (hover: hover) and (pointer: fine) {
  [data-light]:hover .surface::before,
  [data-light]:hover .surface::after,
  [data-light]:hover .work-panel::before {
    opacity: 1;
  }
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color var(--d-base), border-color var(--d-base), backdrop-filter var(--d-base);
}
.header.is-scrolled {
  background: rgba(8, 8, 10, 0.72);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
/* A filter on the header would trap the fixed mobile menu inside it. */
body.menu-open .header {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}
.logo {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}
.logo-mark {
  width: 28px;
  height: 28px;
  flex: none;
  overflow: visible;
}
.logo-ring {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.32;
  stroke-width: 3;
}
.logo-r {
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo-orb {
  fill: var(--accent);
}
.logo-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.logo-descriptor {
  font: 500 11px/1 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
#navigation {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 24px;
}
.nav-links {
  display: flex;
  margin-inline: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 var(--rim);
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--fg-2);
  transition: color var(--d-fast), background-color var(--d-fast);
}
.nav-links a::before {
  content: "";
  width: 0;
  height: 4px;
  margin-right: 0;
  border-radius: 50%;
  background: var(--accent);
  transition: width var(--d-base) var(--ease-out), margin var(--d-base) var(--ease-out);
}
.nav-links a:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}
.nav-links a[aria-current] {
  color: var(--fg);
}
.nav-links a[aria-current]::before {
  width: 4px;
  margin-right: 8px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-actions .button {
  transition: opacity var(--d-base), visibility var(--d-base), background-color var(--d-base), transform var(--d-base),
    box-shadow var(--d-base);
}
.menu-toggle {
  display: none;
}
@media (max-width: 960px) {
  .menu-toggle {
    position: relative;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
  }
  .menu-toggle span {
    grid-area: 1 / 1;
    width: 16px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--fg);
    transition: transform var(--d-base) var(--ease-out);
  }
  .menu-toggle span:first-child {
    transform: translateY(-3.5px);
  }
  .menu-toggle span:last-child {
    transform: translateY(3.5px);
  }
  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: rotate(-45deg);
  }
  #navigation {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(var(--header-h) + 24px) var(--pad) max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--bg-0);
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--d-base), visibility 0s var(--d-base);
  }
  #navigation.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity var(--d-base);
  }
  .nav-links {
    flex-direction: column;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    counter-reset: nav;
  }
  .nav-links a {
    counter-increment: nav;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: clamp(2.25rem, 9vw, 3.25rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    color: var(--fg);
  }
  .nav-links a:hover {
    background: none;
  }
  .nav-links a::before {
    display: none;
  }
  .nav-links a::after {
    content: counter(nav, decimal-leading-zero);
    font: 500 12px/1 var(--f-text);
    letter-spacing: 0.08em;
    color: var(--fg-3);
  }
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: auto;
    padding-top: 32px;
  }
  .nav-actions .button {
    order: -1;
    height: 52px;
    font-size: 15px;
  }
  .motion-ok #navigation.is-open .nav-links a,
  .motion-ok #navigation.is-open .nav-actions {
    animation: rise-in 500ms var(--ease-out) both;
  }
  .motion-ok #navigation.is-open .nav-links a:nth-child(2) {
    animation-delay: 50ms;
  }
  .motion-ok #navigation.is-open .nav-links a:nth-child(3) {
    animation-delay: 100ms;
  }
  .motion-ok #navigation.is-open .nav-links a:nth-child(4) {
    animation-delay: 150ms;
  }
  .motion-ok #navigation.is-open .nav-links a:nth-child(5) {
    animation-delay: 200ms;
  }
  .motion-ok #navigation.is-open .nav-actions {
    animation-delay: 260ms;
  }
}
@media (max-width: 380px) {
  .logo-descriptor {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100svh, 980px);
  padding: calc(var(--header-h) + clamp(40px, 7vh, 88px)) 0 clamp(56px, 8vh, 96px);
  overflow-x: clip;
  /* Key light from the top left, so the headline sits in light. */
  background: radial-gradient(70% 80% at 16% -6%, rgba(255, 255, 255, 0.055), transparent 62%),
    radial-gradient(50% 60% at 78% 30%, rgba(255, 255, 255, 0.025), transparent 70%);
}
/* Vignette: the edges fall into darkness. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.hero-field {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  -webkit-mask-image: radial-gradient(95% 90% at 50% 38%, #000 40%, transparent 92%);
  mask-image: radial-gradient(95% 90% at 50% 38%, #000 40%, transparent 92%);
}
/* Without JavaScript the dot field is a static CSS pattern. */
html:not(.js) .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(rgba(255, 255, 255, 0.1) 0.9px, transparent 1.3px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(80% 75% at 62% 42%, #000 30%, transparent 85%);
  mask-image: radial-gradient(80% 75% at 62% 42%, #000 30%, transparent 85%);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 0 24px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  pointer-events: none;
  grid-column: 1 / span 7;
  grid-row: 1;
  align-self: end;
}
.hero-copy > * {
  pointer-events: auto;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1.2 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hero-title {
  margin-top: 28px;
  font-size: var(--t-display);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.hero-title .line {
  padding-bottom: 0.08em;
  margin-bottom: -0.06em;
}
/* Top-down light falloff: the type looks lit rather than coloured. */
.hero-title .dim {
  color: #9d9da6;
}
.hero-title .lit {
  background: linear-gradient(180deg, #ffffff 30%, #b4b4bc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 36ch;
  margin-top: 28px;
  font-size: var(--t-lead);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--fg-2);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-scope {
  position: relative;
  z-index: 2;
  grid-column: 1 / span 7;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  margin-top: 56px;
  font: 500 12px/1.2 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hero-scope li {
  display: inline-flex;
  align-items: center;
}
.hero-scope li + li::before {
  content: "";
  width: 1px;
  height: 12px;
  margin: 0 14px;
  background: var(--line-3);
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

/* Project deck: the three real concept renders as one tilted plane. */
.deck {
  --cw: clamp(320px, 31vw, 540px);
  position: relative;
  z-index: 1;
  grid-column: 7 / -1;
  grid-row: 1 / span 2;
  height: clamp(440px, 46vw, 680px);
  margin-right: calc(-1 * min(8vw, 140px));
  perspective: 1800px;
  perspective-origin: 40% 50%;
}
.deck-plane {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateY(calc(var(--hs, 0) * -8%)) rotateX(calc(14deg - var(--ty, 0) * 5deg))
    rotateY(calc(-22deg + var(--tx, 0) * 6deg)) rotateZ(4deg);
}
.deck-card {
  --x: 0%;
  --y: 0%;
  --z: 0px;
  --lift: 0px;
  --b: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--cw);
  aspect-ratio: 1.29;
  margin: calc(var(--cw) / -2.58) 0 0 calc(var(--cw) / -2);
  transform-style: preserve-3d;
  transform: translate3d(var(--x), var(--y), calc(var(--z) + var(--lift) + var(--hs, 0) * var(--i) * 60px));
  transition: transform 700ms var(--ease-out);
  border-radius: 18px;
}
.deck-card:nth-child(1) {
  --x: 14%;
  --y: -56%;
  --z: -240px;
  --b: 0.6;
}
.deck-card:nth-child(2) {
  --x: -6%;
  --y: -11%;
  --z: -120px;
  --b: 0.8;
}
.deck-card:nth-child(3) {
  --x: -24%;
  --y: 35%;
  --z: 0px;
  --b: 1;
}
.deck-fly {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  transform-style: preserve-3d;
}
/* Each card's own colour, already present in its render, spills behind it. */
.deck-fly::before {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--p) 26%, transparent), transparent);
  filter: blur(40px);
  transform: translateZ(-40px);
  pointer-events: none;
}
.deck-fly img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 40px 80px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.6);
  filter: brightness(var(--b)) saturate(calc(0.85 + var(--b) * 0.15));
  transition: filter 700ms var(--ease-out);
}
/* Specular sheen that slides with the cursor. */
.deck-fly::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.1) 50%, transparent 62%) no-repeat;
  background-size: 250% 100%;
  background-position: calc(50% + var(--tx, 0) * 40%) 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.deck-card:hover,
.deck-card:focus-visible {
  --lift: 40px;
  --b: 1;
}
/* Keyboard focus brings the card to the front so its ring is fully visible. */
.deck-card:focus-visible {
  --z: 90px;
  outline-offset: 6px;
}
.hero-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-2);
}
.hero-horizon::after {
  content: "";
  position: absolute;
  inset: -1px 0;
  background: radial-gradient(180px 2px at var(--hx, 62%) 50%, rgba(255, 255, 255, 0.7), transparent);
  transition: background-position var(--d-base);
}
/* The deck bleeds past the viewport edge; let it fall into darkness. */
.hero-edge {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: clamp(48px, 9vw, 180px);
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(8, 8, 10, 0.7) 60%, var(--bg-0));
}

@media (max-width: 1023px) {
  .hero-edge {
    display: none;
  }
}
@media (max-width: 1180px) and (min-width: 1024px) {
  .deck {
    --cw: 30vw;
  }
}
@media (max-width: 1023px) {
  .hero {
    min-height: 0;
  }
  .hero-copy,
  .hero-scope,
  .deck {
    grid-column: 1 / -1;
  }
  .hero-scope {
    grid-row: 3;
  }
  .deck {
    --cw: 58vw;
    grid-row: 2;
    height: 74vw;
    margin: 24px 0 0;
  }
  .deck-plane {
    transform: translateY(calc(var(--hs, 0) * -8%)) rotateX(12deg) rotateY(-14deg) rotateZ(3deg);
  }
  .hero-scope {
    margin-top: 24px;
  }
}
@media (max-width: 639px) {
  .hero {
    padding-top: 96px;
  }
  .hero-title {
    margin-top: 22px;
  }
  .hero-sub {
    margin-top: 22px;
  }
  .hero-actions {
    margin-top: 28px;
  }
  /* Equal widths; each still wraps to its own row before it would squeeze its label. */
  .hero-actions .button {
    flex: 1 1 0;
    min-width: fit-content;
  }
  .deck {
    --cw: 74vw;
    height: 110vw;
    margin-top: 16px;
  }
  .deck-plane {
    transform: rotateX(10deg) rotateY(-12deg) rotateZ(3deg);
  }
  /* All three colours (magenta, teal, blue) read above the fold. */
  .deck-card:nth-child(1) {
    --x: -12%;
    --y: -56%;
    --b: 0.85;
  }
  .deck-card:nth-child(2) {
    --x: 18%;
    --y: -26%;
    --b: 0.9;
  }
  .deck-card:nth-child(3) {
    --x: -8%;
    --y: 16%;
  }
  .hero-scope {
    margin-top: 8px;
    gap: 8px 18px;
  }
  .hero-scope li + li::before {
    display: none;
  }
}

/* Narrow phones: two equal halves can't hold both labels, so stack them full width. */
@media (max-width: 380px) {
  .hero-actions .button {
    flex-basis: 100%;
  }
}

/* ---------- Work ---------- */
.work-section {
  overflow-x: clip;
  padding-top: clamp(64px, 6vw, 88px);
  padding-bottom: clamp(32px, 3.5vw, 48px);
}
.work-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: end;
  gap: 32px 64px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.work-index-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.work-index-nav a {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line-2);
  transition: border-color var(--d-base);
}
.work-index-nav a::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--p);
  transform: scaleX(0.12);
  transform-origin: 0 50%;
  transition: transform var(--d-slow) var(--ease-out);
}
.work-index-nav a:hover::before,
.work-index-nav a:focus-visible::before {
  transform: scaleX(1);
}
.wi-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1 var(--f-text);
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.wi-num::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p);
}
.wi-name {
  font-size: clamp(1.25rem, 1rem + 0.7vw, 1.625rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.wi-kind {
  font: 500 11px/1.2 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.work-list {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
  width: calc(100% - 2 * var(--bleed));
  max-width: 1880px;
  margin-inline: auto;
}
.work-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 2.37 / 1;
  min-height: 520px;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  overflow: hidden;
  background: #0a0d1c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 60px 120px -40px rgba(0, 0, 0, 0.9);
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--stack, 0) * 0.06));
  filter: brightness(calc(1 - var(--stack, 0) * 0.55));
}
.work-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.work-media picture {
  position: absolute;
  left: 0;
  right: 0;
  top: -4%;
  height: 108%;
  display: block;
  transform: translateY(calc(var(--par, 0) * 4%));
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 50%;
  transition: transform 1.2s var(--ease-out);
}
/* Legibility: the copy sits on the render's own dark side. */
.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 10, 0.85) 0%, rgba(8, 8, 10, 0.5) 32%, transparent 55%),
    linear-gradient(0deg, rgba(8, 8, 10, 0.6), transparent 30%);
}
/* Cursor light tinted with the project's colour. */
.work-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, -999px) var(--my, -999px), color-mix(in oklab, var(--p) 18%, transparent), transparent 50%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity var(--d-slow);
}
/* Index sits on the render's empty dark side, never on the device UI. */
.work-index {
  position: absolute;
  top: clamp(24px, 3vw, 48px);
  left: clamp(32px, 5vw, 88px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12px/1 var(--f-text);
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.work-index::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p);
  box-shadow: 0 0 12px var(--p);
}
.work-copy {
  max-width: min(46%, 600px);
  padding: clamp(32px, 4.6vw, 80px) clamp(32px, 5vw, 88px);
}
.work-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1 var(--f-text);
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.work-name {
  margin: 16px 0 14px;
  font-size: var(--t-work);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.work-line {
  max-width: 30ch;
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.125rem);
  line-height: 1.5;
  color: var(--fg-2);
}
/* Plain labels (same idiom as .hero-scope), so they never read as buttons. */
.work-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin-top: 20px;
}
.work-tags li {
  display: inline-flex;
  align-items: center;
  font: 500 12px/1.2 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.work-tags li + li::before {
  content: "";
  width: 1px;
  height: 12px;
  margin: 0 12px;
  background: var(--line-3);
}
.work-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin-top: 28px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  transition: background-color var(--d-base), color var(--d-base), border-color var(--d-base);
}
/* The whole panel is clickable; the button stays the only focusable control. */
.work-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.work-panel:hover .work-open,
.work-open:focus-visible {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}
.work-panel:hover .work-open .arrow {
  transform: translateX(4px);
}
@media (hover: hover) and (pointer: fine) {
  .work-panel:hover .work-media img {
    transform: scale(1.035);
  }
  .work-panel:hover::after {
    opacity: 1;
  }
}
.work-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.125rem);
  color: var(--fg-2);
}
.work-note {
  margin-top: 14px;
  font: 500 13px/1.5 var(--f-text);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
/* Panel width matches the render's aspect, so the parallax overscan is
   taken from the empty left side and the device UI stays whole. */
@media (min-width: 1280px) {
  .work-media img {
    object-position: 12% 50%;
  }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .work-panel {
    aspect-ratio: auto;
    min-height: 560px;
  }
}
/* Keyboard focus inside a stacked panel lifts it above the next one
   (WCAG 2.4.11): the focused control is never covered. */
.work-panel:has(:focus-visible) {
  z-index: 3;
  transform: none;
  filter: none;
}
@media (max-width: 1023px) {
  .section-head--split,
  .work-head {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 639px) {
  .work-index-nav {
    gap: 8px;
  }
  .wi-kind {
    display: none;
  }
  .wi-name {
    font-size: 1.0625rem;
  }
}
@media (max-width: 1023px) {
  .work-list {
    width: calc(100% - 2 * var(--pad));
  }
  .work-panel {
    display: block;
    aspect-ratio: auto;
    min-height: 0;
    border-radius: 20px;
    background: var(--bg-2);
    transform: none;
    filter: none;
  }
  .work-media {
    position: relative;
    z-index: auto;
    aspect-ratio: 16 / 10;
  }
  .work-media picture {
    position: absolute;
    inset: 0;
    height: 100%;
    transform: none;
  }
  .work-media img {
    object-position: 50% 50%;
  }
  .work-media::after {
    background: linear-gradient(0deg, var(--bg-2), transparent 28%);
  }
  .work-copy {
    max-width: none;
    padding: 4px clamp(20px, 4vw, 40px) clamp(24px, 4vw, 40px);
  }
  .work-name {
    margin-top: 14px;
    font-size: clamp(2.5rem, 11vw, 3.25rem);
  }
  .work-index {
    display: none;
  }
}

/* ---------- Services: bento of small, built scenes ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(300px, auto);
  gap: 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  /* A faint key light in the top corner, so no tile is a flat slab. */
  background: radial-gradient(560px 300px at 100% 0%, rgba(255, 255, 255, 0.055), transparent 62%),
    radial-gradient(400px 220px at 0% 100%, rgba(255, 255, 255, 0.018), transparent 70%),
    linear-gradient(180deg, var(--bg-2), color-mix(in oklab, var(--bg-2) 70%, var(--bg-0)));
}
.tile--code {
  background: radial-gradient(640px 360px at 0% 0%, rgba(197, 242, 58, 0.035), transparent 60%),
    radial-gradient(560px 300px at 100% 0%, rgba(255, 255, 255, 0.05), transparent 62%),
    linear-gradient(180deg, var(--bg-2), color-mix(in oklab, var(--bg-2) 70%, var(--bg-0)));
}
.tile--mobile {
  background: radial-gradient(520px 320px at 100% 0%, color-mix(in oklab, var(--p-tiporra) 12%, transparent), transparent 64%),
    linear-gradient(180deg, var(--bg-2), color-mix(in oklab, var(--bg-2) 70%, var(--bg-0)));
}
.tile--rail {
  background: radial-gradient(520px 300px at 100% 0%, color-mix(in oklab, var(--p-wellnest) 7%, transparent), transparent 64%),
    linear-gradient(180deg, var(--bg-2), color-mix(in oklab, var(--bg-2) 70%, var(--bg-0)));
}
.tile--code {
  grid-column: 1 / 5;
  grid-row: 1 / 3;
}
.tile--rail {
  grid-column: 5 / 7;
  grid-row: 1;
}
.tile--mobile {
  grid-column: 5 / 7;
  grid-row: 2;
}
.tile--pipe {
  grid-column: 1 / 3;
}
.tile--log {
  grid-column: 3 / 5;
}
.tile--beat {
  grid-column: 5 / 7;
}
.tile-visual {
  position: relative;
  flex: 1 1 auto;
  min-height: 120px;
  margin-bottom: 20px;
}
.tile-body {
  position: relative;
  z-index: 1;
  margin-top: auto;
}
/* These two draw to fixed sizes: the stage rail and the full deploy log. */
.tile--rail .tile-visual,
.tile--log .tile-visual {
  min-height: 172px;
}
.tile-num {
  font: 500 12px/1 var(--f-text);
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.tile h3 {
  margin: 12px 0 8px;
  font-size: var(--t-h3);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.tile-text {
  max-width: 42ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
}

/* 01 code diff */
.tile--code .tile-visual {
  display: flex;
  align-items: flex-start;
}
.code {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.22));
  box-shadow: inset 0 1px 0 var(--rim);
  font: 400 13px/1.85 var(--f-mono);
  color: var(--fg-3);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.code-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-4);
}
.code-bar b {
  margin-left: 12px;
  font-weight: 450;
  font-size: 12px;
  color: var(--fg-3);
}
.code-lines {
  padding: 14px 0 18px;
}
/* Collapsed hunk: the signature and the change, not the whole file. */
.code-lines li:nth-child(1),
.code-lines li:nth-child(n + 3):nth-child(-n + 5),
.code-lines li:nth-child(12) {
  display: none;
}
.code-lines li {
  display: grid;
  grid-template-columns: 22px 34px max-content;
  white-space: pre;
  transition: transform var(--d-slow) var(--ease-out), background-color var(--d-slow);
}
.code-lines li::before {
  content: "";
  text-align: center;
}
.code-lines i {
  font-style: normal;
  color: var(--fg-4);
}
.code-lines em {
  font-style: normal;
  color: var(--fg);
}
.code-lines s {
  text-decoration: none;
  color: #c9c9d0;
}
.code-lines .add {
  background: linear-gradient(90deg, var(--accent-dim), rgba(197, 242, 58, 0.04) 70%, transparent);
  box-shadow: inset 2px 0 0 var(--accent);
}
.code-lines .add::before {
  content: "+";
  color: var(--accent);
}
.code-lines .del {
  opacity: 0.45;
}
.code-lines .del::before {
  content: "\2212";
  color: var(--fg-3);
}
.code-lines .del span {
  text-decoration: line-through;
  text-decoration-color: var(--fg-4);
}
.code-lines .comment span,
.code-lines .c {
  color: var(--fg-4);
}
.tile--code:hover .code-lines .add {
  transform: translateX(6px);
}
.caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}
.code-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--fg-4);
}
.code-foot b {
  font-weight: 450;
  color: var(--fg-3);
}

/* 02 product stages: the same screen growing from MVP to v2 */
.stages {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding-bottom: 30px;
}
.stage {
  position: relative;
  display: grid;
  gap: 10px;
}
.stage-shot {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #0a0d1c;
  box-shadow: inset 0 1px 0 var(--rim), 0 18px 32px -14px rgba(0, 0, 0, 0.85);
}
.stage-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 0;
  transition: transform 900ms var(--ease-out), filter 600ms;
}
.stage:nth-child(1) .stage-shot {
  height: 64px;
}
.stage:nth-child(1) img {
  filter: grayscale(1) brightness(0.5) contrast(0.85) blur(0.4px);
}
.stage:nth-child(2) .stage-shot {
  height: 94px;
}
.stage:nth-child(2) img {
  filter: grayscale(0.7) brightness(0.72);
}
.stage:nth-child(3) .stage-shot {
  height: 124px;
  border-color: rgba(47, 211, 168, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 40px -14px rgba(47, 211, 168, 0.28);
}
.tile--rail:hover .stage img {
  transform: scale(1.06);
}
.stage figcaption {
  font: 450 11px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.stage::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -24px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
  transition: background-color 300ms, box-shadow 300ms;
  transition-delay: calc(200ms + var(--n) * 420ms);
}
.stages-rail {
  position: absolute;
  left: 4px;
  right: 0;
  bottom: 10px;
  height: 1px;
  background: var(--line-2);
}
.stages-rail b {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
  transform-origin: 0 50%;
  transition: transform 1.2s var(--ease-out) 200ms;
}
.fx .tile--rail:not(.was-live) .stages-rail b {
  transform: scaleX(0);
}
.fx .tile--rail:not(.was-live) .stage::after {
  background: var(--bg-3);
  box-shadow: 0 0 0 1px var(--line-3);
}

/* 03 mobile: the real Tiporra render, bleeding off the tile */
.tile--mobile .tile-visual {
  min-height: 150px;
}
.tile--mobile .tile-visual::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -40%;
  width: 120%;
  height: 160%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--p-tiporra) 22%, transparent), transparent);
  pointer-events: none;
}
.tile--mobile img {
  position: absolute;
  top: -44px;
  right: -64px;
  width: min(72%, 300px);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85);
  transform: rotate(-6deg);
  transition: transform 900ms var(--ease-out);
}
.tile--mobile:hover img {
  transform: rotate(-3deg) translateY(-6px);
}

/* 04 pipeline: a snake of four steps with a packet running through */
.pipe {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  place-items: center;
}
.pipe-track {
  position: absolute;
  top: 25%;
  bottom: 25%;
  left: 25%;
  right: 25%;
  border: 1px dashed var(--line-3);
  border-left: 0;
  border-radius: 0 22px 22px 0;
}
.pipe-track b {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 242, 58, 0.18), 0 0 14px rgba(197, 242, 58, 0.35);
  left: 50%;
  top: 0;
  animation: packet 5s linear infinite;
  z-index: 0;
}
.pipe-node {
  position: relative;
  z-index: 1;
  grid-column: var(--c);
  grid-row: var(--r);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  box-shadow: inset 0 1px 0 var(--rim), 0 10px 24px -10px rgba(0, 0, 0, 0.8);
  font: 450 12.5px/1 var(--f-mono);
  letter-spacing: 0.02em;
  color: var(--fg);
}
.pipe-node i {
  font-style: normal;
  font-size: 10px;
  color: var(--fg-4);
}
.pipe-node.is-model {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(197, 242, 58, 0.1), rgba(197, 242, 58, 0.03)), var(--bg-1);
}
.pipe-node.is-model i {
  color: var(--accent);
}

/* 05 deploy log, in a small terminal */
.term {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.22));
  box-shadow: inset 0 1px 0 var(--rim);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  flex: none;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.term-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-4);
}
.term-bar b {
  margin-left: 10px;
  font: 450 11px/1 var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.log {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 16px;
  font: 400 12.5px/1.95 var(--f-mono);
  color: var(--fg-2);
}
.log li {
  display: grid;
  grid-template-columns: auto 14px minmax(0, 1fr) auto;
  gap: 12px;
  white-space: nowrap;
}
.log i {
  font-style: normal;
  color: var(--fg-4);
}
.log b {
  font-weight: 450;
  color: var(--accent);
}
.log em {
  font-style: normal;
  color: var(--fg-4);
}
.log li:last-child {
  color: var(--fg);
}
.log .dot {
  animation: dim 2s var(--ease-io) infinite;
}
.term-progress {
  position: relative;
  height: 2px;
  flex: none;
  background: var(--line);
}
.term-progress b {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
  transform-origin: 0 50%;
  transition: transform 1.8s var(--ease-out) 200ms;
}
.fx .tile--log:not(.was-live) .term-progress b {
  transform: scaleX(0);
}
.fx .tile--log:not(.was-live) li {
  opacity: 0;
  transform: translateX(-6px);
}
.fx .tile--log li {
  transition: opacity 300ms, transform 300ms var(--ease-out);
  transition-delay: calc(var(--n) * 380ms);
}

/* 06 heartbeat: a month of quiet watching */
.beat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.beat-bar {
  position: relative;
  height: 60px;
  --ticks: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 8px);
  background: linear-gradient(180deg, var(--line-3), rgba(255, 255, 255, 0.1));
  -webkit-mask: var(--ticks);
  mask: var(--ticks);
}
.beat-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(197, 242, 58, 0.5) 70%, var(--accent)) no-repeat;
  background-size: 34% 100%;
  background-position: 70% 0;
  animation: sweep 4s linear -2.6s infinite;
}
.beat-meta,
.beat-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 450 11px/1 var(--f-mono);
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.beat-meta b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.beat-meta span {
  margin-left: auto;
  color: var(--fg-3);
}
.beat-scale {
  justify-content: space-between;
  color: var(--fg-4);
}
.beat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.beat-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  font: 450 10.5px/1 var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}

@media (max-width: 1023px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }
  .bento .tile {
    grid-column: auto;
    grid-row: auto;
    min-height: 280px;
  }
  .bento .tile--code,
  .bento .tile--beat {
    grid-column: 1 / -1;
  }
}
@media (max-width: 639px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .bento {
    gap: 12px;
  }
  .bento .tile {
    min-height: 0;
    padding: 20px;
  }
  /* Phones: each visual is a short strip that fades out, a hint rather than a scene. */
  .tile-visual,
  .tile--code .tile-visual,
  .tile--mobile .tile-visual,
  .tile--rail .tile-visual,
  .tile--log .tile-visual {
    height: 120px;
    min-height: 0;
    flex: none;
    margin-bottom: 16px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
    mask-image: linear-gradient(180deg, #000 70%, transparent);
  }
  .tile h3 {
    margin: 8px 0 6px;
  }
  /* Phones show only the change itself; the full file costs a screen of scroll. */
  .code-lines li:nth-child(-n + 8),
  .code-lines li:nth-child(12),
  .code-foot {
    display: none;
  }
  .code {
    font-size: 10.5px;
    -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent 98%);
    mask-image: linear-gradient(90deg, #000 72%, transparent 98%);
  }
  .tile--mobile img {
    width: 55%;
    top: -30px;
    right: -24px;
  }
}

/* ---------- Process ---------- */
.process {
  position: relative;
}
.process-rail {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-2);
}
.process-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
  transform-origin: 0 0;
  transform: scaleX(max(var(--progress, 1), 0.02));
}
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding-top: 40px;
  counter-reset: step;
}
.step {
  display: flex;
  flex-direction: column;
  padding: 24px 20px 22px;
  background: radial-gradient(300px 180px at 100% 0%, rgba(255, 255, 255, 0.045), transparent 65%),
    linear-gradient(180deg, var(--bg-2), color-mix(in oklab, var(--bg-2) 70%, var(--bg-0)));
  transition: box-shadow var(--d-base), border-color var(--d-base);
}
/* The step the rail has reached (and any hovered step) is rimmed in lime. */
.step.is-current,
.step:hover {
  border-top-color: rgba(197, 242, 58, 0.32);
  box-shadow: inset 0 1px 0 rgba(197, 242, 58, 0.28), 0 1px 0 rgba(0, 0, 0, 0.4), 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}
/* The node sits on the rail above each card. */
.step-node {
  position: absolute;
  top: -41px;
  left: 24px;
  width: 13px;
  height: 13px;
  border: 1px solid var(--line-3);
  border-radius: 50%;
  background: var(--bg-0);
  transition: background-color var(--d-base), border-color var(--d-base), box-shadow var(--d-base);
}
.step.is-on .step-node,
html:not(.fx) .step-node {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.step-ghost {
  position: absolute;
  right: -0.04em;
  bottom: -0.2em;
  font-size: 168px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.07em;
  color: rgba(237, 237, 239, 0.075);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 92%);
}
.step-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  z-index: -1;
}
.step-num {
  font: 500 12px/1 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.step h3 {
  margin: 24px 0 10px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.step-text {
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
}
.step-get {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.4;
  color: var(--fg);
}
.step-get-label {
  display: block;
  margin-bottom: 8px;
  font: 500 11px/1 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.step-get-value {
  display: block;
  min-height: 2.8em;
}
.step-get-value::before {
  content: "\21B3";
  margin-right: 8px;
  color: var(--accent);
}
@media (max-width: 1023px) {
  .process-rail {
    top: 0;
    bottom: 0;
    left: 6px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .process-fill {
    transform: scaleY(var(--progress, 1));
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 0;
    padding-left: 32px;
  }
  .step-node {
    top: 30px;
    left: -33px;
  }
  .step-get-value {
    min-height: 0;
  }
  .step-visual {
    max-width: 320px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 38%);
    column-gap: 28px;
    align-content: start;
  }
  .step > * {
    grid-column: 1;
  }
  .step > .step-visual {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
    max-width: none;
    margin-top: 0;
  }
}
/* Per-step micro-scenes (same vocabulary as the Services tiles). */
.step-visual {
  height: 96px;
  margin-top: 18px;
}
.mini {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 0 var(--rim);
}
.mini-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font: 450 10.5px/1 var(--f-mono);
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.mini-head b {
  font-weight: 450;
  color: var(--fg-4);
}
.mini-head b.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-3);
}
.mini-head b.live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.mini-doc i,
.mini-plan i {
  display: block;
  flex: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}
.mini-doc i {
  width: var(--w);
}
.mini-doc i.hl {
  background: linear-gradient(90deg, rgba(197, 242, 58, 0.5), rgba(197, 242, 58, 0.12));
}
.mini-plan {
  gap: 6px;
}
.mini-plan i {
  height: 8px;
  margin-left: var(--s);
  width: calc(var(--e) - var(--s));
}
.mini-plan i.hl {
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
}
.mini-commits {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  margin: 4px 2px 6px;
}
.mini-commits::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line-3);
}
.mini-commits i {
  position: relative;
  width: 9px;
  height: 9px;
  border: 1px solid var(--line-3);
  border-radius: 50%;
  background: var(--bg-2);
}
.mini-commits i.hl {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.mini-line,
.mini-checks {
  font: 450 11px/1.2 var(--f-mono);
  color: var(--fg-2);
}
.mini-line b,
.mini-checks b {
  margin-right: 6px;
  font-weight: 450;
  color: var(--accent);
}
.mini-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 6px;
}
.mini-ticks {
  position: relative;
  flex: 1;
  margin-top: 2px;
  --ticks: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 6px);
  background: linear-gradient(180deg, var(--line-3), rgba(255, 255, 255, 0.08));
  -webkit-mask: var(--ticks);
  mask: var(--ticks);
}
.mini-ticks::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(197, 242, 58, 0.5) 70%, var(--accent)) no-repeat;
  background-size: 40% 100%;
  background-position: 70% 0;
  animation: sweep 4s linear -2.6s infinite;
}

/* ---------- Approach ---------- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.approach-intro {
  grid-column: 1 / span 5;
  align-self: start;
  position: sticky;
  top: 96px;
}
.approach-intro .section-head {
  margin-bottom: 32px;
}
.studio-card {
  padding: 8px 24px;
}
.studio-card > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
}
.studio-card > div + div {
  border-top: 1px solid var(--line);
}
.studio-card dt {
  padding-top: 3px;
  font: 500 11px/1.4 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.studio-card dd {
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg);
}
.approach-shot {
  position: relative;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: #0a0d1c;
  box-shadow: inset 0 1px 0 var(--rim), 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.approach-shot img {
  width: 100%;
  aspect-ratio: 2.3 / 1;
  object-fit: cover;
  object-position: 50% 40%;
  transition: transform 1.2s var(--ease-out);
}
.approach-shot:hover img {
  transform: scale(1.04);
}
.approach-shot figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font: 500 11px/1.3 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.approach-shot figcaption span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-2);
}
.approach-shot figcaption span:last-child::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.principles {
  grid-column: 7 / -1;
  border-bottom: 1px solid var(--line);
}
.principle {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0 8px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
  transition: border-color var(--d-base);
}
.principle::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2px;
  height: 24px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform var(--d-base) var(--ease-out);
}
.principle:hover {
  border-top-color: var(--line-3);
}
.principle:hover::before {
  transform: scaleY(1);
}
.principle-key {
  grid-row: 1 / span 2;
  padding-top: 10px;
  padding-left: 14px;
  font: 500 12px/1 var(--f-text);
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.principle h3 {
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.principle p:not(.principle-key) {
  max-width: 46ch;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-2);
}
@media (max-width: 1023px) {
  .approach-intro,
  .principles {
    grid-column: 1 / -1;
    position: static;
  }
  .principles {
    margin-top: 48px;
  }
}
@media (max-width: 639px) {
  .principle {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 32px;
  }
  .principle-key {
    grid-row: auto;
    padding: 0 0 14px;
  }
  .studio-card > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

/* ---------- Contact ---------- */
.console {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(24px, 4vw, 64px);
  border: 1px solid var(--line-2);
  border-radius: 28px;
  background: radial-gradient(900px 560px at 0% 0%, rgba(255, 255, 255, 0.075), transparent 62%),
    radial-gradient(700px 420px at 100% 100%, rgba(255, 255, 255, 0.025), transparent 70%), var(--bg-1);
  box-shadow: inset 0 1px 0 var(--rim), 0 60px 120px -40px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
/* The hero's dot field, reused as a static texture in the lit corner. */
.console::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(rgba(255, 255, 255, 0.16) 0.9px, transparent 1.3px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(70% 65% at 0% 0%, #000 15%, transparent 82%);
  mask-image: radial-gradient(70% 65% at 0% 0%, #000 15%, transparent 82%);
}
.contact-intro {
  display: flex;
  flex-direction: column;
}
.contact-hints {
  margin-top: 8px;
}
.contact-hints .label {
  margin-bottom: 12px;
}
.contact-hints ol {
  counter-reset: hint;
}
.contact-hints li {
  counter-increment: hint;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg-2);
}
.contact-hints li::before {
  content: counter(hint, decimal-leading-zero);
  padding-top: 3px;
  font: 500 11px/1.4 var(--f-text);
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.contact-signoff {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 40px;
  font: 500 12px/1.4 var(--f-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact-form {
  position: relative;
  padding: clamp(20px, 2.6vw, 36px);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--bg-2);
  box-shadow: inset 0 1px 0 var(--rim), 0 24px 48px -24px rgba(0, 0, 0, 0.7);
}
.field label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
}
.field.full {
  grid-column: 1 / -1;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg-0);
  color: var(--fg);
  font-size: 16px;
  transition: border-color var(--d-fast), box-shadow var(--d-fast), background-color var(--d-fast);
}
.field textarea {
  height: auto;
  min-height: 148px;
  padding: 12px 14px;
  line-height: 1.55;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--fg-4);
}
.field input:hover,
.field textarea:hover {
  border-color: var(--line-3);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--danger);
}
.field-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font: 500 11px/1.4 var(--f-text);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.field-hint.is-ok > span:first-child {
  color: var(--accent);
}
.field textarea:user-invalid + .field-hint > span:first-child {
  color: var(--danger);
}
.form-actions {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
/* Cloudflare renders its iframe in a shadow root, so only the widget's host
   element (the slot's direct child) can be styled. The host is pulled out by
   1px so the slot's clip hides Cloudflare's own border; ours is drawn on top. */
.turnstile-slot {
  position: relative;
  height: 63px;
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
  font-size: 0;
  background: transparent;
}
.turnstile-slot.is-compact {
  height: 138px;
}
.turnstile-slot > * {
  margin: -1px;
  width: calc(100% + 2px) !important;
}
.turnstile-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}
/* Until the widget mounts (or when the site key cannot run on this host)
   the slot collapses; its width is kept so contact.js can size the widget. */
.turnstile-slot:empty,
.turnstile-slot.is-unavailable {
  height: 0;
  margin-top: -16px;
}
.turnstile-slot:empty::after,
.turnstile-slot.is-unavailable::after {
  content: none;
}
.submit-button {
  width: 100%;
  gap: 12px;
}
.submit-button:disabled {
  cursor: progress;
  transform: none;
}
.spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(10, 11, 5, 0.25);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.submit-button:disabled .spinner {
  display: block;
}
.submit-button:disabled .arrow {
  display: none;
}
#form-feedback {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
}
#form-feedback:empty {
  display: none;
}
#form-feedback[data-state] {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--fg);
}
#form-feedback[data-state="error"] {
  border-color: rgba(255, 107, 94, 0.4);
  background: rgba(255, 107, 94, 0.06);
  color: var(--danger);
}
#form-feedback[data-state="success"]::before {
  content: "\2713";
  color: var(--accent);
}
.form-privacy,
.form-footnote {
  margin-top: 16px;
  font: 500 11px/1.5 var(--f-text);
  letter-spacing: 0.02em;
  color: var(--fg-3);
}
.contact-form.is-sent > :not(.form-success) {
  display: none;
}
.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  min-height: 100%;
  padding-block: 24px;
}
.form-success .label::before {
  content: "\2713";
  margin-right: 8px;
  color: var(--accent);
}
.form-success h3 {
  font-size: var(--t-h2);
  line-height: 1;
  letter-spacing: -0.04em;
  outline: 0;
}
.form-success p:not(.label) {
  max-width: 40ch;
  color: var(--fg-2);
}
@media (max-width: 1023px) {
  .console {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-signoff {
    padding-top: 24px;
  }
}
@media (max-width: 639px) {
  .contact-section > .container {
    padding-inline: 8px;
  }
  .console {
    padding: 28px 12px 12px;
    border-radius: 24px;
  }
  .contact-intro {
    padding-inline: 8px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-form {
    padding: 20px 16px;
    border-radius: 16px;
  }
}

/* ---------- Work preview dialog ---------- */
.work-preview {
  width: min(1240px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: var(--bg-1);
  box-shadow: inset 0 1px 0 var(--rim), 0 60px 140px -20px rgba(0, 0, 0, 0.9);
  color: var(--fg-2);
  overflow: auto;
}
.work-preview::backdrop {
  background: rgba(4, 4, 6, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.preview-header h2 {
  margin-top: 10px;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.preview-close,
.preview-step {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  transition: background-color var(--d-fast), border-color var(--d-fast);
}
.preview-close:hover,
.preview-step:hover:not(:disabled) {
  border-color: var(--line-3);
  background: var(--bg-3);
}
.preview-step:disabled {
  opacity: 0.4;
  cursor: default;
}
.preview-close svg,
.preview-step svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.preview-description {
  margin-top: 8px;
  font-size: 15px;
}
.preview-figure {
  margin-top: 20px;
}
.preview-frame {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: #0a0d1c;
}
.preview-frame img {
  width: 100%;
  aspect-ratio: 2.37 / 1;
  object-fit: cover;
}
.preview-figure figcaption {
  margin-top: 12px;
  font: 500 11px/1.5 var(--f-text);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
#work-preview-position {
  font: 500 12px/1.4 var(--f-text);
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--fg-3);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(72px, 8vw, 112px);
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
}
.footer-tagline {
  margin-top: 16px;
  max-width: 28ch;
  font-size: 15px;
  color: var(--fg-3);
}
.footer-title {
  margin-bottom: 18px;
  font: 500 11px/1 var(--f-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.footer-col ul {
  display: grid;
  gap: 10px;
}
.footer-col a:not(.text-link) {
  font-size: 14px;
  color: var(--fg-2);
  transition: color var(--d-fast);
}
.footer-col a:not(.text-link):hover {
  color: var(--fg);
}
.footer-cta-text {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--fg-2);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  position: relative;
  margin-top: clamp(40px, 5vw, 64px);
  padding-block: 24px;
  font: 500 12px/1.4 var(--f-text);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--line);
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--d-fast);
}
.back-to-top:hover {
  color: var(--fg);
}
.back-to-top .arrow {
  width: 14px;
  height: 14px;
}
@media (max-width: 1023px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 479px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 404 ---------- */
.not-found {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  min-height: 100svh;
}
.not-found h1 {
  font-size: var(--t-display);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.not-found .lead {
  font-size: var(--t-lead);
}

/* ---------- Motion ---------- */
@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  70%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes line-in {
  from {
    transform: translateY(105%);
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes deck-in {
  from {
    opacity: 0;
    transform: translateZ(-600px) rotateX(30deg);
  }
}
@keyframes dim {
  50% {
    opacity: 0.35;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes packet {
  0% {
    left: 0;
    top: 0;
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  40% {
    left: 100%;
    top: 0;
  }
  60% {
    left: 100%;
    top: 100%;
  }
  94% {
    opacity: 1;
  }
  100% {
    left: 0;
    top: 100%;
    opacity: 0;
  }
}
@keyframes sweep {
  from {
    background-position: -40% 0;
  }
  to {
    background-position: 140% 0;
  }
}
@keyframes bus {
  0% {
    top: 0;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 56px);
    opacity: 0;
  }
}
@keyframes layer-ping {
  0%,
  100% {
    border-color: var(--line-3);
    color: var(--fg-3);
    box-shadow: none;
  }
  6%,
  14% {
    border-color: var(--accent-line);
    color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim);
  }
  30% {
    border-color: var(--line-3);
    color: var(--fg-3);
    box-shadow: none;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* First load: headline rises, copy fades up, the deck flies in back to front. */
.motion-ok .hero-title .line > span {
  animation: line-in 900ms var(--ease-out) both;
  animation-delay: calc(80ms + var(--line-i, 0) * 90ms);
}
.motion-ok .hero-meta,
.motion-ok .hero-sub,
.motion-ok .hero-actions,
.motion-ok .hero-scope {
  animation: fade-up 600ms var(--ease-out) both;
}
.motion-ok .hero-meta {
  animation-delay: 0ms;
}
.motion-ok .hero-sub {
  animation-delay: 450ms;
}
.motion-ok .hero-actions {
  animation-delay: 530ms;
}
.motion-ok .hero-scope {
  animation-delay: 610ms;
}
.motion-ok .deck-fly {
  animation: deck-in 1100ms var(--ease-out) both;
  animation-delay: calc(250ms + var(--i) * 120ms);
}
.motion-ok .hero-horizon {
  animation: fade-up 900ms var(--ease-out) 600ms both;
}

/* Looping scenes run only while their [data-live] container is on screen. */
.fx [data-live]:not(.is-live) *,
.fx [data-live]:not(.is-live) *::before,
.fx [data-live]:not(.is-live) *::after {
  animation-play-state: paused !important;
}

/* Scroll reveals (main.js): only elements below the fold at load are hidden. */
.reveal {
  transition: opacity var(--d-slow) var(--ease-out), transform var(--d-slow) var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 60ms);
}
.reveal.is-pending {
  opacity: 0;
  transform: translateY(24px);
}
.section-head.reveal.is-pending {
  opacity: 1;
  transform: none;
}
.section-head.reveal .line > span {
  transition: transform var(--d-cine) var(--ease-out);
}
.section-head.reveal .line + .line > span {
  transition-delay: 90ms;
}
.section-head.reveal.is-pending .line > span {
  transform: translateY(105%);
}
.section-head.reveal > *:not(h2):not(div),
.section-head.reveal > div > .label {
  transition: opacity var(--d-slow) var(--ease-out) 200ms, transform var(--d-slow) var(--ease-out) 200ms;
}
.section-head.reveal.is-pending > *:not(h2):not(div),
.section-head.reveal.is-pending > div > .label {
  opacity: 0;
  transform: translateY(12px);
}
/* Work panels open like a shutter and the render settles. */
.work-panel.reveal {
  transition: clip-path var(--d-cine) var(--ease-out);
  clip-path: inset(0 round 28px);
}
.work-panel.reveal.is-pending {
  opacity: 1;
  transform: none;
  clip-path: inset(8% 6% 8% 6% round 28px);
}
.work-panel.reveal .work-media img {
  transition: transform 1.4s var(--ease-out);
}
.work-panel.reveal.is-pending .work-media img {
  transform: scale(1.12);
}
.work-panel.reveal .work-copy > * {
  transition: opacity var(--d-slow) var(--ease-out), transform var(--d-slow) var(--ease-out);
}
.work-panel.reveal .work-copy > :nth-child(2) {
  transition-delay: 70ms;
}
.work-panel.reveal .work-copy > :nth-child(3) {
  transition-delay: 140ms;
}
.work-panel.reveal .work-copy > :nth-child(4) {
  transition-delay: 210ms;
}
.work-panel.reveal .work-copy > :nth-child(5) {
  transition-delay: 280ms;
}
.work-panel.reveal.is-pending .work-copy > * {
  opacity: 0;
  transform: translateY(20px);
}
.principle.reveal h3 {
  transition: transform var(--d-cine) var(--ease-out);
}
.principle.reveal.is-pending {
  transform: none;
}
.principle.reveal.is-pending h3 {
  transform: translateY(30%);
}

/* Sticky stack (desktop, motion allowed): each project panel parks under the
   header and the next one slides over it; fx.js dims and scales the one below. */
@media (min-width: 1024px) {
  .motion-ok .work-panel:not(:last-child) {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}
@media (max-width: 767px) {
  .work-media {
    aspect-ratio: 4 / 3;
  }
}
@media (max-width: 1023px) {
  .work-panel.reveal,
  .work-panel.reveal.is-pending {
    clip-path: none;
  }
  .work-panel.reveal.is-pending {
    opacity: 0;
  }
  .work-panel.reveal {
    transition: opacity var(--d-slow) var(--ease-out);
  }
}

/* ---------- First-visit loader (loader.js) ----------
   Shown only while html.loader is set and not .loader-done. The Orbit mark
   draws in (ring, then R), the lime orb laps the ring with a glowing tail and
   settles at its place; on .loader-leave the mark flies to the header logo
   (loader.js) and the backdrop opens as an iris from the centre. */
@property --iris {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0%;
}
.site-loader {
  display: none;
}
.loader:not(.loader-done) {
  overflow: hidden;
}
.loader:not(.loader-done) .site-loader {
  position: fixed;
  inset: 0;
  z-index: 90; /* under the film grain, over the header */
  display: grid;
  place-items: center;
  cursor: progress;
}
/* The header logo stays hidden until the flying mark lands on it, and the
   hero intro waits for the iris to open. */
.loader:not(.loader-done) .header .logo-mark {
  opacity: 0;
}
.loader:not(.loader-go) #home *,
.loader:not(.loader-go) .header {
  animation-play-state: paused !important;
}
.loader:not(.loader-go) .header {
  opacity: 0;
}
.loader .header {
  transition: opacity 600ms var(--ease-out) 300ms;
}
.loader-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 46%, rgba(197, 242, 58, 0.06), transparent 70%),
    radial-gradient(circle at 50% 46%, var(--bg-2), var(--bg-0) 60%);
  -webkit-mask: radial-gradient(circle at 50% 46%, transparent var(--iris), #000 calc(var(--iris) + 1px));
  mask: radial-gradient(circle at 50% 46%, transparent var(--iris), #000 calc(var(--iris) + 1px));
}
.loader-leave .loader-bg {
  animation: iris 950ms cubic-bezier(0.65, 0, 0.35, 1) 120ms both;
}
.loader-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 28px;
  margin-top: -8vh;
}
.loader-mark {
  width: clamp(96px, 12vw, 132px);
  height: auto;
  overflow: visible;
  color: var(--fg);
}
.loader-ring,
.loader-tail {
  fill: none;
  stroke-width: 3;
}
.loader-ring {
  stroke: currentColor;
  stroke-opacity: 0.32;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transform: rotate(-90deg);
  transform-origin: 32px 32px;
  animation: draw 900ms var(--ease-out) 100ms forwards;
}
.loader-r {
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 800ms cubic-bezier(0.65, 0, 0.35, 1) 450ms forwards;
}
/* The orb and its tail turn together; the tail is the last 22% of the ring
   behind the orb, so it trails it as the group rotates. */
.loader-orbit {
  transform-origin: 32px 32px;
  transform: rotate(-315deg);
  animation: orbit 1300ms cubic-bezier(0.6, 0, 0.25, 1) 200ms forwards;
}
.loader-tail {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 0.22 0.78;
  stroke-dashoffset: -0.78;
  transform: rotate(-90deg);
  transform-origin: 32px 32px;
  filter: drop-shadow(0 0 3px var(--accent));
  opacity: 0;
  animation: tail 1300ms linear 200ms forwards;
}
.loader-orb {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px rgba(197, 242, 58, 0.7));
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: orb-in 300ms var(--ease-out) 200ms forwards;
}
.loader-word {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
  animation: fade-up 700ms var(--ease-out) 700ms both;
}
.loader-word span + span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.loader-meter {
  position: absolute;
  inset: auto 0 clamp(32px, 7vh, 64px);
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(240px, 60vw);
  margin-inline: auto;
  animation: fade-up 600ms var(--ease-out) 300ms both;
}
.loader-count {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--fg-2);
}
.loader-bar {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line-2);
  overflow: hidden;
}
.loader-bar b {
  display: block;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.loader-leave .loader-word,
.loader-leave .loader-meter {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 250ms, transform 250ms;
  animation: none;
}
.loader-leave .site-loader {
  pointer-events: none;
}
@keyframes iris {
  to {
    --iris: 150%;
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes orbit {
  to {
    transform: rotate(45deg);
  }
}
@keyframes tail {
  0% {
    opacity: 0;
  }
  15%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes orb-in {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .reveal.is-pending,
  .reveal.is-pending *,
  .work-panel.reveal.is-pending .work-copy > * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .signal::after,
  .caret,
  .log .dot {
    animation: none;
  }
  .work-panel {
    transform: none;
    filter: none;
  }
  .work-media picture {
    transform: none;
  }
  .pipe-track b {
    left: 50%;
    top: 0;
    animation: none;
  }
  .beat-bar::after {
    animation: none;
    background-position: 60% 0;
  }
  .deck-plane {
    transform: rotateX(14deg) rotateY(-22deg) rotateZ(4deg);
  }
}
@media (prefers-reduced-motion: reduce) and (max-width: 1023px) {
  .deck-plane {
    transform: rotateX(12deg) rotateY(-14deg) rotateZ(3deg);
  }
}
