/* Mathey Reel. Colors come only from tokens.json (dark) and tokens.light.json (light).
   The theme preview bar is host-owned: its height is only ever READ here, through
   --tovu-theme-preview-height, to keep the header and the pinned reel clear of it. */

@font-face { font-family: 'Big Shoulders Display'; src: url("../assets/fonts/big-shoulders-display-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url("../assets/fonts/instrument-sans-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url("../assets/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --bar: var(--tovu-theme-preview-height, 0px);
  --header-h: 68px;
  --gutter: clamp(20px, 3.4vw, 56px);
  --stage-h: calc(100vh - var(--bar));
  --reel-step: 62vh;
  --ease-open: cubic-bezier(.77, 0, .18, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --radius: 14px;
  color-scheme: dark;
}
@supports (height: 100svh) {
  :root { --stage-h: calc(100svh - var(--bar)); --reel-step: 62svh; }
}
:root[data-theme="light"] { color-scheme: light; }
/* kUInetic's own cloak CSS arrives with its footer script, after first paint, so the rule that
   matters lives here in <head>. It releases after 2s if the script fails, and never applies with
   JS off or under reduced motion. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  html[data-kui-cloak] :is([data-kui~=fade-up], [data-kui~="fade-up,"], .contact-page > .page-title, .contact-page > .lede):not([data-kui-state]) { opacity: 0; animation: kui-cloak-release 1ms linear 2s forwards; }
}
@keyframes kui-cloak-release { to { opacity: 1; } }
/* The bar's height is measured by the host at the end of the page; until then its own fallback applies. */
html:has(.tovu-theme-preview-host) { --bar: var(--tovu-theme-preview-height, 44px); }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(reel-photo) { animation-duration: .7s; animation-timing-function: var(--ease-open); }
::view-transition-old(reel-photo), ::view-transition-new(reel-photo) { height: 100%; object-fit: cover; overflow: hidden; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link, .skip-reel {
  position: fixed; left: 12px; top: calc(var(--bar) + 8px); z-index: 60;
  padding: 10px 16px; border-radius: 999px;
  background: var(--fg); color: var(--bg); font-size: .875rem; text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus, .skip-reel:focus { transform: none; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: var(--bar); left: 0; right: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); padding: 0 var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-mark, .brand-mark figure { display: block; width: 34px; height: 34px; }
.brand-mark img { width: 34px; height: 34px; object-fit: contain; }
:root:not([data-theme="light"]) .brand-mark img, .site-header.over-photo .brand-mark img { filter: invert(1); }
/* Over a photo the header is white type on a short dark gradient in both modes; elsewhere a page surface. */
.site-header { transition: background-color .2s ease, border-color .2s ease; }
.site-header.over-photo {
  color: var(--on-photo); border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(180deg,
    rgba(var(--scrim-rgb), var(--scrim-text)) 0,
    rgba(var(--scrim-rgb), var(--scrim-text)) 64%,
    rgba(var(--scrim-rgb), 0) 100%);
  background-clip: padding-box;
}
.site-header.over-photo .theme-toggle, .site-header.over-photo .nav-toggle { border-color: var(--on-photo-line); }
.site-header.over-photo .theme-toggle:hover, .site-header.over-photo .nav-toggle:hover { background: rgba(var(--scrim-rgb), .5); }
.site-header .menu-list .menu-list, .site-header .mnav { color: var(--fg); }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.main-nav { display: flex; gap: 24px; margin-left: auto; font-size: .9rem; }
.main-nav a, .main-nav .menu-item-label { text-decoration: none; }
.main-nav > .menu-list { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-nav .menu-item { position: relative; list-style: none; }
.main-nav .menu-item > a, .main-nav .menu-item > .menu-item-label {
  display: inline-block; padding: 8px 0; cursor: pointer; white-space: nowrap;
  background: linear-gradient(var(--accent), var(--accent)) left 100% / 0 1.5px no-repeat;
  transition: background-size .22s var(--ease-out);
}
.main-nav .menu-item > a:hover, .main-nav .menu-item > a[aria-current="page"],
.main-nav .menu-item:focus-within > a { background-size: 100% 1.5px; }
.main-nav .menu-list .menu-list {
  position: absolute; top: 100%; left: -16px; min-width: 210px; margin: 0; padding: 8px;
  list-style: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--card-shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.main-nav .menu-item:hover > .menu-list,
.main-nav .menu-item:focus-within > .menu-list { opacity: 1; visibility: visible; transform: none; }
.main-nav .menu-list .menu-list a { display: block; padding: 7px 10px; border-radius: 8px; background: none; }
.main-nav .menu-list .menu-list a:hover { background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.theme-toggle, .nav-toggle, .mnav-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--border);
  border-radius: 50%; cursor: pointer; transition: border-color .18s ease, background-color .18s ease;
}
.theme-toggle:hover, .nav-toggle:hover, .mnav-close:hover { border-color: var(--border-strong); background: var(--surface-2); }
.theme-toggle svg { width: 19px; height: 19px; }
:root[data-theme="light"] .icon-sun, :root:not([data-theme="light"]) .icon-moon { display: none; }
.nav-toggle { display: none; }
.site-header.nav-compact .main-nav { display: none; }
.site-header.nav-compact .nav-toggle { display: inline-flex; }
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
html.mnav-open, html.mnav-open body { overflow: hidden; }
.mnav {
  position: fixed; inset: 0 0 0 auto; width: min(420px, 100%); height: 100%; max-height: none;
  margin: 0 0 0 auto; padding: 0; border: 0; background: var(--bg); color: var(--fg);
}
.mnav::backdrop { background: rgba(0, 0, 0, .5); }
.mnav-panel { display: flex; flex-direction: column; height: 100%; }
.mnav-head { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--bar) + 12px) 20px 12px; border-bottom: 1px solid var(--border); }
.mnav-title { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; }
.mnav-body { flex: 1; overflow-y: auto; padding: 12px 20px 32px; }
.mnav-list { list-style: none; margin: 0; padding: 0; }
.mnav-list .mnav-list { padding: 0 0 10px 14px; }
.mnav-list[hidden] { display: none; }
.mnav-row { display: flex; align-items: center; gap: 4px; }
.mnav-link, .mnav-disclose-label {
  flex: 1; display: flex; align-items: center; justify-content: space-between; min-height: 48px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; letter-spacing: .02em;
  text-transform: uppercase; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
}
.mnav-list .mnav-list .mnav-link { font-size: 1.25rem; min-height: 44px; }
.mnav-link[aria-current="page"] { color: var(--accent-text); }
.mnav-disclose { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: none; border: 0; cursor: pointer; }
.mnav-disclose svg { width: 18px; height: 18px; flex: none; transition: transform .18s ease; }
.mnav-disclose[aria-expanded="true"] svg { transform: rotate(180deg); }

/* One template, two faces: html.is-home (set before first paint) picks landing or article. */
html.js:not(.is-home) .landing { display: none; }
html.js.is-home .page-article, html.js.is-home .next { display: none; }

/* ---------- reel: JS off, or before enhancement fails = a plain list ---------- */
.reel { padding: calc(var(--header-h) + 32px) var(--gutter) 48px; }
.page-article + .next + .landing .reel, .page-article + .landing .reel { padding-top: 32px; }
html.js.is-home .reel { padding: 0; }
/* JS off on the Home page: its body is another layout's markup, so visitors get the plain list. */
html:not(.js) .page-article:has(.orbit-hero, [data-scene]) { display: none; }
html:not(.js) main:has(.orbit-hero, [data-scene]) .reel { padding-top: calc(var(--header-h) + 32px); }
.reel-slides {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.slide-link { display: block; text-decoration: none; position: relative; }
.slide-photo { aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.slide-photo img { width: 100%; height: 100%; object-fit: cover; }
.slide-eyebrow { display: block; margin-top: 12px; font-family: var(--font-serif); font-style: italic; color: var(--muted); }
.slide-title {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.75rem;
  line-height: 1.05; text-transform: uppercase; letter-spacing: .01em;
}
.reel-bg, .reel-scrim, .reel-copy, .reel-controls, .skip-reel { display: none; }
.skip-reel { position: fixed; }

/* ---------- reel: enhanced ---------- */
html.js .reel { padding: 0; height: calc(var(--stage-h) + var(--reel-steps, 10) * var(--reel-step)); }
html.js .reel-pin {
  position: sticky; top: var(--bar); height: var(--stage-h); overflow: clip;
  isolation: isolate; touch-action: pan-y; background: var(--surface-2);
}
html.js .reel-bg, html.js .reel-scrim { display: block; position: absolute; inset: 0; }
html.js .skip-reel { display: block; }
.reel-bg { z-index: 0; view-transition-name: reel-photo; }
.reel-bg img, .reel-open img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.next-card img { object-position: var(--focus, 50% 50%); }
/* One on-photo treatment in both modes: white type on a dark scrim that is only as wide and as tall
   as the text in front of it. --scrim-w and --scrim-h are measured from the copy by reel.js. The rest of
   the photo is left exactly as she shot it. ::after is the same idea for the controls along the bottom. */
.reel-scrim::before, .reel-open-scrim::before, .reel-scrim::after, .reel-open-scrim::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
}
.reel-scrim::before, .reel-open-scrim::before {
  background: linear-gradient(90deg,
    rgba(var(--scrim-rgb), var(--scrim-text)) var(--scrim-w, 44vw),
    rgba(var(--scrim-rgb), 0) calc(var(--scrim-w, 44vw) + 16vw));
  -webkit-mask-image: linear-gradient(0deg, #000 var(--scrim-h, 48vh), transparent calc(var(--scrim-h, 48vh) + 12vh));
  mask-image: linear-gradient(0deg, #000 var(--scrim-h, 48vh), transparent calc(var(--scrim-h, 48vh) + 12vh));
}
.reel-scrim::after, .reel-open-scrim::after {
  top: auto; height: 148px;
  background: linear-gradient(0deg,
    rgba(var(--scrim-rgb), var(--scrim-text)) 0,
    rgba(var(--scrim-rgb), var(--scrim-text)) 92px,
    rgba(var(--scrim-rgb), 0) 148px);
}
.reel-scrim { z-index: 1; }
.reel-open { position: absolute; inset: 0; z-index: 2; overflow: hidden; will-change: clip-path; }
.reel-open-scrim { position: absolute; inset: 0; }

html.js .reel:not(.reel--on) .reel-copy, html.js .reel:not(.reel--on) .reel-controls { visibility: hidden; }
html.js .reel-copy {
  display: flex; flex-direction: column; align-items: flex-start; position: absolute; z-index: 5;
  left: var(--gutter); bottom: clamp(28px, 6vh, 64px); width: min(46vw, 760px);
  container-type: inline-size; color: var(--on-photo);
}
.reel-eyebrow {
  margin: 0 0 12px; padding-top: 12px; min-height: 2.2em; position: relative;
  font-family: var(--font-serif); font-style: italic; font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.2;
}
.reel-eyebrow::before { content: ''; position: absolute; top: 0; left: 0; width: 44px; height: 2px; background: var(--accent); }
.reel-title {
  margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: min(clamp(3.25rem, 19cqi, 10.5rem), 24vh); line-height: .9; letter-spacing: -.005em;
  text-wrap: balance; overflow-wrap: anywhere; width: 100%;
}
.reel-title > span { display: block; }
.reel-para { margin: 18px 0 0; max-width: 46ch; font-size: 1rem; line-height: 1.5; color: var(--on-photo); }
.reel-para[hidden] { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 22px; padding: 0 24px;
  border: 1.5px solid var(--on-photo-line); border-radius: 999px; text-decoration: none;
  color: var(--on-photo); font-weight: 600; font-size: .95rem;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.pill:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pill svg { transition: transform .2s var(--ease-out); }
.pill:hover svg { transform: translateX(3px); }

html.js .reel-slides {
  position: absolute; z-index: 4; left: 52%; bottom: calc(clamp(28px, 6vh, 64px) + 66px);
  display: flex; gap: var(--card-gap); width: max-content; grid-template-columns: none;
  --card-gap: clamp(12px, 1.3vw, 20px); --card-w: clamp(150px, 15.5vw, 250px);
}
html.js .slide { display: none; flex: none; width: var(--card-w); }
html.js .reel--on .slide[data-row] { display: block; }
html.js .slide-link {
  display: block; aspect-ratio: 3 / 4.3; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--card-shadow); color: #f8f4ec; background: #1a1714;
  transition: transform .28s var(--ease-out);
}
html.js .slide-link:hover { transform: translateY(-6px); }
html.js .slide-link::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(8, 7, 6, .86) 0%, rgba(8, 7, 6, .35) 36%, rgba(8, 7, 6, 0) 60%);
}
html.js .slide-photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
html.js .slide-eyebrow, html.js .slide-title { position: absolute; z-index: 1; left: 14px; right: 12px; margin: 0; }
html.js .slide-eyebrow { bottom: calc(14px + 1.05em * var(--title-lines, 1) + 1.5rem); color: #e8e1d4; font-size: .95rem; line-height: 1.1; }
html.js .slide-title { bottom: 14px; font-size: clamp(1.25rem, 1.7vw, 1.75rem); line-height: 1; }

html.js .reel-controls {
  display: flex; align-items: center; gap: 10px; position: absolute; z-index: 5;
  left: 52%; right: var(--gutter); bottom: clamp(16px, 4vh, 40px); color: var(--on-photo);
}
.round {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer; color: inherit;
  background: rgba(var(--scrim-rgb), .62); border: 1.5px solid var(--on-photo-line);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.round:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.round:active { transform: scale(.95); }
[data-reel-pause] .icon-play, [data-reel-pause][aria-pressed="true"] .icon-pause { display: none; }
[data-reel-pause][aria-pressed="true"] .icon-play { display: block; }
.reel-progress {
  flex: 1; min-width: 40px; height: 2px; margin: 0 8px; position: relative; overflow: hidden;
  background: var(--on-photo-line);
}
.reel-progress span {
  position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%;
  transform: scaleX(var(--reel-fill, 0));
}
.reel-counter {
  flex: none; margin: 0; display: flex; align-items: baseline; gap: 6px;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(2.25rem, 3.6vw, 3.5rem); line-height: 1;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(var(--scrim-rgb), .7);
}
.reel-total { font-size: .42em; font-weight: 600; display: inline-flex; gap: 3px; }

html.js .reel--still { height: auto; }

/* phones and small tablets: photo on top half of the attention, text and a compact card rail below */
@media (max-width: 760px) {
  :root { --reel-step: 38vh; --header-h: 60px; }
  @supports (height: 100svh) { :root { --reel-step: 38svh; } }
  .brand-name { font-size: 1.05rem; letter-spacing: .1em; }
  .reel-scrim::before, .reel-open-scrim::before {
    background: rgba(var(--scrim-rgb), var(--scrim-text));
    -webkit-mask-image: linear-gradient(0deg, #000 var(--scrim-h, 62vh), transparent calc(var(--scrim-h, 62vh) + 72px));
    mask-image: linear-gradient(0deg, #000 var(--scrim-h, 62vh), transparent calc(var(--scrim-h, 62vh) + 72px));
  }
  .reel-scrim::after, .reel-open-scrim::after { display: none; }
  html.js .reel-copy { left: 20px; right: 20px; width: auto; bottom: calc(148px + 76px + 12px); }
  .reel-eyebrow { margin-bottom: 6px; }
  .reel-title { font-size: min(21cqi, 13vh); }
  .reel-para { display: none; }
  .pill { margin-top: 14px; min-height: 44px; }
  html.js .reel-slides { left: 20px; bottom: 76px; --card-w: 104px; --card-gap: 10px; }
  html.js .slide-eyebrow { display: none; }
  html.js .slide-title { left: 9px; right: 8px; bottom: 9px; font-size: 1rem; }
  html.js .reel-controls { left: 20px; right: 20px; bottom: 16px; gap: 8px; }
  .reel-counter { font-size: 2rem; }
}
/* landscape phones and very short windows: keep the headline clear of the header */
@media (max-height: 560px) {
  .reel-eyebrow, .reel-para { display: none; }
  .reel-title { font-size: min(15cqi, 24vh); }
  .pill { margin-top: 10px; min-height: 44px; }
  html.js .reel-copy { bottom: 14px; }
  html.js .reel-slides { --card-w: 92px; bottom: 62px; }
  html.js .slide-eyebrow { display: none; }
  html.js .slide-title { left: 8px; right: 6px; bottom: 8px; font-size: .95rem; }
  html.js .reel-controls { bottom: 10px; }
  .reel-counter { font-size: 1.75rem; }
}

/* reduced motion: no pin, no scroll stepping, nothing auto-moves */
@media (prefers-reduced-motion: reduce) {
  html.js .reel { height: auto; }
  html.js .reel-pin { position: relative; top: auto; }
  html.js .slide-link, .pill, .pill svg, .round, .main-nav .menu-item > a, .main-nav .menu-list .menu-list, .mnav-disclose svg { transition: none; }
  html.js .slide-link:hover { transform: none; }
}

/* ---------- after the reel ---------- */
.after { padding: clamp(64px, 12vh, 140px) var(--gutter); outline: none; }
.after-body:empty { display: none; }
.after-teaser {
  display: block; text-decoration: none;
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: .9;
  font-size: clamp(4rem, 17vw, 16rem);
}
.after-teaser span {
  background: linear-gradient(var(--accent), var(--accent)) left 100% / 0 .06em no-repeat;
  transition: background-size .35s var(--ease-out);
}
.after-teaser:hover span { background-size: 100% .06em; }
.after-teaser svg { display: inline-block; width: .62em; height: .62em; margin-left: .08em; vertical-align: -.02em; color: var(--accent-text); }

/* ---------- inner pages ---------- */
.is-page main { min-height: 60vh; }
.page-article { padding: calc(var(--header-h) + var(--bar) * 0 + clamp(40px, 8vh, 96px)) var(--gutter) clamp(48px, 8vh, 96px); }
.page-article h1, .post-detail-title {
  margin: 0 0 .3em; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(3.5rem, 13vw, 13rem); line-height: .9; overflow-wrap: anywhere;
}
.page-article h2, .page-article h3 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  line-height: 1; margin: 1.6em 0 .5em; font-size: clamp(1.75rem, 3.6vw, 3rem);
}
.page-article h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.page-article p, .page-article ul, .page-article ol { max-width: 68ch; }
.page-article a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.page-article img { border-radius: 6px; }
.page-article figcaption { margin-top: 8px; font-family: var(--font-serif); font-style: italic; color: var(--muted); font-size: 1rem; }

/* project hero: the first photo of the page, full-bleed, continuing the opened card */
.page-hero {
  position: relative; height: var(--stage-h); margin: 0; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end; color: var(--on-photo); background: var(--surface-2);
}
.page-hero-photo { position: absolute; inset: 0; z-index: -2; view-transition-name: reel-photo; }
.page-hero-photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
/* The scrim belongs to the copy block, so it is exactly as tall as the title and lede need. */
.page-hero-copy {
  padding: 72px var(--gutter) clamp(24px, 5vh, 56px); width: 100%;
  background: linear-gradient(0deg,
    rgba(var(--scrim-rgb), var(--scrim-text)) calc(100% - 72px),
    rgba(var(--scrim-rgb), 0) 100%);
}
.page-hero h1 { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: min(clamp(3.5rem, 10.5vw, 11rem), 26vh); line-height: .9; overflow-wrap: anywhere; }
.page-hero[data-align="right"] .page-hero-copy { text-align: right; }
.page-hero[data-align="right"] .lede { margin-left: auto; }
.page-hero-photo img { object-position: var(--focus, 50% 50%); }
/* A portrait photo on a wide screen is shown whole beside its title, as it was framed. */
@media (min-width: 761px) {
  .page-hero[data-frame="portrait"] {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
    background: var(--bg); color: var(--fg); isolation: auto;
  }
  .page-hero[data-frame="portrait"] .page-hero-photo {
    position: relative; inset: auto; z-index: 0; grid-column: 2; grid-row: 1;
    height: calc(var(--stage-h) - var(--header-h));
    aspect-ratio: var(--photo-ratio, .8); max-width: 58vw;
  }
  .page-hero[data-frame="portrait"] .page-hero-copy { grid-column: 1; grid-row: 1; background: none; padding-top: 0; }
  .page-hero[data-frame="portrait"] .lede { color: var(--fg); }
  .page-hero[data-frame="portrait"] h1 { font-size: min(8.5vw, 22vh); }
}

/* next-project card that opens into the next page */
.next { padding: 0 var(--gutter) clamp(48px, 8vh, 96px); }
.next[hidden] { display: none; }
.next-card {
  display: block; position: relative; height: clamp(320px, 62vh, 640px); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; box-shadow: var(--card-shadow); color: #f8f4ec; isolation: isolate;
}
.next-card img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; z-index: -2; transition: transform .9s var(--ease-out); }
.next-card:hover img { transform: scale(1.03); }
.next-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8,7,6,.85) 0%, rgba(8,7,6,.3) 45%, rgba(8,7,6,0) 70%); }
.next-meta { position: absolute; left: clamp(20px, 3vw, 44px); right: clamp(20px, 3vw, 44px); bottom: clamp(20px, 3vw, 40px); }
.next-eyebrow { display: block; font-family: var(--font-serif); font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.5rem); }
.next-title { display: block; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(3rem, 10vw, 10rem); line-height: .9; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .next-card img { transition: none; }
  .next-card:hover img { transform: none; }
}

/* ---------- galleries and image runs ---------- */
.page-article .jini-gallery { margin: clamp(24px, 4vw, 56px) 0; gap: clamp(10px, 1.2vw, 18px); }
.page-article .jini-gallery-item img { width: 100%; height: auto; }

/* ---------- lightbox: kUInetic's dialog, only the fuzz and the colors are the theme's ---------- */
.plate:not(.plate-logo) > div > img { cursor: zoom-in; }
dialog.kui-lightbox[open] { background: rgba(var(--veil-rgb), .62); color: var(--fg); }
dialog.kui-lightbox .kui-lightbox-close { width: 44px; height: 44px; }
dialog.kui-lightbox .kui-lightbox-close, dialog.kui-lightbox .kui-lightbox-prev, dialog.kui-lightbox .kui-lightbox-next {
  background: var(--bg); color: var(--fg); border: 1px solid var(--border-strong);
}
dialog.kui-lightbox figcaption, dialog.kui-lightbox .kui-lightbox-counter { color: var(--fg); }
dialog.kui-lightbox figcaption { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; }
dialog.kui-lightbox::backdrop { -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1); }

/* ---------- forms ---------- */
.page-article form { max-width: 640px; display: grid; gap: 16px; }
.page-article label { display: block; font-size: .95rem; margin-bottom: 4px; }
.page-article input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .page-article textarea, .page-article select {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--fg);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 10px;
}
.page-article textarea { min-height: 150px; }
.page-article input:focus-visible, .page-article textarea:focus-visible, .page-article select:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.page-article button[type="submit"], .page-article input[type="submit"] {
  justify-self: start; min-height: 48px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-fg); font-weight: 600;
}

/* ---------- imported page bodies ---------- */
.has-page-hero .page-article { padding-top: clamp(40px, 8vh, 88px); }
.has-page-hero .page-article > *:first-child > *:first-child { margin-top: 0; }
.page-hero-copy .lede { margin: 14px 0 0; max-width: 58ch; color: var(--on-photo); font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.4; }
.page-hero-copy .lede strong, .page-hero-copy .lede em { font-weight: 500; font-style: normal; }
.page-article .page-title { margin-bottom: .25em; }
.project-head { margin-bottom: clamp(28px, 5vh, 56px); }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.4; max-width: 56ch; }
.story { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.6; max-width: 64ch; }
.plates-head {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1; margin: 0 0 .6em;
}
.project-head .plates-head { font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.plates {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 22px);
  margin: 0 0 clamp(32px, 7vh, 84px); align-items: start;
}
.plates > .plates-head, .plates > .story, .plates > .link-row, .plates > p { grid-column: 1 / -1; }
.plates > .story { margin: clamp(20px, 4vh, 44px) 0; }
.plate { min-width: 0; }
.plate-wide { grid-column: 1 / -1; }
/* Photos stay in proportion and never fill more than most of the window. */
.plate > div { width: fit-content; max-width: 100%; margin-inline: auto; }
.plate img { width: auto; max-width: 100%; height: auto; max-height: 72svh; border-radius: 6px; }
.plate-logo > div { margin-inline: 0; }

/* Fallback for photo strips (no JS): small even tiles, never full width. */
.ring-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: clamp(20px, 4vh, 40px) 0; }
.ring-row figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; }
.ring-row img { width: 100%; height: 100%; object-fit: cover; }

/* Peek deck: the middle photo sits forward with its neighbours peeking out behind it.
   Moves only by arrows, dots, swipe or clicking a side photo. */
.deck { --slide-w: min(52vw, 86svh, 720px); grid-column: 1 / -1; margin: clamp(32px, 7vh, 72px) calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: clip; }
.deck-stage { display: grid; place-items: center; touch-action: pan-y; padding-bottom: 40px; }
.deck .deck-slide { grid-area: 1 / 1; position: relative; display: block; width: var(--slide-w); max-width: none; margin: 0; aspect-ratio: 16 / 10; z-index: 1; opacity: 0; pointer-events: none; translate: calc(var(--kui-offset, 0) * var(--kui-peek, 58%)) 0; scale: var(--kui-rest, .62); transition: translate .62s var(--ease-open), scale .62s var(--ease-open), opacity .4s linear; cursor: pointer; }
.deck .deck-slide > div { width: 100%; height: 100%; margin: 0; }
.deck .deck-slide img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: 50% 15%; border-radius: 10px; user-select: none; -webkit-user-drag: none; box-shadow: 0 24px 60px -28px rgba(0,0,0,.65); }
.deck .deck-slide[data-kui-step-offset="1"], .deck .deck-slide[data-kui-step-offset="-1"] { opacity: 1; pointer-events: auto; z-index: 2; }
.deck .deck-slide[data-kui-step-offset="0"] { opacity: 1; pointer-events: auto; z-index: 3; scale: var(--kui-main, 1); cursor: zoom-in; }
.deck .deck-slide figcaption { position: absolute; top: calc(100% + 10px); left: 0; right: 0; margin: 0; text-align: center; font-size: .9rem; color: var(--muted); opacity: 0; transition: opacity .3s linear; }
.deck .deck-slide[data-kui-step-offset="0"] figcaption { opacity: 1; }
.deck-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(var(--slide-w), 100%); margin: 8px auto 0; }
.deck-dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.deck-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.deck-dot::before { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; translate: -50% -50%; border-radius: 99px; background: var(--border-strong, var(--muted)); transition: width .3s var(--ease-open), background-color .3s linear; }
.deck-dot[data-kui-step-state="active"]::before { width: 22px; background: var(--accent); }

/* Card stack: photos pile up behind the front one, and the front card flies to the back. */
.kstack { --stack-w: min(30vw, 46svh, 400px); position: relative; z-index: 0; grid-column: 1 / -1; margin: clamp(32px, 7vh, 72px) auto; padding: 96px 0 72px; touch-action: pan-y; }
.kstack .kstack-card { width: var(--stack-w); max-width: none; margin: 0; aspect-ratio: 4 / 5; justify-self: center; margin-left: calc(var(--stack-w) * -.35); }
.kstack .kstack-card > div { width: 100%; height: 100%; margin: 0; }
.kstack .kstack-card img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: 50% 25%; border-radius: 12px; user-select: none; -webkit-user-drag: none; box-shadow: 0 22px 50px -24px rgba(0,0,0,.7); cursor: zoom-in; }
.kstack .kstack-card figcaption { display: none; }
.kstack-bar { position: absolute; left: 50%; bottom: 0; translate: -50% 0; display: flex; gap: 12px; z-index: 200; }

/* Stacking cards: each one pins under the header and the next slides over it. */
@media (min-width: 761px) and (min-height: 520px) {
  .stack-card { position: sticky; top: calc(var(--bar, 0px) + var(--header-h, 68px) + 12px + var(--i, 0) * 14px); margin-bottom: 18px; padding: clamp(24px, 4vh, 44px) clamp(24px, 3vw, 44px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 -18px 40px -30px rgba(0,0,0,.6); }
}
/* Peek deck cards share a height and take their own photo's shape; neighbours sit a fixed step away. */
.deck { --slide-h: min(58svh, 520px); --step: calc(var(--slide-h) * .8); }
.deck .deck-slide { width: auto; height: var(--slide-h); max-width: 84vw; aspect-ratio: var(--ratio, .8); translate: calc(var(--kui-offset, 0) * var(--step)) 0; }
.deck .deck-slide img { object-position: 50% 30%; }
.deck-bar { width: min(calc(var(--slide-h) * 1.5), 100%); }
@media (max-width: 760px) { .deck { --slide-h: min(58svh, 96vw); --step: 66vw; } }

/* Shuffle: each photo keeps its own shape, no box around it. Photos are dealt in from alternating
   sides as you scroll, tilted, overlapping the one before, then settle almost straight. */
.shuffle { display: flex; flex-direction: column; gap: 0; }
.shuffle > .plate { position: relative; width: fit-content; max-width: 46%; margin: calc(-30svh) 0 0; }
.shuffle > .plate:first-of-type { margin-top: 0; }
.shuffle > .plate:nth-of-type(odd) { align-self: flex-start; margin-left: 6%; rotate: -1.2deg; }
.shuffle > .plate:nth-of-type(even) { align-self: flex-end; margin-right: 6%; rotate: 1.2deg; }
.shuffle > .plate > div { margin: 0; }
.shuffle > .plate img { max-height: 64svh; box-shadow: 0 26px 60px -26px rgba(0,0,0,.7); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .shuffle > .plate { animation-duration: 1ms; animation-timing-function: cubic-bezier(.2, .7, .2, 1); animation-fill-mode: both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    .shuffle > .plate:nth-of-type(odd) { animation-name: deal-left; }
    .shuffle > .plate:nth-of-type(even) { animation-name: deal-right; }
  }
}
@keyframes deal-left { from { translate: -16vw 60px; rotate: -9deg; } to { translate: none; rotate: -1.2deg; } }
@keyframes deal-right { from { translate: 16vw 60px; rotate: 9deg; } to { translate: none; rotate: 1.2deg; } }
@media (max-width: 760px) {
  .shuffle > .plate { max-width: 86%; margin-top: -14px; }
  .shuffle > .plate:nth-of-type(odd) { margin-left: 0; }
  .shuffle > .plate:nth-of-type(even) { margin-right: 0; }
}
@media (max-width: 760px) {
  .deck { --slide-w: 76vw; }
  .kstack { --stack-w: 62vw; }
  .kstack .kstack-card { margin-left: calc(var(--stack-w) * -.12); }
}
@media (prefers-reduced-motion: reduce) {
  .deck .deck-slide, .deck-dot::before { transition: none; }
}

/* Photos open like the landing's cards. reel.js adds these classes, so they never apply without JS
   or under reduced motion. Hero copy and photo settle in on arrival. */
.rv { clip-path: inset(14% 14% 14% 14% round 18px); opacity: 0; transition: clip-path 1s var(--ease-open) var(--rv-delay, 0ms), opacity .3s linear var(--rv-delay, 0ms); }
.rv img { scale: 1.2; transition: scale 1.25s var(--ease-open) var(--rv-delay, 0ms); will-change: translate; }
.rv.rv-in { clip-path: inset(0 round 6px); opacity: 1; }
.rv.rv-in img { scale: 1.07; }
.rv-pop { opacity: 0; translate: 0 18px; scale: .94; transition: opacity .5s linear var(--rv-delay, 0ms), translate .7s var(--ease-open) var(--rv-delay, 0ms), scale .7s var(--ease-open) var(--rv-delay, 0ms); }
.rv-pop.rv-in { opacity: 1; translate: none; scale: none; }
@media (prefers-reduced-motion: no-preference) {
  html.js .page-hero-photo img { animation: hero-settle 1.5s var(--ease-open) both; }
  html.js .page-hero h1 { animation: hero-rise .9s var(--ease-open) .15s both; }
  html.js .page-hero .lede { animation: hero-rise .9s var(--ease-open) .35s both; }
}
@keyframes hero-settle { from { scale: 1.14; } to { scale: 1; } }
@keyframes hero-rise { from { opacity: 0; translate: 0 .4em; } to { opacity: 1; translate: none; } }
.plate-logo { grid-column: 1 / -1; max-width: 340px; }
.plate-logo img { border-radius: 6px; }
.plate.video iframe, .plate iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 6px; background: var(--surface-2); }
.plate .widget-placeholder { display: none; }
/* Videos open like the reel's cards as they scroll in: a small rounded card grows to full size.
   Browsers without scroll timelines just show them. */
.plate.video iframe { max-width: 124svh; margin-inline: auto; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html.js .plate.video iframe { animation: video-open 1ms cubic-bezier(.2, .7, .2, 1) both; animation-timeline: view(); animation-range: entry 5% cover 42%; }
  }
}
@keyframes video-open { from { clip-path: inset(16% 20% round 22px); scale: .9; translate: 0 50px; } to { clip-path: inset(0 round 6px); scale: 1; translate: none; } }
.project-nav.is-replaced { display: none; }
.project-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; }
.project-nav a { display: inline-flex; flex-direction: column; font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; text-transform: uppercase; text-decoration: none; }
.project-nav span { font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; font-size: 1rem; color: var(--muted); }
.link-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.link-row a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* bio */
.bio-head { display: grid; gap: clamp(20px, 3vw, 44px); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); margin-bottom: clamp(36px, 7vh, 80px); }
.bio-head > h1, .bio-head > .ring-mask { grid-column: 1 / -1; }
.bio-head > .ring-mask { max-width: 340px; }
.bio-head blockquote { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(1.5rem, 2.8vw, 2.5rem); line-height: 1.2; }
.bio-head blockquote em { font-style: inherit; }
.highlights { margin-bottom: clamp(36px, 7vh, 80px); }
.highlights ul { list-style: none; padding: 0; margin: 0; max-width: 90ch; columns: 2 340px; column-gap: 40px; }
.highlights li { break-inside: avoid; padding: 12px 0; border-top: 1px solid var(--border); }
.logo-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px;
  margin-bottom: clamp(36px, 7vh, 80px);
}
.logo-wall figure { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; padding: 14px; background: #fff; border-radius: 8px; }
.logo-wall img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 0; }

/* services */
.service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 3vw, 48px); padding: clamp(24px, 4vh, 48px) 0; border-top: 1px solid var(--border); }
.service h2 { margin: 0; font-size: clamp(1.75rem, 3.4vw, 3rem); }
.service > div > p:first-child { margin-top: 0; }

/* gallery: an editorial wall of uneven columns, photos keep their own proportions */
.gallery-wall { columns: 3 280px; column-gap: clamp(10px, 1.2vw, 18px); }
.gallery-wall figure { break-inside: avoid; margin: 0 0 clamp(10px, 1.2vw, 18px); }
.gallery-wall img { width: 100%; height: auto; border-radius: 6px; cursor: zoom-in; }
.gallery-wall figcaption { margin: 6px 0 0; font-size: .95rem; }

/* contact */
.contact-page { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-rows: auto auto 1fr; column-gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-page > .page-title { grid-column: 1; font-size: clamp(3.5rem, 8.5vw, 8rem); }
.contact-page > .lede, .contact-page > .link-row { grid-column: 1; }
.contact-form { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
.contact-form form { max-width: none; }
@media (max-width: 760px) {
  .contact-page { grid-template-columns: minmax(0, 1fr); }
  .contact-form { grid-column: 1; grid-row: auto; margin-top: 28px; }
}

@media (max-width: 760px) {
  .plates { grid-template-columns: minmax(0, 1fr); }
  .bio-head, .service { grid-template-columns: minmax(0, 1fr); }
  .page-hero h1 { font-size: min(17vw, 26vh); }
}

/* ---------- landing, after the reel ---------- */
.after-statement {
  margin: 0 0 clamp(48px, 10vh, 120px); max-width: 36ch;
  font-family: var(--font-serif); font-style: italic; font-size: clamp(2rem, 4.6vw, 4.5rem); line-height: 1.08;
}
.after-contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.after-line { margin: 0 0 20px; max-width: 44ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); }
.after-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-2); }
.after-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .after-contact { grid-template-columns: minmax(0, 1fr); }
  .after-teaser { font-size: 21vw; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: clamp(32px, 6vh, 56px) var(--gutter); font-size: .95rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px 48px; }
.footer-brand { font-family: var(--font-display); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--fg); font-size: 1.25rem; }
.footer-menu > .menu-list { display: flex; flex-wrap: wrap; gap: 20px clamp(28px, 4vw, 64px); list-style: none; margin: 0; padding: 0; }
.footer-menu .menu-list .menu-list { list-style: none; margin: 4px 0 0; padding: 0; }
.footer-menu a, .footer-menu .menu-item-label { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.footer-menu > .menu-list > .menu-item > a, .footer-menu > .menu-list > .menu-item > .menu-item-label { color: var(--fg); font-weight: 600; }
.footer-menu a[href]:hover { color: var(--accent-text); }
.footer-menu a[href^="#"] { pointer-events: none; }
