
  /* Fonts are self-hosted (no requests to Google): Inter and Newsreader, both under the SIL Open Font License. */
  @font-face {
    font-family: 'Inter';
    src: url(../fonts/Inter-var.woff2) format('woff2');
    font-weight: 400 700; font-style: normal; font-display: swap;
  }
  @font-face {
    font-family: 'Newsreader';
    src: url(../fonts/Newsreader-var.woff2) format('woff2');
    font-weight: 300 400; font-style: normal; font-display: swap;
  }
:root {
    --bg: #E8E7EA;
    --ink: #1C1B21;
    --mute: #6A6972;
    --line: rgba(28, 27, 33, .16);
    --pad: clamp(18px, 2.6vw, 40px);
    --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color-scheme: light;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  html { background: var(--bg); color-scheme: light; scroll-padding-top: env(safe-area-inset-top, 0px); }
  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    font-synthesis: none;
    overflow-x: hidden; overflow-x: clip;
  }
  a { color: inherit; text-decoration: none; }
  a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
  html.has-cur, html.has-cur a, html.has-cur button { cursor: none; }

  /* ---------- Cursor ---------- */
  .cur {
    position: fixed; left: 0; top: 0; width: 0; height: 0;
    z-index: 100; pointer-events: none; mix-blend-mode: difference;
  }
  .cur::before, .cur::after {
    content: ""; position: absolute; left: 0; top: 0;
    transform: translate(-50%, -50%);
    transition: opacity .2s ease;
  }
  .cur::before { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
  .cur::after {
    width: 20px; height: 20px; opacity: 0;
    background:
      linear-gradient(#fff, #fff) center / 100% 1.5px no-repeat,
      linear-gradient(#fff, #fff) center / 1.5px 100% no-repeat;
  }
  .cur.plus::before { opacity: 0; }
  .cur.plus::after { opacity: 1; }

  /* ---------- Nav (inverts against whatever is behind it) ---------- */
  .nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; justify-content: space-between; align-items: baseline;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--pad) 0;
    color: #fff; mix-blend-mode: difference; pointer-events: none;
    font-size: 14px; letter-spacing: .01em;
  }
  .nav a { pointer-events: auto; }
  .nav .who b { font-weight: 600; margin-right: .6em; }
  .nav .who span { font-weight: 400; opacity: .7; }
  .nav .links { display: flex; gap: 22px; }

  /* ---------- Giant fitted type ---------- */
  .fit { display: block; width: 100%; white-space: nowrap; font-family: var(--serif);
         font-weight: 300; letter-spacing: -.02em; line-height: 1; margin: 0; }
  .fit > span { display: inline-block; }
  html:not(.ready) .fit { visibility: hidden; }

  /* ---------- Hero ---------- */
  .hero {
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column;
    padding: 0 var(--pad) 2.2vh;
  }
  .hero-mid { flex: 1; display: grid; place-items: center; padding-top: 70px; }
  .portrait {
    /* Sized so the figure keeps the same visual height as before; the image itself is never cropped. */
    --ph: min(59vh, 728px);
    width: min(100%, calc(var(--ph) * var(--arw, 0.8991)));
    aspect-ratio: var(--ar, 1641 / 1825);
    margin-bottom: calc(var(--ph) * -0.12);
    opacity: 0;
  }
  @supports (height: 1svh) { .portrait { --ph: min(59svh, 728px); } }
  .portrait { will-change: transform; }
  .portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }
  /* The mask only clips the rise-in animation. Its padding is sized from the name's font-size
     (--fs, set by fitAll) so i-dots, ascenders and descenders are never cut. Margins cancel it out. */
  .mask { --fs: 0px; overflow: hidden; padding: calc(var(--fs) * .3) 0; margin: calc(var(--fs) * -.3) 0; }
  .name-in { transform: translateY(165%); }
  .ready .name-in { animation: rise 1.25s cubic-bezier(.2, .75, .1, 1) .1s forwards; }
  .ready .portrait { animation: fadein .9s ease .75s forwards; }
  @keyframes rise { to { transform: translateY(0); } }
  @keyframes fadein { to { opacity: 1; } }

  /* ---------- Word-by-word statements ---------- */
  .statement { padding: 34vh var(--pad); display: grid; place-items: center; gap: clamp(20px, 3.2vh, 34px); }
  .reveal {
    margin: 0; max-width: 52ch; text-align: center;
    font-family: var(--serif); font-weight: 300;
    font-size: clamp(22px, 2.35vw, 36px); line-height: 1.38;
  }

  /* ---------- Work stack ---------- */
  .stack { position: relative; }
  .panel {
    display: block;
    position: sticky; top: 0;
    height: 100vh; height: 100svh;
    overflow: hidden; color: #fff;
  }
  /* The inner layer scales from small to full size as the panel enters (see updateMotion) */
  .panel-in {
    position: absolute; inset: 0;
    display: grid; place-items: center; text-align: center;
    overflow: hidden; transform: scale(var(--s, 1));
  }
  /* only the first project animates its size, so only it needs its own layer */
  .stack > .panel:first-of-type .panel-in { will-change: transform; }
  .panel-bg, .panel-in::after { position: absolute; inset: 0; }
  .panel-in::after { content: ""; background: rgba(0, 0, 0, .2); }
  .panel-t { position: relative; z-index: 1; padding: 0 var(--pad); }
  .panel-t h3 {
    margin: 0; font-family: var(--serif); font-weight: 300;
    font-size: clamp(30px, 3.6vw, 60px); line-height: 1.1; letter-spacing: -.01em;
  }
  .panel-t p { margin: 12px 0 0; font-size: 14px; letter-spacing: .02em; opacity: .88; }

  /* ---------- About ---------- */
  .about-top { padding: 24vh var(--pad) 14vh; }
  .about-top .wrap { max-width: 780px; margin: 0 auto; }
  .lead-lg {
    margin: 0 0 14vh; font-family: var(--serif); font-weight: 300;
    font-size: clamp(24px, 2.7vw, 40px); line-height: 1.28; letter-spacing: -.005em;
  }
  .statement .reveal { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.45; max-width: 60ch; }
  .lead-lg, .reveal, .case-sum { text-wrap: pretty; }
  .lead-lg.tight { margin-bottom: .85em; }
  .caps { border-top: 1px solid var(--line); }
  .cap {
    display: grid; grid-template-columns: minmax(150px, 1fr) 2fr; gap: 24px;
    padding: 26px 0; border-bottom: 1px solid var(--line);
  }
  .cap h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
  .cap p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--mute); max-width: 56ch; }
  .about-mid { padding: 16vh var(--pad) 8vh; display: grid; gap: 12vh; place-items: center; }
  .count { text-align: center; }
  .count-n {
    display: block; font-family: var(--serif); font-weight: 300;
    font-size: clamp(110px, 17vw, 280px); line-height: .9; letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
  }
  .count small { display: block; margin-top: 14px; font-size: 14px; color: var(--mute); }
  .sel-wrap { padding: 10vh var(--pad) 3vh; }

  /* ---------- Case study ---------- */
  .case-hero {
    position: relative; height: 100vh; height: 100svh;
    display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden;
  }
  .case-hero .panel-bg, .case-hero::after { position: absolute; inset: 0; }
  .case-hero::after { content: ""; background: rgba(0, 0, 0, .2); }
  .case-title {
    margin: 0 0 clamp(28px, 5vh, 56px);
    font-family: var(--serif); font-weight: 300;
    font-size: clamp(36px, 6vw, 104px); line-height: 1.05; letter-spacing: -.015em;
  }
  .case-body { max-width: 1180px; margin: 0 auto; padding: 12vh var(--pad) 8vh; }
  .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 10vh;
          padding-bottom: 28px; border-bottom: 1px solid var(--line); }
  .meta dt { font-size: 13px; color: var(--mute); margin-bottom: 6px; }
  .meta dd { margin: 0; font-size: 15px; font-weight: 600; }
  .case-sum {
    margin: 0 0 12vh; max-width: 40ch; font-family: var(--serif); font-weight: 300;
    font-size: clamp(24px, 2.6vw, 40px); line-height: 1.3;
  }
  .story { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 56px; margin: 0 0 12vh; max-width: 900px; }
  .story h2 { margin: 0 0 10px; font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.3vw, 34px); line-height: 1.1; letter-spacing: -.01em; }
  .story p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--mute); max-width: 40ch; }
  .frames { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; color: #fff; }
  .frame:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .frame .panel-bg { position: absolute; inset: 0; }
  .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .frame span { position: absolute; left: 16px; bottom: 14px; font-size: 13px; opacity: .85; z-index: 1; }
  .next { display: block; padding: 16vh var(--pad) 6vh; text-align: center; }
  .next small { display: block; font-size: 14px; color: var(--mute); margin-bottom: 14px; }
  .next b {
    display: block; font-family: var(--serif); font-weight: 300;
    font-size: clamp(34px, 6vw, 100px); line-height: 1.05; letter-spacing: -.015em;
  }

  /* ---------- Footer ---------- */
  .foot {
    position: relative; background: var(--bg);
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 0 var(--pad) 2.4vh;
  }
  .foot-links {
    display: grid; grid-template-columns: 1fr auto 1fr; margin-top: 3.2vh;
    font-size: 14px; font-weight: 600;
  }
  .foot-links a:nth-child(2) { justify-self: center; }
  .foot-links a:nth-child(3) { justify-self: end; }

  /* ---------- Scroll text reveal (blur + fade) ---------- */
  .js:not(.fx-ready) :is(.reveal, .lead-lg, .cap h3, .cap p, .count small, .meta dt, .meta dd, .case-sum, .story p, .story h2, .next small, .next b, .case-title) { opacity: 0; }
  .fx-w { display: inline-block; white-space: nowrap; }
  .fx-u { display: inline-block; }
  .sr {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }

  /* ---------- Intro slide: frosted glass over the real home page, then it slides out ---------- */
  .intro { position: fixed; inset: 0; z-index: 90; display: none; overflow: hidden; }
  .intro-on .intro { display: block; }
  .intro-slab {
    position: absolute; inset: 0; color: #1C1B21;
    background: rgba(236, 235, 238, .46);
    -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .55), 14px 0 60px rgba(28, 27, 33, .10);
    will-change: transform;
  }
  .intro--dark .intro-slab {
    color: #fff; background: rgba(20, 19, 25, .5);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .18), 14px 0 60px rgba(0, 0, 0, .25);
  }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .intro-slab { background: rgba(236, 235, 238, .92); }
    .intro--dark .intro-slab { background: rgba(20, 19, 25, .92); }
  }
  .intro-w {
    position: absolute; opacity: 0; white-space: nowrap; pointer-events: none;
    font: 700 clamp(56px, 12.5vw, 220px) / .88 var(--sans); letter-spacing: -.05em;
  }
  .intro-w.w1 { top: clamp(78px, 13vh, 150px); left: var(--pad); }
  .intro-w.w2 { top: 41%; left: 34vw; }
  .intro-w.w3 { right: var(--pad); bottom: clamp(28px, 7vh, 80px); }
  .intro.go .intro-w { animation: introWord .75s cubic-bezier(.2, .75, .1, 1) both; }
  .intro.go .intro-w.w1 { animation-delay: .25s; }
  .intro.go .intro-w.w2 { animation-delay: .85s; }
  .intro.go .intro-w.w3 { animation-delay: 1.45s; }
  .intro.out .intro-slab { transform: translateX(-100%); transition: transform var(--out, 1000ms) cubic-bezier(.76, 0, .24, 1); }
  .intro.out .intro-w { animation: introWordOut .8s cubic-bezier(.6, 0, .4, 1) both; animation-delay: 0s; }
  @keyframes introWord {
    from { opacity: 0; transform: translateY(.3em); filter: blur(22px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
  }
  @keyframes introWordOut {
    from { opacity: 1; transform: none; filter: blur(0); }
    to   { opacity: 0; transform: translateX(-14vw); filter: blur(16px); }
  }
  /* with the intro, the home page is already in place behind the glass (no separate rise-in) */
  .no-rise .name-in { transform: none; animation: none; }
  .no-rise .portrait { opacity: 1; animation: none; }
  .nav { transition: opacity .6s ease .15s; }
  .intro-on .nav { opacity: 0; }
  .intro-on.ready .hero { animation: heroBehind .8s ease both; }
  @keyframes heroBehind { from { opacity: 0; } to { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .intro { display: none !important; } }

  /* ---------- Contact: roll-up form ---------- */
  .foot-area { flex: 1; position: relative; min-height: 0; margin-top: 76px; }
  .cta {
    appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0;
    color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .cta:focus-visible { outline: 2px solid currentColor; outline-offset: 8px; }
  .cta .ch, .wave .ch {
    display: inline-block;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
    transition-delay: calc(var(--i) * 18ms);
  }
  @media (hover: hover) {
    .cta:hover .ch, .cta:focus-visible .ch,
    .wave:hover .ch, .wave:focus-visible .ch { transform: translateY(-.06em); }
  }
  /* The panel sits in the empty space above the text and is absolutely positioned,
     so opening it never changes the footer's height or moves the page. */
  .contact {
    position: absolute; left: -4px; right: -4px; bottom: 0;
    max-height: 100%; overflow-y: auto;
    padding: 4px 4px clamp(28px, 6vh, 64px);
    clip-path: inset(100% 0 0 0); transform: translateY(32px); opacity: 0; visibility: hidden;
    transition: clip-path .85s cubic-bezier(.2, .75, .1, 1), transform .85s cubic-bezier(.2, .75, .1, 1),
                opacity .5s ease, visibility 0s linear .85s;
  }
  .contact.open {
    clip-path: inset(0 0 0 0); transform: none; opacity: 1; visibility: visible;
    transition-delay: 0s;
  }
  .contact form {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; max-width: 980px;
  }
  .contact-intro { grid-column: 1 / -1; margin: 0 0 4px; font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.2; letter-spacing: -.01em; }
  .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .field.wide { grid-column: 1 / -1; }
  .field label { font-size: 13px; color: var(--mute); }
  .field input, .field textarea {
    font: 300 clamp(20px, 2vw, 26px) / 1.25 var(--serif); color: var(--ink);
    background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    padding: 6px 0 10px; width: 100%; outline: none; resize: none;
    -webkit-appearance: none; appearance: none; transition: border-color .25s ease;
  }
  .field input:focus, .field textarea:focus { border-bottom-color: var(--ink); }
  .field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--bg) inset; -webkit-text-fill-color: var(--ink);
  }
  .field.invalid input, .field.invalid textarea { border-bottom-color: #B3261E; }
  .err { font-size: 12.5px; line-height: 16px; min-height: 16px; color: #B3261E; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
  .actions {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 14px 24px; margin-top: 4px;
  }
  .status { margin: 0; font-size: 14px; line-height: 1.4; color: var(--mute); min-height: 20px; flex: 1 1 260px; }
  .status.bad { color: #B3261E; }
  .status a { text-decoration: underline; }
  .send {
    appearance: none; -webkit-appearance: none; border: 0; cursor: pointer;
    background: var(--ink); color: var(--bg); font: 600 14px var(--sans); letter-spacing: .02em;
    padding: 15px 34px; border-radius: 999px; transition: transform .2s ease, opacity .2s ease;
  }
  @media (hover: hover) { .send:hover { transform: translateY(-1px); } }
  .send[disabled] { opacity: .55; cursor: progress; }
  .send:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  .sent { max-width: 980px; padding-bottom: 8px; }
  .sent-t {
    margin: 0 0 10px; font-family: var(--serif); font-weight: 300;
    font-size: clamp(40px, 6vw, 96px); line-height: 1; letter-spacing: -.02em;
  }
  .sent-s { margin: 0; font-size: 16px; color: var(--mute); }
  .sent-note { margin: 14px 0 0; font-size: 13px; color: var(--mute); max-width: 52ch; }

  /* ---------- Back to top ---------- */
  .totop {
    position: fixed; z-index: 60;
    right: var(--pad); bottom: calc(env(safe-area-inset-bottom, 0px) + 68px);
    width: 50px; height: 50px; border-radius: 50%; padding: 0;
    display: grid; place-items: center;
    background: rgba(24, 23, 29, .30); color: #fff;
    border: 1px solid rgba(255, 255, 255, .32);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .22);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
  }
  .totop.show {
    opacity: 1; visibility: visible; transform: none;
    transition-delay: 0s;
  }
  .totop:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(24, 23, 29, .55); }
  .totop svg { display: block; transition: transform .25s ease; }
  @media (hover: hover) {
    .totop:hover { background: rgba(24, 23, 29, .46); }
    .totop:hover svg { transform: translateY(-2px); }
  }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .totop { background: rgba(24, 23, 29, .62); }
  }

  /* ---------- Page change ---------- */
  .view.enter { animation: vin .5s ease both; }
  @keyframes vin { from { opacity: 0; } to { opacity: 1; } }

  @media (prefers-reduced-motion: reduce) {
    .totop { transition: none; transform: none; }
  }
  @media (max-width: 720px) {
    .cap { grid-template-columns: 1fr; gap: 8px; }
    .contact form { grid-template-columns: 1fr; gap: 6px; }
    .field input, .field textarea { font-size: 20px; }
    .contact-intro { font-size: 20px; margin: 0; }
    .contact { padding-bottom: 22px; }
    .field { gap: 2px; }
    .err { min-height: 14px; line-height: 14px; }
    .actions { flex-direction: column-reverse; align-items: stretch; }
    .status { flex: 0 0 auto; }
    .send { width: 100%; }
    .meta { grid-template-columns: 1fr 1fr; }
    .frames { grid-template-columns: 1fr; }
    .story { grid-template-columns: 1fr; gap: 28px; }
    .frame:first-child { aspect-ratio: 16 / 10; }
    .nav .who span { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .name-in { transform: none; animation: none !important; }
    .contact { transition: none; transform: none; }
    .cta .ch, .wave .ch { transition: none; }
    .portrait { opacity: 1; animation: none !important; }
    .view.enter { animation: none; }
  }

  /* ---------- WordPress extras (only visible to logged-in editors) ---------- */
  body.admin-bar .nav { top: 32px; }
  @media (max-width: 782px) { body.admin-bar .nav { top: 46px; } }
  .jc-note { font-size: 14px; color: var(--mute); }

  /* ---------- Plain pages (privacy, terms, 404) ---------- */
  .page-title { margin: 0 0 .5em; font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 5vw, 72px); line-height: 1.05; letter-spacing: -.015em; }
  .page-generic h2 { margin: 1.8em 0 .5em; font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.3vw, 34px); line-height: 1.15; }
  .page-generic ul, .page-generic ol { margin: 0 0 1.4em; padding-left: 1.2em; font-size: 16px; line-height: 1.7; color: var(--mute); }
  .page-generic a { text-decoration: underline; text-underline-offset: 3px; }
  .page-generic .lead-lg { margin-bottom: 1em; }

  /* ---------- Smooth scrolling (Lenis) ---------- */
  html { overflow-anchor: none; }   /* stops the browser from nudging the page when content above it changes size */
  html.lenis, html.lenis body { height: auto; }
  .lenis.lenis-smooth { scroll-behavior: auto !important; }
  .lenis [data-lenis-prevent] { overscroll-behavior: contain; }
  .lenis.lenis-smooth iframe { pointer-events: none; }

  /* ---------- Cover images: a landscape and a portrait version (one image is used on every screen if only one is added) ---------- */
  .panel-bg, .case-hero .panel-bg {
    background-image: var(--cl); background-position: var(--pl, 50% 50%);
    background-size: cover; background-repeat: no-repeat;
  }
  @media (orientation: portrait) {
    .panel-bg, .case-hero .panel-bg { background-image: var(--cp, var(--cl)); background-position: var(--pp, var(--pl, 50% 50%)); }
  }

  /* ---------- Title colour follows the image: white over dark images, dark over light images ---------- */
  .panel-in::after, .case-hero::after { transition: background-color .55s ease; }
  @media (orientation: landscape) {
    .panel[data-tone-l="light"], .case-hero[data-tone-l="light"] { color: #1C1B21; }
    .panel[data-tone-l="light"] .panel-in::after, .case-hero[data-tone-l="light"]::after { background-color: rgba(255, 255, 255, 0); }
  }
  @media (orientation: portrait) {
    .panel[data-tone-p="light"], .case-hero[data-tone-p="light"] { color: #1C1B21; }
    .panel[data-tone-p="light"] .panel-in::after, .case-hero[data-tone-p="light"]::after { background-color: rgba(255, 255, 255, 0); }
  }

  /* ---------- Hover (mouse): the project image turns to frosted blur so the title stands out, and clears when the mouse leaves ---------- */
  @media (hover: hover) and (pointer: fine) {
    .panel-bg { transition: filter .6s ease, transform .6s ease; }
    html.is-scrolling .panel-bg { transition-duration: .15s; }   /* while scrolling the frost clears quickly: keeps scrolling light and smooth */
    html:not(.is-scrolling) .panel:hover .panel-bg, html:not(.is-scrolling) .panel:focus-visible .panel-bg { filter: blur(26px) saturate(1.1); transform: scale(1.1); }
    html:not(.is-scrolling) .panel:hover .panel-in::after, html:not(.is-scrolling) .panel:focus-visible .panel-in::after { background-color: rgba(0, 0, 0, .34); }
  }
  @media (hover: hover) and (pointer: fine) and (orientation: landscape) {
    html:not(.is-scrolling) .panel[data-tone-l="light"]:hover .panel-in::after, html:not(.is-scrolling) .panel[data-tone-l="light"]:focus-visible .panel-in::after { background-color: rgba(255, 255, 255, .42); }
  }
  @media (hover: hover) and (pointer: fine) and (orientation: portrait) {
    html:not(.is-scrolling) .panel[data-tone-p="light"]:hover .panel-in::after, html:not(.is-scrolling) .panel[data-tone-p="light"]:focus-visible .panel-in::after { background-color: rgba(255, 255, 255, .42); }
  }

  /* ---------- "Scroll to explore" at the bottom of a project cover ---------- */
  .scroll-cue {
    position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 26px); transform: translateX(-50%); z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: inherit; text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
  }
  .scroll-cue .sc-mouse { display: none; position: relative; width: 22px; height: 34px; border: 1.5px solid currentColor; border-radius: 12px; }
  .scroll-cue .sc-mouse i {
    position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: currentColor;
    animation: sc-wheel 1.8s cubic-bezier(.5, 0, .2, 1) infinite;
  }
  .scroll-cue .sc-arrow {
    display: block; width: 12px; height: 12px; margin-top: 2px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
    animation: sc-bob 1.6s ease-in-out infinite;
  }
  @media (hover: hover) and (pointer: fine) {
    .scroll-cue .sc-mouse { display: block; }
    .scroll-cue .sc-arrow { display: none; }
  }
  @keyframes sc-wheel { 0% { opacity: 0; transform: translateY(0); } 25% { opacity: 1; } 70% { opacity: 1; transform: translateY(11px); } 100% { opacity: 0; transform: translateY(14px); } }
  @keyframes sc-bob { 0%, 100% { opacity: .5; transform: translateY(0) rotate(45deg); } 50% { opacity: 1; transform: translateY(7px) rotate(45deg); } }
  @media (prefers-reduced-motion: reduce) { .scroll-cue .sc-mouse i, .scroll-cue .sc-arrow { animation: none; } }

  /* ---------- Long words and strings never widen the page (this made phones zoom out) ---------- */
  html { overflow-x: clip; }
  .reveal, .lead-lg, .cap, .case-sum, .case-title, .story, .meta, .g-it figcaption, .page-generic, .page-title, .next b, .sent-s, .contact-intro, .status, .err, .frame span { overflow-wrap: anywhere; }
  .story > div, .meta > div, .cap > *, .case-body { min-width: 0; }

  /* ---------- Bold and italic type for text blocks (these files load only when a text block uses them) ---------- */
  @font-face { font-family: 'Inter'; src: url(../fonts/Inter-italic-var.woff2) format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
  @font-face { font-family: 'Newsreader'; src: url(../fonts/Newsreader-italic-var.woff2) format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }
  @font-face { font-family: 'Newsreader'; src: url(../fonts/Newsreader-bold-var.woff2) format('woff2'); font-weight: 500 700; font-style: normal; font-display: swap; }

  /* ---------- Cover videos ---------- */
  .panel-bg video, .case-hero .panel-bg video {
    position: absolute; inset: 0; width: 100%; height: 100%; display: block;
    object-fit: cover; object-position: var(--pl, 50% 50%);
  }
  @media (orientation: landscape) { .panel-bg video[data-orient="p"] { display: none; } }
  @media (orientation: portrait) {
    .panel-bg video[data-orient="l"] { display: none; }
    .panel-bg video, .case-hero .panel-bg video { object-position: var(--pp, var(--pl, 50% 50%)); }
  }
  @media (max-width: 720px) { video[data-phones="poster"] { display: none; } }

  /* ---------- "Scroll to explore": stays on screen under the WordPress admin bar, and sits a little higher on big screens ---------- */
  body.admin-bar .case-hero { height: calc(100vh - 32px); height: calc(100svh - 32px); }
  @media (max-width: 782px) { body.admin-bar .case-hero { height: calc(100vh - 46px); height: calc(100svh - 46px); } }
  @media (hover: hover) and (pointer: fine) { .scroll-cue { bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(30px, 4.5vh, 52px)); } }
