/* Self-hosted variable fonts (latin subset, SIL Open Font License) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/inter-latin-var.woff2") format("woff2"); 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: "Plus Jakarta Sans"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-var.woff2") format("woff2"); 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; }

/* ==========================================================================
   VergeMount design system
   Tokens first, then base, layout, components, pages. No build step.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --bg: #060606;
  --bg-1: #0d0d0e;
  --bg-2: #141416;
  --bg-3: #1b1b1e;

  /* Lines */
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --line-3: rgba(255, 255, 255, 0.28);

  /* Text */
  --text: #f6f6f4;
  --text-2: rgba(246, 246, 244, 0.72);
  --text-3: rgba(246, 246, 244, 0.54);

  /* Accent: electric blue is the interactive colour */
  --blue: #2d63f0;
  --blue-hover: #4a7bff;
  --blue-text: #6c97ff;
  --blue-soft: rgba(45, 99, 240, 0.14);

  /* Secondary palette, used sparingly */
  --sage: #9fb86c;
  --gold: #c7a467;

  /* Type */
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --fs-0: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --fs-1: clamp(0.9375rem, 0.92rem + 0.1vw, 1rem);
  --fs-2: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-4: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --fs-5: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  --fs-6: clamp(2.6rem, 1.6rem + 4.4vw, 5.25rem);

  /* Spacing (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 7rem;
  --section-y: clamp(4.5rem, 3rem + 6vw, 8rem);

  /* Layout */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --w-wide: 1240px;
  --w-text: 720px;

  /* Shape and motion */
  --radius: 6px;
  --radius-lg: 10px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --nav-h: 68px;

  /* Motion system. One vocabulary for every animation on the site. */
  --dur-1: 160ms;   /* micro: focus, press, colour */
  --dur-2: 280ms;   /* hover, small state changes */
  --dur-3: 520ms;   /* panels, section entrances */
  --dur-4: 900ms;   /* hero and large compositions */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dist-s: 8px;
  --dist-m: 16px;
  --dist-l: 32px;
  --stagger: 70ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: var(--s-4); top: -4rem; z-index: 200;
  background: var(--text); color: var(--bg); padding: var(--s-3) var(--s-4);
  border-radius: var(--radius); font-weight: 600;
  transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: var(--s-4); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: var(--fs-6); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: var(--fs-5); }
h3 { font-size: var(--fs-3); line-height: 1.2; letter-spacing: -0.015em; }
h4 { font-size: var(--fs-2); line-height: 1.3; letter-spacing: -0.01em; }
p { text-wrap: pretty; }

.lede { font-size: var(--fs-2); color: var(--text-2); max-width: 60ch; line-height: 1.6; }
.muted { color: var(--text-2); }
.mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-0);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-text);
  font-weight: 500;
}

.text-link {
  color: var(--blue-text);
  text-decoration: underline;
  text-decoration-color: rgba(108, 151, 255, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-2);
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--w-wide) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--text { max-width: calc(var(--w-text) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section--first { border-top: 0; }
.section--tint { background: var(--bg-1); }

.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(2.25rem, 5vw, 4rem); max-width: 56rem; }
.section-head h2 { margin-top: var(--s-1); }
.section-head--split { max-width: none; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s-8); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-1); line-height: 1;
  padding: 0.95rem 1.4rem; min-height: 48px;
  border-radius: var(--radius); border: 1px solid transparent;
  transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  white-space: nowrap;
}
.btn .arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--secondary { border-color: var(--line-3); color: var(--text); }
.btn--secondary:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn--sm { padding: 0.7rem 1.05rem; min-height: 40px; font-size: var(--fs-0); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-1);
  color: var(--text);
  border-bottom: 1px solid var(--line-3); padding-bottom: 2px;
  transition: color var(--dur-2), border-color var(--dur-2);
}
.link-arrow:hover { color: var(--blue-text); border-color: var(--blue-text); }
.link-arrow .arrow { transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.brand img { width: 34px; height: 17px; }
.brand__word { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; }

.nav-links { display: none; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.25rem); }
.nav-links a { font-size: var(--fs-0); font-weight: 500; color: var(--text-2); padding-block: var(--s-2); position: relative; transition: color var(--dur-2); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue);
}
.nav-cta { display: none; }

.nav-toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: var(--radius);
}
.nav-toggle__bars { width: 18px; height: 12px; position: relative; display: block; }
.nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars i {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--text); border-radius: 1px;
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars i { top: 5px; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i { opacity: 0; }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99; background: var(--bg);
  padding: var(--s-5) var(--gutter) var(--s-7);
  display: flex; flex-direction: column; gap: var(--s-1); overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(calc(var(--dist-s) * -1));
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-menu > * { opacity: 0; transform: translateY(var(--dist-m)); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
.mobile-menu.is-open > * { opacity: 1; transform: none; }
.mobile-menu.is-open > :nth-child(1) { transition-delay: 60ms; } .mobile-menu.is-open > :nth-child(2) { transition-delay: 110ms; } .mobile-menu.is-open > :nth-child(3) { transition-delay: 160ms; } .mobile-menu.is-open > :nth-child(4) { transition-delay: 210ms; } .mobile-menu.is-open > :nth-child(5) { transition-delay: 260ms; }
.mobile-menu a:not(.btn) {
  font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; letter-spacing: -0.02em;
  padding: var(--s-4) 0; border-bottom: 1px solid var(--line);
}
.mobile-menu a[aria-current="page"] { color: var(--blue-text); }
.mobile-menu .btn { margin-top: var(--s-5); align-self: stretch; }
body.menu-open { overflow: hidden; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(4rem, 3rem + 5vw, 7.5rem); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 85%);
  opacity: 0.55;
}
.hero__grid { position: relative; display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-top: var(--s-5); max-width: 14ch; }
.hero .lede { margin-top: var(--s-5); max-width: 52ch; }
.hero__audience { margin-top: var(--s-4); color: var(--text-3); font-size: var(--fs-0); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

/* ---------- Paths (work with us vs our products) ---------- */
.paths { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.path { background: var(--bg); padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; gap: var(--s-4); align-items: flex-start; transition: background-color var(--dur-2); }
.path:hover { background: var(--bg-1); }
.path h2 { font-size: var(--fs-4); letter-spacing: -0.025em; }
.path p { color: var(--text-2); max-width: 44ch; }
.path .link-arrow { margin-top: auto; }
@media (min-width: 800px) { .paths { grid-template-columns: 1fr 1fr; } }

/* ---------- Capabilities ---------- */
.caps { border-top: 1px solid var(--line-2); }
.cap { display: grid; gap: var(--s-3) var(--s-6); padding-block: clamp(1.75rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.cap__num { font-family: var(--font-mono); font-size: var(--fs-0); color: var(--text-3); }
.cap h3 { font-size: var(--fs-4); letter-spacing: -0.025em; }
.cap p { color: var(--text-2); max-width: 52ch; }
.cap ul { display: flex; flex-wrap: wrap; gap: var(--s-2); align-content: flex-start; }
.tag { display: inline-block; border: 1px solid var(--line-2); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: var(--fs-0); color: var(--text-2); }

.cap { position: relative; transition: background-color var(--dur-2) var(--ease-out); }
.cap__title { grid-column: auto; }
.cap__toggle {
  display: inline-flex; align-items: center; gap: var(--s-3); text-align: left;
  font: inherit; letter-spacing: inherit; color: var(--text);
  transition: color var(--dur-2) var(--ease-out);
}
.cap__toggle:hover, .cap.is-open .cap__toggle { color: var(--blue-text); }
.cap__icon { position: relative; flex: none; width: 14px; height: 14px; opacity: 0.7; transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2); }
.cap__icon::before, .cap__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px; background: currentColor; border-radius: 1px; }
.cap__icon::after { transform: rotate(90deg); transition: transform var(--dur-3) var(--ease-out); }
.cap.is-open .cap__icon { transform: rotate(180deg); opacity: 1; }
.cap.is-open .cap__icon::after { transform: rotate(0deg); }

/* Dropdown panel: inline accordion on touch and small screens */
.cap__more {
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-3);
}
.cap__more-inner { min-height: 0; overflow: hidden; display: grid; gap: var(--s-3); align-content: start; }
.cap.is-open .cap__more { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
.cap__more-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); padding-top: var(--s-3); }
.cap__more .check-list { gap: var(--s-2); font-size: var(--fs-0); }
.cap__more .text-link { justify-self: start; font-size: var(--fs-0); padding-bottom: var(--s-2); }

@media (min-width: 900px) {
  .cap__title, .cap__more { min-width: 0; }
  /* Floating dropdown on desktop: overlays the next row, so nothing below it shifts */
  .cap__more {
    position: absolute; z-index: 6; top: calc(100% - 1px); left: 6rem; right: 0; display: block;
    opacity: 0; visibility: hidden; transform: translateY(calc(var(--dist-s) * -1));
    background: var(--bg-2); border: 1px solid var(--line-3); border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
    transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
    pointer-events: none;
  }
  .cap.is-open .cap__more { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
  .cap__more-inner { overflow: visible; padding: var(--s-2) var(--s-5) var(--s-4); grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }
  .cap__more-label { grid-column: 1 / -1; padding-top: var(--s-3); }
  .cap__more .check-list { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }
  .cap__more .text-link { grid-column: 1 / -1; padding-bottom: 0; }
}
@media (min-width: 900px) {
  .cap { grid-template-columns: 4rem minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

/* ---------- Work cards ---------- */
.work-grid { display: grid; gap: var(--s-5); }
.work-card {
  display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  background: var(--bg-1); overflow: hidden;
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.work-card:hover { border-color: var(--line-3); }
.work-card__media { aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; position: relative; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work-card__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.work-card__meta { display: flex; justify-content: space-between; gap: var(--s-3); align-items: center; }
.work-card h3 { font-size: var(--fs-3); }
.work-card p { color: var(--text-2); font-size: var(--fs-1); }
.work-card .tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; padding-top: var(--s-2); }
.work-card .link-arrow { margin-top: var(--s-2); align-self: flex-start; }
.stretched::after { content: ""; position: absolute; inset: 0; }
.work-card { position: relative; }
.work-card a:not(.stretched) { position: relative; z-index: 1; }
@media (min-width: 760px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .work-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.status--beta::before, .status--early::before { background: var(--gold); }

/* ---------- Products ---------- */
.product { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); align-items: center; }
.product:first-of-type { border-top: 0; padding-top: 0; }
.product__media { border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 10; position: relative; }
.product__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.product__body { display: grid; gap: var(--s-4); align-content: start; }
.product__body h3 { font-size: var(--fs-4); letter-spacing: -0.03em; }
.product__body p { color: var(--text-2); max-width: 52ch; }
.facts { display: grid; gap: var(--s-3); margin-top: var(--s-2); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--fs-0); }
.facts dt { color: var(--text-3); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; padding-top: 2px; }
.facts dd { margin: 0; color: var(--text-2); }
.product__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .product:nth-of-type(even) .product__media { order: 2; }
}

/* Compact list of further products */
.mini-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: var(--s-7); }
.mini { background: var(--bg); padding: var(--s-5); display: grid; gap: var(--s-2); }
.mini h4 { font-size: var(--fs-2); }
.mini p { font-size: var(--fs-0); color: var(--text-2); }
@media (min-width: 760px) { .mini-list { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Capabilities (tech) ---------- */
.tech { display: grid; gap: var(--s-5); }
.tech__group { border-top: 1px solid var(--line-2); padding-top: var(--s-4); display: grid; gap: var(--s-3); }
.tech__group h3 { font-size: var(--fs-2); font-family: var(--font-display); }
.tech__group p { font-size: var(--fs-0); color: var(--text-3); }
.tech__group ul { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tech__group li { font-family: var(--font-mono); font-size: 0.8125rem; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0.3rem 0.65rem; color: var(--text-2); }
@media (min-width: 760px) { .tech { grid-template-columns: repeat(2, 1fr); gap: var(--s-6) var(--s-7); } }
@media (min-width: 1100px) { .tech { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Principles ---------- */
.principles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.principle { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.25rem); display: grid; gap: var(--s-3); align-content: start; }
.principle h3 { font-size: var(--fs-3); }
.principle p { color: var(--text-2); }
.principle__n { font-family: var(--font-mono); font-size: var(--fs-0); color: var(--gold); }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .principles--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-2); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: var(--s-5) 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-weight: 400; font-size: 1.5rem; color: var(--text-3); transition: transform var(--dur-2) var(--ease-out); flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; color: var(--blue-text); }
.faq summary:hover { color: var(--blue-text); }
.faq details p { padding-bottom: var(--s-5); color: var(--text-2); max-width: 62ch; }

/* ---------- CTA band ---------- */
.cta { padding-block: clamp(4.5rem, 3rem + 6vw, 8rem); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: 0.4;
  mask-image: linear-gradient(0deg, rgba(0,0,0,0.6), transparent 80%);
  -webkit-mask-image: linear-gradient(0deg, rgba(0,0,0,0.6), transparent 80%);
}
.cta__inner { position: relative; display: grid; gap: var(--s-6); }
.cta h2 { font-size: var(--fs-6); letter-spacing: -0.035em; max-width: 16ch; }
.cta p { color: var(--text-2); max-width: 54ch; font-size: var(--fs-2); }
.cta__next { display: grid; gap: var(--s-3); margin-top: var(--s-2); max-width: 54ch; }
.cta__next li { display: grid; grid-template-columns: 2rem 1fr; gap: var(--s-3); font-size: var(--fs-1); color: var(--text-2); }
.cta__next li span:first-child { font-family: var(--font-mono); color: var(--text-3); }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem) clamp(3rem, 2rem + 3vw, 5rem); position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: 0.45;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 90%);
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: var(--fs-6); margin-top: var(--s-4); max-width: 18ch; }
.page-hero .lede { margin-top: var(--s-5); }
.breadcrumb { font-family: var(--font-mono); font-size: var(--fs-0); color: var(--text-3); }
.breadcrumb a:hover { color: var(--text); }

/* ---------- Service detail ---------- */
.service { display: grid; gap: var(--s-5) var(--s-7); padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; padding-top: 0; }
.service h2 { font-size: var(--fs-4); letter-spacing: -0.03em; }
.service__intro p { color: var(--text-2); margin-top: var(--s-3); max-width: 46ch; }
.service__num { font-family: var(--font-mono); font-size: var(--fs-0); color: var(--text-3); display: block; margin-bottom: var(--s-3); }
.check-list { display: grid; gap: var(--s-3); }
.check-list li { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--s-3); color: var(--text-2); }
.check-list li::before { content: ""; width: 1rem; height: 1px; background: var(--blue-text); margin-top: 0.8em; }
.service h3.mini-title { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: var(--s-3); }
@media (min-width: 900px) { .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }

.engage { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.engage > div { background: var(--bg); padding: var(--s-5); }
.engage h3 { font-size: var(--fs-2); font-family: var(--font-display); }
.engage p { margin-top: var(--s-2); font-size: var(--fs-0); color: var(--text-2); }
@media (min-width: 760px) { .engage { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .engage { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Case study ---------- */
.case { display: grid; gap: var(--s-6) var(--s-7); padding-block: clamp(2.75rem, 5vw, 4.5rem); border-top: 1px solid var(--line); }
.case:first-of-type { border-top: 0; padding-top: 0; }
.case__head h2 { font-size: var(--fs-5); letter-spacing: -0.03em; margin-top: var(--s-3); }
.case__head p { margin-top: var(--s-3); color: var(--text-2); font-size: var(--fs-2); max-width: 44ch; }
.case__head .tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.case__media { margin-top: var(--s-5); border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 10; position: relative; }
.case__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.case__body { display: grid; gap: var(--s-5); align-content: start; }
.case__block h3 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-text); font-weight: 500; margin-bottom: var(--s-2); }
.case__block p { color: var(--text-2); max-width: 60ch; }
.case__block .check-list { margin-top: var(--s-2); }
@media (min-width: 960px) { .case { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } .case__head { position: sticky; top: calc(var(--nav-h) + 2rem); align-self: start; } }

.note-box { border: 1px dashed var(--line-3); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: var(--s-4); }
.note-box h3 { font-size: var(--fs-3); }
.note-box p { color: var(--text-2); max-width: 60ch; }

/* ---------- Team (about) ---------- */
.team { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.person { background: var(--bg); padding: var(--s-5); display: grid; gap: var(--s-2); align-content: start; }
.person h3 { font-size: var(--fs-3); }
.person .role { font-family: var(--font-mono); font-size: 0.75rem; color: var(--blue-text); letter-spacing: 0.06em; text-transform: uppercase; }
.person p { color: var(--text-2); font-size: var(--fs-1); }
@media (min-width: 800px) { .team { grid-template-columns: repeat(3, 1fr); } }

.profile { display: grid; gap: var(--s-5) var(--s-7); padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 1rem); }
.profile:first-of-type { border-top: 0; padding-top: 0; }
.profile__head h2 { font-size: var(--fs-5); letter-spacing: -0.03em; }
.profile__head .role { font-family: var(--font-mono); font-size: var(--fs-0); color: var(--blue-text); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--s-2); display: block; }
.profile__body { display: grid; gap: var(--s-4); max-width: 62ch; }
.profile__body p { color: var(--text-2); }
.profile__body .pull { font-family: var(--font-display); font-size: var(--fs-3); color: var(--text); line-height: 1.3; letter-spacing: -0.015em; }
@media (min-width: 900px) { .profile { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } .profile__head { position: sticky; top: calc(var(--nav-h) + 2rem); align-self: start; } }

.facts-table { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.facts-table div { display: grid; gap: var(--s-1) var(--s-6); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.facts-table dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.facts-table dd { margin: 0; color: var(--text-2); }
@media (min-width: 760px) { .facts-table div { grid-template-columns: 12rem 1fr; } }

/* ---------- Start a project (form) ---------- */
.start { display: grid; gap: var(--s-7); }
@media (min-width: 980px) { .start { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); gap: var(--s-8); align-items: start; } }
.form-card { display: grid; gap: var(--s-5); }
.form-card.hide, .start-aside.hide { display: none; }
.field-grid { display: grid; gap: var(--s-5); }
@media (min-width: 700px) { .field-grid { grid-template-columns: 1fr 1fr; } .field.full { grid-column: 1 / -1; } }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--fs-0); font-weight: 600; color: var(--text); }
.field .opt { color: var(--text-3); font-weight: 400; }
.req { color: var(--blue-text); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 0.85rem 0.95rem; min-height: 48px; color: var(--text); transition: border-color var(--dur-2), background-color var(--dur-2);
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--blue-text); outline: 2px solid var(--blue-soft); outline-offset: 0; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23999' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.95rem center; padding-right: 2.5rem; }
.field select option { background: var(--bg-2); color: var(--text); }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.submit-note { color: var(--text-3); font-size: var(--fs-0); max-width: 34ch; }
.form-error { display: none; color: #ff8a80; font-size: var(--fs-0); }
.form-error.show { display: block; }

.start-aside { display: grid; gap: var(--s-6); }
.aside-block { border-top: 1px solid var(--line-2); padding-top: var(--s-4); display: grid; gap: var(--s-4); }
.aside-block h2 { font-size: var(--fs-3); font-family: var(--font-display); }
.aside-block p { color: var(--text-2); }
.steps { display: grid; gap: var(--s-4); }
.steps li { display: grid; grid-template-columns: 2rem 1fr; gap: var(--s-3); color: var(--text-2); }
.steps li b { color: var(--text); font-weight: 600; }
.steps .n { font-family: var(--font-mono); color: var(--blue-text); }

.success { display: none; border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 4rem); gap: var(--s-4); background: var(--bg-1); }
.success.show { display: grid; }
.success h2 { font-size: var(--fs-4); }
.success p { color: var(--text-2); max-width: 54ch; }
.success .check { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--sage); display: grid; place-items: center; color: var(--sage); }
.success .check svg { width: 20px; height: 20px; stroke: currentColor; }

/* ---------- Prose (legal) ---------- */
.prose { max-width: var(--w-text); }
.prose h1 { font-size: var(--fs-5); margin-bottom: var(--s-3); }
.prose h2 { font-size: var(--fs-3); margin-top: var(--s-8); margin-bottom: var(--s-3); letter-spacing: -0.02em; scroll-margin-top: calc(var(--nav-h) + 1rem); }
.prose h3 { font-size: var(--fs-2); margin-top: var(--s-6); margin-bottom: var(--s-2); }
.prose p, .prose li { color: var(--text-2); }
.prose p { margin-top: var(--s-4); }
.prose ul, .prose ol { margin-top: var(--s-3); padding-left: 1.25rem; display: grid; gap: var(--s-2); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: var(--blue-text); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .updated { color: var(--text-3); font-size: var(--fs-0); }
.prose .toc { margin-top: var(--s-6); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: var(--s-5); background: var(--bg-1); }
.prose .toc p { margin: 0 0 var(--s-3); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.prose .toc ol { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin-top: var(--s-4); font-size: var(--fs-0); }
.prose th, .prose td { text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.prose th { color: var(--text); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-2); background: var(--bg); padding-block: clamp(3rem, 6vw, 5rem) 5.5rem; }
.footer__grid { display: grid; gap: var(--s-7); }
.footer__about p { color: var(--text-2); font-size: var(--fs-0); max-width: 42ch; margin-top: var(--s-4); }
.footer__legal { color: var(--text-3); font-size: var(--fs-0); margin-top: var(--s-3); }
.footer__col h2 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: var(--s-4); }
.footer__col ul { display: grid; gap: var(--s-3); }
.footer__col a { color: var(--text-2); font-size: var(--fs-0); transition: color var(--dur-2); }
.footer__col a:hover { color: var(--text); }
.footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.newsletter { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.newsletter input { flex: 1; min-width: 0; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 0.85rem; min-height: 44px; font-size: var(--fs-0); }
.newsletter input::placeholder { color: var(--text-3); }
.newsletter input:focus-visible { border-color: var(--blue-text); outline-offset: 0; }
.newsletter button { background: var(--text); color: var(--bg); border-radius: var(--radius); padding: 0 1rem; font-weight: 700; font-size: var(--fs-0); min-height: 44px; }
.newsletter button:hover { background: #fff; }
.newsletter-note { color: var(--text-3); font-size: var(--fs-0); margin-top: var(--s-3); }
.footer__bottom { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); color: var(--text-3); font-size: var(--fs-0); }
@media (min-width: 980px) { .footer__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) minmax(0, 1.1fr); gap: var(--s-8); } .footer__links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Reveal (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* (hero sequence replaced by .asm) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- DODGE chat widget ---------- */
#dodge-launcher {
  position: fixed; bottom: 20px; right: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line-3);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-0);
  padding: 0.8rem 1.1rem; border-radius: 999px; min-height: 44px;
  transition: border-color var(--dur-2), background-color var(--dur-2);
}
#dodge-launcher:hover { border-color: var(--blue-text); background: var(--bg-3); }
#dodge-launcher::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
#dodge-panel {
  position: fixed; bottom: 20px; right: 20px; z-index: 150;
  width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 96px));
  background: var(--bg-1); border: 1px solid var(--line-3); border-radius: var(--radius-lg);
  display: none; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
#dodge-panel.open { display: flex; }
#dodge-header { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.dodge-title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-1); letter-spacing: 0.04em; }
.dodge-title small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.75rem; color: var(--text-3); letter-spacing: 0; }
#dodge-close { width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--line-2); font-size: 1.25rem; line-height: 1; color: var(--text-2); }
#dodge-close:hover { color: var(--text); border-color: var(--line-3); }
#dodge-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.dodge-msg { max-width: 88%; padding: 0.6rem 0.8rem; border-radius: var(--radius); font-size: 0.875rem; line-height: 1.5; }
.dodge-msg.user { align-self: flex-end; background: var(--blue); color: #fff; }
.dodge-msg.assistant { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); }
.dodge-msg.thinking { color: var(--text-3); font-style: italic; }
#dodge-input-row { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--line); }
#dodge-input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0.6rem 0.75rem; font-size: 0.875rem; }
#dodge-input:focus-visible { border-color: var(--blue-text); outline-offset: 0; }
#dodge-send { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 0 1rem; font-weight: 700; font-size: 0.8125rem; min-height: 40px; }
#dodge-send:hover { background: var(--blue-hover); }
#dodge-send:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 640px) { #dodge-launcher, #dodge-panel { right: 12px; bottom: 12px; } }

/* Anonymised client work strip */
.client-strip { margin-top: var(--s-7); border-top: 1px solid var(--line-2); padding-top: var(--s-5); display: grid; gap: var(--s-3); }
.client-strip p:not(.eyebrow) { color: var(--text-2); max-width: 62ch; }
.client-strip__tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ==========================================================================
   Motion: hero (B + D)
   Rule: keyframes only define the FROM state and use fill-mode both, so
   with animation disabled (reduced motion) every element rests in its
   final, fully visible state.
   ========================================================================== */
.hero-title { overflow-wrap: normal; }
.hw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hw__i { display: inline-block; animation: word-up var(--dur-4) var(--ease-out) both; animation-delay: calc(60ms + var(--i) * var(--stagger)); }
@keyframes word-up { from { transform: translateY(108%); } }

.hero-in { animation: fade-up var(--dur-3) var(--ease-out) both; animation-delay: calc(240ms + var(--i) * 85ms); }
@keyframes fade-up { from { opacity: 0; transform: translateY(var(--dist-m)); } }

.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(52% 48% at 82% 22%, rgba(45, 99, 240, 0.06), transparent 70%); z-index: 1;
}
.hero__grid { z-index: 2; }

/* Buttons: feedback (A) */
.btn { transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.btn--primary:hover { box-shadow: 0 12px 32px -14px rgba(45, 99, 240, 0.8); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); box-shadow: none; }

/* ==========================================================================
   Motion: scroll-driven process story (C)
   Without JS everything is a normal readable column. With JS, the rail
   tracks scroll progress and the active stage plays its visual.
   ========================================================================== */
.story__layout { display: grid; gap: var(--s-6); }
.story__rail { position: sticky; top: var(--nav-h); z-index: 20; margin-inline: calc(var(--gutter) * -1); padding: var(--s-3) var(--gutter); background: var(--bg-1); border-bottom: 1px solid var(--line); }
.story__rail ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); }
.story__rail a { display: grid; gap: 2px; padding: var(--s-2) 0; color: var(--text-3); transition: color var(--dur-2) var(--ease-out); }
.story__rail .n { font-family: var(--font-mono); font-size: 0.75rem; }
.story__rail .t { display: none; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-1); }
.story__rail li.is-active a { color: var(--text); }
.story__rail li.is-active .n { color: var(--blue-text); }
.story__rail li.is-done a { color: var(--text-2); }
.story__track { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--line); }
.story__fill { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(var(--p, 0)); will-change: transform; }

.story__panels { display: grid; gap: var(--s-8); }
.story__panel { display: grid; gap: var(--s-5); align-content: center; scroll-margin-top: calc(var(--nav-h) + 4rem); }
.story__text h3 { font-size: var(--fs-4); letter-spacing: -0.03em; margin-top: var(--s-2); }
.story__text p:not(.step__out) { margin-top: var(--s-3); color: var(--text-2); max-width: 42ch; font-size: var(--fs-2); }
.step__idx { font-family: var(--font-mono); font-size: var(--fs-0); color: var(--text-3); }
.step__out { margin-top: var(--s-4); font-size: var(--fs-0); color: var(--text-3); }
.step__out b { color: var(--text-2); font-weight: 600; }

@media (min-width: 980px) {
  .story__layout { grid-template-columns: 14rem minmax(0, 1fr); gap: var(--s-8); align-items: start; }
  .story__rail { top: calc(var(--nav-h) + 2rem); margin: 0; padding: 0; background: none; border: 0; align-self: start; padding-left: var(--s-5); }
  .story__rail ol { grid-template-columns: 1fr; gap: var(--s-5); }
  .story__rail .t { display: block; }
  .story__rail .n { display: block; }
  .story__track { left: 0; right: auto; top: 0.35rem; bottom: 0.35rem; width: 2px; height: auto; }
  .story__fill { width: 100%; height: 100%; transform-origin: top; transform: scaleY(var(--p, 0)); }
  .story__rail li { position: relative; }
  .story__rail li::before { content: ""; position: absolute; left: calc(var(--s-5) * -1 - 3px); top: 0.55rem; width: 8px; height: 8px; border-radius: 50%; background: var(--bg-1); border: 1px solid var(--line-3); transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out); }
  .story__rail li.is-done::before { border-color: var(--blue-text); }
  .story__rail li.is-active::before { background: var(--blue); border-color: var(--blue); transform: scale(1.5); }
  .story__panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-7); min-height: clamp(24rem, 62vh, 36rem); align-items: center; }
}

/* Panel states (JS only) */
.js .story__panel .story__text, .js .story__panel .story__media { transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out), filter var(--dur-3) var(--ease-out); }
.js .story__panel:not(.is-active) .story__text { opacity: 0.7; }

/* Hero backdrop image (generated with Higgsfield, see assets/img/hero) */
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55; animation: bg-in 1.6s var(--ease-out) both; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--bg) 0%, rgba(6, 6, 6, 0.82) 34%, rgba(6, 6, 6, 0) 70%),
  linear-gradient(180deg, rgba(6, 6, 6, 0) 70%, var(--bg) 100%); }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 38%; transform: translate3d(var(--bgx, 0px), var(--bgy, 0px), 0) scale(1.02); will-change: transform; }
@keyframes bg-in { from { opacity: 0; } }
@media (min-width: 980px) { .hero__bg { opacity: 1; } }

.story__text .step__idx, .story__text .step__out { color: var(--text-2); }
.story__text .step__out b { color: var(--text); }
.js .story__panel:not(.is-active) .story__text { opacity: 0.78; }

/* ==========================================================================
   Motion: cards and media (D)
   ========================================================================== */
[data-tilt] { transition: transform var(--dur-3) var(--ease-out); will-change: transform; }
[data-tilt].is-tilting { transition: transform 140ms linear; }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--dur-2) var(--ease-out);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.07), transparent 62%);
}
[data-tilt].is-tilting::after { opacity: 1; }

/* In-card expandable details (same pattern as capability rows, inline) */
.card-more { margin-top: var(--s-2); border-top: 1px solid var(--line); }
.card-more__toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-1); color: var(--text); transition: color var(--dur-2) var(--ease-out); text-align: left; }
.card-more__toggle:hover, .card-more.is-open .card-more__toggle { color: var(--blue-text); }
.card-more.is-open .cap__icon { transform: rotate(180deg); opacity: 1; }
.card-more.is-open .cap__icon::after { transform: rotate(0deg); }
.card-more__panel { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-3); }
.card-more.is-open .card-more__panel { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
.card-more__inner { min-height: 0; overflow: hidden; display: grid; gap: var(--s-3); }
.card-more__inner .check-list { font-size: var(--fs-0); gap: var(--s-2); }
.card-more__inner .text-link { justify-self: start; font-size: var(--fs-0); padding-bottom: var(--s-3); }
.work-card .tags { padding-top: var(--s-2); }
.work-grid:has(.card-more.is-open) { align-items: start; }

/* ==========================================================================
   Motion: navigation, links, boundaries, atmosphere (E, F)
   ========================================================================== */
.site-header { transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out); view-transition-name: site-header; }
.site-header.is-scrolled { border-bottom-color: var(--line-2); box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9); }

/* Sliding nav indicator (enhanced by JS; the static current-page underline is the fallback) */
.nav-links { position: relative; }
.nav-ind { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w, 0); background: var(--blue); transform: translateX(var(--x, 0)); opacity: 0; pointer-events: none; transition: transform var(--dur-2) var(--ease-out), width var(--dur-2) var(--ease-out), opacity var(--dur-1) linear; }
.nav-links.has-ind .nav-ind { opacity: 1; }
.nav-links.has-ind a[aria-current="page"]::after { display: none; }

/* Link underline sweep */
.text-link { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; text-decoration: none; padding-bottom: 1px; transition: background-size var(--dur-3) var(--ease-out), color var(--dur-2); border-bottom: 1px solid rgba(108, 151, 255, 0.4); }
.text-link:hover { background-size: 100% 1px; }
.prose a.text-link, .prose a { text-decoration: underline; }
.footer__col a { position: relative; }
.footer__col a:hover { transform: translateX(2px); }

/* Section boundaries: fading hairlines instead of hard rules */
.section { position: relative; border-top: 0; }
.section::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent); }
.section.section--first::before { display: none; }

/* Secondary palette as quiet light sources */
.section--tint::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(38% 42% at 0% 0%, rgba(159, 184, 108, 0.06), transparent 70%); }
.section--tint > .container { position: relative; z-index: 1; }
.cta::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(42% 60% at 90% 100%, rgba(199, 164, 103, 0.09), transparent 72%), radial-gradient(40% 55% at 6% 0%, rgba(45, 99, 240, 0.07), transparent 70%); }
.cta__inner { z-index: 1; }

/* Back to top */
.to-top { position: fixed; left: max(var(--gutter), 12px); bottom: 20px; z-index: 80; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-3); border-radius: 999px; background: var(--bg-2); color: var(--text); opacity: 0; visibility: hidden; transform: translateY(var(--dist-m)); transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3), border-color var(--dur-2); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { border-color: var(--blue-text); }
.to-top svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Cross-page fade (progressive enhancement, same-origin navigations) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out 180ms var(--ease-in-out) both; }
  ::view-transition-new(root) { animation: vt-in 320ms var(--ease-out) both; }
  ::view-transition-group(site-header) { animation-duration: 0s; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ==========================================================================
   Generated graphics (Higgsfield GPT Image 2.5 stills, Kling loops)
   ========================================================================== */
/* Hero: image + looping video, no hand-built overlay */
.hero { min-height: min(86vh, 780px); display: flex; align-items: center; }
.hero::before, .hero::after { display: none; }
.hero__grid { grid-template-columns: 1fr !important; width: 100%; }
.hero__grid > div { max-width: 40rem; }
.hero__bg picture { display: contents; }
.hero__bg img, .hero__bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 38%; transform: translate3d(var(--bgx, 0px), var(--bgy, 0px), 0) scale(1.02); will-change: transform; }
.hero__bg video { opacity: 0; transition: opacity 1.2s var(--ease-out); }
.hero__bg video.is-playing { opacity: 1; }
.hero__bg { opacity: 1; }
@media (max-width: 979px) { .hero__bg { opacity: 0.55; } .hero { min-height: 0; } }

/* Ambient video inside cards */
video.ambient { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s var(--ease-out); z-index: 1; }
video.ambient.is-playing { opacity: 1; }
.work-card__media img, .product__media img, .case__media img, .service__media img { transition: transform var(--dur-4) var(--ease-out); }
.work-card:hover .work-card__media img, .product:hover .product__media img { transform: scale(1.025); }

/* Inner page headers and final CTA use generated backdrops */
.page-hero::before {
  background-image:
    linear-gradient(90deg, var(--bg) 0%, rgba(6, 6, 6, 0.8) 34%, rgba(6, 6, 6, 0.1) 100%),
    linear-gradient(180deg, rgba(6, 6, 6, 0) 55%, var(--bg) 100%),
    url("../img/hero/page-wide-2400.webp");
  background-size: cover; background-position: right center; background-repeat: no-repeat;
  mask-image: none; -webkit-mask-image: none; opacity: 1;
}
.cta::before {
  background-image:
    linear-gradient(90deg, var(--bg) 0%, rgba(6, 6, 6, 0.55) 45%, rgba(6, 6, 6, 0.1) 100%),
    linear-gradient(180deg, var(--bg) 0%, rgba(6, 6, 6, 0) 35%, rgba(6, 6, 6, 0) 70%, var(--bg) 100%),
    url("../img/hero/cta-wide-1920.webp");
  background-size: cover; background-position: center; background-repeat: no-repeat;
  mask-image: none; -webkit-mask-image: none; opacity: 1;
}
.cta::after { display: none; }
.section--tint::after { display: none; }

/* Service imagery */
.service__media { margin-top: var(--s-5); border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-1); }
.service__media img { width: 100%; height: 100%; object-fit: cover; }

/* Process: generated stage images */
.story__media { margin: 0; border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-1); }
.story__media img { width: 100%; height: 100%; object-fit: cover; }
.js .story__panel:not(.is-active) .story__media { filter: saturate(0.45) brightness(0.72); transform: scale(0.985); }
.story__panel.is-active .story__media img { animation: media-settle 1.4s var(--ease-out) both; }
@keyframes media-settle { from { transform: scale(1.06); } }

/* Process rail: current stage, deliverable, progress and next step */
.story__count { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-2); }
.story__count b { color: var(--blue-text); font-weight: 500; }
.story__name { color: var(--text); margin-left: 0.5em; }
.r-sub { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
.r-sub > span { min-height: 0; overflow: hidden; font-family: var(--font-body); font-weight: 400; font-size: var(--fs-0); color: var(--text-2); line-height: 1.5; }
.story__rail li.is-active .r-sub { grid-template-rows: 1fr; opacity: 1; }
.story__cta { display: none; }
@media (max-width: 979px) { .story__rail .r-sub { display: none; } .story__count { margin-bottom: var(--s-1); } }
@media (min-width: 980px) {
  .story__layout { grid-template-columns: 17rem minmax(0, 1fr); }
  .story__count { margin-bottom: var(--s-5); padding-left: 0; }
  .story__name { display: none; }
  .story__cta { display: grid; gap: var(--s-3); margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
  .story__cta p { font-size: var(--fs-0); color: var(--text-2); max-width: 26ch; }
}

.story__list { position: static; }
@media (min-width: 980px) { .story__list { position: relative; margin-left: calc(var(--s-5) * -1); padding-left: var(--s-5); } }

/* Process panels are text only now: one column, larger copy */
.story__panel { grid-template-columns: 1fr !important; min-height: clamp(18rem, 48vh, 26rem) !important; }
.story__text { max-width: 36rem; }
.story__text h3 { font-size: var(--fs-5); }
.story__text p:not(.step__out) { font-size: var(--fs-3); max-width: 30ch; line-height: 1.4; }

/* CTA band: poster image, looping video, and a legibility overlay above both */
.cta::before { background-image: url("../img/hero/cta-wide-1920.webp"); background-size: cover; background-position: center; background-repeat: no-repeat; mask-image: none; -webkit-mask-image: none; opacity: 1; z-index: 0; }
.cta__video { z-index: 0; }
.cta::after { display: block; content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background:
  linear-gradient(90deg, var(--bg) 0%, rgba(6, 6, 6, 0.6) 42%, rgba(6, 6, 6, 0.05) 100%),
  linear-gradient(180deg, var(--bg) 0%, rgba(6, 6, 6, 0) 32%, rgba(6, 6, 6, 0) 68%, var(--bg) 100%); }
.cta__inner { z-index: 2; }

/* Keep the stage rail pinned through the final stage as well */
@media (min-width: 980px) { .story__panels { padding-bottom: 42vh; } .story__panel:last-child { min-height: 60vh !important; } }
.story__cta .link-arrow { display: inline-flex; padding: 0 0 2px; color: var(--text); white-space: nowrap; }
.story__cta .link-arrow:hover { color: var(--blue-text); }
