/* ============================================================
   Bluefin Studio — case-study article pages (axl.html)

   Built from Oliver's Figma (file "Bluefin-Brand", node 833:1469),
   a 1440-wide frame. Reads like an article: one 708px text column,
   centred, with a sticky chapter list on the left (a floating chapter
   pill on narrower screens). Motion, selection colour, buttons and the
   footer follow the homepage (styles.css / main.js / ocean.js).

     · Saans          → body copy, headlines
     · Saans SemiMono → dek, byline, chapters, captions, credits, buttons

   Vertical rhythm, measured off the frame: 60px between a block of
   text and a picture, 16px from a picture to its caption.
   ============================================================ */

@font-face {
  font-family: "Saans";
  src: url("/fonts/Saans-Regular.woff2") format("woff2"),
       url("/fonts/Saans-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Saans SemiMono";
  src: url("/fonts/SaansSemiMono-Regular.woff2") format("woff2"),
       url("/fonts/SaansSemiMono-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  /* Same gutter math as the homepage (styles.css): 70px at 1440. */
  --ct-max:    1300px;
  --ct-gutter: 40px;
  --side:      max(var(--ct-gutter), calc((100vw - var(--ct-max)) / 2));

  --col:       708px;                     /* the reading column */
  --block:     88px;                      /* text ↔ picture */
  --cap-gap:   20px;                      /* picture → caption */

  --black:     #000;
  --paper:     #FFF;
  --hero-bg:   #000;                      /* = the Axl clip's own background */
  --muted:     rgba(0, 0, 0, 0.3);        /* chapters you're not in */
  --ink:       #FAFDFF;                   /* text on water (footer) */
  --accent:    #0009FF;                   /* this page's hovers, highlight, progress */
  --aqua:      #7DD8FC;                   /* hovers on the footer's water (homepage) */
  --white:     #FFF;
  --aqua-ink:  #01102A;                   /* text on an aqua fill */
  --focus:     #005BFE;

  --display: "Saans", ui-sans-serif, system-ui, sans-serif;
  --mono:    "Saans SemiMono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --rise:    cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* Lenis drives the smooth scroll (case-study.js), as on the homepage. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.cs-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  letter-spacing: 0.01em;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, strong, b { font-weight: 400; }   /* never bold (as styles.css) */
a { color: inherit; }
button { font: inherit; color: inherit; }

/* Highlighted text: electric blue. */
::selection      { background: var(--accent); color: #FFF; }
::-moz-selection { background: var(--accent); color: #FFF; }

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

/* Fade in / out on scroll (case-study.js toggles .is-in / .is-above).
   Blocks rise into place as they come up from below; once they've gone
   off the top they only fade, in place — nothing shifts while you read.
   `translate` rather than `transform`, so blocks that are centred with a
   transform keep it. */
.fx {
  opacity: 0;
  translate: 0 14px;
  transition: opacity 900ms var(--ease), translate 1000ms var(--rise);
}
.fx.is-in,
.fx.is-above { translate: 0 0; }
.fx.is-in { opacity: 1; }
/* Hero intro, in three beats: Axl, then the copy (title, dek, byline as one
   group), then the nav. html.cs-intro (set in <head>) holds them hidden;
   case-study.js adds .cs-go once the fonts and Axl's first frame are ready,
   so no beat plays while it's still invisible. Arriving from the homepage
   card (html.cs-enter): deeper and slower. */
html.cs-intro { --intro-axl: 0ms; --intro-copy: 450ms; --intro-nav: 1000ms; --intro-rise: 16px; --intro-fade: 900ms; --intro-move: 1000ms; }
html.cs-intro.cs-enter { --intro-axl: 150ms; --intro-copy: 750ms; --intro-nav: 1500ms; --intro-rise: 48px; --intro-fade: 1100ms; --intro-move: 1400ms; }
html.cs-intro .cs-hero__dog,
html.cs-intro .cs-hero__text > * { opacity: 0; translate: 0 var(--intro-rise); }
html.cs-intro .cs-topbar { opacity: 0; }
html.cs-intro .cs-hero__dog { --d: var(--intro-axl); }
html.cs-intro .cs-hero__title { --d: var(--intro-copy); }
html.cs-intro .cs-hero__dek { --d: calc(var(--intro-copy) + 70ms); }
html.cs-intro .cs-hero__byline { --d: calc(var(--intro-copy) + 140ms); }
html.cs-intro.cs-go .cs-hero__dog,
html.cs-intro.cs-go .cs-hero__text > * {
  opacity: 1;
  translate: 0 0;
  transition: opacity var(--intro-fade) var(--ease) var(--d), translate var(--intro-move) var(--rise) var(--d);
}
html.cs-intro.cs-go .cs-topbar { opacity: 1; transition: opacity 800ms var(--ease) var(--intro-nav); }

.fx.is-above { transition: opacity 500ms var(--ease); }

/* ============================================================
   NAV — the homepage's (styles.css .nav): wordmark left, white pill
   right; slides up out of the way while you scroll down and comes back
   on the way up. Black wordmark on the white page; it cross-fades to
   the white one over the footer's water.
   ============================================================ */
.cs-topbar {
  position: fixed;
  z-index: 50;
  top: 36px;
  left: var(--side);
  width: calc(100vw - 2 * var(--side));
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: opacity 600ms ease, transform 380ms var(--rise);
}
.cs-topbar.is-hidden {
  opacity: 0;
  transform: translateY(calc(-100% - 40px));
  pointer-events: none;
}
.cs-wordmark { position: relative; display: block; height: 30px; aspect-ratio: 99 / 24; }
.cs-wordmark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 400ms ease;
}
.cs-wordmark .logo-white,
.cs-topbar.is-deep .logo-ink { opacity: 0; }
/* (.is-deep = over the black hero or the footer's water) */
.cs-topbar.is-deep .logo-white { opacity: 1; }
.cs-pill-nav {
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0 25.2px;
  gap: 32.4px;
  background: #FFF;
  border: 1px solid #000;
  border-radius: 30px;
}
.cs-pill-nav a {
  font-family: var(--mono);
  font-size: 16.52px;
  line-height: 1;
  color: var(--black);
  text-decoration: none;
  transition: color 300ms var(--ease);
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.cs-pill-nav a:hover { color: var(--accent); }

/* ============================================================
   HERO — black panel (Axl's clip plays on its own black), white text,
   about one screen tall. Everything centred on one axis: Axl on top,
   then the title, the dek and the byline.
   ============================================================ */
.cs-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Exactly one screen, so the byline is always in view on arrival. The
     text takes what it needs; Axl gets the rest (up to 480px). */
  height: 100svh;
  min-height: 560px;
  /* Top clears the nav (and sits a touch low, as in the mockup); both ends
     tighten on shorter screens. */
  padding: clamp(104px, 17svh, 176px) var(--side) clamp(36px, 4.7svh, 48px);
  background: var(--hero-bg);
  color: #FFF;
  text-align: center;
  overflow: hidden;
}
.cs-hero__text { position: relative; z-index: 1; }
/* Title + dek sizes match the homepage's "Training Axl" card (styles.css
   .feature__title / .feature__desc) at every width. */
.cs-hero__title {
  max-width: 560px;                  /* breaks after "How we" */
  margin: 0 auto;
  font-family: var(--display);
  font-weight: 400;
  font-size: 48px;
  line-height: normal;
  letter-spacing: 0.01em;
}
.cs-hero__dek {
  margin: clamp(24px, 3.9svh, 40px) 0 0;
  font-family: var(--mono);
  font-size: 20px;
  line-height: normal;
  letter-spacing: 0.01em;
}
.cs-hero__byline {
  margin: clamp(24px, 3.9svh, 40px) 0 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0.01em;
}
/* Idle Axl (720×1380 clip), centred above the title. He fills whatever
   height the text leaves — shrinking and sliding up on shorter windows —
   up to 480px; past that the stack just centres. object-fit keeps him in
   proportion inside the full-width box (its sides are the hero's black). */
.cs-hero__dog {
  display: block;
  flex: 1 1 0;
  min-height: 120px;
  max-height: 480px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto clamp(32px, 6.25svh, 64px);
}

/* ============================================================
   ARTICLE — three columns: chapter list | 708 reading column | air.
   ============================================================ */
.cs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(var(--col), 100% - 2 * var(--side)) minmax(0, 1fr);
  padding-top: 150px;
}
.cs-article { grid-column: 2; grid-row: 1; min-width: 0; }

/* Chapter list — sticky, on the far left at the gutter. */
.cs-toc { grid-column: 1; grid-row: 1; padding-left: var(--side); }
.cs-toc ol,
.cs-legend__menu ol {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.cs-toc ol { position: sticky; top: 120px; }
.cs-toc a,
.cs-legend__menu a {
  color: var(--muted);
  text-decoration: none;
  transition: color 300ms var(--ease);
}
.cs-toc a:hover,
.cs-toc a[aria-current],
.cs-legend__menu a[aria-current] { color: var(--black); }

/* Body copy. Airy, long-read spacing: 1.7 line height, 1.75em between
   paragraphs, 88px around pictures. */
.cs-article p,
.cs-article li {
  font-size: 20px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}
.cs-article p { margin: 0 0 1.75em; }
/* Lists: the same air around them as a paragraph, a little between the
   points, and a smaller round bullet. */
.cs-article ul { margin: 0 0 1.75em; padding: 0; list-style: none; }
.cs-article li { position: relative; padding-left: 26px; }
.cs-article li + li { margin-top: 14px; }
.cs-article li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
/* Links in the copy: black text, thin black underline (no blue). */
.cs-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.cs-chapter > :last-child { margin-bottom: 0; }
/* A new chapter gets a bigger pause than a picture does. */
.cs-chapter + .cs-chapter { margin-top: calc(var(--block) * 1.5); }
/* Anchor jumps land with a little air above the first line. */
.cs-chapter { scroll-margin-top: 120px; }

.cs-quote { margin: 0; }
.cs-quote p { margin: 0; }
.cs-quote footer { font-size: 20px; line-height: 1.7; letter-spacing: 0.01em; }

/* Pictures + captions. Every picture opens in the pop-out. */
.cs-fig { margin: var(--block) 0; }
.cs-chapter > .cs-fig:first-child { margin-top: 0; }
.cs-fig img { width: 100%; cursor: zoom-in; }
.cs-fig figcaption {
  position: relative;
  margin-top: var(--cap-gap);
  font-family: var(--mono);
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0.01em;
  text-align: center;
}
/* Single landscape pictures (character card + screenshots) all share one
   width — the Melius screenshot's 751px, just past the 708px column —
   centred on it, scaled evenly (no cropping). */
.cs-fig--wide {
  width: min(751px, 100vw - 2 * var(--side));
  margin-left: 50%;
  transform: translateX(-50%);
}
.cs-fig--scary img { width: min(428px, 100%); margin: 0 auto; }

/* Axl & Eric — two photos side by side with a 4px seam. */
.cs-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

/* Street Fighter — the three idles, centred as a group by the fighters
   themselves (each GIF has a different amount of empty space around its
   character). Each .cs-sf__item is sized to its fighter's box, measured
   from the GIF frames, at the Figma scale (widths are % of the 806px row);
   the GIF sits inside, offset so its fighter fills the box. Equal gaps,
   feet on one line. Chun-Li jumps to the very top of her GIF (and its
   background is opaque off-white), so she's shown whole, scaled so the full
   frame is the row's height: a touch smaller standing, but nothing clipped. */
.cs-fig--sf { width: min(806px, 100vw - 2 * var(--side)); margin-left: 50%; transform: translateX(-50%); }
.cs-sf { display: flex; justify-content: center; align-items: flex-end; column-gap: 7.9%; }
.cs-sf__item { position: relative; flex: none; display: block; }
.cs-fig .cs-sf__item img { position: absolute; max-width: none; height: auto; image-rendering: pixelated; }
/*            fighter box (px in the GIF)   → item width + shape       → GIF size + offset in the item */
.cs-sf__dudley { width: 19.48%; aspect-ratio: 470 / 560; }   /* 15,20 – 485,580 of 515×580 */
.cs-sf__dudley img { width: 109.57%; left: -3.19%; top: -3.57%; }
.cs-sf__chun   { width: 14.47%; aspect-ratio: 311 / 498; }   /* whole GIF: her jump uses all of it */
.cs-sf__chun img   { width: 100%; left: 0; top: 0; }
.cs-sf__ryu    { width: 24.34%; aspect-ratio: 233 / 200; }   /* 125,96 – 358,296 of 500×380 */
.cs-sf__ryu img    { width: 214.59%; left: -53.65%; top: -48%; }

/* Motion states — the three looping videos side by side, transparent on white. */
.cs-states { display: grid; grid-template-columns: repeat(3, 1fr); }
.cs-states video { display: block; width: 100%; height: auto; aspect-ratio: 624 / 696; }

/* ============================================================
   SAY HI — the closing lines, buttons + credits.
   ============================================================ */
.cs-big {
  font-size: 28px !important;
  line-height: 1.35 !important;
  letter-spacing: 0.01em;
}
.cs-outro__hi { margin: 96px 0 0 !important; }
.cs-outro__meet {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}
.cs-outro__dog { display: block; width: 96px; height: auto; aspect-ratio: 624 / 696; transform: scaleX(-1); }
.cs-outro__ready { margin: 96px 0 0 !important; }
.cs-outro__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Buttons: the homepage's "Talk to Blu" pill — white, thin black stroke,
   a fill + a little lift on hover (electric blue here) — with the ↗ of
   its other CTAs. */
.cs-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
  color: var(--black);
  text-decoration: none;
  background: #FFF;
  border: 1px solid #000;
  border-radius: 30px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 300ms var(--ease), border-color 300ms var(--ease), color 300ms var(--ease), transform 300ms var(--ease);
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.cs-btn:hover { background: var(--accent); border-color: var(--accent); color: #FFF; transform: translateY(-2px); }
.cs-btn:active { background: var(--accent); border-color: var(--accent); color: #FFF; }
.cs-btn__arrow { display: inline-block; font-family: var(--display); transition: transform 300ms var(--ease); letter-spacing: 0.01em; }
.cs-btn:hover .cs-btn__arrow { transform: translateX(3px) translateY(-2px); }

.cs-credits { margin-top: 96px; }
/* Credits: a heading, then each group (Bluefin, Client) with a line's
   space between them. */
.cs-credits p + p { margin-top: 1.6em !important; }
.cs-br-m { display: none; }   /* a line break for phones only */
.cs-credits p {
  margin: 0 !important;
  font-family: var(--mono);
  font-size: 16px !important;
  line-height: 1.6 !important;
  letter-spacing: 0.01em;
}

/* ============================================================
   CHAPTER LEGEND — narrow screens only (the side list needs 1100px+).
   Floating text at the top once the hero is behind you: "3/6 Drawing
   Axl" and a caret, a reading-progress hairline across the screen, then
   a soft white fade into the page so it stays legible over anything.
   It sits under the nav and slides up into the nav's place while the
   nav is hidden (html.cs-nav-up), in step with it. Tap → the chapter
   list drops down. (Blu has the bottom of the screen.)
   ============================================================ */
.cs-legend {
  --nav-space: 96px;                      /* nav top 36 + 50 tall + air */
  --nav-slide: 82px;                      /* how far it rises when the nav hides */
  position: fixed;
  z-index: 45;                            /* under the nav (50) */
  top: 0; left: 0; right: 0;
  display: none;
  padding: var(--nav-space) var(--side) 0;
  background: linear-gradient(to bottom, #FFF 0, #FFF calc(100% - 28px), rgba(255, 255, 255, 0) 100%);
  padding-bottom: 28px;                   /* the fade */
  transform: translateY(-100%);
  pointer-events: none;
  transition: transform 380ms var(--rise);
}
.cs-legend.is-shown { transform: translateY(0); pointer-events: auto; }
/* Open: a deeper fade, so the last chapter sits clear of the text below. */
.cs-legend.is-open {
  padding-bottom: 48px;
  background: linear-gradient(to bottom, #FFF 0, #FFF calc(100% - 48px), rgba(255, 255, 255, 0) 100%);
}
html.cs-nav-up .cs-legend.is-shown { transform: translateY(calc(-1 * var(--nav-slide))); }
.cs-legend__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 0 12px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.cs-legend__count { color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-legend__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cs-legend__caret {
  flex: none;
  width: 6px; height: 6px;
  margin: -3px 0 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 300ms var(--ease), margin 300ms var(--ease);
}
.cs-legend.is-open .cs-legend__caret { transform: rotate(225deg); margin-top: 3px; }
/* Reading progress, edge to edge. */
.cs-legend__bar {
  position: relative;
  display: block;
  height: 2px;
  margin: 0 calc(-1 * var(--side));
  background: rgba(0, 0, 0, .06);
  overflow: hidden;
}
.cs-legend__bar > span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.cs-legend__menu {
  margin-top: 14px;
  padding: 4px 0 8px;
  animation: cs-drop 300ms var(--rise);
}
.cs-legend__menu[hidden] { display: none; }
.cs-legend__menu li + li { margin-top: 14px; }
.cs-legend__menu a { display: block; font-size: 15px; }
@keyframes cs-drop { from { opacity: 0; transform: translateY(-6px); } }

/* ============================================================
   IMAGE POP-OUT — the picture large on white, zoomable.
   ============================================================ */
.cs-lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(255, 255, 255, .97);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.cs-lightbox.is-open { opacity: 1; }
.cs-lightbox[hidden] { display: none; }
.cs-lightbox__stage {
  position: absolute;
  inset: 90px 40px 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-out;
}
.cs-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  transform-origin: center;
  scale: .96;
  transition: scale 400ms var(--rise);
}
.cs-lightbox.is-open .cs-lightbox__img { scale: 1; }
.cs-lightbox__img.is-pixel { image-rendering: pixelated; }
.cs-lightbox.is-zoomed .cs-lightbox__img { cursor: grab; }
.cs-lightbox.is-zoomed .cs-lightbox__img:active { cursor: grabbing; }
.cs-lightbox__cap {
  position: absolute;
  left: 0; right: 0; bottom: 26px;
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  text-align: center;
  transition: opacity 300ms var(--ease);
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.cs-lightbox.is-zoomed .cs-lightbox__cap { opacity: 0; }
/* ✕ in the nav pill's style, where the nav sits. */
.cs-lightbox__close {
  position: absolute;
  top: 36px;
  right: var(--side);
  width: 50px;
  height: 50px;
  padding: 0;
  background: #FFF;
  border: 1px solid #000;
  border-radius: 50%;
  cursor: pointer;
  transition: background 300ms var(--ease), border-color 300ms var(--ease);
}
.cs-lightbox__close::before,
.cs-lightbox__close::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.cs-lightbox__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.cs-lightbox__close:hover { background: var(--accent); border-color: var(--accent); color: #FFF; }

/* ============================================================
   CONTACT MODAL — an exact copy of the homepage's (styles.css): #0009FF
   fields and hovers. Opened by Contact, Contact us and the footer email.
   ============================================================ */
#contact-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
#contact-modal.is-open { pointer-events: auto; opacity: 1; }
.contact-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 40, 0.72);
}
.contact-modal__card {
  position: relative;
  width: min(720px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 64px;
  border-radius: 28px;
  background: #FAFDFF;                 /* the homepage's --paper */
  transform: translateY(28px);
  transition: transform 400ms var(--ease);
}
#contact-modal.is-open .contact-modal__card { transform: translateY(0); }
.contact-modal__close {
  position: absolute;
  top: 28px; right: 28px;
  width: 40px; height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}
.contact-modal__close span {
  position: absolute;
  top: 50%; left: 50%;
  display: block;
  width: 22px; height: 2px;
  border-radius: 1px;
  background: var(--black);
  transition: background 200ms var(--ease);
}
.contact-modal__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.contact-modal__close span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }
.contact-modal__close:hover span { background: var(--accent); }
.contact-modal__label {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--black);
}
.contact-modal__headline {
  margin: 0 0 44px;
  font-family: var(--display);
  font-size: 52px;
  line-height: normal;
  color: var(--black);
  letter-spacing: 0.01em;
}

.contact-form { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.contact-form__row { display: flex; gap: 16px; }
.contact-form__row .contact-form__input { flex: 1; }
.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 0 24px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  outline: none;
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.contact-form__input { height: 68px; }
.contact-form__textarea { height: 160px; padding: 20px 24px; resize: none; line-height: normal; }
.contact-form__input::placeholder,
.contact-form__textarea::placeholder { color: rgba(0, 0, 0, 0.35); }
.contact-form__input:focus,
.contact-form__textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 9, 255, .18); }
.contact-form__submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  margin-top: 8px;
  padding: 0 28px;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--black);
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 100px;
  cursor: pointer;
  will-change: transform;
  transition: background 400ms var(--ease), color 400ms var(--ease), transform 400ms var(--ease);
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.contact-form__submit:hover { background: var(--accent); border-color: var(--accent); color: #FFF; transform: translateY(-2px); }
.contact-form__submit .arrow { display: inline-block; font-family: var(--display); transition: transform 400ms var(--ease); letter-spacing: 0.01em; }
.contact-form__submit:hover .arrow { transform: translateX(3px) translateY(-2px); }
.contact-form__submit:disabled { opacity: 0.55; cursor: default; transform: none; }
/* Honeypot — kept out of the layout and away from keyboard/AT users. */
.contact-form__botcheck {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}
.contact-form__status {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.4;
  color: var(--focus);
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.contact-form__status.is-error { color: #c0392b; }

@media (max-width: 734px) {
  #contact-modal { padding: 14px; }
  .contact-modal__card { padding: 36px 22px 28px; border-radius: 22px; }
  .contact-modal__label { margin-bottom: 10px; }
  .contact-modal__headline { margin-bottom: 28px; font-size: clamp(34px, 11vw, 48px); white-space: nowrap; }
  .contact-modal__close { top: 18px; right: 18px; }
  .contact-form__row { flex-direction: column; gap: 14px; }
  .contact-form__row .contact-form__input { flex: none; }
  .contact-form__input,
  .contact-form__textarea { font-size: 16px; }
  .contact-form__textarea { height: 150px; }
}

/* ============================================================
   BLU — the homepage's chat widget (styles.css "BLU CHAT WIDGET"): a
   fixed, full-screen stage the concierge draws into; the pointer only
   reaches it over his rect (case-study.js). The frame is only visible
   while he's docked or open — never while he's tucked away (hero, footer).
   ============================================================ */
#chat-root { visibility: hidden; }
#chat-root.is-summoned { visibility: visible; }
#blu-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  border: none;
  background: transparent;
  pointer-events: none;
  color-scheme: normal;
}
#blu-hitbox {
  position: fixed;
  z-index: 99;
  display: none;
  cursor: pointer;
  background: transparent;
}
html.uw-no-blu #chat-root,
html.uw-no-blu #blu-hitbox { display: none !important; }

/* ============================================================
   FOOTER — the homepage's: contact line + clock, wordmark, open water,
   the legal row on the sand. footer-sea.js paints the water, the
   waterline and the seafloor on the canvas behind it.
   ============================================================ */
.cs-footer {
  position: relative;
  margin-top: 200px;
  padding: 120px var(--side) 44px;
  overflow: hidden;
  isolation: isolate;
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: normal;   /* SemiMono: not the Saans +1% */
}
.cs-footer__contact,
.cs-footer__logo,
.cs-footer__legal { position: relative; z-index: 1; }
.cs-footer__sea {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.cs-footer__contact {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
  font-size: 22px;
  line-height: 1.3;
}
.cs-footer__email { text-decoration: none; transition: color 250ms var(--ease); }
.cs-footer__email:hover { color: var(--aqua); }
.cs-footer__time::before { content: "~"; margin: 0 0.5em; }
.cs-footer {
  --logo-gutter: 64px;                /* = the homepage footer's wordmark margins */
}
/* The wordmark nearly edge to edge (as the homepage's): the window's width
   less the homepage's outer gutter, breaking out of the content column. */
.cs-footer__logo {
  display: block;
  width: calc(100% + 2 * (var(--side) - var(--logo-gutter)));
  max-width: none;
  height: auto;
  margin: 0 calc(var(--logo-gutter) - var(--side));
}
@media (max-width: 1068px) { .cs-footer { --logo-gutter: 40px; } }
.cs-footer__legal {
  display: flex;
  align-items: center;
  gap: 10px;
  /* open water between the wordmark and the sand: the homepage's fixed
     360px, which keeps the big wordmark clear of the kelp at any width. */
  margin-top: 360px;
  font-size: 14px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.82);
}
.cs-footer__legal a { text-decoration: none; transition: color 160ms var(--ease); }
.cs-footer__legal a:hover { color: var(--aqua); }
.cs-footer__sep { opacity: 0.45; }

/* ============================================================
   NARROWER SCREENS
   ============================================================ */
/* No room left of the column for the chapter list → the chapter pill. */
@media (max-width: 1100px) {
  .cs-toc { display: none; }
  .cs-legend { display: block; }
}

/* Homepage M tier (735–1068): the card's type steps down. */
@media (max-width: 1068px) {
  .cs-hero__title { font-size: 44px; line-height: 1.1; letter-spacing: 0.01em; }
  .cs-hero__dek { font-size: 16px; line-height: 1.4; margin-top: 32px; }
  .cs-hero__byline { font-size: 14px; margin-top: 32px; }
}

/* Phone: single column; the hero stacks with Axl first, centred. */
@media (max-width: 734px) {
  /* Legend under the phone nav (20 + safe area, 44 tall). */
  .cs-legend { --nav-space: calc(74px + env(safe-area-inset-top, 0px)); --nav-slide: 60px; }
  /* Settling back down as the nav fades in: an even ease over the nav's
     own 900ms, not the rise curve's quick snap. Rising away (below) keeps
     its curve. */
  .cs-legend { transition: transform 900ms cubic-bezier(.45, 0, .25, 1); }
  html.cs-nav-up .cs-legend.is-shown { transition: transform 380ms var(--rise); }
  :root { --ct-gutter: 20px; --block: 60px; }
  /* Nav: the homepage's phone nav (.m-nav-header) — fades rather than slides. */
  .cs-topbar {
    top: calc(20px + env(safe-area-inset-top, 0px));
    left: 0;
    width: 100%;
    height: auto;
    padding: 0 clamp(18px, 5.1vw, 30px);
    transition: opacity 900ms cubic-bezier(.45, 0, .25, 1);   /* slow, soft fade back in (= the homepage's) */
  }
  .cs-topbar.is-hidden { transform: none; transition: opacity 300ms ease; }
  .cs-wordmark { height: auto; width: clamp(88px, 25vw, 112px); }
  .cs-pill-nav { height: 44px; padding: 0 6px; gap: 0; }
  .cs-pill-nav a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    font-size: clamp(14px, 4.1vw, 16px);
  }
  .cs-pill-nav a:active { color: var(--accent); }

  .cs-hero { min-height: 520px; padding: 96px var(--side) 56px; }
  .cs-hero__dog { max-height: 360px; margin-bottom: 36px; }
  .cs-hero__title { font-size: clamp(26px, 7.7vw, 38px); line-height: 1.1; }   /* = homepage --m-sub */
  .cs-hero__dek { font-size: 18px; line-height: 1.4; letter-spacing: normal; color: #FFF; margin-top: 20px; }   /* = the homepage's phone subtext */
  .cs-hero__byline { font-size: 12px; margin-top: 24px; }

  .cs-layout { padding-top: 64px; }
  .cs-article p,
  .cs-article li,
  .cs-quote footer { font-size: 18px; }
  .cs-article li { padding-left: 22px; }
  .cs-article li::before { left: 4px; top: 0.7em; width: 5px; height: 5px; }
  .cs-big { font-size: 24px !important; }
  .cs-fig figcaption,
  .cs-credits p { font-size: 13px !important; }
  .cs-br-m { display: inline; }   /* "…to get / his portrait done" */
  .cs-btn { height: 44px; padding: 0 22px; font-size: 15px; }
  .cs-outro__dog { width: 76px; }

  .cs-lightbox__stage { inset: 76px 0 56px; }
  .cs-lightbox__close { top: 16px; width: 44px; height: 44px; }
  .cs-lightbox__cap { font-size: 13px; bottom: 20px; padding: 0 var(--side); }

  /* Footer, phone: a full screen of water; the contact line + wordmark
     float in the middle, the legal row sits on the sand (as m-footer). */
  .cs-footer {
    width: 100%;                      /* else min-height + aspect-ratio widens it */
    margin-top: 140px;
    min-height: 100lvh;
    padding: 0;
    aspect-ratio: 2544 / 3256;
  }
  .cs-footer__contact {
    position: absolute;
    top: calc((100% - 130px) / 2);
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 15px;
    white-space: nowrap;
  }
  .cs-footer__time::before { content: none; }
  .cs-footer__logo {
    position: absolute;
    top: calc((100% - 130px) / 2 + 52px);
    left: 50%;
    width: 120px;
    margin-left: -60px;
  }
  .cs-footer__legal {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
    font-size: clamp(12px, 3.4vw, 14px);
  }
  .cs-footer__email:active { color: var(--aqua); }
}
