@charset "UTF-8";

/* ===========================================================================
   Gurleen Kaur - portfolio
   ---------------------------------------------------------------------------
   Art direction follows the agreed reference: a black canvas, white type, one
   electric-lime accent, a geometric display face over a light humanist body
   face, and motion built on two easing curves at 0.3s / 0.7s.

   Contrast note: body copy clears 4.5:1, but a few small labels (carousel
   tabs, card numbers, scroll hints) keep the reference's 0.35-0.4 white to
   match it exactly, which is below WCAG AA. Raise them here if that matters more.

   Order: fonts, tokens, reset, utilities, page chrome, header, hero, marquee,
   intro, work, playground, capabilities, process, closing and footer, case
   study, forms, cursor, motion, responsive, reduced motion, print.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Fonts - self-hosted, so the site makes no third-party requests
   --------------------------------------------------------------------------- */

@font-face {
  font-family: 'Blinker';
  src: url('/fonts/blinker-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Blinker';
  src: url('/fonts/blinker-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sulphur Point';
  src: url('/fonts/sulphur-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sulphur Point';
  src: url('/fonts/sulphur-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sulphur Point';
  src: url('/fonts/sulphur-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   2. Tokens
   --------------------------------------------------------------------------- */

:root {
  --black: #000;
  --surface: #141414;
  --surface-2: #0f0e0e;
  --hero-bg: #0f0e0e;
  --surface-3: #1c1c1c;
  --white: #fff;

  /*
   * Two accents, and the split matters: white is the interactive colour - every
   * hover, underline, focus ring and active state - while the lime is reserved
   * for status marks only (the availability dot, the nav dots, section
   * eyebrows). Using lime for buttons was wrong: it turns a quiet accent into
   * the loudest thing on the page.
   */
  --accent: #fff;
  --green: #8cff2e;
  --green-dim: rgb(140 255 46 / 0.16);

  --t-90: rgb(255 255 255 / 0.9);
  --t-75: rgb(255 255 255 / 0.75);
  --t-60: rgb(255 255 255 / 0.6);
  --t-40: rgb(255 255 255 / 0.4);
  --t-20: rgb(255 255 255 / 0.2);
  --t-12: rgb(255 255 255 / 0.12);
  --t-08: rgb(255 255 255 / 0.08);

  --line: rgb(255 255 255 / 0.12);
  --line-soft: rgb(255 255 255 / 0.08);

  --font-display: 'Blinker', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Sulphur Point', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Hero matches the reference exactly: clamp(34px, 8vw, 128px). */
  --fs-hero: clamp(2.125rem, 8vw, 8rem);
  --fs-h1: clamp(2rem, 5.2vw, 4.5rem);
  --fs-h2: clamp(1.75rem, 4vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 2.2vw, 1.75rem);
  --fs-lead: clamp(1.0625rem, 1.5vw, 1.3125rem);
  --fs-body: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --fs-small: 0.9375rem;
  --fs-micro: 0.6875rem;

  --tracking-hero: 0.01em;
  --tracking-label: 0.16em;
  --lh-hero: 0.9;
  --lh-heading: 1.05;
  --lh-body: 1.65;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --section-y: clamp(4.5rem, 10vw, 10rem);

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 60ch;
  --max-w: 1440px;

  /* The reference's two curves, and nothing else. */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --d-fast: 0.15s;
  --d-mid: 0.2s;
  --d: 0.3s;
  --d-fade: 0.5s;
  --d-slow: 0.7s;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 9999px;

  --nav-h: 4.25rem;
  color-scheme: dark;
}

/* ---------------------------------------------------------------------------
   3. Reset
   --------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  background: var(--black);
  overscroll-behavior-y: none;
}

/* The reference hides the scrollbar; scrolling itself is eased by the script. */
::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/*
 * A <picture> is an inline wrapper by default, which silently breaks the height
 * chain between a fixed-ratio frame and the <img> inside it - object-fit then
 * has nothing to fill and the image sits short in its box. Every frame that
 * sets its own aspect-ratio needs the wrapper to carry the full height through.
 */
.work-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--accent);
  color: var(--black);
}

/* ---------------------------------------------------------------------------
   4. Utilities
   --------------------------------------------------------------------------- */

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 400;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  color: var(--black);
  font-size: var(--fs-small);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transform: translate(-50%, -130%);
  transition: transform var(--d) var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.shell {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}

/* The green dot + small caps label that opens each section. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.5);
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
  animation: dot-loop 1.8s ease-in-out infinite alternate;
}

@keyframes dot-loop {
  0% { opacity: 1; transform: scale(1) rotate(0deg); }
  100% { opacity: 0.7; transform: scale(0.2) rotate(360deg); }
}

.eyebrow--plain::before {
  display: none;
}

.label {
  display: block;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--t-75);
  max-width: 46ch;
}

.prose {
  max-width: var(--measure);
  color: var(--t-75);
}

.prose p + p {
  margin-top: 1.1em;
}

.text-muted { color: var(--t-60); }
.text-accent { color: var(--accent); }

.link {
  position: relative;
  display: inline-block;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--d) var(--ease), color var(--d) var(--ease);
}

.link:hover,
.link:focus-visible {
  background-size: 100% 1px;
  color: var(--accent);
}

.link--drawn {
  background-size: 100% 1px;
}

/* ---------------------------------------------------------------------------
   5. Page chrome - intro curtain, page reveal, scroll progress
   --------------------------------------------------------------------------- */

/*
 * Intro curtain, home page only, once per session: five black panels, a
 * counter and a changing word. The counter runs to 100, the content lifts
 * away, then the panels roll up one after another.
 */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.intro-done .preloader {
  display: none !important;
}

/* Nothing behind the curtain scrolls while it is up. */
html.js:not(.intro-done):has(.preloader),
html.js:not(.intro-done):has(.preloader) body {
  overflow: hidden;
}

.preloader__panels {
  position: absolute;
  inset: 0;
  display: flex;
}

.preloader__panel {
  flex: 1;
  height: 100%;
  background: #000;
  /* Overlap by a pixel so scaled displays never show a seam between panels. */
  box-shadow: 1px 0 0 #000;
  transform-origin: top;
  will-change: transform;
}

.preloader__content {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
}

.preloader__count {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-body);
  font-size: clamp(56px, 11vw, 150px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.025em;
  color: rgb(255 255 255 / 0.4);
}

.preloader__word {
  position: absolute;
  bottom: 2rem;
  left: 1.5rem;
  font-family: var(--font-body);
  font-size: clamp(64px, 15vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: #fff;
}

/* Every page opens from black. A click on an internal link turns it back on
   instantly, so the next page fades up out of the same black. */
.page-reveal {
  position: fixed;
  inset: 0;
  z-index: 195;
  background: #000;
  pointer-events: none;
  animation: page-reveal 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes page-reveal {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

html.is-leaving .page-reveal {
  animation: none;
  opacity: 1;
  visibility: visible;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 3px;
  pointer-events: none;
}

.scroll-progress__bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* Where scroll timelines exist the bar follows the page with no script at
   all, animated by the compositor alongside the scroll itself. */
@supports (animation-timeline: scroll()) {
  .scroll-progress__bar {
    animation: scroll-progress linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes scroll-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------------------------------------------------------------------------
   6. Header - floating pill
   --------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 1rem 1rem 0;
  pointer-events: none;
}

.site-header__pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 9999px;
  background: rgb(0 0 0 / 0.3);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  transition:
    max-width 0.5s cubic-bezier(0, 0, 0.2, 1),
    padding 0.5s cubic-bezier(0, 0, 0.2, 1),
    background-color 0.5s cubic-bezier(0, 0, 0.2, 1),
    box-shadow 0.5s cubic-bezier(0, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0, 0, 0.2, 1),
    opacity 0.5s cubic-bezier(0, 0, 0.2, 1);
}

.site-header.is-scrolled .site-header__pill {
  max-width: 840px;
  padding-inline: 1rem;
  background: rgb(0 0 0 / 0.72);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.site-header.is-compact .site-header__pill {
  max-width: 440px;
}

.site-header.is-hidden .site-header__pill {
  opacity: 0;
}

/* Inside the pill the real cursor comes back; the custom dot steps aside. */
.site-header__pill,
.site-header__pill * {
  cursor: auto !important;
}

.site-header__pill a,
.site-header__pill a *,
.site-header__pill button,
.site-header__pill button * {
  cursor: pointer !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* A monogram stands in for the reference's portrait: no invented photography. */
.brand__mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.2);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.brand:hover .brand__mark {
  transform: rotate(-6deg) scale(1.1);
}

.brand__mark picture,
.brand__photo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand__pip {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 16px;
  white-space: nowrap;
  color: #fff;
}

.brand__dot {
  color: var(--accent);
}

.nav-cluster {
  position: relative;
  display: none;
  align-items: center;
  justify-content: flex-end;
}

.nav-dots {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.is-compact .nav-dots {
  position: static;
  opacity: 1;
  pointer-events: auto;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: dot-wave 1.4s ease-in-out infinite;
}

.nav-dot:nth-child(2) { animation-delay: 0.18s; }
.nav-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes dot-wave {
  0%, 60%, 100% { opacity: 0.45; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.is-compact .nav-group {
  position: absolute;
  right: 0;
  opacity: 0;
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-body);
  font-size: 18px;
  color: #fff;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding-block: 0.25rem;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__link:hover {
  color: var(--accent);
}

/* The underline grows from the left - width, not a transform. */
.nav__line {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__link:hover .nav__line,
.nav__link:focus-visible .nav__line {
  width: 100%;
}

.nav__divider {
  width: 1px;
  height: 1rem;
  background: rgb(255 255 255 / 0.2);
}

.nav__icons {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.nav__icon {
  display: block;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.nav__icon:hover,
.nav__icon:focus-visible {
  transform: translateY(-0.125rem) rotate(6deg) scale(1.25);
}

.nav__icon .brand-icon {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.15));
}

.nav-burger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.nav-burger__box {
  position: relative;
  display: block;
  width: 1.5rem;
  height: 0.875rem;
}

.nav-burger__box span {
  position: absolute;
  left: 0;
  width: 1.5rem;
  height: 2px;
  border-radius: 9999px;
  background: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-burger__box span:nth-child(1) { top: 0; }
.nav-burger__box span:nth-child(2) { top: 0.375rem; transition-duration: 0.2s; }
.nav-burger__box span:nth-child(3) { top: 0.75rem; }

.site-header.menu-open .nav-burger__box span:nth-child(1) { top: 0.375rem; transform: rotate(45deg); }
.site-header.menu-open .nav-burger__box span:nth-child(2) { opacity: 0; }
.site-header.menu-open .nav-burger__box span:nth-child(3) { top: 0.375rem; transform: rotate(-45deg); }

.site-menu {
  position: absolute;
  top: 72px;
  left: 1rem;
  right: 1rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 1.5rem;
  background: rgb(0 0 0 / 0.85);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.menu-open .site-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.site-menu__nav {
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 18px;
  color: #fff;
}

.site-menu__nav a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-menu__nav a:hover {
  background: rgb(255 255 255 / 0.05);
}

.site-menu__icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 1rem 0.75rem 0;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.site-menu__icons .brand-icon {
  width: 24px;
  height: 24px;
}

/* ---------------------------------------------------------------------------
   7. Hero
   --------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding-inline: 1.5rem;
  overflow: hidden;
  overflow: clip;
  text-align: center;
  background: var(--hero-bg);
}

/*
 * The moving background. A WebGL layer draws slow, low-contrast smoke with a
 * faint light that follows the pointer. It fades in once its first frame is
 * ready, so a slow GPU never flashes an empty black box.
 */
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0, 0, 0.2, 1);
}

.hero__canvas.is-ready {
  opacity: 1;
}

/* Static stand-in for when WebGL is unavailable; hidden once the canvas runs. */
.hero::before {
  content: '';
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 0;
  width: min(130vw, 1200px);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.05) 0%, transparent 62%);
  pointer-events: none;
}

.hero.has-smoke::before {
  display: none;
}

.hero__trail {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

.trail-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 245px;
  height: 170px;
  max-width: none;
  object-fit: cover;
  opacity: 0;
}

.hero__inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(34px, 8vw, 128px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #fff;
  will-change: transform;
}

.hero-word,
.hero-char {
  display: inline-block;
}

.hero-word {
  will-change: transform;
}

/* A real pipe, so it sits on the baseline at every size. Shown once the name
   has finished lighting up. */
.hero-caret {
  display: none;
  font-weight: 100;
  color: rgb(255 255 255 / 0.6);
  animation: caret-blink 1.05s step-end infinite;
}

.hero.is-ready .hero-caret {
  display: inline-block;
}

@keyframes caret-blink {
  0%, 70%, 100% { opacity: 1; }
  20%, 50% { opacity: 0; }
}

.hero__intro {
  margin-top: 10rem;
  max-width: 620px;
  font-family: var(--font-body);
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.625;
  letter-spacing: -0.025em;
  color: rgb(255 255 255 / 0.8);
  text-wrap: balance;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  translate: -50% 0;
}

.hero__scroll-label {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}

.hero__scroll-track {
  position: relative;
  display: block;
  width: 1px;
  height: 2.5rem;
  overflow: hidden;
  background: rgb(255 255 255 / 0.15);
}

.hero__scroll-line {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  width: 1px;
  height: 1rem;
  background: var(--accent);
  animation: scroll-cue 1.8s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

@keyframes scroll-cue {
  from { transform: translateY(-100%); }
  to { transform: translateY(250%); }
}

/* ---------------------------------------------------------------------------
   8. Marquee - inverted white band
   --------------------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  padding-block: 1.5rem;
  background: #fff;
  color: #000;
  user-select: none;
}

.marquee__track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
}

/* Each group slides its own width in 22 seconds, so two copies loop seamlessly. */
.marquee__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
  animation: marquee-slide 22s linear infinite;
  will-change: transform;
}

.marquee__item {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.marquee__word {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.marquee__star {
  font-size: clamp(20px, 3vw, 40px);
  color: var(--accent);
}

@keyframes marquee-slide {
  to { transform: translateX(-100%); }
}


/* ---------------------------------------------------------------------------
   9. Section heads
   --------------------------------------------------------------------------- */

.section-head {
  display: grid;
  gap: var(--space-4);
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-hero);
}

.section-head__statement {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--t-75);
  max-width: 52ch;
}

/* ---------------------------------------------------------------------------
   10. Intro - audience switcher beside a dotted notepad
   --------------------------------------------------------------------------- */

.about {
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: 6rem 1.5rem;
  overflow: hidden;
  overflow: clip;
  background: #000;
}

.about__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  max-width: 1274px;
  margin-inline: auto;
}

.about__intro {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-start;
}

.about__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 80px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #fff;
}

.about__switch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  margin-top: 2rem;
}

.about__tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.5rem;
  font-family: var(--font-body);
  font-size: 18px;
  text-align: left;
  color: rgb(255 255 255 / 0.4);
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.about__tab:hover {
  color: rgb(255 255 255 / 0.75);
}

.about__tab[aria-selected='true'] {
  color: #fff;
}

.about__tab-line {
  display: block;
  width: 1rem;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.about__tab:hover .about__tab-line {
  width: 1.5rem;
}

.about__tab[aria-selected='true'] .about__tab-line {
  width: 2.25rem;
  opacity: 1;
}

.about__card {
  width: 100%;
}

.notepad {
  position: relative;
  height: 600px;
  padding: 2rem;
  overflow: hidden;
  border-radius: 20px;
  background-color: #101014;
  background-image: radial-gradient(circle, rgb(255 255 255 / 0.11) 1.1px, transparent 1.3px);
  background-position: 16px 16px;
  background-size: 26px 26px;
  box-shadow: 0 34px 70px -34px rgb(0 0 0 / 0.85);
}

/* The folded corner. */
.notepad::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-top-right-radius: 20px;
  background: linear-gradient(225deg, #000 0 43%, rgb(255 255 255 / 0.2) 43% 48%, #23232b 48% 100%);
  pointer-events: none;
}

.notepad__panel:focus-visible {
  outline-offset: -4px;
}

.notepad__text,
.notepad__spot {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.notepad__text p + p,
.notepad__spot p + p {
  margin-top: 0.5em;
}

.notepad__text {
  color: rgb(255 255 255 / 0.35);
}

/* An exact copy in full white, shown only inside a soft circle at the pointer. */
.notepad__spot {
  position: absolute;
  inset: 0;
  padding: 2rem;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notepad__panel.is-entering .notepad__text {
  animation: notepad-in 0.5s ease both;
}

@keyframes notepad-in {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------------
   11. Featured work
   --------------------------------------------------------------------------- */

.work {
  padding: 6rem 1.5rem;
  background: #000;
}

.work__inner {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

.work__head .eyebrow,
.pg__intro .eyebrow {
  margin-bottom: 1.5rem;
}

.work__title,
.pg__title,
.wd__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #fff;
}

.work__statement,
.pg__note,
.wd__note,
.pf__note {
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.375;
  letter-spacing: -0.025em;
  color: rgb(255 255 255 / 0.7);
}

.work__statement { max-width: 760px; }

/* Wide screens: one large frame that cross-fades between projects. */
.work-carousel {
  display: none;
}

.work-carousel__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 5rem;
}

.work-carousel__arrow {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: 50%;
  color: #fff;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-carousel__arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.work-carousel__frame {
  position: relative;
  display: block;
  flex-shrink: 1;
  height: 80vh;
  /* Matches the shape every project cover is built at, so nothing is cropped. */
  aspect-ratio: 16 / 10;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #171717;
}

.work-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0, 0, 0.2, 1);
}

.work-slide.is-active {
  opacity: 1;
}

.work-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.work-slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-carousel__shade {
  position: absolute;
  inset: auto 0 0;
  z-index: 10;
  height: 88%;
  /* The covers are now the products' own screens, several of them white, so the
     caption end of the frame is taken nearly to black. */
  background: linear-gradient(
    to top,
    rgb(0 0 0 / 0.97) 0%,
    rgb(0 0 0 / 0.93) 32%,
    rgb(0 0 0 / 0.72) 55%,
    rgb(0 0 0 / 0.3) 78%,
    transparent 100%
  );
  pointer-events: none;
}

.work-carousel__count {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 20;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: 9999px;
  background: rgb(0 0 0 / 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.25em;
  color: #fff;
  pointer-events: none;
}

.work-carousel__info {
  position: absolute;
  inset: auto 0 0;
  z-index: 20;
  padding: 2.5rem;
  pointer-events: none;
}

.work-carousel__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.7);
}

/* The project's own name leads, in the site's display face, so it never
   depends on a wordmark inside the artwork. */
.work-carousel__name {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: var(--tracking-hero);
  color: #fff;
}

.work-carousel__line {
  margin-top: 0.35rem;
  max-width: 34ch;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.4;
  color: rgb(255 255 255 / 0.92);
}

.work-carousel__desc {
  margin-top: 0.5rem;
  max-width: 560px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.625;
  color: rgb(255 255 255 / 0.75);
}

.sw-info {
  animation: sw-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sw-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* The buttons sit above the frame-wide link, so they can be clicked. */
.work-carousel__actions {
  position: relative;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
  pointer-events: auto;
}

.work-carousel__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.1);
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.work-carousel__cta:hover,
.work-carousel__cta:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.work-carousel__cta--ghost {
  background: transparent;
}

/* The display above would otherwise beat the browser's rule for [hidden]. */
.work-carousel__cta[hidden] {
  display: none;
}

.work-carousel__link {
  position: absolute;
  inset: 0;
  z-index: 30;
}

.work-carousel__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.work-carousel__tab {
  font-family: var(--font-body);
  font-size: 16px;
  color: rgb(255 255 255 / 0.4);
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-carousel__tab[aria-pressed='true'] {
  color: #fff;
}

/* Phones: a plain list of cards. */
.work-list-mobile {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 3.5rem;
}

.work-mcard {
  display: block;
}

.work-mcard__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #171717;
}

.work-mcard__media picture,
.work-mcard__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-mcard__text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.work-mcard__row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.work-mcard__num {
  font-family: var(--font-body);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: rgb(255 255 255 / 0.35);
}

.work-mcard__label {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  color: rgb(255 255 255 / 0.6);
}

.work-mcard__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 7vw, 36px);
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
}

.work-mcard:hover .work-mcard__title {
  color: var(--accent);
}

.work-mcard__desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.625;
  color: rgb(255 255 255 / 0.6);
}


/* ---------------------------------------------------------------------------
   12. Work index list (the /work page)
   --------------------------------------------------------------------------- */

.work-list {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.work-card {
  display: grid;
  gap: var(--space-4);
  padding: clamp(1rem, 2vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  transition: border-color var(--d) var(--ease), background-color var(--d) var(--ease),
    transform var(--d) var(--ease-out);
}

.work-card:hover,
.work-card:focus-within {
  border-color: var(--t-20);
  background: var(--surface-3);
  transform: translateY(-2px);
}

.work-card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-2);
  aspect-ratio: 16 / 10;
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--d-slow) var(--ease-out);
}

.work-card:hover .work-card__media img {
  transform: scale(1.03);
}

.work-card__index {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--t-60);
}

.work-card__title {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-hero);
  margin-top: 0.35rem;
}

.work-card__subtitle {
  margin-top: 0.5rem;
  color: var(--t-75);
  max-width: 52ch;
}

.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-4);
}

.work-card__tags li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t-60);
}

.work-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  color: var(--accent);
}

.work-card__cta::after {
  content: '\2192';
  transition: transform var(--d) var(--ease);
}

.work-card:hover .work-card__cta::after {
  transform: translateX(4px);
}

.work-mcard__flag {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.7);
}

.work-card__flag {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--green-dim);
  border: 1px solid var(--green);
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--green);
  vertical-align: middle;
}

/* ---------------------------------------------------------------------------
   13. Playground - pinned horizontal gallery
   On wide screens with motion on, the section pins and vertical scroll drives
   the track sideways (JS sets --pg-distance and the transform). Phones and
   reduced motion get a stacked list.
   --------------------------------------------------------------------------- */

.pg {
  position: relative;
  background: #0a0a0a;
  color: #fff;
}

.pg__track {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  width: 100%;
  padding-block: 5rem;
}

.pg__intro {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  padding-inline: 1.5rem;
}

.pg__note { max-width: 420px; }

.pg__hint {
  display: none;
  margin-top: 2.5rem;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}

.pg-card {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding-inline: 1.5rem;
}

.pg-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: #171717;
}

.pg-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* Drawn larger than its frame so the sideways drift never shows an edge. */
.pg-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  will-change: transform;
}

.pg-card__text {
  margin-top: 1.5rem;
}

.pg-card__title {
  font-family: var(--font-body);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #fff;
}

.pg-card__desc {
  margin-top: 0.5rem;
  max-width: 380px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.625;
  color: rgb(255 255 255 / 0.6);
}

.pg-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pg-card__tags li {
  padding: 0.25rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.025em;
  color: rgb(255 255 255 / 0.6);
}

.pg__end {
  display: none;
}

/* ---------------------------------------------------------------------------
   13b. Capabilities - outlined list with a pointer preview
   --------------------------------------------------------------------------- */

.wd {
  position: relative;
  padding: 6rem 1.5rem;
  overflow: hidden;
  overflow: clip;
  background: #000;
}

.wd__inner,
.pf__inner {
  width: 100%;
  max-width: 1274px;
  margin-inline: auto;
}

.wd__head {
  margin-bottom: 2.5rem;
}

.wd__head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.wd__title {
  padding-bottom: 0.2em;
}

.wd__count {
  display: none;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}

.wd__note { max-width: 620px; }

.wd__list {
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.wd__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

/* Outlined until hovered, then solid white and nudged right. */
.wd__name {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.5vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: rgb(255 255 255 / 0.16);
  -webkit-text-stroke: 1px rgb(255 255 255 / 0.55);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wd__row:hover .wd__name,
.wd__row.is-active .wd__name {
  color: #fff;
  -webkit-text-stroke: 0 transparent;
}

.wd__row:hover .wd__name {
  transform: translateX(0.75rem);
}

.wd__arrow {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: rgb(255 255 255 / 0.3);
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wd__row:hover .wd__arrow {
  color: rgb(255 255 255 / 0.8);
}

.wd-preview {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  width: 420px;
  height: 300px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.wd-preview.is-visible {
  opacity: 1;
}

.wd-preview__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wd-preview__img.is-active {
  opacity: 1;
}

.wd-preview__img picture,
.wd-preview__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------------------
   13c. How I work - cover-flow
   --------------------------------------------------------------------------- */

.pf {
  position: relative;
  padding: 6rem 1.5rem;
  overflow: hidden;
  overflow: clip;
  background: #000;
}

.pf__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  text-align: center;
}

.pf__title {
  padding-bottom: 0.2em;
  font-family: var(--font-display);
  font-size: clamp(34px, 6.5vw, 72px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
}

.pf__note {
  margin-top: 1.25rem;
  max-width: 620px;
}

.pf__cta,
.case-hero__link {
  --tech-accent: #e5e7eb;
  --tech-bg: #0a0a0a;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.pf__cta:hover,
.case-hero__link:hover {
  transform: scale(1.1);
}

.tech-border__arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf__cta:hover .tech-border__arrow,
.case-hero__link:hover .tech-border__arrow {
  transform: translateX(0.25rem);
}

.case-hero__link {
  transform-origin: left;
}

.pf__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5rem;
  margin-top: 3.5rem;
  touch-action: pan-y;
}

.pf-card {
  position: relative;
  width: 100%;
  margin: 0;
  will-change: transform;
}

.pf-card__link {
  display: block;
  -webkit-user-drag: none;
}

.pf-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #171717;
}

.pf-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.pf-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0, 0, 0.2, 1);
  -webkit-user-drag: none;
  user-select: none;
}

.pf-card:hover .pf-card__media img {
  transform: scale(1.05);
}

.pf-card__shade {
  position: absolute;
  inset: auto 0 0;
  padding: 3rem 1.25rem 1rem;
  background: linear-gradient(to top, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0.25), transparent);
}

.pf-card__caption {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.85);
}

.pf-card__text {
  margin-top: 1rem;
}

.pf-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.pf-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
}

.pf-card__num {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: rgb(255 255 255 / 0.4);
}

.pf-card__desc {
  margin-top: 0.375rem;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.625;
  color: rgb(255 255 255 / 0.55);
}

.pf__hint {
  display: none;
  margin-top: 0.5rem;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}

/* Keyboard route through the stages: invisible until one of them is focused. */
.pf__keys {
  display: none;
  justify-content: center;
  gap: 1rem;
}

.pf__key {
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
}

.pf__key:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pf__key:focus-visible {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 9999px;
}

/* ---------------------------------------------------------------------------
   13d. Glowing border button
   A light runs round the pill: a conic gradient on the border, rotated by an
   animatable custom property, with a blurred copy for the glow.
   --------------------------------------------------------------------------- */

@property --tech-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes tech-angle-spin {
  to { --tech-angle: 360deg; }
}

.tech-border {
  position: relative;
  border: 1.5px solid transparent;
  border-radius: 9999px;
  background:
    linear-gradient(var(--tech-bg, #0a0a0a), var(--tech-bg, #0a0a0a)) padding-box,
    conic-gradient(
      from var(--tech-angle),
      rgb(255 255 255 / 0.06) 0deg,
      var(--tech-accent, #e5e7eb) 55deg,
      rgb(255 255 255 / 0.06) 130deg,
      rgb(255 255 255 / 0.06) 230deg,
      var(--tech-accent, #e5e7eb) 305deg,
      rgb(255 255 255 / 0.06) 360deg
    ) border-box;
  animation: tech-angle-spin 4s linear infinite;
}

/* Paused off screen: the script marks the ones in view. */
html.js .tech-border:not(.is-spinning) {
  animation-play-state: paused;
}

.tech-border::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--tech-angle),
    transparent 0deg,
    var(--tech-accent, #e5e7eb) 55deg,
    transparent 130deg,
    transparent 360deg
  ) border-box;
  -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);
  filter: blur(6px);
  opacity: 0.7;
  pointer-events: none;
}

/* Grid items refuse to shrink below their content by default; these grids
   hold text that must wrap, so let their children shrink. */
.about-grid > *,
.site-footer__grid > * {
  min-width: 0;
}


/* ---------------------------------------------------------------------------
   14. Closing call to action and footer
   The closing line arrives in two halves, one from each side, tied to the
   scroll. A faint light follows the pointer across the background.
   --------------------------------------------------------------------------- */

.cta {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 6rem 1.5rem 2rem;
  overflow: hidden;
  overflow: clip;
  background: linear-gradient(180deg, #07090d 0%, #0a0c11 100%);
}

/* The faint light that follows the pointer: its own layer, moved with a
   transform, so it never repaints the section. */
.cta__glow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 76rem;
  height: 60rem;
  margin: -30rem 0 0 -38rem;
  background: radial-gradient(closest-side, rgb(255 255 255 / 0.075), transparent 68%);
  pointer-events: none;
  transform: translate3d(50vw, 38vh, 0);
  will-change: transform;
}

.cta__stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.cta__title {
  max-width: 100%;
  font-family: var(--font-body);
  font-size: clamp(52px, 13vw, 180px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #fff;
}

.cta__line {
  display: block;
}

.cta-word {
  display: block;
  white-space: nowrap;
  will-change: transform;
}

.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1274px;
  margin: 6rem auto 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding-top: 3rem;
  border-top: 1px solid rgb(255 255 255 / 0.15);
}

.site-footer__label {
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}

.site-footer__list {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: rgb(255 255 255 / 0.75);
}

.site-footer__list li + li {
  margin-top: 0.75rem;
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.site-footer__link:hover {
  color: #fff;
  transform: scale(1.1);
}

.site-footer__arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-footer__link:hover .site-footer__arrow,
.site-footer__top:hover .site-footer__arrow {
  transform: rotate(45deg);
}

.site-footer__email {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  overflow-wrap: anywhere;
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.site-footer__email:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.site-footer__phone {
  display: table;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.5vw, 19px);
  letter-spacing: 0.02em;
  color: rgb(255 255 255 / 0.72);
  transition: color 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.site-footer__phone:hover {
  color: var(--accent);
}

.site-footer__status {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-size: 15px;
  color: rgb(255 255 255 / 0.6);
}

.site-footer__pip {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--green);
}

.site-footer__base {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.15);
}

.site-footer__copy {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgb(255 255 255 / 0.5);
}

.site-footer__top {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.25rem;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.5);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.site-footer__top:hover {
  color: #fff;
  transform: scale(1.1);
}


/* ---------------------------------------------------------------------------
   16. Page heads
   --------------------------------------------------------------------------- */

.page-head {
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.page-head__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-hero);
  margin-top: var(--space-4);
}

.page-head__intro {
  margin-top: var(--space-5);
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--t-75);
  max-width: 52ch;
}

/* ---------------------------------------------------------------------------
   17. Case study
   --------------------------------------------------------------------------- */

.case-hero {
  padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem));
}

.case-hero__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.case-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
}

.case-hero__eyebrow span + span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 1rem;
  border-radius: 50%;
  background: var(--t-40);
  vertical-align: middle;
}

.case-hero__title {
  font-size: clamp(2.75rem, 9vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-top: var(--space-4);
}

.case-hero__subtitle {
  margin-top: var(--space-5);
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  color: var(--t-75);
  max-width: 30ch;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.case-meta__item--wide {
  grid-column: 1 / -1;
}

.case-meta__item dt {
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
  margin-bottom: 0.4rem;
}

.case-meta__item dd {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--t-90);
}

.case-hero__link {
  display: inline-flex;
  margin-top: var(--space-6);
}

.case-hero__media {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
}

.case-hero__media picture,
.case-hero__media img,
.cs-feature__media picture,
.cs-feature__media img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Sections: one rhythm, a hairline between each ---------------------- */

.cs {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-top: 1px solid var(--line-soft);
}

.case-hero + .cs {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.cs__cols,
.cs__intro {
  display: grid;
  gap: var(--space-5);
}

.cs__intro {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.cs__side {
  display: grid;
  align-content: start;
  gap: var(--space-4);
}

.cs__main {
  min-width: 0;
}

.cs__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.cs__heading {
  font-size: clamp(1.75rem, 3.4vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: var(--tracking-hero);
  max-width: 22ch;
}

.cs__body {
  max-width: 62ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.7;
  color: var(--t-75);
}

.cs__body p + p {
  margin-top: 1em;
}

.cs__body.lead {
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.55;
  color: var(--t-90);
}

.cs__lede {
  margin-bottom: var(--space-6);
}

.cs__after {
  margin-top: var(--space-6);
}

.cs__meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-5) var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-soft);
}

.cs__meta-list dt {
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
  margin-bottom: 0.3rem;
}

.cs__meta-list dd {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--t-90);
}

.cs__media--bleed {
  margin-inline: calc(var(--gutter) * -1);
}

.cs__media--bleed .cs-figure__frame {
  border-radius: 0;
}

/* --- Statements ---------------------------------------------------------- */

.cs-statement__text {
  font-size: clamp(1.75rem, 4.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: var(--tracking-hero);
  max-width: 24ch;
}

.cs-statement--problem .cs-statement__text,
.cs-statement--hmw .cs-statement__text {
  font-size: clamp(1.4rem, 2.8vw, 2.35rem);
  line-height: 1.22;
  max-width: 34ch;
}

.cs-statement__body {
  margin-top: var(--space-5);
  max-width: 62ch;
  color: var(--t-75);
}

.cs-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-6);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.cs-steps li {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--t-90);
}

/* --- Numbered items and process steps ------------------------------------ */

.cs-items {
  display: grid;
  counter-reset: item;
}

.cs-item,
.cs-step {
  display: grid;
  gap: var(--space-2) var(--space-5);
  padding-block: clamp(1.1rem, 2vw, 1.6rem);
  border-top: 1px solid var(--line-soft);
}

.cs-item:last-child,
.cs-step:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.cs-item__num,
.cs-step__num {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 0.45rem;
}

.cs-item__num {
  counter-increment: item;
}

.cs-item__num::before {
  content: counter(item, decimal-leading-zero);
}

.cs-item__title,
.cs-step__title {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: var(--tracking-hero);
}

.cs-item__body,
.cs-step__body {
  margin-top: 0.35rem;
  color: var(--t-75);
  max-width: 60ch;
}

.cs-item__note,
.cs-step__goal {
  margin-top: 0.6rem;
  font-size: var(--fs-small);
  color: var(--t-60);
}

.cs-step__goal strong {
  font-weight: 400;
  color: var(--t-90);
}

/* --- Metrics ------------------------------------------------------------- */

.cs-metrics {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cs-metric {
  background: var(--surface);
  padding: clamp(1.1rem, 2.2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cs-metric__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1;
  letter-spacing: var(--tracking-hero);
}

.cs-metric__label {
  font-size: var(--fs-small);
  color: var(--t-90);
}

.cs-metric__desc {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--t-60);
}

.cs-metrics--feature .cs-metric__value {
  color: var(--accent);
}

.cs-metrics--inline {
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: var(--space-6);
}

.cs-metrics--inline .cs-metric {
  background: transparent;
  padding: 0;
}

.cs-metrics--inline .cs-metric__value {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

.cs-metrics-split {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

/* --- Comparison ---------------------------------------------------------- */

.cs-compare {
  border-top: 1px solid var(--line-soft);
}

.cs-compare__row {
  display: grid;
  gap: var(--space-3);
  padding-block: clamp(0.9rem, 1.8vw, 1.35rem);
  border-bottom: 1px solid var(--line-soft);
}

.cs-compare__head {
  display: none;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--line-soft);
}

.cs-compare__cell {
  line-height: 1.5;
  color: var(--t-90);
}

.cs-compare__cell--right {
  color: var(--t-75);
}

.cs-compare__mobile-label {
  display: block;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
  margin-bottom: 0.35rem;
}

.cs-compare--tension .cs-compare__cell {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.28;
}

/* --- Personas ------------------------------------------------------------ */

.cs-personas {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.persona {
  display: grid;
  gap: var(--space-5);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
}

.persona__kind {
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.persona__name {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: var(--tracking-hero);
}

.persona__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: 0.55rem;
  font-size: var(--fs-small);
  color: var(--t-60);
}

.persona__bio {
  margin-top: var(--space-4);
  max-width: 60ch;
  color: var(--t-75);
}

.persona__media {
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.persona__cols {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.persona__col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
  margin-bottom: var(--space-3);
}

.persona__col li {
  padding-block: 0.4rem;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--t-90);
}

/* --- Timeline ------------------------------------------------------------ */

.cs-timeline {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cs-timeline__phase {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: clamp(1.1rem, 2vw, 1.5rem);
  background: var(--surface);
}

.cs-timeline__week {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-60);
}

.cs-timeline__name {
  font-size: 1.2rem;
  line-height: 1.2;
}

.cs-timeline__name span {
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--accent);
}

.cs-timeline__tasks {
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
}

.cs-timeline__tasks li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  color: var(--t-90);
}

.cs-timeline__days {
  flex: none;
  font-size: var(--fs-micro);
  color: var(--t-60);
}

/* --- Figures and galleries ----------------------------------------------- */

.cs-figure {
  margin: 0;
}

.cs-figure__frame {
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
}

.cs-figure__frame picture,
.cs-figure__frame img {
  display: block;
  width: 100%;
}

.cs-figure figcaption,
.cs-gallery figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-top: var(--space-3);
  font-size: var(--fs-small);
  color: var(--t-60);
}

.cs-figure__hint {
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-40);
}

/* Process artefacts are light-on-white by nature; a pale mat keeps them from
   glowing against the black page. */
.cs-figure--diagram .cs-figure__frame {
  background: #fff;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

/* Tall artwork is shown in a frame no taller than the screen, and scrolls
   inside, instead of turning one image into several screens of scrolling. */
.cs-figure--tall .cs-figure__frame {
  max-height: min(80vh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--t-20) transparent;
}

.cs-gallery {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.cs-gallery--grid .cs-figure--tall .cs-figure__frame {
  max-height: min(70vh, 720px);
}

.cs-gallery--horizontal {
  grid-auto-flow: column;
  grid-auto-columns: minmax(78vw, 1fr);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  padding-bottom: var(--space-4);
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--t-20) transparent;
}

.cs-gallery--horizontal > * {
  scroll-snap-align: start;
}

/* Phone screens: narrow columns, so several sit side by side. */
.cs-gallery--horizontal.cs-gallery--phones {
  grid-auto-columns: minmax(200px, 62vw);
}

.cs-gallery--phones .cs-figure__frame {
  border-radius: 28px;
  border: 1px solid var(--line);
}

.cs-gallery__hint {
  margin-top: var(--space-3);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-40);
}

/* --- Feature rows -------------------------------------------------------- */

.cs-features {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.cs-feature {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.cs-feature__media .cs-figure__frame {
  border: 1px solid var(--line-soft);
}

.cs-feature--phone .cs-feature__media {
  max-width: 280px;
  justify-self: center;
  width: 100%;
}

.cs-feature--phone .cs-feature__media .cs-figure__frame {
  border-radius: 28px;
}

.cs-feature__num {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--accent);
}

.cs-feature__title {
  margin-top: var(--space-3);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: var(--tracking-hero);
}

.cs-feature__body {
  margin-top: var(--space-4);
  max-width: 52ch;
  color: var(--t-75);
}

.cs-feature__bullets {
  display: grid;
  gap: 0.1rem;
  margin-top: var(--space-4);
  max-width: 52ch;
}

.cs-feature__bullets li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.4rem;
  border-top: 1px solid var(--line-soft);
  color: var(--t-90);
}

.cs-feature__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.cs-feature__note {
  margin-top: var(--space-5);
  max-width: 52ch;
  padding: var(--space-4) var(--space-5);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--t-90);
}

.cs-feature__note strong {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 400;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
}

/* --- Information architecture tree --------------------------------------- */

.cs-tree {
  display: grid;
  gap: var(--space-4);
}

.cs-tree__row {
  display: grid;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.cs-tree__root {
  justify-self: start;
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--black);
  font-size: var(--fs-small);
}

.cs-tree__line {
  display: none;
  height: 1px;
  background: var(--t-40);
}

.cs-tree__children {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cs-tree__children li {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  color: var(--t-90);
}

/* --- Design system ------------------------------------------------------- */

.ds {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.ds__label {
  margin-bottom: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
}

.ds-colors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: var(--space-4);
}

.ds-color {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding: 0.6rem 0.6rem 0.9rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
}

.ds-color__swatch {
  display: block;
  height: 5.5rem;
  margin-bottom: 0.55rem;
  border-radius: calc(var(--r-md) - 4px);
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}

.ds-color__name {
  font-size: var(--fs-small);
  color: var(--white);
  padding-inline: 0.2rem;
}

.ds-color__hex {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--t-60);
  padding-inline: 0.2rem;
}

.ds-color__role {
  margin-top: 0.25rem;
  padding-inline: 0.2rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--t-75);
}

.ds-type {
  display: grid;
  gap: var(--space-4);
}

.ds-face {
  display: grid;
  gap: var(--space-5);
  align-items: center;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.ds-face__specimen {
  font-size: clamp(4.5rem, 10vw, 8rem);
  line-height: 0.9;
  color: var(--white);
}

.ds-face__name {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.15;
  color: var(--white);
}

.ds-face__role {
  margin-top: 0.3rem;
  font-size: var(--fs-small);
  color: var(--t-60);
}

.ds-face__alphabet {
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--t-75);
  overflow-wrap: anywhere;
}

.ds-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-3);
}

.ds-chips li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--t-90);
}

.ds-scale {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.ds-scale__note {
  margin-bottom: var(--space-4);
  font-size: var(--fs-small);
  color: var(--t-60);
}

.ds-scale ul {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3) var(--space-6);
}

.ds-scale__step {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.35rem;
}

.ds-scale__size {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--t-60);
}

.ds-scale__sample {
  line-height: 1;
  color: var(--white);
}

.ds-radii {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.ds-radius {
  display: grid;
  justify-items: start;
  gap: 0.25rem;
}

.ds-radius__box {
  display: block;
  width: 5.5rem;
  height: 4rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--t-40);
  background: var(--surface-3);
}

.ds-radius__name {
  font-size: var(--fs-small);
  color: var(--t-90);
}

/* Cell borders rather than a gap on a coloured background, so a short last
   row leaves empty space instead of a grey block. */
.ds-components {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.ds-component {
  padding: clamp(1rem, 2vw, 1.4rem);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.ds-component__name {
  color: var(--white);
}

.ds-component__body {
  margin-top: 0.35rem;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--t-60);
}

/* --- Design system specimens ---------------------------------------------
   Buttons, fields, cards and navigation drawn live in each product's own
   colours. Each element reads its measurements from custom properties set on
   itself (see src/utils/design-tokens.js). They are registered as
   non-inheriting, so a card's fill never leaks into the button inside it. */

@property --bg { syntax: '*'; inherits: false; }
@property --fg { syntax: '*'; inherits: false; }
@property --bc { syntax: '*'; inherits: false; }
@property --bw { syntax: '*'; inherits: false; }
@property --r { syntax: '*'; inherits: false; }
@property --h { syntax: '*'; inherits: false; }
@property --w { syntax: '*'; inherits: false; }
@property --px { syntax: '*'; inherits: false; }
@property --py { syntax: '*'; inherits: false; }
@property --gap { syntax: '*'; inherits: false; }
@property --fs { syntax: '*'; inherits: false; }
@property --fw { syntax: '*'; inherits: false; }
@property --lh { syntax: '*'; inherits: false; }
@property --ls { syntax: '*'; inherits: false; }
@property --tt { syntax: '*'; inherits: false; }
@property --sh { syntax: '*'; inherits: false; }
@property --ff { syntax: '*'; inherits: false; }
@property --ac { syntax: '*'; inherits: false; }
@property --aw { syntax: '*'; inherits: false; }

.ds {
  --ds-canvas: #fff;
  --ds-surface: #fff;
  --ds-subtle: #f4f4f5;
  --ds-text: #111;
  --ds-muted: #6b7280;
  --ds-border: #e5e7eb;
  --ds-primary: #111;
  --ds-on-primary: #fff;
  --ds-font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ds-display: var(--ds-font);
  --ds-line: rgb(0 0 0 / 0.08);
}

.ds--dark {
  --ds-line: rgb(255 255 255 / 0.1);
}

.ds-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ds-toc a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  color: var(--t-90);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ds-toc a:hover,
.ds-toc a:focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: #000;
}

.ds__block,
/* Linked to from the capabilities row and the featured carousel. */
.cs--ds {
  scroll-margin-top: 6rem;
}

.ds__source {
  max-width: 62ch;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--t-60);
}

/* Text styles, set on the product's own canvas. */
.ds-textstyles {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--ds-canvas);
  color: var(--ds-text);
}

.ds-textstyles__note {
  padding: 1rem clamp(1.1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--ds-line);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ds-muted);
}

.ds-ts {
  display: grid;
  gap: 0.6rem 2rem;
  padding: clamp(1rem, 2.4vw, 1.4rem) clamp(1.1rem, 3vw, 2rem);
}

.ds-ts + .ds-ts {
  border-top: 1px solid var(--ds-line);
}

.ds-ts__name {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ds-text);
}

.ds-ts__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.7rem;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--ds-muted);
}

.ds-ts__sample {
  min-width: 0;
  font-family: var(--ff, var(--ds-font));
  font-size: min(var(--fs, 16px), 10.5vw);
  font-weight: var(--fw, 400);
  line-height: var(--lh, 1.3);
  letter-spacing: var(--ls, normal);
  text-transform: var(--tt, none);
  color: var(--fg, var(--ds-text));
  overflow-wrap: anywhere;
}

/* The specimen grid. */
.ds-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: var(--space-4);
}

.ds-specs--compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
}

.ds-specs--cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
}

.ds-spec {
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
}

.ds-spec__stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  /* Keeps a specimen wider than a phone reachable from its start. */
  justify-content: safe center;
  gap: 0.75rem;
  min-width: 0;
  min-height: 9rem;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto;
  background: var(--stage, var(--ds-canvas));
  color: var(--ds-text);
  font-family: var(--ds-font);
  line-height: 1.4;
  text-align: left;
}

.ds-spec__meta {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--line-soft);
}

.ds-spec__name {
  font-size: var(--fs-small);
  color: var(--white);
}

.ds-spec__usage {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--t-75);
}

.ds-spec__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.8rem;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.55;
  color: var(--t-60);
}

.ds-icon {
  display: block;
  flex: none;
}

.ds-glyph {
  display: inline-flex;
  flex: none;
  color: var(--fg, currentColor);
}

.ds-table {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), minmax(max-content, 1fr));
  width: 100%;
  text-align: left;
}

.ds-table__head,
.ds-table__cell {
  padding: 12px 16px;
  background: var(--bg, transparent);
  color: var(--fg, inherit);
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 12px);
  font-weight: var(--fw, 400);
  white-space: nowrap;
}

.ds-table__head {
  padding-block: 14px;
}

.ds-table__cell {
  border-top: 1px solid var(--ds-line);
}

/* Parts. */
.ds-text {
  display: block;
  min-width: 0;
  font-family: var(--ff, inherit);
  font-size: var(--fs, 14px);
  font-weight: var(--fw, 400);
  line-height: var(--lh, 1.4);
  letter-spacing: var(--ls, normal);
  text-transform: var(--tt, none);
  color: var(--fg, inherit);
}

.ds-text--icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.ds-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: var(--gap, 8px);
  width: var(--w, auto);
  max-width: 100%;
  height: var(--h, auto);
  padding: var(--py, 0px) var(--px, 16px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 8px);
  background: var(--bg, var(--ds-primary));
  box-shadow: var(--sh, none);
  color: var(--fg, var(--ds-on-primary));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 14px);
  font-weight: var(--fw, 500);
  line-height: 1;
  letter-spacing: var(--ls, normal);
  text-transform: var(--tt, none);
  white-space: nowrap;
}

.ds-btn--block {
  width: 100%;
}

.ds-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--gap, 6px);
  height: var(--h, auto);
  padding: var(--py, 4px) var(--px, 10px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 999px);
  background: var(--bg, transparent);
  box-shadow: var(--sh, none);
  color: var(--fg, var(--ds-text));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 12px);
  font-weight: var(--fw, 500);
  line-height: var(--lh, 1.2);
  letter-spacing: var(--ls, normal);
  text-transform: var(--tt, none);
  white-space: nowrap;
}

.ds-iconbtn,
.ds-avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--w, 36px);
  height: var(--h, 36px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 999px);
  background: var(--bg, transparent);
  box-shadow: var(--sh, none);
  color: var(--fg, var(--ds-text));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 12px);
  font-weight: var(--fw, 600);
  line-height: 1;
}

.ds-divider {
  display: block;
  flex: 1 1 auto;
  width: var(--w, auto);
  min-width: 1.5rem;
  height: var(--bw, 1px);
  background: var(--bc, var(--ds-border));
}

.ds-rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.ds-rule .ds-text {
  flex: none;
}

.ds-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, 8px);
  min-width: 0;
  padding: var(--py, 0px) var(--px, 0px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 0px);
  background: var(--bg, transparent);
}

.ds-row--between {
  flex-wrap: nowrap;
  justify-content: space-between;
}

.ds-row--center {
  justify-content: center;
}

.ds-row--end {
  justify-content: flex-end;
}

.ds-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 2px);
  min-width: 0;
  padding: var(--py, 0px) var(--px, 0px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 0px);
  background: var(--bg, transparent);
}

.ds-grow {
  flex: 1 1 auto;
}

.ds-progress {
  display: block;
  width: var(--w, 100%);
  max-width: 100%;
  height: var(--h, 6px);
  overflow: hidden;
  border-radius: var(--r, 999px);
  background: var(--bg, var(--ds-border));
}

.ds-progress__fill {
  display: block;
  width: var(--pct, 50%);
  height: 100%;
  border-radius: inherit;
  background: var(--bg, var(--ds-primary));
}

.ds-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--gap, 6px);
  width: var(--w, 100%);
  height: var(--h, 64px);
}

.ds-bars__bar {
  flex: 1;
  height: var(--pct, 50%);
  border-radius: 3px;
  background: var(--bg, var(--ds-primary));
}

.ds-media {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 100%;
  height: var(--h, 160px);
  overflow: hidden;
  border-radius: var(--r, 0px);
  background: var(--bg, var(--ds-subtle));
}

.ds-media__glyph {
  color: var(--fg, rgb(0 0 0 / 0.22));
}

.ds-media__slot {
  position: absolute;
  display: flex;
  gap: 6px;
}

.ds-media__slot--tl { top: 12px; left: 12px; }
.ds-media__slot--tr { top: 12px; right: 12px; }
.ds-media__slot--bl { bottom: 12px; left: 12px; }
.ds-media__slot--br { bottom: 12px; right: 12px; }

.ds-card {
  display: flex;
  flex-direction: column;
  width: var(--w, 100%);
  max-width: 100%;
  overflow: hidden;
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-left: var(--aw, var(--bw, 0px)) solid var(--ac, var(--bc, transparent));
  border-radius: var(--r, 12px);
  background: var(--bg, var(--ds-surface));
  box-shadow: var(--sh, none);
  color: var(--ds-text);
  font-family: var(--ds-font);
  text-align: left;
}

.ds-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 8px);
  padding: var(--py, 16px) var(--px, 16px);
}

.ds-fields {
  display: block;
  overflow: hidden;
  border: var(--bw, 1px) solid var(--bc, var(--ds-border));
  border-radius: var(--r, 10px);
  background: var(--bg, transparent);
}

.ds-fields__row {
  display: grid;
  gap: 2px;
  padding: var(--py, 10px) var(--px, 14px);
}

.ds-fields__row + .ds-fields__row {
  border-top: 1px solid var(--ds-border);
}

/* Fields. */
.ds-field {
  display: grid;
  gap: var(--gap, 6px);
  width: var(--w, 100%);
  max-width: 100%;
}

.ds-field__label {
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 13px);
  font-weight: var(--fw, 500);
  line-height: 1.4;
  letter-spacing: var(--ls, normal);
  text-transform: var(--tt, none);
  color: var(--fg, var(--ds-text));
}

.ds-field__req {
  margin-left: 2px;
  color: var(--fg, var(--ds-primary));
}

.ds-field__help {
  font-size: var(--fs, 12px);
  line-height: 1.4;
  color: var(--fg, var(--ds-muted));
}

.ds-input {
  display: flex;
  align-items: center;
  gap: var(--gap, 10px);
  height: var(--h, 44px);
  padding: 0 var(--px, 14px);
  border: var(--bw, 1px) solid var(--bc, var(--ds-border));
  border-radius: var(--r, 8px);
  background: var(--bg, #fff);
  box-shadow: var(--sh, none);
  color: var(--fg, var(--ds-text));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 15px);
  font-weight: var(--fw, 400);
  line-height: 1.2;
}

.ds-input--underline {
  border-width: 0 0 var(--bw, 1px);
  border-radius: 0;
  padding-inline: 0;
}

.ds-input--ring {
  outline: var(--ring-w, 2px) solid var(--ring, var(--ds-primary));
  outline-offset: var(--ring-o, 2px);
}

.ds-input__value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg, inherit);
}

.ds-input__icon {
  display: inline-flex;
  color: var(--fg, var(--ds-muted));
}

.ds-search {
  --line-c: var(--ds-border);
  display: flex;
  align-items: center;
  width: var(--w, 100%);
  max-width: 100%;
  min-height: var(--h, auto);
  padding: var(--py, 6px) var(--px, 6px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 999px);
  background: var(--bg, #fff);
  box-shadow: var(--sh, none);
}

.ds-search__field {
  display: grid;
  flex: 1 1 0;
  gap: 2px;
  min-width: 7rem;
  padding: 2px 20px;
}

.ds-search__field + .ds-search__field {
  border-left: 1px solid var(--line-c);
}

/* Selection and controls. */
.ds-seg {
  display: inline-flex;
  gap: var(--gap, 0px);
  width: var(--w, auto);
  max-width: 100%;
  padding: var(--px, 4px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 8px);
  background: var(--bg, transparent);
}

.ds-seg__opt {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  height: var(--h, 36px);
  padding: 0 var(--px, 16px);
  border-radius: var(--r, 6px);
  background: var(--bg, transparent);
  box-shadow: var(--sh, none);
  color: var(--fg, var(--ds-muted));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 13px);
  font-weight: var(--fw, 500);
  white-space: nowrap;
}

.ds-tabs {
  display: flex;
  gap: var(--gap, 24px);
  width: var(--w, 100%);
  max-width: 100%;
  overflow-x: auto;
  border-bottom: var(--bw, 1px) solid var(--bc, var(--ds-border));
}

.ds-tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: var(--h, 40px);
  padding: 0 var(--px, 0px);
  border-radius: var(--r, 0px);
  background: var(--bg, transparent);
  box-shadow: inset 0 calc(var(--aw, 0px) * -1) 0 var(--ac, transparent);
  color: var(--fg, var(--ds-muted));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 15px);
  font-weight: var(--fw, 400);
  white-space: nowrap;
}

.ds-chipset,
.ds-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.25rem;
}

.ds-chipset {
  gap: 8px;
}

.ds-choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ds-toggle {
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--w, 50px);
  height: var(--h, 28px);
  border-radius: 999px;
  background: var(--bg, #d1d5db);
}

.ds-toggle__knob {
  position: absolute;
  top: 50%;
  left: var(--inset, 3px);
  width: var(--w, 22px);
  height: var(--h, 22px);
  border-radius: 50%;
  background: var(--bg, #fff);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  transform: translateY(-50%);
}

.ds-toggle.is-on .ds-toggle__knob {
  right: var(--inset, 3px);
  left: auto;
}

.ds-check {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--w, 18px);
  height: var(--h, 18px);
  border: var(--bw, 1.5px) solid var(--bc, var(--ds-border));
  border-radius: var(--r, 4px);
  background: var(--bg, transparent);
  color: var(--fg, #fff);
}

.ds-slots {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 22rem);
}

.ds-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--h, 48px);
  border: var(--bw, 1px) solid var(--bc, var(--ds-border));
  border-radius: var(--r, 12px);
  background: var(--bg, #fff);
  color: var(--fg, var(--ds-text));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 15px);
  font-weight: var(--fw, 500);
}

.ds-dates {
  display: flex;
  gap: 8px;
}

.ds-date {
  display: grid;
  flex: none;
  align-content: center;
  justify-items: center;
  gap: 2px;
  width: var(--w, 56px);
  height: var(--h, 72px);
  border: var(--bw, 1px) solid var(--bc, var(--ds-border));
  border-radius: var(--r, 14px);
  background: var(--bg, #fff);
}

/* Navigation. */
.ds-bnav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--gap, 4px);
  width: var(--w, 100%);
  max-width: 100%;
  height: var(--h, 64px);
  padding: 0 var(--px, 12px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 0px);
  background: var(--bg, var(--ds-surface));
  box-shadow: var(--sh, none);
}

.ds-bnav__item {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--fg, var(--ds-muted));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 11px);
  font-weight: var(--fw, 500);
  line-height: 1.2;
}

.ds-bnav__icon {
  display: grid;
  place-items: center;
  width: var(--w, 32px);
  height: var(--h, 32px);
  border-radius: var(--r, 999px);
  background: var(--bg, transparent);
  color: var(--fg, currentColor);
}

.ds-side {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 4px);
  width: var(--w, 100%);
  max-width: 100%;
  padding: var(--py, 12px) var(--px, 12px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 0px);
  background: var(--bg, var(--ds-surface));
}

.ds-side__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--py, 6px) var(--px, 8px);
  border-radius: var(--r, 8px);
  background: var(--bg, transparent);
  color: var(--fg, var(--ds-muted));
  font-family: var(--ff, var(--ds-font));
  font-size: var(--fs, 14px);
  font-weight: var(--fw, 400);
}

.ds-side__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: var(--w, 28px);
  height: var(--h, 28px);
  border-radius: var(--r, 6px);
  background: var(--bg, transparent);
  color: var(--fg, currentColor);
}

.ds-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap, 16px);
  width: max-content;
  min-width: 100%;
  min-height: var(--h, 64px);
  padding: var(--py, 0px) var(--px, 20px);
  border: var(--bw, 0px) solid var(--bc, transparent);
  border-radius: var(--r, 0px);
  background: var(--bg, var(--ds-surface));
  box-shadow: var(--sh, none);
}

.ds-bar > .ds-row {
  flex-wrap: nowrap;
}

/* Foundations. */
.ds-foundations {
  display: grid;
  gap: var(--space-4);
}

.ds-foundation {
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
}

.ds-foundation__title {
  margin-bottom: var(--space-4);
  font-size: var(--fs-small);
  color: var(--white);
}

.ds-shadows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: var(--space-4);
}

.ds-shadow {
  display: grid;
  gap: 0.25rem;
}

.ds-shadow__stage {
  display: grid;
  place-items: center;
  height: 7rem;
  margin-bottom: 0.4rem;
  border-radius: 10px;
  background: var(--ds-subtle);
}

.ds-shadow__box {
  width: 58%;
  height: 52%;
  border-radius: var(--r, 12px);
  background: var(--ds-surface);
  box-shadow: var(--sh, none);
}

.ds-spacing {
  display: grid;
  gap: 0.55rem;
}

.ds-space {
  display: grid;
  grid-template-columns: 3.2rem auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
}

.ds-space__bar {
  width: var(--w, 4px);
  height: 14px;
  border-radius: 3px;
  background: var(--accent, #fff);
}

.ds-space__name {
  font-size: 0.8125rem;
  color: var(--t-75);
}

.ds-spec--full {
  grid-column: 1 / -1;
}

/* A wide specimen takes the whole row until there is room for it to span two
   columns without forcing an extra one. */
.ds-spec--wide {
  grid-column: 1 / -1;
}

@media (min-width: 64em) {
  .ds-spec--wide {
    grid-column: span 2;
  }
}

@media (min-width: 48em) {
  .ds-ts {
    grid-template-columns: 12.5rem minmax(0, 1fr);
    align-items: center;
  }
}

@media (min-width: 64em) {
  .ds-foundations:has(.ds-foundation + .ds-foundation) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Quote and outro ----------------------------------------------------- */

.cs-quote__text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: var(--tracking-hero);
  max-width: 32ch;
  margin-inline: auto;
  text-align: center;
}

.cs-quote .cs__eyebrow {
  text-align: center;
}

.cs-quote__body {
  margin: 1.5rem auto 0;
  text-align: center;
}

.cs-outro__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.cs-outro__text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.cs-outro .case-hero__link {
  margin-top: 0;
}

.about-portrait {
  margin-bottom: var(--space-7);
  overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 4 / 5;
  background: var(--surface);
}

.about-portrait picture,
.about-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------------------
   21b. About page
   A portrait that answers the pointer, numbers that count up as they arrive,
   roles that open, and a toolkit split into tabs.
   --------------------------------------------------------------------------- */

.about-hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}

.about-hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-hero__name {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: var(--tracking-hero);
  color: var(--white);
}

.about-hero__role {
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-60);
}

.about-hero__lead {
  margin-top: var(--space-6);
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.55;
  color: var(--t-90);
}

.about-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-7);
}

.about-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  color: var(--white);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.about-action--quiet {
  border: 1px solid var(--line);
  color: var(--t-90);
}

.about-action--quiet:hover,
.about-action--quiet:focus-visible {
  border-color: var(--white);
  background: var(--white);
  color: #000;
}

/* The portrait leans a little towards the pointer. */
.about-portrait {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
  aspect-ratio: 4 / 5;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}

.about-portrait picture,
.about-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-stats-section {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

/* The about page reads as one piece, so its sections sit closer than the
   full-height sections elsewhere on the site. */
.about-story,
.about-journey-section,
.about-toolkit-section,
.about-practice-section {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-5);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.about-stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: var(--tracking-hero);
  color: var(--white);
}

.about-stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--t-60);
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: var(--tracking-hero);
  color: var(--white);
}

.about-note {
  margin-top: 0.6rem;
  max-width: 46ch;
  font-size: var(--fs-small);
  color: var(--t-60);
}

.about-section-head {
  margin-bottom: var(--space-7);
}

.about-story__grid {
  display: grid;
  gap: var(--space-6);
}

/* Roles: the summary line opens to what the work involved. */
.about-journey {
  border-top: 1px solid var(--line-soft);
}

.about-role {
  border-bottom: 1px solid var(--line-soft);
}

.about-role__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.35rem 1rem;
  width: 100%;
  padding: clamp(1.1rem, 2.2vw, 1.6rem) 0;
  text-align: left;
  cursor: pointer;
}

.about-role__num {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--t-60);
}

.about-role__title {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.25;
  color: var(--white);
  transition: color 0.3s var(--ease-out);
}

.about-role__place {
  grid-column: 2;
  font-size: var(--fs-small);
  color: var(--t-60);
}

.about-role__dates {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--t-60);
}

.about-role__chevron {
  grid-row: 1 / span 3;
  grid-column: 3;
  align-self: center;
  color: var(--t-60);
  transition: transform 0.35s var(--ease-out), color 0.3s var(--ease-out);
}

.about-role.is-open .about-role__chevron {
  transform: rotate(180deg);
  color: var(--white);
}

.about-role:hover .about-role__title,
.about-role.is-open .about-role__title {
  color: var(--accent);
}

.about-role__detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}

.about-role.is-open .about-role__detail {
  grid-template-rows: 1fr;
}

/* With a mouse, hovering a role opens it as well. */
@media (hover: hover) and (pointer: fine) {
  .about-role:hover .about-role__detail {
    grid-template-rows: 1fr;
  }

  .about-role:hover .about-role__detail p {
    padding-bottom: clamp(1rem, 2vw, 1.4rem);
  }

  .about-role:hover .about-role__chevron {
    transform: rotate(180deg);
  }
}

.about-role__detail p {
  overflow: hidden;
  max-width: 62ch;
  padding-right: 2rem;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--t-75);
}

.about-role.is-open .about-role__detail p {
  padding-bottom: clamp(1rem, 2vw, 1.4rem);
}

/* Toolkit tabs. */
.about-toolkit__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-6);
}

.about-toolkit__tab {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  color: var(--t-75);
  cursor: pointer;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.about-toolkit__tab:hover {
  border-color: var(--white);
  color: var(--white);
}

.about-toolkit__tab[aria-selected='true'] {
  border-color: var(--white);
  background: var(--white);
  color: #000;
}

.about-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.about-tools li {
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-small);
  color: var(--t-90);
}

.about-practice__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

/* Practice rows fill in from the left as the pointer crosses them. */
.about-practice {
  margin-top: var(--space-6);
  border-top: 1px solid var(--line-soft);
}

.about-practice__item {
  position: relative;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--t-75);
  transition: color 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
}

.about-practice__item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  transform: translateY(-50%);
  transition: width 0.35s var(--ease-out);
}

.about-practice__item:hover {
  padding-left: 2.2rem;
  color: var(--white);
}

.about-practice__item:hover::before {
  width: 1.5rem;
}

.about-certs {
  margin-top: var(--space-6);
}

.about-cert {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line-soft);
}

.about-cert__name {
  font-size: var(--fs-small);
  color: var(--t-90);
}

.about-cert__by {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--t-60);
}

.about-links {
  margin-top: var(--space-6);
}

.about-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-small);
  color: var(--t-90);
  transition: color 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
}

.about-link:hover {
  padding-left: 0.5rem;
  color: var(--white);
}

.about-link__arrow {
  transition: transform 0.3s var(--ease-out);
}

.about-link:hover .about-link__arrow {
  transform: translate(3px, -3px);
}

@media (min-width: 48em) {
  .about-hero__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  }

  .about-story__grid {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: var(--space-8);
  }

  /* Every role is its own grid, so the tracks are sized in absolute units:
     fr units would be measured per row and the columns would not line up. */
  .about-role__head {
    grid-template-columns: 2.75rem minmax(0, 1fr) clamp(8rem, 15vw, 13rem) 9.5rem 1.25rem;
    align-items: center;
    gap: 0.35rem 1.5rem;
  }

  .about-role__place,
  .about-role__dates {
    grid-column: auto;
  }

  .about-role__dates {
    text-align: right;
  }

  .about-role__chevron {
    grid-row: auto;
    grid-column: auto;
    justify-self: end;
  }

  .about-practice__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.case-nav {
  border-top: 1px solid var(--line);
}

.case-nav__grid {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
}

.case-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-block: clamp(1.75rem, 3.5vw, 3rem);
  background: var(--black);
  transition: background-color var(--d) var(--ease);
}

.case-nav__link:hover,
.case-nav__link:focus-visible {
  background: var(--surface);
}

.case-nav__dir {
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
}

.case-nav__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: var(--tracking-hero);
}

.case-nav__link--next {
  text-align: right;
  align-items: flex-end;
}

/* --- Case study breakpoints ---------------------------------------------- */

@media (min-width: 48em) {
  .cs-metrics { grid-template-columns: repeat(2, 1fr); }

  .cs-item,
  .cs-step {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .cs-compare__row,
  .cs-compare__head {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-6);
    align-items: baseline;
  }

  .cs-compare__head { display: grid; }
  .cs-compare__mobile-label { display: none; }

  .persona__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-personas--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-personas--cards .persona__cols { grid-template-columns: minmax(0, 1fr); }

  .case-nav__grid { grid-template-columns: 1fr 1fr; }

  .cs-gallery--horizontal { grid-auto-columns: minmax(46vw, 1fr); }
  .cs-gallery--horizontal.cs-gallery--phones { grid-auto-columns: minmax(220px, 28vw); }
  .cs-gallery--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

  .cs-timeline { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }

  .cs-tree__row {
    grid-template-columns: 9rem 2.5rem minmax(0, 1fr);
    gap: var(--space-4);
  }

  .cs-tree__line { display: block; }

  .ds-face {
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .ds-type:has(.ds-face + .ds-face) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-type:has(.ds-face + .ds-face) .ds-face {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 64em) {
  .case-hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(2rem, 5vw, 5rem);
  }

  /* Two columns: heading on the left, content on the right. */
  .cs__cols,
  .cs__intro {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
  }

  .cs__cols > .cs__side {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
    align-self: start;
  }

  .cs__intro .cs__main {
    padding-top: 0.2rem;
  }

  .cs-metrics { grid-template-columns: repeat(3, 1fr); }
  .cs-metrics--four { grid-template-columns: repeat(4, 1fr); }
  .cs-metrics--inline { grid-template-columns: repeat(3, max-content); }

  .cs-metrics-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .cs-metrics-split .cs-metrics--two { grid-template-columns: repeat(2, 1fr); }

  .persona--media {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
  }

  .persona--media .persona__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .cs-gallery--horizontal { grid-auto-columns: minmax(34vw, 1fr); }
  .cs-gallery--horizontal.cs-gallery--phones { grid-auto-columns: minmax(240px, 18vw); }

  .cs-feature {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 5vw, 5rem);
  }

  /* The media keeps the wider column on both sides of the page: `order` moves
     it to the second track, so the tracks swap with it. */
  .cs-feature--flip {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .cs-feature--flip .cs-feature__media { order: 2; }

  .cs-feature--phone {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .cs-feature--phone.cs-feature--flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .ds-components { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
}

/* ---------------------------------------------------------------------------
   18. About
   --------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  gap: var(--space-7);
}

.about-body {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.55;
  color: var(--t-90);
  max-width: 46ch;
}

.about-body p + p {
  margin-top: 1em;
}

.about-list li {
  padding-block: 0.7rem;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-small);
  color: var(--t-90);
}

.about-list li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------------------
   20. Forms
   --------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--space-5);
  max-width: 40rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--t-60);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-body);
  transition: border-color var(--d) var(--ease), background-color var(--d) var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--t-40);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-3);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field__error {
  font-size: var(--fs-small);
  color: #ff8a7a;
}

.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: #ff8a7a;
}

.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.85rem 1.75rem;
  background: transparent;
  color: var(--white);
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  transition: background-color var(--d) var(--ease), border-color var(--d) var(--ease),
    color var(--d) var(--ease), transform var(--d) var(--ease-out);
}

.button:hover,
.button:focus-visible {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.button:active {
  transform: translateY(1px);
}

.button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Kept as an alias so existing markup stays valid; the base button is already
   outlined, so this only needs to not fight it. */
.button--ghost {
  background: transparent;
}

.notice {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-small);
  color: var(--t-90);
}

.notice--ok {
  border-left-color: var(--accent);
}

/* ---------------------------------------------------------------------------
   21. Error pages
   --------------------------------------------------------------------------- */

.error-page {
  min-height: 72svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
}

.error-page__code {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: var(--tracking-hero);
}

.error-page__message {
  margin-top: var(--space-5);
  font-size: var(--fs-lead);
  max-width: 36ch;
  color: var(--t-75);
}

/* ---------------------------------------------------------------------------
   22. Custom cursor
   A small white dot that sits exactly under the pointer.
   It grows over links and buttons, and becomes a "View Project" disc over
   work. The size change is a scale on the disc, so it never triggers layout.
   --------------------------------------------------------------------------- */

.has-custom-cursor,
.has-custom-cursor a,
.has-custom-cursor button,
.has-custom-cursor [data-cursor-hover] {
  cursor: none;
}

.has-custom-cursor input,
.has-custom-cursor textarea,
.has-custom-cursor select {
  cursor: text;
}

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  display: none;
  width: 0;
  height: 0;
  pointer-events: none;
  transform: translate3d(-200px, -200px, 0);
  will-change: transform;
}

.has-custom-cursor .custom-cursor-dot {
  display: block;
}

.cursor-disc,
.cursor-label {
  position: absolute;
  top: 0;
  left: 0;
}

.cursor-disc {
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 9999px;
  background: #fff;
  /* A faint dark ring keeps the dot visible on white backgrounds. It is drawn
     at full size and scaled with the disc, so it stays about a pixel wide. */
  box-shadow: 0 0 0 8px rgb(0 0 0 / 0.16);
  transform: scale(0.1067);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s, box-shadow 0.3s;
}

/* Over links the dot opens into a see-through circle, so it never hides the
   text it is pointing at. */
.custom-cursor-dot.is-hover .cursor-disc {
  opacity: 0.3;
  box-shadow: 0 0 0 4px rgb(0 0 0 / 0.2);
  transform: scale(0.2934);
}

.custom-cursor-dot.is-view .cursor-disc {
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 10px 30px rgb(0 0 0 / 0.35);
  transform: scale(1);
}

.has-custom-cursor.nav-hovering .cursor-disc,
.custom-cursor-dot.is-away .cursor-disc {
  opacity: 0;
}

.cursor-label {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  color: #000;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-cursor-dot.is-view .cursor-label {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------------------------------------------------------------------------
   23. Motion
   Starting states for everything the script animates in. They only apply with
   JavaScript on and motion allowed, so nothing can be stranded invisible.
   --------------------------------------------------------------------------- */

.dot-loop {
  will-change: transform, opacity;
  animation: dot-loop 1.8s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: no-preference) {
  /* Reveals rise into place as they fade in. Only opacity and transform
     change, which the compositor animates without repainting; a blur filter
     on whole sections made scrolling stutter. */
  html.js .reveal {
    opacity: 0;
    transform: translate3d(0, 60px, 0);
  }

  html.js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1),
      transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: var(--reveal-delay, 0s);
  }

  html.js .site-header {
    transform: translateY(-140%);
  }

  html.js .site-header.is-in {
    transform: none;
    transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  }

  html.js .hero-name { transform: scale(0.42); }
  html.js .hero-char { color: #3d3d3d; }
  html.js .hero-fade { opacity: 0; transform: translateY(18px); }

  html.js .about__intro,
  html.js .about__card {
    opacity: 0;
    visibility: hidden;
  }

  html.js .cta-word--left { transform: translateX(-120%); }
  html.js .cta-word--right { transform: translateX(120%); }
}


/* ---------------------------------------------------------------------------
   24. Responsive
   --------------------------------------------------------------------------- */

@media (min-width: 48em) {
  /* Chrome */
  .preloader__count { top: 3rem; right: 3.5rem; }
  .preloader__word { bottom: 3rem; left: 3.5rem; }

  .brand__name { font-size: 18px; }
  .nav-cluster { display: flex; }
  .nav-burger,
  .site-menu { display: none; }

  /* Intro */
  .about { padding-inline: 2.5rem; }
  .about__tab { font-size: 20px; }
  .notepad { height: 840px; padding: 2.75rem; }
  .notepad__spot { padding: 2.75rem; }
  .notepad__text,
  .notepad__spot { font-size: 56px; }

  /* Featured work */
  .work {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 8rem 2.5rem;
  }

  .work__inner { max-width: 1274px; }
  .work-carousel { display: block; }
  .work-list-mobile { display: none; }

  /* Playground */
  .pg__hint { display: block; }

  .pg.is-static .pg__track { gap: 6rem; padding-block: 8rem; }
  .pg.is-static .pg__intro { width: 100%; max-width: 1274px; margin-inline: auto; padding-inline: 2.5rem; }
  .pg.is-static .pg-card { max-width: 760px; margin-inline: auto; padding-inline: 2.5rem; }

  .pg.is-pinned {
    height: calc(100vh + var(--pg-distance, 0px));
  }

  .pg.is-pinned .pg__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    overflow: clip;
  }

  .pg.is-pinned .pg__track {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: max-content;
    height: 100%;
    padding-block: 0;
    will-change: transform;
  }

  .pg.is-pinned .pg__intro {
    width: 46vw;
    height: 100%;
    padding-right: 4rem;
    padding-left: calc(max((100vw - 1354px) / 2, 0px) + 2.5rem);
  }

  .pg.is-pinned .pg-card {
    width: 42vw;
    height: 100%;
    padding-inline: 2.5rem;
  }

  .pg.is-pinned .pg__end {
    display: block;
    flex: none;
    width: 8vw;
    height: 100%;
  }

  /* Capabilities */
  .wd { padding: 8rem 2.5rem; }
  .wd__head { margin-bottom: 3.5rem; }
  .wd__count { display: block; }
  .wd__row { padding-block: 1.75rem; }

  /* How I work */
  .pf {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 8rem 2.5rem;
  }

  .pf__head { margin-bottom: 0; }

  /* Cards sit on top of each other in the middle; the script spreads them. */
  .pf__stage {
    display: block;
    height: 54vh;
    margin-top: 5rem;
    cursor: grab;
    user-select: none;
  }

  .pf__stage:active { cursor: grabbing; }

  .pf-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(40vw, 500px);
    transform: translate(-50%, -50%);
  }

  .pf-card__title { font-size: 24px; }
  .pf__hint { display: block; }
  .pf__keys { display: flex; }

  /* Closing and footer */
  .cta { padding-inline: 2.5rem; }
  .site-footer__grid { grid-template-columns: 1fr 1fr 1.4fr; }

  .site-footer__base {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .site-footer__top { align-self: auto; }

  /* Inner pages */
  .work-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-card--flagship {
    grid-column: 1 / -1;
  }

  .about-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-8); }

}

@media (min-width: 64em) {
  .about__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4rem;
  }

  .about__intro { width: 240px; padding-top: 0.25rem; }
  .about__card { flex: 1; max-width: 790px; }
  .notepad { height: 700px; }

  .work-card--flagship {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-6);
    padding: clamp(1.25rem, 2vw, 1.75rem);
  }

  .work-card--flagship .work-card__media {
    aspect-ratio: 16 / 10;
    order: 2;
  }

}

@media (hover: none) {
  .wd-preview { display: none; }
}

/* ---------------------------------------------------------------------------
   25. Reduced motion
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .page-reveal,
  .preloader,
  .custom-cursor-dot { display: none !important; }

  .marquee__group,
  .dot-loop,
  .nav-dot,
  .hero-caret,
  .hero__scroll-line,
  .tech-border { animation: none !important; }

  .tech-border::after { display: none; }

  .work-mcard:hover .work-mcard__title,
  .pf-card:hover .pf-card__media img,
  .work-card:hover .work-card__media img {
    transform: none;
  }
}

/* ---------------------------------------------------------------------------
   26. Print
   --------------------------------------------------------------------------- */

@media print {
  .site-header,
  .custom-cursor-dot,
  .scroll-progress,
  .page-reveal,
  .preloader,
  .hero__scroll,
  .hero__trail,
  .work-carousel__arrow,
  .wd-preview,
  .pf__keys {
    display: none !important;
  }

  html, body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
}
