/* Breakpoints. The site switches layout at four standard widths (REFDOCS/punch-site.plan.md §6.3):
     @media (max-width: 559px)   phone
     @media (min-width: 760px)   two columns
     @media (min-width: 1100px)  desktop layouts (the nav has its own width, 1025)
     @media (min-width: 1280px)  wide
   A section that needs its own width is registered in tests/breakpoints.json, which also lists the older widths
   fix G4 is replacing. A width in neither place fails the tests. */

/* css/shared-tokens.css */
/* Granule Labs — Design tokens
 *
 * Source of truth for brand values across the build.
 *
 * Populate this file by running `punch-token-export` against your Figma fork's
 * Punch Tokens collection. Don't edit values directly here — edit them in Figma,
 * then re-export. This keeps Figma and code in sync.
 *
 * 2026-10-19: unset values are commented out so this file is valid CSS. Do NOT wire it
 * into the wireframe until punch-token-export has run against the Figma fork.
 *
 * Until tokens are exported, the wireframe will render with neutral defaults
 * (intentional — wireframe is meant to look like a wireframe, not the brand).
 */

:root {
  /* ---- Color ---- */
  /* --color-brand-primary: #(fill from Figma);  NOT SET: run punch-token-export */
  /* --color-brand-secondary: #(fill from Figma);  NOT SET: run punch-token-export */
  /* --color-accent: #(fill from Figma);  NOT SET: run punch-token-export */
  --color-text: #0A0A0A;
  --color-text-muted: #555555;
  --color-surface-1: #FFFFFF;
  --color-surface-2: #F4F4F4;
  --color-border: #E5E5E5;

  /* ---- Typography ---- */
  /* --font-display: (fill from Figma);  NOT SET: run punch-token-export */
  /* --font-body: (fill from Figma);  NOT SET: run punch-token-export */
  /* --font-mono: (fill from Figma);  NOT SET: run punch-token-export */

  --type-size-h1: clamp(2.5rem, 5vw, 4rem);
  --type-size-h2: clamp(24px, 2.8vw, 34px);   /* the one section-heading size, sitewide */
  --type-size-h3: 1.25rem;
  --type-size-body: 1rem;
  --type-size-small: 0.875rem;

  /* ---- Space scale ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* ---- Radius ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* ---- Container ---- */
  --container-max: 1120px;
  --gutter: 24px;
  --section-y: var(--space-16);
}

/* css/tokens.css */
/* ==========================================================
   Granule Labs — Homepage V2 tokens (colors + fonts)
   Source: Figma "26 Granule Labs Website Assets" → page "Homepage V2"

   Load AFTER the shared tokens file so these values win:
     <link rel="stylesheet" href="css/shared-tokens.css">   (shared sizes, spacing, radius; copied from ../sandbox/tokens.css)
     <link rel="stylesheet" href="tokens.css">              (this file: v2 colors + fonts)

   Variable names match the shared Punch tokens file.
   ========================================================== */

/* Fonts (all three are free on Google Fonts, no font files needed) */

:root {
  color-scheme: dark;  /* dark scrollbars & form controls */

  /* ---------- Raw palette (from Figma) ---------- */
  --color-orange:    #FFAF36;
  --color-black:     #1D1D1D;
  --color-off-white: #F5F5F5;
  --color-teal:      #60C9B2;

  /* ---------- Brand (fills the shared file's blank slots) ---------- */
  --color-brand-primary:   var(--color-orange);
  --color-brand-secondary: var(--color-teal);
  --color-accent:          var(--color-orange);

  /* ---------- Neutrals: DARK MODE (client request) ---------- */
  --color-text:       var(--color-off-white);
  --color-text-muted: rgba(245, 245, 245, 0.7);  /* off-white at 70% */
  --color-surface-1:  var(--color-black);        /* default page background */
  --color-surface-2:  color-mix(in srgb, var(--color-off-white) 5%, var(--color-black)); /* slightly lifted dark, for cards / alternating sections */
  --color-surface-0:  #161616;                   /* sunk band below the page, for logo strips (fix G10) */
  --color-border:     rgba(245, 245, 245, 0.15); /* off-white at 15% */

  /* For the occasional light section, if used */
  --color-surface-light: #DADADA;                  /* light sections + light tiles (client request, 2026-10-19) */
  --color-text-on-light: var(--color-black);
  --color-footer-box:   #E0E0E0;                  /* filled footer box (client request, 2026-10-19) */

  /* ---------- Fonts ---------- */
  --font-display: "Mozilla Text", system-ui, sans-serif;  /* Headlines: Mozilla Text (V3) */
  --font-body:    "42dot Sans", system-ui, sans-serif;    /* Body copy: 400 / 500 / 600 / 700 */
  --font-mono:    "Chivo Mono", ui-monospace, monospace;  /* Tertiary: labels, eyebrows */

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Mono label treatment, as used in the Figma specimen */
  --mono-letter-spacing: 0.06em;   /* 0.72px at 12px */
  --mono-transform: uppercase;
}

/* css/home.css */
/* ==========================================================
   Granule Labs — Homepage V2 layout + motion
   Colors and fonts come only from css/tokens.css; sizes and
   spacing come from css/shared-tokens.css. Tints below are
   token colors at reduced opacity (same approach as tokens.css).
   ========================================================== */

:root {
  --line-faint: color-mix(in srgb, var(--color-off-white) 8%, transparent);
  --line-soft:  color-mix(in srgb, var(--color-off-white) 28%, transparent);
  --nav-h: 80px;   /* 20px above and below the 40px logo */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --type-size-hero: clamp(2.25rem, 4.4vw, calc(var(--type-size-h1) * 1.05)); /* scales with width so the H1 holds 3 lines on desktop */
}   /* 20px above and below the 32px phone logo */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; scroll-padding-top: var(--nav-h); }
body {
  background: var(--color-surface-1);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--type-size-body);
  line-height: 1.6;
  overflow-x: clip;   /* clips like hidden, but leaves the window as the scroller, so its snap point works */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
mark { background: none; color: inherit; }
/* selected text highlights in the brand orange */
::selection { background: var(--color-orange); color: var(--color-black); }
:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--color-orange); color: var(--color-black);
  padding: var(--space-2) var(--space-4); font-family: var(--font-mono);
}
.skip:focus { top: var(--space-4); }

.wrap {
  width: 100%;
  max-width: calc(var(--container-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Viewport units, capped ----------
   1% of the window height, but never more than 1% of the screen height
   (--vh-max, set in index.html). In a normal window this is just 1vh; inside a
   doc viewer's grow-to-fit frame it stops the page from growing without end. */
:root { --vhu: min(1vh, var(--vh-max, 1200px) / 100); --svhu: var(--vhu); }   /* 1200px if the script can't run */
@supports (height: 1svh) { :root { --svhu: min(1svh, var(--vh-max, 1200px) / 100); } }
/* html.viewer-safe (set in index.html; this is the version that works in Punch Docs):
   window-height sizes come from the height actually on screen, measured by the script
   (--vh-live), never from the frame a viewer puts the page in (which may stretch to the
   page's own height); 900px until measured */
html.viewer-safe { --vhu: var(--vh-live, 9px); --svhu: var(--vh-live, 9px); }

/* ---------- Grow-to-fit frames ----------
   Some review tools stretch the page's frame to the page's full height. With scripts,
   pinning and scroll effects follow what's actually on screen (js: "What's on screen").
   Without scripts, a frame at least 3x taller than wide (no real screen is) gets the
   two pinned sections laid out flat (rules in each section below). */

/* ---------- No scripts ----------
   If a viewer blocks scripts, nothing would ever reveal, so show it all as-is. */
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
html:not(.js) [data-fill] { clip-path: none; }
html:not(.js) .hero__side .ctas > * { transform: none; }
html:not(.js) .footer__inner::after, html:not(.js) .nav::after { transform: none; }
html:not(.js) .wipe::before { transform: none; }
html:not(.js) .wipe { color: var(--color-black); }

/* ---------- Type ---------- */
.h-xl, .h2, .hero__title {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h-xl { font-size: clamp(2.5rem, 4.6vw, 4.5rem); }   /* the page-title size (.hero__title, .pg-hero__title) */
.h2   { font-size: var(--type-size-h2); line-height: 1.12; }
/* Even out paragraph lines, so no block ends on a single word (fix G22) */
p, li, h3 { text-wrap: pretty; }
.nobr { display: inline !important; white-space: nowrap; }   /* words kept on one line by the no-single-word-lines script; inline even where a parent's rule styles every span */
@media (max-width: 1179px) { .hero__br { display: none; } }   /* Home's set break, only from 1180, where its first half fits one line */
.lead { font-size: var(--type-size-h3); line-height: 1.55; color: var(--color-text-muted); max-width: 40ch; }

/* ---------- Buttons + links ---------- */
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) var(--space-8); margin-top: var(--space-8); }

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--color-orange); color: var(--color-black);
  font-family: var(--font-mono); font-size: var(--type-size-small);
  letter-spacing: var(--mono-letter-spacing); text-transform: var(--mono-transform);
  border: 1px solid var(--color-orange);
  isolation: isolate;
  transition: color .3s, background-color .3s, border-color .3s;
}
/* Hover color for every button is white (off-white): every button (filled or
   outlined) fills white, sweeping in from the left; underlined links change their line to white. */
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: var(--color-off-white);
  transform: translateX(-101%);
  transition: transform .55s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(0); }
.btn:hover, .btn:focus-visible { border-color: var(--color-off-white); }
.btn__arrow { position: relative; transition: transform .3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--color-text); border-color: var(--line-soft); transition: color .2s, border-color .3s; }
/* text turns dark as the sweep passes under it, not before */
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--color-black); border-color: var(--color-off-white); transition: color .2s .22s, border-color .3s; }
/* filled orange with black text (was the light #E0E0E0, client request 2026-10-21); the hover still sweeps white */
.btn--light { background: var(--color-orange); border-color: var(--color-orange); color: var(--color-black); }

/* Orbit: an orange light that keeps travelling around the button's outline,
   the same soft glow the grid lines get on hover. Hidden on hover so the
   white fill shows. */
@property --orbit { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.btn--orbit { overflow: visible; }
.btn--orbit::after {
  content: ""; position: absolute; inset: -1px; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--orbit), transparent 0deg 250deg,
    color-mix(in srgb, var(--color-orange) 40%, transparent) 300deg, var(--color-orange) 340deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: orbit 3.2s linear infinite;
  transition: opacity .3s;
}
.btn--orbit:hover::after, .btn--orbit:focus-visible::after { opacity: 0; transition: none; }   /* no orange while hovered */
.btn--orbit::before { display: block; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path .55s var(--ease-out); }   /* wipe in place: the button's overflow is visible for the orbit */
.btn--orbit:hover::before, .btn--orbit:focus-visible::before { clip-path: inset(0); }
.btn--orbit { transition: color .2s, border-color .3s; }
.btn--orbit:hover, .btn--orbit:focus-visible { color: var(--color-black); transition: color .2s .22s, border-color .3s; }
@keyframes orbit { to { --orbit: 360deg; } }

.link {
  position: relative; display: inline-block; padding-bottom: 4px;
  color: var(--color-text);
}
.link::after, .link::before {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--line-soft);
}
.link::after { background: var(--color-off-white); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out); }
.link:hover::after, .link:focus-visible::after { transform: scaleX(1); }
.link--mono { font-family: var(--font-mono); font-size: var(--type-size-small); letter-spacing: var(--mono-letter-spacing); text-transform: var(--mono-transform); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-black) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
/* nav hairline draws out from the center on load, like the frame lines */
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--color-border); transform: scaleX(0); transition: transform 1.2s var(--ease-out) .1s;
}
.nav.is-drawn::after { transform: none; }
.nav__inner { display: flex; align-items: stretch; justify-content: space-between; height: var(--nav-h); padding-left: var(--gutter); }
.nav__logo { display: flex; align-items: center; margin-left: var(--space-6); }
/* logo glow: the logo is inline SVG; a second copy filled with a radial
   orange gradient sits on top, so only the letters light up around the cursor
   (same 280px soft spotlight as the grid lines) */
.nav__logo-svg { display: block; width: auto; height: min(20px, (100vw - 2 * var(--gutter) - 24px) / 14.2); overflow: visible; }   /* stacked logo: 40px tall in the 64px nav */
/* the height's second term: on screens under about 356px the logo (14.2 times as wide as tall) shrinks just enough to
   leave the menu button and an 8px gap inside the gutters, so a 320px screen doesn't scroll sideways (WCAG reflow);
   at 356px and wider it stays 20px */
.nav__logo-base { fill: var(--color-off-white); }
.nav__logo-svg stop { stop-color: var(--color-orange); }   /* gradient color from the token */
.nav__logo-glow { opacity: 0; transition: opacity .5s; }
.nav__logo-glow.is-on { opacity: 1; }
.nav__links { display: flex; align-items: stretch; }
.nav__links a {
  display: flex; align-items: center; padding-inline: var(--space-6);
  font-family: var(--font-mono); font-size: var(--type-size-small);
  letter-spacing: var(--mono-letter-spacing); text-transform: var(--mono-transform);
  color: var(--color-text-muted);
  transition: color .25s;
}
.nav__links a:hover { color: var(--color-text); }
.nav__links a { white-space: nowrap; }   /* Home heads the menu; with tabs, the logo is the way home */
.nav__links a { border-left: 1px solid var(--color-border); }
.nav__links .nav__cta { background: var(--color-orange); color: var(--color-black); padding-inline: var(--space-8); transition: background-color .25s, color .25s; }
.nav__links .nav__cta:hover, .nav__links .nav__cta:focus-visible { background: var(--color-off-white); color: var(--color-black); }
.nav__toggle { display: none; }
.nav__item { position: relative; display: flex; align-items: stretch; }
.nav__menu { position: absolute; top: 100%; left: 0; min-width: 100%; width: max-content; display: flex; flex-direction: column;
  background: var(--color-surface-1); border: 1px solid var(--color-border); border-top: 0;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease-out), visibility 0s .2s; }
.nav__item:hover .nav__menu, .nav__item:focus-within .nav__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s var(--ease-out); }
.nav__links .nav__menu a { border-left: 0; padding: var(--space-4) var(--space-6); }
.nav__links .nav__menu a + a { border-top: 1px solid var(--color-border); }
.nav__links .nav__menu a[aria-current] { color: var(--color-orange); }
.nav__item:hover > a::after, .nav__item:focus-within > a::after { transform: rotate(-135deg); margin-top: 3px; }

/* ---------- Hero ---------- */
/* Hero fills the first screen minus a strip, so the next section's gray
   peeks up from the bottom on landing (less than its top padding, so no text
   shows). Text stack on the left, the granule block animation on the right */
.hero { --peek: 96px; display: flex; flex-direction: column; height: calc(var(--vhu) * 100 - var(--nav-h) - var(--peek)); height: calc(var(--svhu) * 100 - var(--nav-h) - var(--peek)); min-height: 600px; }
.hero__top { position: relative; flex: 1 1 auto; display: flex; align-items: center; padding-block: var(--space-12); }
.hero__top > .wrap { position: relative; z-index: 1; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);   /* text box and graphic box the same width */ align-items: stretch; gap: var(--space-12); max-width: calc(var(--container-max) * 1.25 + var(--gutter) * 2); }
/* The text cell is framed by the grid lines (20px outside its box); its padding
   sets how far the lines sit from the text */
.hero__copy { padding-block: var(--space-12); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-8); }
/* max-width in em keeps the same three-line break at every size; it's just wider than the
   longest line ("engineering that keeps"), so the box ends where the text does */
.hero__title { font-size: clamp(2.5rem, 4.6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.02em; max-width: 11.05em; margin-right: -0.055em; }   /* margin trims the box to the ink of that longest line */
.hero__side { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }   /* the set break only where both halves fit a line */
.hero__sub { font-size: var(--type-size-h3); line-height: 1.55; color: var(--color-text-muted); }
/* the tagline: one mono line under the subhead, fading in as the subhead rises */
.hero__tag { margin: var(--space-4) 0 0; font: 400 12px/1.5 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--color-off-white);
  opacity: 0; transition: opacity 1s var(--ease-out) .35s; }
.hero__sub.is-in ~ .hero__tag, html:not(.js) .hero__tag { opacity: 1; }
/* hero subhead rises word by word with the H1 (data-split); the buttons
   rise out of a mask at the same moment, as whole pieces */
.hero__side .ctas { overflow: hidden; padding: 2px; margin: calc(var(--space-6) - 2px) -2px -2px; }
.hero__side .ctas > * { transform: translateY(130%); transition: transform 1s var(--ease-out) .25s; }
.hero__sub.is-in ~ .ctas > * { transform: none; }   /* rise as the subhead does */
.hero__stage { position: relative; }   /* stretches to the text cell's height, so the animation stays between the grid lines */
.hero__stage .field { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: pan-y; }

/* Highlight wipe in the H1 */
.wipe { position: relative; display: inline; padding: 0 .08em; white-space: nowrap; }
.wipe::before {
  content: ""; position: absolute; inset: .16em 0 .01em; z-index: -1;   /* cap top to the bottom of the descenders (g, y, p reach ~1.13em into the line box) with room either side, clear of the line above */
  background: var(--color-orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease-out) .9s;
}
.wipe.is-in::before { transform: scaleX(1); }
.wipe.is-in { color: var(--color-black); transition: color .3s 1.3s; }
.hero__title { position: relative; z-index: 0; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-24); position: relative; }
.section--lift { background: var(--color-surface-2); }

/* ---------- Frame lines (hero, closing + footer, nav glow) ----------
   Hairlines that frame each block of text and run edge to edge, like a
   drafting grid. JS places them; they draw out from the block when the
   section comes into view. Same color and weight as the nav line. The
   --spot layer is an orange copy, revealed only around the cursor. */
.hlines { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hl { position: absolute; background: var(--color-border); transition: transform 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.hl--h { left: 0; right: 0; height: 1px; transform: scaleX(0); }
.hl--v { top: 0; width: 1px; transform: scaleY(0); }
.hlines.is-in .hl { transform: none; }
/* lines that continue another section's lines (carryOuter in the frame-lines script)
   draw with that section's lines, not with their own host */
.hlines.is-in .hl--carry { transform: scaleY(0); }
.carry-in > .hlines .hl--carry { transform: none; }   /* .carry-in is set on the host */
/* outer lines of every grid: drawn down with the scroll by the script (--p, 0–1), so they read as one
   line running down the page ("Edge lines" in home.js) */
.hlines .hl.hl--v.hl--edge { transform: scaleY(var(--p, 0)); transform-origin: 50% 0 !important; transition: none; }
/* nav glow layer */
.nav__spot { z-index: 2; }
/* one continuous stroke: steady speed, no pause between segments */
.hl--sweep.hl--v { transition-duration: 1.6s; transition-timing-function: cubic-bezier(.4, 0, .2, 1); }
.hl--sweep.hl--h { transition-duration: 1.3s; }
.hlines--spot .hl { background: var(--color-orange); }
.hlines--spot {
  -webkit-mask-image: radial-gradient(circle 280px at var(--x, -999px) var(--y, -999px), black 25%, transparent 100%);
          mask-image: radial-gradient(circle 280px at var(--x, -999px) var(--y, -999px), black 25%, transparent 100%);
  opacity: 0; transition: opacity .5s;
}
.hlines--spot.is-on { opacity: 1; }
/* no orange glow on the grid while hovering the footer (it fills orange instead) */
.endgrid:has(.footer:hover) > .hlines--spot { opacity: 0; transition-duration: .15s; }

/* Cursor glow: a soft orange light follows the cursor across a #282828 section (intro, the
   process band, careers). The element fills the section; the content sits above it. */
.intro { position: relative; overflow: hidden; }
.cursor-glow ~ .wrap, .cursor-glow ~ .hscroll__head, .cursor-glow ~ .hscroll__viewport { position: relative; z-index: 1; }
.cursor-glow {
  position: absolute; inset: 0; pointer-events: none;
  /* eased falloff (many stops along a smooth curve) instead of one linear ramp, to avoid rings */
  background: radial-gradient(circle 360px at var(--x, -999px) var(--y, -999px),
    color-mix(in srgb, var(--color-orange) 14.00%, transparent) 0%,
    color-mix(in srgb, var(--color-orange) 13.61%, transparent) 7%,
    color-mix(in srgb, var(--color-orange) 12.54%, transparent) 14%,
    color-mix(in srgb, var(--color-orange) 10.98%, transparent) 21%,
    color-mix(in srgb, var(--color-orange) 9.07%, transparent) 28%,
    color-mix(in srgb, var(--color-orange) 7.00%, transparent) 35%,
    color-mix(in srgb, var(--color-orange) 4.93%, transparent) 42%,
    color-mix(in srgb, var(--color-orange) 3.02%, transparent) 49%,
    color-mix(in srgb, var(--color-orange) 1.46%, transparent) 56%,
    color-mix(in srgb, var(--color-orange) 0.39%, transparent) 63%,
    color-mix(in srgb, var(--color-orange) 0.00%, transparent) 70%);
  opacity: 0; transition: opacity .5s;
}
/* dither: a faint, fine grain inside the glow only, which breaks up the 8-bit color steps */
.cursor-glow::after {
  content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .96 0 0 0 0 .96 0 0 0 0 .96 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(circle 360px at var(--x, -999px) var(--y, -999px), #000, transparent 70%);
          mask-image: radial-gradient(circle 360px at var(--x, -999px) var(--y, -999px), #000, transparent 70%);
}
.cursor-glow.is-on { opacity: 1; }
.intro__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-16); align-items: center; }   /* heading and paragraph centered on each other */
.intro__body { font-size: var(--type-size-h3); line-height: 1.6; }
.intro__body .sw { transition: opacity .25s linear; }
.intro__body p { margin: 0; }
.intro__body p + p { margin-top: 1em; }   /* a line of space between the paragraphs */
.intro__em { color: var(--color-orange); }   /* the one phrase in the paragraph picked out in amber; it lights with the scroll like the rest */
/* the ClickHouse row: across both columns under a hairline, on the same two columns as the title and paragraphs */
.intro__ch { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-16); align-items: center;
  padding-top: var(--space-12); border-top: 1px solid var(--color-border); }
.intro__ch p { margin: 0; max-width: 28em; color: var(--color-text-muted); font-size: clamp(18px, 1.4vw, 22px); line-height: 1.5; }
.intro__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.intro__stat { min-width: 0; display: flex; flex-direction: column; padding: clamp(20px, 2vw, 28px); border: 1px solid var(--color-border); background: var(--color-black); }
.intro__num { margin-bottom: 14px; font-family: var(--font-display); font-weight: var(--weight-headline, 400); font-size: clamp(26px, 2.2vw, 38px); line-height: 1; letter-spacing: -.01em; white-space: nowrap; color: var(--color-off-white); }
.intro__label { font: 400 12px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-muted); }
/* ClickHouse stats (fix list P-HOME-5): two or three cards, whichever fits. Phones: three stacked. 560-759: two in a
   row. 760-1099: the line above three in a row. 1100-1279: the line beside two. 1280 and up: the line beside three,
   the cards taking 60% of the row. Each card's source opens the ClickHouse story in a new tab. */
@media (min-width: 560px) and (max-width: 759px), (min-width: 1100px) and (max-width: 1279px) { .intro__stat--3 { display: none; } }
@media (min-width: 760px) and (max-width: 1099px) { .intro__ch { grid-template-columns: 1fr; gap: var(--space-8); } .intro__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .intro__ch { grid-template-columns: 2fr 3fr; } .intro__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.intro__src { display: block; margin-top: auto; padding-top: 8px; font: 400 12px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--color-off-white); text-decoration: none; white-space: nowrap; width: fit-content; }   /* at the card's foot, so the three sources line up even when a caption takes two lines */
@media (max-width: 759px) { .intro__src { margin-inline: auto; } }   /* the intro is centered below 760 */
.intro__src:hover, .intro__src:focus-visible { color: var(--color-orange); text-decoration: underline; text-underline-offset: .2em; }
/* whole sections fill in from the bottom on scroll */
[data-fill] { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease-out); }
[data-fill].is-in { clip-path: inset(0 0 0 0); }

@keyframes qlive { 50% { opacity: .25; } }

/* ---------- Process: pinned horizontal scroll ----------
   Only the band (heading + cards + modest padding) is the lifted dark #282828. While
   scrolling, the band pins centered on screen (JS sets --hs-top) and the card
   row slides left. --hs-gap is both the first card's inset from the screen
   edge and the gap between cards, so the spacing reads as one even rhythm. */
.hscroll {
  --hs-gap: var(--space-8);   /* the title and first card line up on this inset */
  /* band padding: 96px on screens 756px+ tall, easing to 48px on short screens so the cards keep their room */
  --hs-pad: clamp(var(--space-12), calc(var(--vhu) * 100 - 660px), var(--space-24));
  position: relative; height: var(--hs-h, calc(var(--vhu) * 250));
}
.hscroll__sticky {
  position: sticky; top: var(--hs-top, var(--nav-h));
  display: flex; flex-direction: column; gap: var(--space-12); overflow: hidden;
  padding-block: var(--hs-pad);
  background: var(--color-surface-2); color: var(--color-text);
}
.hscroll__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-8); padding-inline: var(--hs-gap); }
.hscroll__title { max-width: 24ch; }
/* step readout on the right: the step count over a hairline that fills with
   the scroll (JS sets --p, 0 to 1); a tick per card, a granule at the head */
.hscroll__meter {
  flex: 0 0 auto; width: min(320px, 32vw); margin-bottom: .35em;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: var(--mono-letter-spacing); text-transform: var(--mono-transform);
}
.hscroll__count { margin-bottom: var(--space-4); text-align: right; }   /* numbers end flush with the line's right end */
.hscroll__bar { position: relative; height: 1px; background: color-mix(in srgb, currentColor 22%, transparent); }
.hscroll__bar::before {   /* fill */
  content: ""; position: absolute; inset: 0; background: currentColor;
  transform: scaleX(var(--p, 0)); transform-origin: left;
}
.hscroll__bar::after {    /* the granule riding the head of the fill */
  content: ""; position: absolute; top: 50%; left: calc(var(--p, 0) * 100%); width: 7px; height: 7px;
  background: currentColor; transform: translate(-50%, -50%);
}
.hscroll__meter::after {  /* one tick per card, at 0, 1/3, 2/3 and the end */
  content: ""; display: block; height: 5px; margin-top: -3px; opacity: .35;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 33.333% 0 / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 66.667% 0 / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 1px 100% no-repeat;
}
.hscroll__track {
  display: flex; gap: var(--hs-gap); padding-inline: var(--hs-gap); width: max-content;
  will-change: transform;
}
.hcard {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6);
  /* wide enough that the later cards start off-screen right (like the reference),
     but capped by screen height so the band always fits; still smaller than the reference */
  width: max(280px, min(40vw, (var(--vhu) * 100 - 278px - 2 * var(--hs-pad)) * 4 / 3)); aspect-ratio: 4 / 3; padding: var(--space-6);
  background: var(--color-black); color: var(--color-text);
}
.hscroll__intro { margin: var(--space-4) 0 0; max-width: 34em; color: var(--color-text-muted); font-size: 16px; line-height: 1.6; }
.hscroll__cta { margin-top: var(--space-6); }
.hcard__text { display: flex; flex-direction: column; gap: var(--space-4); }
/* large, but a clear step below the section title (h2, up to 2.5rem) */
.hcard__name { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: clamp(20px, 1.6vw, 24px); line-height: 1.25; }   /* the sitewide card-title size */
.hcard p { color: var(--color-text-muted); font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.5; }
.hcard__viz { display: block; width: 100%; flex: 1 1 0; min-height: 56px; }

html:not(.js) .fpin__sticky { position: relative; top: auto; height: auto; overflow: visible; padding-block: var(--space-24); }
html:not(.js) .fpin__visual { position: relative; top: auto; }
/* the page stops where the band pins, however fast it is scrolled: a swipe or trackpad flick ends there, and the next
   scroll carries on sideways through the cards. Snapping is switched on (html.snap-near, by the script) only while the
   section is within a screen of view, since a snapping page scrolls with heavier physics everywhere. The script also
   sets scroll-margin-top so the stop lands exactly where the band pins */
html.snap-near { scroll-snap-type: y proximity; }
.hscroll { scroll-snap-align: start; scroll-snap-stop: always; }
html:not(.js) .hscroll { height: auto; }
html:not(.js) .hscroll__sticky { position: relative; top: auto; }
html:not(.js) .hscroll__meter { display: none; }   /* no sideways travel to report */
html:not(.js) .hscroll__track { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); width: auto; transform: none !important; }
html:not(.js) .hcard { width: auto; }   /* phones: the section's own padding */

/* ---------- Closing ---------- */
/* Closing CTA + footer share one line grid (.endgrid holds the lines) */
.endgrid { position: relative; overflow: hidden; }
.endgrid > .hlines { z-index: 2; }            /* lines sit on top of the cells' edges */
.closing { position: relative; padding-block: var(--space-24) var(--space-12); }
.closing__inner { position: relative; z-index: 1; padding: 0; }   /* the cell's edges sit on the line grid, like the footer box */
/* desktop: the closing cell and the footer box sit on the hero's outer lines, like the grids above
   (the hero grid's content box, 20px outside it); phones: inset by the gutter */
.closing__inner, .footer__inner { width: min(calc(var(--container-max) * 1.25 + 40px), calc(100% - 2 * (var(--gutter) - 20px))); max-width: none; }

/* one cell on the page black split into four by grid lines: a rails graphic, the statement (all white,
   "your team" highlighted like the hero H1) and lead, and a column of two CTA cells. It fills in
   from the bottom on scroll. */
.closing__cell {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1.15fr); grid-template-rows: 1fr 1fr;
  grid-template-areas: "art main cta1" "art main cta2"; background: var(--color-surface-1);
  clip-path: inset(100% 0 0 0); transition: clip-path 1s var(--ease-out);
}
/* a closing with one button: it takes both button cells (below 940 the buttons sit in a row, and on phones in a
   column, so one button needs nothing there) */
@media (min-width: 1100px) { .closing__cell:not(:has(.closing__cta--2)) { grid-template-areas: "art main cta1" "art main cta1"; } }
@media (min-width: 940px) and (max-width: 1099px) { .closing__cell:not(:has(.closing__cta--2)) { grid-template-areas: "art art" "main cta1" "main cta1"; } }
.closing__cell.is-in { clip-path: inset(0); }
html:not(.js) .closing__cell { clip-path: none; }
/* two lines (a break before "on,"), sized so the statement and the lead read as one block */
.closing__title {
  position: relative; z-index: 0;
  font-family: var(--font-display); font-weight: var(--weight-regular); color: var(--color-text);
  font-size: clamp(2rem, 3.1vw, 2.875rem); line-height: 1.1; letter-spacing: -0.015em;
}
.closing__line { display: block; }   /* phones: too narrow for the first line, so it flows */
.closing__art { grid-area: art; position: relative; min-height: 240px; }
.closing__pattern { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
/* statement and lead centered in their cell, both ways */
.closing__main { grid-area: main; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: var(--space-16) var(--space-12); }
.closing__lead { max-width: 31em; margin: var(--space-6) auto 0; text-wrap: balance; }   /* about the title's width, two even lines */
/* one CTA per cell, centered; the two cells stack in the right column */
.closing__cta { grid-area: cta1; display: flex; align-items: center; justify-content: center; padding: var(--space-8) var(--space-6); }
.closing__cta--2 { grid-area: cta2; }
.closing__cta .btn { width: min(17rem, 100%); justify-content: center; white-space: nowrap; }

/* ---------- Footer ---------- */
/* The footer sits in the line grid: its box is one filled cell, framed by
   hairlines that run edge to edge (placed by the frame-lines script). */
.footer { position: relative; padding-block: var(--space-12) var(--space-24); }
.footer__inner {
  position: relative; z-index: 1; isolation: isolate; cursor: pointer;
  display: flex; justify-content: space-between; align-items: stretch; gap: var(--space-12);
  padding: var(--space-12);
  background: var(--color-footer-box); color: var(--color-text-on-light);
}
/* #E0E0E0 cell that fills orange from the bottom on hover */
.footer__inner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--color-orange);
  transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease-out);
}
.footer__inner:hover::before, .footer__inner:focus-within::before { transform: scaleY(1); }

/* on load (scrolled into view) only the #E0E0E0 background fills up from the
   bottom; the logo and text don't animate. [data-fill] just triggers it here. */
.footer__inner[data-fill] { clip-path: none; background: none; }
.footer__inner::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--color-footer-box);
  transform: scaleY(0); transform-origin: bottom; transition: transform 1.1s var(--ease-out);
}
.footer__inner.is-in::after { transform: none; }

/* logo: dark version, readable on both fills */
.footer__logo { position: relative; display: block; flex: none; width: clamp(220px, 22vw, 320px); }
.footer__logo img, .footer__logo svg { display: block; width: 100%; height: auto; }
.footer__logo { width: clamp(240px, 24vw, 380px); }   /* the one-line wordmark runs wider than the stacked logo */

/* back-to-top arrow: top-right corner, its point level with the logo's top edge (phones only:
   on wider screens the nav sits in that corner, and clicking the box still goes to the top) */
.footer__top {
  position: absolute; top: var(--space-8); right: var(--space-8);
  display: block; line-height: 0; color: inherit;
  opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .45s var(--ease-out);
}
.footer__top svg { display: block; overflow: visible; }
.footer__inner:hover .footer__top, .footer__top:focus-visible { opacity: 1; transform: none; }

/* right of the logo: the nav items on top, their cap tops level with the logo's top edge, and
   contact + copyright at the bottom, their baseline on the logo's bottom edge */
.footer__side { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: var(--space-8); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-4) var(--space-12); margin-top: -0.14em; font-family: var(--font-mono); font-size: var(--type-size-body); line-height: 1; letter-spacing: var(--mono-letter-spacing); text-transform: var(--mono-transform); }
/* clearly links: underlined at rest (a hairline under each item), a heavier line on hover */
.footer__nav a { color: inherit; padding-bottom: 6px; background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; transition: background-size .2s; }
.footer__nav a:hover, .footer__nav a:focus-visible { background-size: 100% 2px; }
.footer__meta { display: flex; flex-wrap: wrap; gap: var(--space-3); font-family: var(--font-mono); font-size: var(--type-size-small); line-height: 1; letter-spacing: var(--mono-letter-spacing); color: inherit; opacity: .75; transition: opacity .4s; margin-bottom: var(--meta-drop, -0.2em); }
.footer__inner:hover .footer__meta { opacity: 1; }
.footer__meta a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .25s; }
.footer__meta a:hover { text-decoration-color: currentColor; }
/* social profiles (fixes G20): marks in the footer's text color, orange on hover. Each is a 32px target; the row's
   side margins line the marks up with the text around them */
.footer__social { display: flex; margin: -10px -8px; }
.footer__social a { display: grid; place-items: center; width: 32px; height: 32px; color: inherit; text-decoration: none; transition: color .2s; }
.footer__social a:hover, .footer__social a:focus-visible { color: var(--color-orange); }
.footer__social svg { width: 16px; height: 16px; fill: currentColor; }
/* the contact line is two units that wrap as wholes: [email · marks] and [copyright]. On one line a dot separates
   them; when the copyright wraps to the start of the next line its dot falls outside the box and is clipped */
.footer__meta { flex-wrap: wrap; align-items: center; column-gap: var(--space-6); row-gap: 14px; clip-path: inset(-16px 0); }
.footer__contact { display: inline-flex; align-items: center; column-gap: var(--space-3); white-space: nowrap; }
.footer__copy { position: relative; }
.footer__copy::before { content: "·"; content: "·" / ""; position: absolute; left: calc(var(--space-6) / -2); transform: translateX(-50%); }
/* the Privacy and Accessibility links ride on the copyright line, each after its own dot, so the footer gains no line */
.footer__copy { white-space: nowrap; }
.footer__dot { margin-inline: var(--space-3); }
/* from 900px the meta line fits on one row: its gaps stay at their tightest until then, and widen more slowly than
   the window after it, reaching full size by 960px, so the line never breaks again as the window grows */
@media (min-width: 760px) and (max-width: 1099px) {
  .footer__meta { --meta-gap: clamp(14px, (100vw - 900px) * .2 + 14px, var(--space-6)); column-gap: var(--meta-gap); }
  .footer__copy::before { left: calc(var(--meta-gap) / -2); }
  .footer__dot { margin-inline: clamp(6px, (100vw - 900px) * .1 + 6px, var(--space-3)); }
}
/* the footer keeps its text on two rows as long as it can, and the wordmark goes first: the nav bar already carries
   it. From 1280px the links and the contact line each fit on one line beside it; below, it's hidden and the text runs
   from the left edge. When a line no longer fits even then, it wraps a group at a time, not an item per line. */
@media (max-width: 1279px) {
  .footer__logo { display: none; }
  .footer__side { align-items: flex-start; }
  .footer__nav, .footer__meta { justify-content: flex-start; }
}
/* touch screens have no hover: keep the #E0E0E0 fill and show the arrow */
@media (hover: none) { .nav__logo-glow { display: none; } .hlines--spot { display: none; } .cursor-glow { display: none; }
  .footer__top { opacity: 1; transform: none; }
}
/* the menu button instead of tabs below 1025px, the nav's own breakpoint: from there the gap between the logo and the
   first tab is at least the logo's left margin (tests/nav-fit.spec.mjs; a new tab moves it) */
@media (max-width: 1024px) {
  .nav__item { flex-direction: column; }
  .nav__menu { position: static; width: auto; opacity: 1; visibility: visible; transform: none; border: 0; background: none; }
  .nav__links .nav__menu a { padding: var(--space-3) var(--gutter) var(--space-3) calc(var(--gutter) + var(--space-6)); border-top: 1px solid var(--color-border); }
  .nav__inner { padding-right: var(--gutter); }
  .nav__toggle {
    display: flex; align-items: center; gap: 5px; justify-content: center;
    width: 44px; background: none; border: 0; cursor: pointer;
  }
  .nav__toggle span { width: 2px; height: 20px; background: var(--color-off-white); transition: transform .35s var(--ease-out), background-color .25s; }
  .nav__toggle[aria-expanded="true"] span { background: var(--color-orange); }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateX(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: scaleY(0); }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateX(-7px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; background: var(--color-surface-1);
    border-bottom: 1px solid var(--color-border);
    clip-path: inset(0 0 100% 0); transition: clip-path .45s var(--ease-out);
  }
  .nav.is-open .nav__links { clip-path: inset(0 0 0 0); }
  .nav__links a { padding: var(--space-4) var(--gutter); border-top: 1px solid var(--color-border); }
  .nav__links a { border-left: 0; }
  .nav__links .nav__cta { margin: 0; padding-inline: var(--gutter); }
}
@media (min-width: 1025px) { .nav__links .nav__home { display: none; } }
@media (max-width: 1099px) {
  /* en tablet y movil la capa del brillo sobra: no hay cursor que la encienda y sus copias de las
     lineas quedan desalineadas con el marco (se veian lineas dobles) */ .hlines--spot { display: none !important; }
  /* y en tablet/movil las secciones no dibujan su propio par de lineas por dentro del marco de la
     pagina: se veian dobles */
  main > section > .hlines > i[style*="width: 1px"] { display: none !important; }
  /* esas dos hacian de lineas laterales cuando la seccion no tenia borde; ahora lo tiene, asi que
     sobran: se veian dobles, una a 12 y otra a 25 */
  main > section.pg-hero::before, main > section.pg-hero::after,
  main > section.v3-svc--page > .v3-svc__head::before, main > section.v3-svc--page > .v3-svc__head::after { display: none !important; }
  /* both CTAs the same width (the wider one's), labels centered */
  /* narrower desktops: the pattern becomes a band across the top, the text and CTAs below it */
  .closing__cell { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: 180px 1fr 1fr; grid-template-areas: "art art" "main cta1" "main cta2"; }
  .closing__art { min-height: 0; } .footer__nav { column-gap: var(--space-8); }
  /* below 1100px the logo takes its own row and everything under it runs left to right across the full width: the logo
     sits beside the links only where the nav and the contact line each fit on one line (from 1100px) */
  .footer__inner { flex-direction: column; gap: var(--space-8); }
  .footer__side { align-items: flex-start; gap: var(--space-8); }
  .footer__nav, .footer__meta { justify-content: flex-start; }
}

/* ---------- Scroll reveals ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Split headings: words rise from a mask */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
/* read by screen readers, not shown: a split heading's whole text (site.js) */
:root .sr-only.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }   /* important and extra specific: some sections force every element inside them (careers.css, the timeline: position: static !important) */
.w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 45ms); }
.is-in .w > span, .is-in.w > span { transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .w > span { transform: none; }
  .hero__side .ctas > * { transform: none; }
  .btn--orbit::after { animation: none; opacity: 0; }
  [data-fill], .closing__cell { clip-path: none; }
  .footer__inner::after { transform: none; }
}

/* headlines: weight set in one place */
:root { --weight-headline: 400; }
.h-xl, .h2, .hero__title, .closing__title, .hcard__name { font-weight: var(--weight-headline); }

/* ---------- V3 who we are + careers: Option 1's layout on the shared grid (same outer lines, column lines at its
   thirds). Group 1: headline | box | co-founder headshots. Group 2: team photos | headline | box ---------- */
.v3-who { --pad: clamp(14px, 1.6vw, 28px); --rule: var(--color-border); position: relative; box-sizing: border-box;
  margin-left: var(--svc-l, 0px); width: var(--svc-w, 100%); border-inline: 1px solid var(--rule);
  padding-block: var(--space-24); }
.v3-who::before, .v3-who::after { content: ""; position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--rule); pointer-events: none; }
.v3-who::before { left: calc((100% + 1px) / 3 - 1px); }
.v3-who::after { left: calc((100% + 1px) * 2 / 3 - 1px); }
.v3-who .tw-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; }
.v3-who .tw-group > h2 { grid-column: 1; grid-row: 1; margin: 0; padding: 1px var(--pad) 0; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.2; text-wrap: balance; }
.v3-who .tw-box { grid-column: 2; grid-row: 1; }
.v3-who #careers > h2 { grid-column: 2; }
.v3-who #careers .tw-box { grid-column: 3; }   /* careers on its own: photos | headline | box */
.v3-who .svc-icon { display: block; width: 28px; height: 28px; margin-bottom: 18px; fill: none; stroke: var(--color-orange); stroke-width: 3; }
.v3-who .svc-row { display: flex; flex-direction: column; padding: clamp(24px, 2.4vw, 40px) var(--pad); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.v3-who .svc-row p { margin: 0; max-width: 38em; color: var(--color-text-muted); font-size: 16px; line-height: 1.6; }
.v3-who .sec-cta { margin-top: 28px; }
.v3-who .tw-heads { grid-column: 3; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); padding: 0 var(--pad); }   /* the same space between the photos as at either side */
.v3-who #careers .tw-heads, .v3-who .tw-heads[data-from="left"] { grid-column: 1; }
.v3-who .tw-heads figure { margin: 0; will-change: translate; }
#main { overflow-x: clip; }   /* the photos wait off screen without adding a sideways scroll */
main img { transition: filter .5s ease; }
main img:hover, main figure:hover img { filter: none !important; }   /* every photo turns to color on hover */
.v3-who .tw-heads img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.v3-who .tw-heads figcaption { margin-top: 12px; font: 400 12px/1.5 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--color-off-white); }
.v3-who .tw-heads figcaption span { display: block; color: var(--color-text-muted); }

/* ---------- V3 services: Option 1's layout. Three columns with a line between each; the headline holds in the
   middle of the screen in column 1 while the boxes scroll up past it in columns 2-3, staggered by half a step ---------- */
/* the grid spans the hero and intro's outer lines (the script sets --svc-l / --svc-w from them), with those
   two lines carried down as its edges and the two column lines at its thirds */
.v3-svc { --rule: var(--color-border); box-sizing: border-box; margin-left: var(--svc-l, 0px); width: var(--svc-w, 100%);
  border-inline: 1px solid var(--rule); --pad: clamp(14px, 1.6vw, 28px);
  --box: 590px; --gap: 150px; position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: var(--space-24); padding-bottom: var(--space-24); }
.v3-svc::before, .v3-svc::after { content: ""; position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--rule); pointer-events: none; }
.v3-svc::before { left: calc((100% + 1px) / 3 - 1px); }
.v3-svc::after { left: calc((100% + 1px) * 2 / 3 - 1px); }
/* a screen-tall sticky box with the title and button centered in it, so they never rise above the section */
.v3-svc__head { grid-column: 1; grid-row: 1; align-self: start; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; gap: 32px; padding: 0 var(--pad); }
.v3-svc__lead { margin: -16px 0 0; color: var(--color-text-muted); font-size: 16px; line-height: 1.6; }
.v3-svc__head h2 { margin: 0; max-width: 18em; font-family: var(--font-display); font-weight: var(--weight-headline);
  font-size: clamp(24px, 2.8vw, 34px); line-height: 1.2; text-wrap: balance; }
.v3-svc__stack { grid-column: 2 / -1; grid-row: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: calc((var(--box) + var(--gap)) / 2); padding-top: calc(50vh + 80px); }
.v3-svc__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--pad); margin-bottom: var(--gap); padding: clamp(24px, 2.4vw, 40px) var(--pad);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.v3-svc__row:nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
.v3-svc__row:nth-child(2) { grid-area: 2 / 2 / 4 / 3; }
.v3-svc__row:nth-child(3) { grid-area: 3 / 1 / 5 / 2; }
.v3-svc__row:nth-child(4) { grid-area: 4 / 2 / 6 / 3; }
.v3-svc__top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px;
  font: 400 12px/1 var(--font-mono, "Chivo Mono", monospace); letter-spacing: .06em; color: #8A8A8A; }
.v3-svc__mark { width: 11px; height: 11px; background: var(--color-orange); }
/* each offering's title opens it on What We Do */
.v3-svc__text h3 a { color: inherit; text-decoration: none; transition: color .2s; }
/* a service card is one link (fix G15): the title's link stretches over the whole card, a small orange arrow shows at
   rest that it leads somewhere, and pointing at or focusing the card lights the title */
.v3-svc__row:has(h3 a) { position: relative; }
.v3-svc__text h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.v3-svc__arw { display: inline-block; margin-right: -1.3em; color: var(--color-orange); transition: transform .2s; }   /* hangs past the title's line, so the title wraps exactly as without it */
.v3-svc__row:hover h3 a, .v3-svc__text h3 a:focus-visible { color: var(--color-orange); }
.v3-svc__row:hover .v3-svc__name, .v3-svc__text h3 a:focus-visible .v3-svc__name { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.v3-svc__row:hover .v3-svc__arw, .v3-svc__text h3 a:focus-visible .v3-svc__arw { transform: translateX(4px); }
/* text left, diagram right */
.v3-svc__text { grid-column: 1 / -1; grid-row: 2; align-self: start; }
.v3-svc .v3-svc__viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.v3-svc__viz { grid-column: 1 / -1; grid-row: 3; position: relative; min-height: 340px; margin-top: var(--space-6); }   /* the diagram under the text, full width */
.v3-svc h3 { margin: 0; font-family: var(--font-display); font-weight: var(--weight-headline); font-size: clamp(20px, 1.6vw, 24px); line-height: 1.25; }
.v3-svc p { margin: 10px 0 0; color: var(--color-text-muted); font-size: 16px; line-height: 1.6; }
@media (max-width: 759px) { :root { --nav-h: 72px; } .nav__logo { margin-left: 0; }
  .hero { height: auto; min-height: 0; }
  .hero__top { padding-block: var(--space-12) var(--space-6); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero__copy { padding-block: 0; }
  .hero__title { font-size: var(--type-size-hero); }
  .hero__stage { height: 380px; margin-inline: calc(var(--gutter) * -1); }
  .section { padding-block: var(--space-16); }.intro__ch { grid-template-columns: 1fr; gap: var(--space-6); padding-top: var(--space-8); } .intro__grid { grid-template-columns: 1fr; gap: var(--space-8); }html:not(.js) .fpin__sticky { padding-block: 0; }
  /* phones and small tablets: the nav in aligned columns, two or three links per line. Columns are counted at 6.2em,
     a little under the widest link (6.6em), and each widens to fit its links; the nav is capped at three columns so five
     links split 3 + 2, never 4 + 1, and two columns still fit the narrowest footer box (224px inside, at 320px) */
  .footer__nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2em, max-content)); justify-items: start; column-gap: var(--space-6); width: 100%; white-space: nowrap; max-width: calc(3 * 6.6em + 2 * var(--space-6)); margin-top: 0; }
  .v3-who { margin: 0 0 0 12px; width: calc(100% - 24px); }
  .v3-who::before, .v3-who::after { display: none; }
  .v3-who .tw-group > h2, .v3-who .tw-box, .v3-who .tw-group + .tw-group > h2, .v3-who .tw-group + .tw-group .tw-box,
  .v3-who .tw-heads, .v3-who .tw-heads[data-from="left"] { grid-column: 1 / -1; grid-row: auto; }
  .v3-who .tw-box { padding-top: 28px; }
  .v3-who .svc-row { border: 0; }
  .v3-who .tw-heads { margin-top: 32px; }
  .v3-who #careers > h2, .v3-who #careers .tw-box { grid-column: 1 / -1; }
  .v3-svc { grid-template-columns: 1fr; margin: 0 0 0 12px; width: calc(100% - 24px); }
  .v3-svc::before, .v3-svc::after { display: none; }
  .v3-svc__head { position: static; height: auto; }
  .v3-svc__stack { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; grid-auto-rows: auto; margin-top: 40px; padding-top: 0; }
  .v3-svc__row:nth-child(n) { grid-area: auto; margin-bottom: 0; }
  .v3-svc__row + .v3-svc__row { border-top: 0; }
}
/* the closing section, with the footer frame and lines it shares, stays stacked up to 939px, where its button first fits two columns (a section breakpoint) */
@media (max-width: 939px) {.closing__inner, .footer__inner { width: auto; margin-inline: var(--gutter); }
  .closing__cell { grid-template-columns: 1fr; grid-template-rows: 160px auto auto auto; grid-template-areas: "art" "main" "cta1" "cta2"; }
}
@media (max-width: 559px) { .intro__stats { grid-template-columns: 1fr; }
  /* fills the card's leftover space; basis 0 so the canvas's drawing size never stretches the card */
  .hscroll { --hs-gap: var(--space-6); }
  .hscroll__sticky { gap: var(--space-8); }
  .hscroll__head { flex-direction: column; align-items: stretch; gap: var(--space-6); }
  .hscroll__meter { width: auto; }
  .hcard { width: 80vw; aspect-ratio: auto; min-height: 340px; }
  .hcard__name { font-size: 1.375rem; }   /* a clear step below the phone section title */.closing__line { display: inline; } .closing__title { text-wrap: balance; } .closing__main { padding: var(--space-12) var(--space-6); }
  .footer__inner { padding: var(--space-6); }
  .footer__top { top: var(--space-6); right: var(--space-6); }
  /* phones: email, marks, copyright, one per line, the marks spanning exactly the email's width */
  .footer__meta { flex-direction: column; align-items: flex-start; gap: 10px; clip-path: none; }
  .footer__contact { display: inline-grid; row-gap: 10px; }
  .footer__sep, .footer__copy::before { display: none; }
  /* the copyright, then the Privacy and Surface links on their own line: all three don't fit a 320px screen */
  .footer__copy { display: grid; row-gap: 10px; }
  .footer__copy > .footer__dot { display: none; }
  .footer__social { justify-content: space-between; margin-block: 0; }
  .v3-svc__row { grid-template-columns: 1fr; }
  .v3-svc__viz { grid-column: 1; grid-row: 3; min-height: 360px; margin: 20px 0 0; }
  .v3-svc__text { grid-row: 2; }
}

/* the closing section, with the footer frame and lines it shares, stays stacked up to 939px, where its button first fits two columns (a section breakpoint) */
@media (min-width: 940px) {
  .closing__inner, .footer__inner { margin: 0 0 0 var(--svc-l, 0px); width: calc(var(--svc-w, 100%) - 1px); }   /* the frame script draws the right line on the cell's right edge */
  .closing { padding-top: 0; }
  .endgrid { border-top: 1px solid var(--color-border); }
}
@media (min-width: 1100px) { .footer__top { display: none; } .footer__logo { align-self: center; }
  /* beside the links, the wordmark sits midway down the footer box */
  /* wide screens: the CTA column is the grid's last third, so its line continues the careers line above
     (narrower desktops already split 2:1) */
  .closing__cell { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 2fr); }
}

.hlines.grid-spot { inset: -1px; z-index: 1; }   /* the host's border box, so its own outer lines light up too */
.grid-spot i { position: absolute; background: var(--color-orange); }

/* ---------- reveal delays and counts set per element (were inline styles, which the security policy blocks) ---------- */
[data-d=".0s"] { --d: .0s; }
[data-d="0.00s"] { --d: 0.00s; }
[data-d="0.06s"] { --d: 0.06s; }
[data-d="0.08s"] { --d: 0.08s; }
[data-d=".1s"] { --d: .1s; }
[data-d="0.16s"] { --d: 0.16s; }
[data-d="0.24s"] { --d: 0.24s; }
[data-n="4"] { --n: 4; }

/* a screen too short for the whole pinned band drops its [data-hs-drop] parts in order (data-short, set in
   js/site.js), so the cards clear the toolbar */
.hscroll[data-short="1"] [data-hs-drop="1"],
.hscroll[data-short="2"] [data-hs-drop] { display: none !important; }

/* Tap targets (fix G8): on phones every footer link has a touch area at least 44px tall, and 44px wide for the arrow and
   icons. The text and icons stay as they are; an invisible area around each link takes the tap, and the rows move just
   far enough apart that neighbouring areas don't overlap. tests/tap-targets.spec.mjs checks it. */
@media (max-width: 759px) {
  .footer__nav { row-gap: 22px; }
  .footer__nav a, .footer__meta a:not(.footer__social a) { position: relative; }
  .footer__nav a::after { content: ""; position: absolute; inset: -11px -8px; }
  .footer__meta a:not(.footer__social a)::after { content: ""; position: absolute; inset: -15px -8px; }
  .footer__top::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
  .footer__social { margin: 6px -14px 0; }   /* the wider boxes keep the first icon lined up with the text */
  .footer__social a { width: 44px; height: 44px; }
}
