/* Crisp — components and layout. Every value comes from css/tokens.css (load it first). */

/* ── Base ─────────────────────────────────────────────────── */
/* The house ease: a soft spring for hover, tap and the one Home load moment */
:root { --ease: cubic-bezier(.34, 1.56, .64, 1); }
/* Deviation from the design system's 72px layout-nav-height: the brand skill sets the logo minimum at 120px wide,
   so the navbar logo is 120x81 and the bar is --space-9 (96px) tall at every width. --nav-h is the one header height. */
:root { --nav-h: var(--space-9); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, address { margin: 0; }
ul, ol { padding: 0; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }
strong, b { font-weight: 600; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--space-1); }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute; left: var(--space-4); top: calc(-1 * var(--space-10));
  z-index: 100; padding: var(--space-3) var(--space-4);
  background: var(--bg); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  font-weight: 600;
}
.skip:focus { top: var(--space-4); }

/* Inline text links: burnt orange only here */
/* Inline text links. Burnt (--link) passes 4.5:1 on white only (4.67:1); on grey surfaces
   (--surface 4.24:1, --surface-2 3.95:1) it fails, so any grey block resets --link-ink to navy
   and links there change only their underline on hover. New grey blocks: add them to the
   surface list below or put .on-surface on the container. */
.link, .prose a {
  color: var(--link-ink, var(--link));
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}
.link:hover, .prose a:hover { text-decoration-thickness: 1.5px; }
.on-surface, .card, .tile, .post, .closer-card, .table-wrap { --link-ink: var(--text); }

/* ── Type ─────────────────────────────────────────────────── */
h1, h2, h3, .t-display-xl, .t-display, .t-h1, .t-h2, .t-h3, .t-title { font-weight: 600; text-wrap: balance; }
.t-display-xl { font-size: var(--fs-display-xl); line-height: var(--lh-display-xl); letter-spacing: var(--ls-display-xl); }
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
h1, .t-h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
h2, .t-h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }
h3, .t-h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.t-title { font-size: var(--fs-title); line-height: var(--lh-title); }
.t-lead { font-size: var(--fs-lead); line-height: var(--lh-lead); font-weight: var(--fw-lead); max-width: var(--layout-measure); text-wrap: pretty; }
.t-small { font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small); }
.t-muted { color: var(--text-muted); }
.label {
  font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted);
}
.nowrap { white-space: nowrap; }
/* .t-fit: one step down the type scale where a long headline would otherwise end on a lone word
   (Display XL -> Display below 1024px; H1 -> H2 below 600px). Sizes stay on tokens. */
@media (max-width: 1023px) {
  .t-display-xl.t-fit { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
}
@media (max-width: 599px) {
  .t-h1.t-fit { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }
}
p { max-width: var(--layout-measure); }

/* ── Layout ───────────────────────────────────────────────── */
.wrap { width: 100%; max-width: calc(var(--layout-max) + 2 * var(--layout-margin)); margin-inline: auto; padding-inline: var(--layout-margin); }
.section { padding-block: var(--pad-section); }
.section--lg { padding-block: var(--pad-section-lg); }
.section--tight { padding-block: var(--space-6); } /* About: closer segments */
@media (min-width: 1024px) { .section--tight { padding-block: var(--space-7); } }
.section > .wrap { display: flex; flex-direction: column; gap: var(--gap-section-head); }
.section-head { display: flex; flex-direction: column; gap: var(--gap-heading-body); }
.section-foot { display: flex; flex-wrap: wrap; gap: var(--gap-actions); align-items: center; }

.stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--gap-paragraph)); }
.stack--card { --stack-gap: var(--gap-card-stack); }
.stack--head { --stack-gap: var(--gap-heading-body); }
.stack--actions { --stack-gap: var(--gap-text-actions); }

.grid-12 { display: grid; grid-template-columns: repeat(var(--layout-columns-mobile), minmax(0, 1fr)); gap: var(--layout-gutter); }
@media (min-width: 600px) { .grid-12 { grid-template-columns: repeat(var(--layout-columns-tablet), minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-12 { grid-template-columns: repeat(var(--layout-columns-desktop), minmax(0, 1fr)); } }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--size-button); padding: 0 var(--pad-button-x);
  border: 0; border-radius: var(--radius-md);
  background: var(--orange); color: var(--on-accent);
  font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 600;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover, .btn:active { background: var(--orange-hover); }
.btn--secondary { background: var(--bg); color: var(--text); box-shadow: var(--shadow-outline); }
.btn--secondary:hover, .btn--secondary:active { background: var(--bg); color: var(--link); box-shadow: var(--shadow-outline-hover); }
.btn--sm { min-height: var(--size-button-sm); padding: 0 var(--pad-button-sm-x); font-size: var(--fs-small); line-height: var(--lh-small); }
.btn svg { width: var(--space-4); height: var(--space-4); flex: none; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ── Cards, tiles, chips, tags ────────────────────────────── */
.card {
  display: flex; flex-direction: column; gap: var(--gap-card-stack);
  padding: var(--pad-card); border-radius: var(--radius-xl); background: var(--surface);
  min-width: 0; overflow-wrap: anywhere;
}
a.card, a.tile { transition: background-color .15s ease; }
a.card:hover, a.tile:hover { background: var(--surface-2); }
.card-body { display: flex; flex-direction: column; gap: var(--gap-card-stack); padding-top: var(--space-1); }
.card-media-text { gap: var(--gap-media-text); }

.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-7);
  padding: var(--pad-card); border-radius: var(--radius-xl); background: var(--surface);
  min-width: 0; overflow-wrap: anywhere;
}
.tile-icon { width: var(--space-7); height: var(--space-7); color: var(--orange); }
.tile-text { display: flex; flex-direction: column; gap: var(--gap-heading-body-sm); }

.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag {
  display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small);
}
.tag--line { background: transparent; box-shadow: var(--shadow-outline); color: var(--text-muted); }

.chip {
  display: inline-flex; align-items: center; min-height: var(--size-button-sm); padding: 0 var(--pad-button-sm-x);
  border: 0; border-radius: var(--radius-sm); background: var(--bg); box-shadow: var(--shadow-outline);
  color: var(--text); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; cursor: default;
}
button.chip { cursor: pointer; }
button.chip:hover { box-shadow: var(--shadow-outline-hover); }
.chip[aria-pressed="true"] { background: var(--orange); color: var(--on-accent); box-shadow: none; }

/* Curl bullets */
.bullets { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.bullets li { display: grid; grid-template-columns: var(--space-5) minmax(0, 1fr); gap: var(--space-3); align-items: start; }
/* the official 20px orange curl (assets/icons/Crisp_Bullet_Curl.svg) */
.bullets li::before {
  content: ""; width: calc(var(--space-4) + var(--space-1)); height: calc(var(--space-4) + var(--space-1));
  margin: var(--space-1) 0 0 var(--space-1);
  background: url("/assets/icons/Crisp_Bullet_Curl.svg") center / contain no-repeat;
}

/* Icon chip: an official 56px card icon on a --surface-2 square; tilts -10deg and grows 6% on hover
   (on its own or on the hovered card/link it sits in). Icons are decorative: aria-hidden + alt="". */
.icon-chip {
  display: grid; place-items: center; flex: none;
  width: calc(var(--space-8) + var(--space-4)); height: calc(var(--space-8) + var(--space-4));
  border-radius: var(--radius-lg); background: var(--surface-2);
}
.icon-chip img { width: calc(var(--space-7) + var(--space-2)); height: calc(var(--space-7) + var(--space-2)); }
@media (prefers-reduced-motion: no-preference) {
  .icon-chip img { transition: transform .35s var(--ease); }
  .icon-chip:hover img, :is(a, .tile, .card):hover .icon-chip img, a:focus-visible .icon-chip img { transform: rotate(-10deg) scale(1.06); }
}

/* Spinner: the official croissant curl (assets/icons/Crisp_Spinner_Curl.svg), turning only when motion is fine */
.spinner { width: var(--space-5); height: var(--space-5); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .spinner { animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(1turn); } }
}

/* ── Forms ────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field > label, .field > legend { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.input {
  width: 100%; min-height: var(--size-button); padding: var(--space-3) var(--pad-input-x);
  border: 1px solid var(--surface-3); border-radius: var(--radius-md);
  background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body);
}
textarea.input { min-height: var(--space-10); resize: vertical; }
.input::placeholder { color: var(--text-muted); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--burnt); }
.err { color: var(--burnt); font-size: var(--fs-small); line-height: var(--lh-small); }

/* ── Table (on grey) ─────────────────────────────────────── */
.table-wrap { border-radius: var(--radius-xl); background: var(--surface); padding: var(--space-2) var(--pad-card); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: var(--space-4) var(--space-4) var(--space-4) 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--surface-3); }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table th { font-weight: 600; }
.table thead th { font-size: var(--fs-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }

/* ── Header ───────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50; background: var(--bg);
  transition: box-shadow .2s ease;
}
.site-head.scrolled { box-shadow: var(--shadow-nav); }
.site-head .bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); height: var(--nav-h); }
.brandmark img { width: calc(var(--space-10) - var(--space-2)); height: auto; } /* 120px: the brand minimum */
.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav a:not(.btn) { font-weight: 400; padding-block: var(--space-2); transition: color .15s ease; }
.nav a:not(.btn):hover { color: var(--link); }
.nav a[aria-current="page"]:not(.btn) { font-weight: 600; }
.nav-toggle {
  display: none; place-items: center; width: var(--size-button); height: var(--size-button);
  border: 0; border-radius: var(--radius-md); background: var(--surface); cursor: pointer;
}
.nav-toggle svg { width: var(--space-5); height: var(--space-5); }
.nav-toggle .close { display: none; }

@media (max-width: 767px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--space-1);
    padding: var(--space-4) var(--layout-margin) var(--space-6);
    background: var(--bg); box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav a:not(.btn) { padding: var(--space-3) 0; font-size: var(--fs-title); line-height: var(--lh-title); }
  .nav .btn { margin-top: var(--space-3); }
  .nav-open .nav { display: flex; }
  .nav-open .nav-toggle .open { display: none; }
  .nav-open .nav-toggle .close { display: block; }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-foot { position: relative; padding-block: var(--pad-section) var(--space-6); border-top: 1px solid var(--border); }
.site-foot > .wrap { display: flex; flex-direction: column; gap: var(--space-8); }
.foot-grid { display: grid; gap: var(--space-7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; gap: var(--layout-gutter); } }
.foot-brand { display: flex; flex-direction: column; gap: var(--space-4); }
.foot-col { display: flex; flex-direction: column; gap: var(--space-4); }
.foot-col h2 { font-size: var(--fs-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.foot-col a:hover { color: var(--link); }
.foot-col address { display: block; }
.social { display: flex; gap: var(--space-2); }
.social a { display: grid; place-items: center; width: var(--size-button-sm); height: var(--size-button-sm); border-radius: var(--radius-md); background: var(--surface); transition: background-color .15s ease; }
.social a:hover { background: var(--surface-2); color: var(--text); }
.social svg { width: var(--space-5); height: var(--space-5); }
.foot-base { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }

/* ── Home ─────────────────────────────────────────────────── */
.hero { padding-block: var(--space-7) var(--pad-section); }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; grid-template-columns: minmax(0, 1fr); }
.hero-copy { display: flex; flex-direction: column; gap: var(--gap-text-actions); }
.hero-copy .stack { --stack-gap: var(--gap-heading-body); }
/* The big hero logo sits on no container (no tray, no cards). --logo-w is its size per breakpoint, always well
   above the 120px navbar logo it docks into. Phones and tablets (< 1024px): one column, the logo first and
   centred at the top of the hero (160px, 200px from 600px); desktop: two columns, the logo bigger (320px, 400px
   from 1280px) and centred in the right column, vertically centred with the headline block. */
.hero-grid { --logo-w: calc(var(--space-10) + var(--space-6)); } /* 160px */
@media (min-width: 600px) {
  .hero-grid { --logo-w: calc(var(--space-10) + var(--space-8) + var(--space-2)); } /* 200px */
}
@media (max-width: 1023px) {
  .hero-logo-spot { order: -1; justify-self: center; }
}
@media (min-width: 1024px) {
  .hero { padding-block: var(--space-8) var(--pad-section); }
  .hero-grid { grid-template-columns: 7fr 5fr; gap: var(--layout-gutter); --logo-w: calc(var(--space-10) * 2 + var(--space-8)); } /* 320px */
  .hero-logo-spot { justify-self: center; }
}
@media (min-width: 1200px) {
  .hero-grid { grid-template-columns: 6fr 5fr; gap: var(--space-8); }
}
@media (min-width: 1280px) {
  .hero-grid { --logo-w: calc(var(--space-10) * 3 + var(--space-4)); } /* 400px */
}

/* The hero logo. js initLogoTravel() makes the .hero-logo box position: fixed (html.logo-travel) and moves it
   from this spot into the navbar slot over the first 320px of scroll; at the end (html.logo-docked) the navbar's
   own logo, the "Crisp home" link, takes over at the same rect. One logo at a time: on Home the slot's logo is
   hidden until then. No JS (html:not(.js)) or reduced motion: no hero logo, the navbar logo shows as on every
   other page. The --shadow-logo drop-shadow sits on a ::before copy of the same file under the <img>; JS fades
   that layer (--logo-k: 1 -> 0) as the logo docks, so the shadow goes without any shadow values of our own. */
.hero-logo-spot { position: relative; flex: none; width: var(--logo-w); aspect-ratio: 120 / 81; }
.hero-logo { position: absolute; inset: 0; pointer-events: none; }
.hero-logo::before {
  content: ""; position: absolute; inset: 0;
  background: url("/assets/logo/Crisp_Logo_FullColour.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(var(--shadow-logo)); opacity: var(--logo-k, 1);
}
.hero-logo img { position: relative; width: 100%; height: 100%; max-width: none; }
html.logo-travel .hero-logo {
  position: fixed; inset: auto; left: 0; top: 0; z-index: 60; /* width and height set by js */
  transform-origin: 0 0; will-change: transform;
}
html.logo-travel body.nav-open .hero-logo { z-index: 40; } /* the open mobile menu sits above a travelling logo */
html.logo-docked .hero-logo { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  body[data-page="home"] [data-logo-slot] img { visibility: hidden; }
}
html.logo-docked body[data-page="home"] [data-logo-slot] img { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .hero-logo-spot { display: none; }
}
html:not(.js) .hero-logo-spot { display: none; }
html:not(.js) body[data-page="home"] [data-logo-slot] img { visibility: visible; }


/* Selected work: category cards in one horizontally scrollable row (scroll-snap). The row bleeds into the page
   margin so the next card peeks to the screen edge (~78% of the viewport per card on phones, 320px from there on);
   it is a focusable region, so arrow keys scroll it, with padding so the cards' focus rings are never clipped.
   js initWorkRow() shows the Previous/Next circle buttons only when the row overflows. */
.work-row {
  display: flex; gap: var(--layout-gutter);
  margin-inline: calc(-1 * var(--layout-margin)); padding: var(--space-2) var(--layout-margin);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--layout-margin); scrollbar-width: thin;
}
.work-row:focus-visible { outline-offset: calc(-1 * var(--space-1)); }
.work-card {
  position: relative; flex: 0 0 min(78vw, calc(var(--space-10) * 2 + var(--space-8))); scroll-snap-align: start;
  justify-content: space-between; gap: var(--space-8); min-height: calc(var(--space-10) * 3);
}
.work-text { display: flex; flex-direction: column; gap: var(--space-2); }
.work-text h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.work-meta { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
.work-card > .card-go { top: var(--pad-card); right: var(--pad-card); }
/* The large flat icon, drawn in the recipe of the official assets/icons/Crisp_Icon_*.svg (56px grid, flat fills,
   rounded corners, brand colours only); each card sets its own palette (--wi-1 body, --wi-2 inner detail,
   --wi-3 accent) so it reads on that card's background. */
.work-icon { display: block; width: calc(var(--space-8) + var(--space-2)); height: calc(var(--space-8) + var(--space-2)); } /* 72px */
.work-icon svg { width: 100%; height: 100%; }
.work-icon .wi-1 { fill: var(--wi-1); }
.work-icon .wi-2 { fill: var(--wi-2); }
.work-icon .wi-3 { fill: var(--wi-3); }
.work-icon .wi-s1, .work-icon .wi-s3 { fill: none; stroke-width: 4; stroke-linecap: round; }
.work-icon .wi-s1 { stroke: var(--wi-1); }
.work-icon .wi-s3 { stroke: var(--wi-3); stroke-width: 5; }
/* User override of "cards are grey": the four Crisp brand colours, on .work-card only (tools/check.py
   check_card_colours). Text pairs: navy on Golden Bake 7.66:1, white on Crust Navy 15.87:1, navy on Flake
   10.67:1, white on Toasted Rust 4.67:1. Never white on orange. Hover keeps the colour (the icon and arrow move). */
.work-card--collaterals, a.work-card--collaterals:hover { background: var(--brand-orange); color: var(--navy); --wi-1: var(--navy); --wi-2: var(--orange); --wi-3: var(--bg); }
.work-card--product, a.work-card--product:hover { background: var(--navy); color: var(--bg); --wi-1: var(--orange); --wi-2: var(--navy); --wi-3: var(--cream); }
.work-card--presentations, a.work-card--presentations:hover { background: var(--cream); color: var(--navy); --wi-1: var(--navy); --wi-2: var(--orange); --wi-3: var(--burnt); }
.work-card--nda, a.work-card--nda:hover { background: var(--burnt); color: var(--bg); --wi-1: var(--bg); --wi-2: var(--navy); --wi-3: var(--cream); }
/* arrow circle: navy with a white arrow on the orange, cream and rust cards; orange with a navy arrow on navy */
.work-card .card-go { background: var(--navy); }
.work-card .card-go svg { color: var(--bg); }
.work-card--product .card-go { background: var(--orange); }
.work-card--product .card-go svg { color: var(--navy); }
.work-nav { display: flex; gap: var(--space-2); margin-inline-start: auto; }
.work-arrow {
  display: grid; place-items: center; width: var(--size-button); height: var(--size-button); padding: 0;
  border: 0; border-radius: var(--radius-full); background: var(--surface); color: var(--text); cursor: pointer;
  transition: background-color .15s ease;
}
.work-arrow:hover { background: var(--surface-2); }
.work-arrow svg { width: var(--space-5); height: var(--space-5); }
.work-arrow[disabled] { opacity: .4; cursor: default; }
.work-arrow[disabled]:hover { background: var(--surface); }

/* Cards that are links: on hover and keyboard focus the arrow circle (.card-go, navy arrow on orange) appears;
   on the work cards the icon tilts -10deg and grows 6%. Plain cards stay still, so they never look clickable.
   Movement only when motion is fine. */
.card-go {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1;
  display: grid; place-items: center; width: var(--size-button-sm); height: var(--size-button-sm);
  border-radius: var(--radius-full); background: var(--orange); color: var(--on-accent);
  opacity: 0; pointer-events: none;
}
.card-go svg { width: var(--space-5); height: var(--space-5); color: var(--on-accent); }
a:hover > .card-go, a:focus-visible > .card-go { opacity: 1; }
@media (hover: none) { .card-go { opacity: 1; } } /* touch: no hover, so the arrow always shows on links */
@media (prefers-reduced-motion: no-preference) {
  .work-icon svg { transition: transform .35s var(--ease); }
  a.work-card:hover .work-icon svg, a.work-card:focus-visible .work-icon svg { transform: rotate(-10deg) scale(1.06); }
  .card-go { transform: scale(.6) rotate(-45deg); transition: opacity .2s ease, transform .35s var(--ease); }
  a:hover > .card-go, a:focus-visible > .card-go { transform: none; }
  .work-row { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: no-preference) and (hover: none) { .card-go { transform: none; } }

/* Strip: the client logo ticker. It scrolls only with JS and motion allowed, and never pauses (no Pause/Play
   buttons, no hover pause). Otherwise (reduced motion, no JS) it is a static wrapped list and the loop copy is hidden. */

.brands { padding-block: var(--pad-section); }
.brands > .wrap { display: flex; flex-direction: column; gap: var(--space-6); }
.strip-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.ticker { overflow: hidden; }
.track { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-5) var(--space-7); }
.track .logo { flex: none; display: grid; place-items: center; height: var(--space-8); }
.track .logo img { width: auto; max-width: none; }
.track .logo[aria-hidden="true"] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html.js .ticker { /* an alpha mask that fades the logos out at the edges, not a colour gradient wash */
    -webkit-mask-image: linear-gradient(90deg, transparent, white var(--space-8), white calc(100% - var(--space-8)), transparent);
    mask-image: linear-gradient(90deg, transparent, white var(--space-8), white calc(100% - var(--space-8)), transparent);
  }
  html.js .track { flex-wrap: nowrap; gap: var(--space-9); width: max-content; animation: ticker-scroll 40s linear infinite; }
  html.js .track .logo[aria-hidden="true"] { display: grid; }
  @keyframes ticker-scroll { to { transform: translateX(calc(-50% - var(--space-9) / 2)); } }
}

/* What we do: narrow heading column left, bento right (from 1200px). Asymmetric from 1024px: Strategy tall on the
   left (icon top, text pinned to the bottom, so no dead block), Branding and Product small and compact (icon beside
   the title) on its right, Build wide along the bottom (icon, text, tags in a row). 600-1023: two columns, tall and
   wide full width with the icon beside the text. Phones: one column. Orange only in icons and the arrow. */
.wrap.do-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-section-head); }
.bento { display: grid; gap: var(--layout-gutter); grid-template-columns: minmax(0, 1fr); }
.bento-tile { position: relative; justify-content: flex-start; gap: var(--space-5); }
.bento-tile .tile-text { flex: 1; }
.bento-tile p { color: var(--text-muted); }
a.bento-tile:hover { background: var(--surface); } /* hover = icon tilt + arrow; the --surface-2 icon chip stays visible */
.bento-tile > .card-go { top: var(--pad-card); right: var(--pad-card); }
.bento-tile .tags { padding-top: var(--space-2); }
@media (min-width: 600px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-tile { flex-direction: row; align-items: flex-start; }
  .bento-tile--tall, .bento-tile--wide { grid-column: 1 / -1; align-items: center; }
  .bento-tile > .tile-text { padding-right: var(--space-6); }
  .bento-tile--small { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-5); row-gap: var(--gap-heading-body-sm); align-content: start; align-items: center; } /* icon beside the title, line and tags full width below */
  .bento-tile--small > .tile-text { display: contents; }
  .bento-tile--small .icon-chip { width: var(--space-8); height: var(--space-8); }
  .bento-tile--small .icon-chip img { width: var(--space-7); height: var(--space-7); }
  .bento-tile--small h3 { grid-column: 2; padding-right: var(--space-7); }
  .bento-tile--small p, .bento-tile--small .tags { grid-column: 1 / -1; }
  .bento-tile--small p { margin-top: var(--space-2); }
}
@media (min-width: 1024px) {
  .bento-tile--tall { grid-column: 1; grid-row: 1 / span 2; flex-direction: column; align-items: stretch; justify-content: space-between; padding: var(--pad-card-featured); }
  .bento-tile--tall > .card-go { top: var(--pad-card-featured); right: var(--pad-card-featured); }
  .bento-tile--tall > .tile-text { flex: none; padding-right: 0; }
  .bento-tile--tall .icon-chip { width: calc(var(--space-9) + var(--space-7)); height: calc(var(--space-9) + var(--space-7)); }
  .bento-tile--tall .icon-chip img { width: calc(var(--space-9) + var(--space-3)); height: calc(var(--space-9) + var(--space-3)); }
  .bento-tile--tall h3 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
  .bento-tile--tall > .tile-text { gap: var(--space-4); }
  .bento-tile--tall p { font-size: var(--fs-lead); line-height: var(--lh-lead); }
  .bento-tile--tall .tags { flex-direction: column; align-items: flex-start; gap: var(--space-3); padding-top: var(--space-3); }
  .bento-tile--small { grid-column: 2; }
  .bento-tile--wide .tile-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-7); align-items: center; padding-right: var(--space-7); }
  .bento-tile--wide .tile-text > :not(.tags) { grid-column: 1; }
  .bento-tile--wide .tags { grid-column: 2; grid-row: 1 / span 2; padding-top: 0; justify-content: flex-end; }
}
@media (min-width: 1200px) {
  .wrap.do-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; gap: var(--gap-text-actions) var(--layout-gutter); }
  .do-head { grid-column: 1 / span 4; }
  .do-foot { grid-column: 1 / span 4; grid-row: 2; align-self: start; }
  .bento { grid-column: 5 / span 8; grid-row: 1 / span 2; }
}

/* Why Crisp: heading in a narrow column, the "isn't enough" line beside it, then one very large statement.
   With motion (js .is-cycling) the job word swaps in place under "Everything we make has a job, to"; the
   original sentence stays for screen readers (.why-static, visually hidden). No JS or reduced motion: the
   full original sentence shows at Display size and nothing moves. */
.wrap.why-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
.why-not { font-weight: 400; max-width: var(--layout-measure); }
.why-statement { display: flex; flex-direction: column; gap: var(--space-6); max-width: none; padding-top: var(--space-6); }
.why-big {
  display: block; font-weight: 600; text-wrap: balance;
  font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-display);
}
.why-big .why-static { white-space: normal; }
.why-crunch { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); font-weight: 600; color: var(--text-muted); }
.why-js, .why-roll { display: none; }
.why-statement.is-cycling .why-big { font-size: var(--fs-display-xl); line-height: var(--lh-display-xl); letter-spacing: var(--ls-display-xl); }
.why-statement.is-cycling .why-js { display: inline; }
.why-statement.is-cycling .why-static {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.why-statement.is-cycling .why-roll { display: block; position: relative; }
.why-statement.is-cycling .cycle { display: grid; }
.cycle > span { grid-area: 1 / 1; text-wrap: balance; opacity: 0; transform: translateY(.3em); }
.cycle > span.on { opacity: 1; transform: none; }
.cycle > span.out { opacity: 0; transform: translateY(-.3em); }
/* User override (Home pass item 5): the job words in Golden Bake, the brand yellow (2.07:1 on white: below 4.5:1,
   user-chosen, Display XL only; the words are aria-hidden and the readable sentence stays navy). The period
   (.why-dot) stays navy and still: js places it right after the last letter of the word shown. */
.why-statement .cycle > span { color: var(--brand-orange); }
.why-dot { position: absolute; left: 0; top: 0; color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .cycle > span { transition: opacity .5s ease, transform .7s var(--ease); }
}
@media (min-width: 1024px) {
  .wrap.why-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-7) var(--layout-gutter); align-items: end; }
  .why-head { grid-column: 1 / span 5; }
  .why-not { grid-column: 7 / span 6; }
  .why-statement { grid-column: 1 / -1; }
}

.post-grid { display: grid; gap: var(--layout-gutter); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post {
  display: flex; flex-direction: column; gap: var(--gap-card-stack);
  padding: var(--pad-card); border-radius: var(--radius-xl); background: var(--surface);
  min-width: 0; overflow-wrap: anywhere; transition: background-color .15s ease;
}
.post:hover { background: var(--surface-2); }
.post time { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.post h3 { font-size: var(--fs-title); line-height: var(--lh-title); }
.post p { color: var(--text-muted); }

.closer { padding-block: var(--pad-section) var(--pad-section-lg); }
.closer-card {
  display: grid; gap: var(--space-6); align-items: center; grid-template-columns: minmax(0, 1fr);
  padding: var(--pad-card); border-radius: var(--radius-2xl); background: var(--surface);
}
.closer-copy { display: flex; flex-direction: column; gap: var(--gap-text-actions); }
.closer-copy .stack { --stack-gap: var(--gap-heading-body); }
.closer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); }
@media (min-width: 600px) { .closer-card { padding: var(--pad-card-featured); } }
@media (min-width: 1200px) {
  .closer-card { padding: var(--space-9); }
}

/* ── Services ─────────────────────────────────────────────── */
.page-hero { max-width: calc(var(--layout-measure) + var(--space-10)); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bullets--lg { font-size: var(--fs-title); line-height: var(--lh-title); }
.bullets--lg li::before { margin-top: var(--space-1); }

.svc-layout { --seg-pad: var(--space-6); display: grid; grid-template-columns: minmax(0, 1fr); } /* space between Services segments: --seg-pad above and below each */
@media (min-width: 1024px) { .svc-layout { --seg-pad: var(--space-7); } }
.svc-main { display: flex; flex-direction: column; min-width: 0; }
.svc {
  display: flex; flex-direction: column; gap: var(--space-7);
  padding-block: var(--seg-pad); border-top: 1px solid var(--border);
  /* html scroll-padding-top already clears the sticky header; pull the section up a little
     so its own top padding, not padding + header offset, is the gap above the label */
  scroll-margin-top: calc(-1 * var(--space-6));
}
.svc-main > .svc:last-child { padding-bottom: 0; } /* the sticky index stops level with the table's bottom edge */
.svc-layout + .closer { margin-top: var(--pad-section); } /* the spacing that used to sit inside the container */
.svc-head { display: flex; flex-direction: column; gap: var(--gap-heading-body); }
.svc-head .label { margin-bottom: calc(var(--gap-label-heading) - var(--gap-heading-body)); }
.svc-block { display: flex; flex-direction: column; gap: var(--space-4); }
.svc-card { gap: var(--space-4); }
.svc-card p { color: var(--text); }
.svc-card .tags { list-style: none; padding-top: var(--space-2); }
.fit-note { gap: var(--space-3); }

.cap-table thead th:first-child, .cap-table tbody th { width: 34%; }
.stage-table .stage-num { width: var(--space-7); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.stage-table tbody th { width: 28%; }
@media (max-width: 599px) {
  .table-wrap { padding-inline: var(--space-4); }
  .cap-table thead { display: none; }
  .cap-table tr, .stage-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); padding-block: var(--space-4); border-bottom: 1px solid var(--surface-3); }
  .stage-table tr { grid-template-columns: var(--space-7) minmax(0, 1fr); }
  .stage-table td:last-child { grid-column: 2; }
  .cap-table tr:last-child, .stage-table tr:last-child { border-bottom: 0; }
  .cap-table th, .cap-table td, .stage-table th, .stage-table td { width: auto; padding: 0; border: 0; }
}

/* Index: horizontal chip row under 1024px, sticky column from 1024px */
.svc-index { margin-inline: calc(-1 * var(--layout-margin)); padding-bottom: var(--space-5); }
.svc-index ul {
  list-style: none; display: flex; gap: var(--space-2);
  overflow-x: auto; padding: var(--space-2) var(--layout-margin); scrollbar-width: none; /* room for the focus ring */
  scroll-padding-inline: var(--layout-margin); /* a chip scrolled into view keeps the margin, so its ring shows */
}
.svc-index ul::-webkit-scrollbar { display: none; }
.svc-index a {
  display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap;
  min-height: var(--size-button-sm); padding: 0 var(--pad-button-sm-x);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-outline);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600;
  transition: box-shadow .15s ease, color .15s ease;
}
.svc-index a:hover { box-shadow: var(--shadow-outline-hover); }
.svc-num { color: var(--text-muted); font-weight: 400; font-variant-numeric: tabular-nums; }

@media (min-width: 1024px) {
  .svc-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--layout-gutter); align-items: start; }
  .svc-index {
    grid-column: 1 / span 3; margin: var(--seg-pad) 0 0; padding: 0;
    position: sticky; top: calc(var(--nav-h) + var(--seg-pad) - var(--space-6)); /* lines up with a section label after an anchor jump */
  }
  .svc-index ul { flex-direction: column; gap: var(--space-1); overflow: visible; padding: 0; }
  .svc-index a {
    display: flex; gap: var(--space-3); min-height: 0; padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md); box-shadow: none; white-space: normal;
    font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 400; color: var(--text-muted);
  }
  .svc-index a:hover { box-shadow: none; color: var(--text); background: var(--surface); }
  .svc-index a[aria-current="true"] { color: var(--text); font-weight: 600; background: var(--surface); }
  .svc-index a[aria-current="true"] .svc-num { color: var(--text); }
  .svc-main { grid-column: 4 / span 9; }
  .svc:first-child { border-top: 0; }
}
@media (min-width: 1200px) {
  .svc-main { grid-column: 5 / span 8; }
}

/* ── Work ─────────────────────────────────────────────────── */
.work-index { padding-block: 0; } /* the closing block below brings its own top padding */
/* Rows of project cards on the normal page scroll: 1 per row on phones, 2 from 600px (two projects fill a row
   instead of leaving a dead third column; more cards just wrap into new rows). Every cover frame has the same
   4:3 shape so rows line up; covers fill it, the wide deck cover sits whole on the grey. */
.work-tiles { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--layout-gutter); }
@media (min-width: 600px) { .work-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .work-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.work-tile {
  position: relative; display: flex; flex-direction: column; gap: var(--gap-media-text); height: 100%;
  padding: var(--pad-card); border-radius: var(--radius-xl); background: var(--brand-orange);
  color: var(--navy); text-decoration: none;
}
/* the card is the colour; cover art and title sit straight on it (no inner frame). Colours match each cover's own ground. */
.work-tiles > li:nth-child(3n+2) .work-tile { background: var(--cream); }
.work-tiles > li:nth-child(3n+3) .work-tile { background: var(--navy); color: var(--bg); }
.work-tile > .card-go { top: calc(var(--pad-card) + var(--space-3)); right: calc(var(--pad-card) + var(--space-3)); }
.work-cover {
  display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden;
}
.work-cover img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.work-tile-title { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The Pandora's Box: lock panel inside the closing card */
.vault {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-5);
  padding: var(--space-7) var(--space-6); border-radius: var(--radius-xl); background: var(--surface-2);
}
.vault svg { width: var(--space-8); height: var(--space-8); color: var(--orange); }
.vault .tags { justify-content: center; }
@media (min-width: 1024px) {
  .vault { width: calc(var(--space-10) * 2 + var(--space-8)); aspect-ratio: 1 / 1; }
  .vault svg { width: var(--space-9); height: var(--space-9); }
}

/* ── About ────────────────────────────────────────────────── */
.believe-head h2 { max-width: 24ch; }
.believe { display: flex; flex-direction: column; gap: var(--space-7); }
.notdone { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.notdone li {
  display: grid; grid-template-columns: var(--space-5) minmax(0, 1fr); gap: var(--space-4); align-items: start;
  padding: var(--pad-card); border-radius: var(--radius-xl); background: var(--surface);
  font-size: var(--fs-h3); line-height: var(--lh-h3); overflow-wrap: anywhere;
}
.notdone svg { width: var(--space-5); height: var(--space-5); margin-top: var(--space-1); color: var(--orange); }
.notdone p { max-width: none; text-wrap: pretty; }

.split { display: grid; gap: var(--space-7); grid-template-columns: minmax(0, 1fr); }
.split-body { display: flex; flex-direction: column; gap: var(--gap-text-actions); }
@media (min-width: 1200px) {
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--layout-gutter); align-items: start; }
  .split-head { grid-column: 1 / span 6; }
  .split-body { grid-column: 7 / span 6; padding-top: var(--space-6); }
}
.fit-check { gap: var(--space-4); }
.fit-check p { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-title); line-height: var(--lh-title); }
.fit-check svg { flex: none; width: var(--space-5); height: var(--space-5); }
.fit-no { color: var(--text-muted); }
.fit-no svg { color: var(--text-muted); }
.fit-yes { font-weight: 600; }
.fit-yes svg { color: var(--orange); }

/* ── Blog ─────────────────────────────────────────────────── */
.blog-index { padding-block: 0 var(--pad-section-lg); }
.blog-empty { align-items: flex-start; gap: var(--space-5); }
.blog-empty-copy { display: flex; flex-direction: column; gap: var(--gap-heading-body-sm); }
@media (min-width: 600px) { .blog-empty { padding: var(--pad-card-featured); } }
@media (min-width: 1024px) {
  .blog-empty { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-6); }
}

/* ── Contact ──────────────────────────────────────────────── */
.contact { padding-block: var(--peek-h) var(--pad-section-lg); } /* room for the cats on the card's top edge */
.contact-intro { --stack-gap: var(--gap-heading-body); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.contact-main { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--layout-gutter); }
  .contact-main { grid-column: 1 / span 8; }
}
@media (min-width: 1200px) { .contact-main { grid-column: 1 / span 7; } }

.form-card { padding: var(--pad-card); }
@media (min-width: 600px) { .form-card { padding: var(--pad-card-featured); } }
#contact-form { display: flex; flex-direction: column; gap: var(--space-5); }
.req { color: var(--text-muted); font-weight: 400; }
.field > legend { margin-bottom: var(--space-2); }

/* Errors sit on the grey card, where burnt text fails 4.5:1: navy text with an orange marker */
.form-card .err { display: flex; gap: var(--space-2); align-items: center; color: var(--text); font-weight: 600; }
.form-card .err::before {
  content: ""; flex: none; width: var(--space-4); height: var(--space-4);
  background: var(--burnt);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm-1 4v5h2V4zm0 6.5v2h2v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm-1 4v5h2V4zm0 6.5v2h2v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.form-card .err[hidden] { display: none; }

/* "What do you need?" options: real checkboxes, drawn as chips */
.checks { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.check { position: relative; display: inline-flex; }
.check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.check span {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--size-button-sm); padding: 0 var(--pad-button-sm-x);
  border-radius: var(--radius-sm); background: var(--bg); box-shadow: var(--shadow-outline);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.check:hover span { box-shadow: var(--shadow-outline-hover); }
.check input:checked + span { background: var(--orange); color: var(--on-accent); box-shadow: none; }
.check input:checked + span::before {
  content: ""; width: var(--space-4); height: var(--space-4); background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3 3L13 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3 3L13 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.check input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: var(--space-1); }

.hp { position: absolute; left: -100vw; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding-top: var(--space-2); }
.form-note { flex-basis: 100%; }
.form-done { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.form-done:focus { outline: none; }
.contact-direct { color: var(--text-muted); }

/* ── 404 ──────────────────────────────────────────────────── */
.lost { padding-block: var(--space-7) var(--pad-section-lg); }
.lost-art {
  display: grid; place-items: center; aspect-ratio: 4 / 3;
  padding: var(--space-7); border-radius: var(--radius-2xl); background: var(--surface);
}
@media (min-width: 1024px) {
  .lost { padding-top: var(--space-8); }
  .lost-art { aspect-ratio: 1 / 1; }
}

/* ── Idli and Samosa ──────────────────────────────────────── */
/* The official "Cat poses" (assets/cat-poses) and the two round avatars (assets/cats), all pinned in
   tools/assets.sha256: never recoloured, never mirrored (Samosa's clipped ear stays on the viewer's right).
   Small moments only: never in a .hero, on Work or beside client work. Always decorative: alt="" on the img,
   aria-hidden on its wrapper, never focusable. The poses are flat tracings, so motion is whole-figure only.
   Pose images carry style="--vbw:<viewBox width>"; a moment sets --k (px per art unit), so every cat in that
   moment shares one scale: width = --vbw x --k, height follows the width/height attributes. */
.cat { display: block; flex: none; height: auto; -webkit-tap-highlight-color: transparent; }
.cat[style*="--vbw"] { width: calc(var(--vbw) * var(--k, .2) * 1px); max-width: 100%; }
.cat--96 { width: var(--space-9); height: var(--space-9); border-radius: var(--radius-full); }
.cat--48 { width: var(--space-7); height: var(--space-7); border-radius: var(--radius-full); }
.cat--idli { transform-origin: 50% 100%; }

/* Contact: Samosa standing and Idli peeking, both on the form card's top edge (bottoms on the edge) */
.has-peek { position: relative; }
.contact { --k: .21; --peek-h: calc(var(--k) * 776px); } /* 776: the tallest pose here (Samosa_06) */
.cat-peek {
  position: absolute; bottom: 100%; right: var(--space-5);
  display: flex; align-items: flex-end; gap: var(--space-2);
}
.cat-duo { --k: .2; display: flex; align-items: flex-end; gap: var(--space-4); }
@media (min-width: 1024px) {
  .contact { --k: .245; } /* Samosa_06 stays ~190px tall (776 x .245) */
  .cat-peek { right: var(--space-9); }
  .cat-peek .cat--idli { --k: .42; } /* Idli_04 is a head-and-paws crop: ~170px wide so the pair reads; still under Samosa's height */
  .cat-duo { --k: .24; }
}

/* 404: one scale for the pair; each takes its share of the row by art width (flex-grow = --vbw) */
.cat-pair { --k: .3; display: flex; align-items: flex-end; justify-content: center; gap: var(--space-4); width: 100%; }
.lost-art { grid-template-columns: minmax(0, 1fr); } /* lets the pair shrink to the block, never past it */
.cat-pair .cat { flex: var(--vbw) 1 0; min-width: 0; max-width: calc(var(--vbw) * var(--k) * 1px); }

/* Home closing: Idli in her basket, the one cat here, hangs from the card's top edge right beside the text (phones:
   centred above it). The scene is in the grid, so the card grows to fit; a negative top margin of the card padding
   puts the rope's top (the art runs to its top edge) on the card edge. Sizes:
   ~190px phones, ~240px tablets, ~320px desktop, ~335px from 1200px. */
.has-scene { position: relative; }
.closer-scene { --k: .134; order: -1; justify-self: center; align-self: start; margin-top: calc(-1 * var(--pad-card)); }
.scene-hammock { transform-origin: 48% 0; } /* the rope's top (x 941-987 of the 276-1698 viewBox), so it swings from where it hangs */
@media (min-width: 600px) {
  .closer-card.has-scene { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); }
  .closer-scene { --k: .169; order: 1; justify-self: end; margin-top: calc(-1 * var(--pad-card-featured)); }
}
@media (min-width: 600px) and (max-width: 1023px) { /* beside the hammock the headline steps down one size (Display -> H1), so it never ends on a lone word */
  .closer-card.has-scene .t-display { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
}
@media (min-width: 1024px) { /* the copy column hugs the headline, so the pair sits together, centred in the card */
  .closer-card.has-scene { grid-template-columns: minmax(0, max-content) auto; justify-content: center; gap: var(--space-7); }
  .closer-card.has-scene .closer-copy { max-width: calc(var(--space-10) * 3 + var(--space-9)); }
  .closer-scene { --k: .225; }
}
@media (min-width: 1200px) {
  .closer-scene { --k: .236; margin-top: calc(-1 * var(--space-9)); }
}

/* Services closing: Samosa with his ball stands on the card's top edge (art 1883x938, so the card clears 938 x --k above it) */
.closer-card--top { --k: .1; position: relative; margin-top: calc(938 * var(--k) * 1px); }
.closer-cat { position: absolute; bottom: 100%; left: var(--space-6); }
@media (min-width: 600px) { .closer-card--top { --k: .127; } .closer-cat { left: var(--space-7); } }
@media (min-width: 1024px) { .closer-card--top { --k: .16; } .closer-cat { left: var(--space-8); } }
/* Work closing: the sitting Samosa (art 1255x1524) sits inside the box, bottom-right, paws on the card's bottom edge, unflipped */
.closer-card--sits { --k: .115; }
.closer-card--sits .closer-sit { justify-self: end; align-self: end; margin-bottom: calc(-1 * var(--pad-card)); }
@media (min-width: 600px) {
  .closer-card--sits { --k: .15; grid-template-columns: minmax(0, 1fr) auto; }
  .closer-card--sits .closer-sit { margin-bottom: calc(-1 * var(--pad-card-featured)); }
}
@media (min-width: 1024px) { .closer-card--sits { --k: .22; } }

/* Blog empty state: Idli asleep */
.blog-cat { --k: .088; display: block; } /* idli-confused 1693x1581: ~149px wide x 139px tall on phones */
@media (min-width: 1024px) { .blog-cat { --k: .11; } } /* ~186 x 174px */

/* Motion, only when motion is fine: Idli breathes very slowly; the Home hammock sways constantly and subtly
   (2.75deg each way about the cords' top with a 2px bob, 5.5s); Samosa tilts on hover/tap (springy); avatars tilt
   on hover and squash on tap. Nothing loops fast. */
@media (prefers-reduced-motion: no-preference) {
  .cat--idli { animation: cat-breathe 4s ease-in-out infinite; }
  .cat--samosa { transition: rotate .25s var(--ease); transform-origin: 50% 100%; }
  .cat--samosa:hover { rotate: -4deg; }
  .cat--samosa:active { rotate: 4deg; }
  .scene-hammock { animation: cat-sway 5.5s ease-in-out infinite alternate; }
  .cat--96, .cat--48 { transition: transform .35s var(--ease); }
  .cat--96:hover, .cat--48:hover { transform: rotate(-8deg); }
  .cat--96:active, .cat--48:active { transform: scale(1.06, .9); transition-duration: .12s; }
  @keyframes cat-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }
  @keyframes cat-sway { from { transform: rotate(-2.75deg); } to { transform: rotate(2.75deg) translateY(2px); } }
}

/* ── Work case page: sticky text on the left, the work stacked on the right (from 1024px) ── */
.case-page { padding-block: var(--space-7) var(--pad-section); }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
.case-text { display: flex; flex-direction: column; gap: var(--space-6); }
.case-text p { max-width: 65ch; }
.case-back, .case-next { color: var(--link-ink, var(--navy)); text-decoration: underline; text-underline-offset: .2em; }
.case-back { align-self: flex-start; }
.case-next { display: flex; flex-direction: column; gap: var(--space-1); align-self: flex-start; text-decoration: none; }
.case-next .label { color: var(--text-muted); }
.case-next-title { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.case-media { display: flex; flex-direction: column; gap: var(--layout-gutter); min-width: 0; }
.case-shot { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface-2); }
.case-shot img, .case-shot video { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
.case-shot--tall img, .case-shot--tall video { width: min(100%, calc(var(--space-10) * 3)); }
@media (min-width: 1024px) {
  .case-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-9); align-items: start; }
  .case-text {
    position: sticky; top: calc(var(--nav-h) + var(--space-6)); align-self: start;
    max-height: calc(100vh - var(--nav-h) - var(--space-6) * 2); overflow-y: auto;
  }
  .case-next { margin-top: auto; }
  /* a short media column (one figure) stays beside the sticky text instead of leaving a gap */
  .case-media { position: sticky; top: calc(var(--nav-h) + var(--space-6)); }
}

/* Confirmation after "Let's chat" copies the address */
.toast {
  position: fixed; left: 50%; bottom: var(--space-6); z-index: 50; transform: translate(-50%, var(--space-4));
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); background: var(--bg); color: var(--navy);
  box-shadow: var(--shadow-lg); font-weight: 600; opacity: 0; pointer-events: none; max-width: calc(100% - 2 * var(--space-5));
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: no-preference) { .toast { transition: opacity .25s var(--ease), transform .25s var(--ease); } }
