/* ==========================================================================
   Fonts (self-hosted, SIL Open Font License — see assets/fonts/OFL.txt)
   ========================================================================== */
@font-face {
  font-family: 'Imperial Script';
  src: url('../assets/fonts/ImperialScript-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/CormorantGaramond-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/CormorantGaramond-Italic-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inder';
  src: url('../assets/fonts/Inder-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --wall: #d5e4da;
  --sage: #5f6c56;
  --sage-top: #6b795f;
  --sage-deep: #4f5b48;
  --cream: #fbf8f0;
  --ink-green: #145a2e;
  --olive: #5a6533;
  --slate: #6c878d;
  --name-ink: #f6e6e4;   /* the name: blush white (was deep leaf green #24452f) */
  --accent-rose: #b04a6c; /* the role: lotus rose accent */
  --lead-olive: #2c5034; /* the lead sentence: olive */
  --body-ink: #3a5a43;   /* the paragraph: deep olive ink */
  --nav-ink: #173f24;
  /* height of the curtain rod at the top of the hero */
  --rod: calc(100vh / 907 * 13);
  --rod: calc(100svh / 907 * 13);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;   /* anchor jumps land below the fixed nav bar */
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  /* nothing decorative (silk, curtains, drifting layers) may widen the page:
     clip, not hidden, so position: sticky keeps working */
  overflow-x: clip;
  background: var(--wall);
  color: #23301f;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  /* 1 unit = 1px of the 1440 × 907 composition, scaled to the viewport */
  --u: min(100vh / 907, 100vw / 760);
  --u: min(100svh / 907, 100vw / 760);
  /* the stage: as tall as the screen, or as tall as the case studies once
     the curtain is open */
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
  /* text column: a shared left edge on the plain beads, right of the lotus */
  --col-w: min(calc(100vw - 48px), calc(var(--u) * 600));
  --col-left: max(24px, min(47vw, calc(100vw - var(--col-w) - 24px)));
  background: var(--wall);
  touch-action: pan-y;            /* vertical scroll stays native on touch */
  -webkit-tap-highlight-color: transparent;
}

.hero__track {           /* full-height track for a pinned layer */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
}
.hero--live .hero__track { height: 100%; }   /* the whole hero, open or closed */
.hero__track--wall { z-index: 0; }
.hero__track--stage { z-index: 2; }

.hero__wall {            /* the supplied wall layer, slightly out of focus */
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.hero__wall::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/img/wall.webp') center bottom / cover no-repeat;
  filter: blur(3px) brightness(1.07);
  transform: scale(1.03);  /* hides the blurred edges */
}

/* Open: the wall doesn't just drop away. Its texture lingers behind the
   parting strands, then softens: the sharp layer fades out while a softer,
   more blurred copy under a pale lightening veil fades in, leaving a trace
   of the wall behind the case studies (the veil's alpha sets how much). Only opacity is
   animated, so it stays smooth. Closing runs it back, a little quicker. */
.hero__wall {
  background: #f3f8f3;
}
.hero__wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* the lightening veil: about two fifths of the wall still shows through */
    linear-gradient(180deg, rgba(245, 249, 244, .56), rgba(245, 249, 244, .64)),
    url('../assets/img/wall.webp') center bottom / cover no-repeat;
  filter: blur(7px) saturate(.9);
  transform: scale(1.05);      /* hides the blurred edges */
  opacity: 0;
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1);
}
.hero__wall::before { transition: opacity .6s cubic-bezier(.4, 0, .2, 1); }
.hero--live.is-open:not(.is-closing) .hero__wall::before {
  opacity: 0;
  transition: opacity 1.3s cubic-bezier(.45, 0, .2, 1) .28s;  /* lingers, then dissolves */
}
.hero--live.is-open:not(.is-closing) .hero__wall::after {
  opacity: 1;
  transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1) .12s;
}
@media (prefers-reduced-motion: reduce) {
  .hero__wall::before,
  .hero__wall::after,
  .hero--live.is-open:not(.is-closing) .hero__wall::before,
  .hero--live.is-open:not(.is-closing) .hero__wall::after { transition: none; }
}

.hero__stage {           /* the curtain, in front of the case studies */
  position: relative;
  height: 100vh;
  height: 100svh;
}

/* Live: wall and curtain stay pinned to the screen within their tracks, so
   the open curtain frames the case studies while you scroll, and both stop
   where the hero ends. */
.hero--live .hero__wall,
.hero--live .hero__stage {
  position: sticky;
  top: 0;
}

/* The intro: name, copy and the CTA, one screen tall */
.hero__intro {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 76px;              /* room for the nav bar (static fallback) */
}
.hero--live .hero__intro {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  padding-top: 0;
  pointer-events: none;
}
.hero--live .hero__intro .hero__cta { pointer-events: auto; }
.hero--live.is-open .hero__intro { visibility: hidden; transition: visibility 0s linear .4s; }

/* Static layers: shown without JS/WebGL, replaced by the canvas when live */
.hero__static {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% * 856 / 907);
  object-fit: cover;
  object-position: left top;   /* keep the lotus in view */
  filter: brightness(1.08);
  user-select: none;
}
/* static fallback: soft floor shadow under the hem */
.hero__stage::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% * 786 / 907);
  height: calc(100% * 86 / 907);
  background: linear-gradient(180deg, rgba(18, 26, 15, 0) 0%, rgba(18, 26, 15, .22) 38%, rgba(18, 26, 15, 0) 100%);
  pointer-events: none;
}
.hero__stage::before { display: none; }   /* floor shadow: off */

/* narrower screens: slide the lotus left so it never sits under the text */
@media (max-width: 1000px) { .hero__static { object-position: 28% top; } }
@media (max-width: 700px)  { .hero__static { object-position: 47% top; } }

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* While the interactive curtain loads, show only the wall (avoids a swap) */
.js .hero:not(.hero--live):not(.hero--static) .hero__static,
.js .hero:not(.hero--live):not(.hero--static) .hero__copy,
.js .hero:not(.hero--live):not(.hero--static) .hero__cta {
  opacity: 0;
}
/* the case studies wait behind the closed curtain */
.js .hero:not(.hero--static) .hero__work { display: none; }
.js .hero.hero--live.is-open:not(.hero--static) .hero__work { display: block; }
.hero--live .hero__static { display: none; }

/* --------------------------------------------------------------------------
   Lettering — static fallback styling
   (with the live curtain the same words are painted into the beads)
   -------------------------------------------------------------------------- */
.hero__copy {
  position: relative;
  z-index: 1;
  width: var(--col-w);
  margin-left: var(--col-left);
  text-align: left;
  transition: opacity .4s ease;
}

.hero__name {
  margin: 0;
  font-family: 'Imperial Script', cursive;
  font-weight: 400;
  line-height: 1;
}
.hero__first,
.hero__last {
  display: block;
  font-size: clamp(52px, calc(var(--u) * 132), 150px);
  /* embossed: a light edge from the top-left, no shadow behind */
  text-shadow: -1px -1px 0 rgba(255, 253, 246, .55);
}
.hero__first { color: var(--name-ink); }
.hero__last { color: var(--name-ink); margin-top: -.14em; }  /* just touching "Rosie" */

.hero__lead {
  max-width: 30rem;
  margin: calc(var(--u) * 20) 0 0;
  font-style: italic;
  font-weight: 500;
  font-size: max(20px, calc(var(--u) * 33));
  line-height: 1.24;
  color: var(--lead-olive);
}
.hero__lead-role {
  font-style: normal;
  font-weight: 650;
  color: var(--accent-rose);
}
.hero__body {
  max-width: 30rem;
  margin: calc(var(--u) * 16) 0 0;
  font-weight: 500;
  font-size: max(17px, calc(var(--u) * 22));
  line-height: 1.5;
  color: var(--body-ink);
}

/* Live: the words live in the curtain; keep the HTML for assistive tech */
.hero--live .hero__copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   CTA — a sage bead "tag" hanging among the strands
   -------------------------------------------------------------------------- */
.hero__cta {
  --sway: 0;
  position: relative;
  z-index: 2;
  margin: max(28px, calc(var(--u) * 44)) 0 0 var(--col-left);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  min-height: 44px;
  padding: .66rem 1.5rem .66rem 1.65rem;
  /* a hairline edge instead of a heavy outline */
  border: 1px solid rgba(251, 248, 240, .5);
  border-radius: 999px;
  font-family: 'Inder', system-ui, sans-serif;
  font-size: .97rem;
  line-height: 1.2;
  letter-spacing: .045em;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  /* smooth matte sage, lit softly from above */
  background: linear-gradient(180deg, #66745d 0%, var(--sage) 55%, #58654f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 1px 1px rgba(28, 44, 26, .16),
    0 12px 24px -16px rgba(28, 44, 26, .6);
  cursor: pointer;
  transition:
    background-color .25s ease,
    box-shadow .25s ease,
    opacity .35s ease,
    filter .25s ease;
}
.hero--live .hero__cta {
  position: absolute;
  margin: 0;
  left: var(--cta-x, 50%);
  top: var(--cta-top, 70%);
  transform-origin: 50% -120%;
  transform: translateX(calc(var(--sway) * 1px)) rotate(calc(var(--sway) * -0.35deg));
}

/* Windows high-contrast: real text in the user's colours, in the column */
@media (forced-colors: active) {
  .hero--live .hero__copy {
    position: relative;
    width: var(--col-w);
    height: auto;
    margin: 0 0 0 var(--col-left);
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }
  .hero--live .hero__cta {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 28px 0 0 var(--col-left);
  }
  .hero__first, .hero__last, .hero__lead, .hero__body { text-shadow: none; }
}
.hero__cta-arrow {
  display: inline-block;
  opacity: .9;
  transition: transform .3s cubic-bezier(.3, .7, .3, 1);
}
.hero__cta:hover {
  filter: brightness(1.06);
  border-color: rgba(251, 248, 240, .72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 1px 1px rgba(28, 44, 26, .18),
    0 16px 28px -16px rgba(28, 44, 26, .65);
}
.hero__cta:hover .hero__cta-arrow,
.hero__cta:focus-visible .hero__cta-arrow { transform: translateX(4px); }
.hero__cta:active { filter: brightness(.96); }
.hero__cta:focus-visible {
  outline: 2px solid #173f24;
  outline-offset: 3px;
}

.hero.is-opening .hero__cta {
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Sound toggle — a small sage bead at the end of the nav bar
   -------------------------------------------------------------------------- */
.hero__sound {
  position: relative;
  flex: none;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid rgba(251, 248, 240, .9);
  border-radius: 50%;
  color: var(--cream);
  background: linear-gradient(180deg, #6b795f, var(--sage-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    0 1px 2px rgba(28, 44, 26, .25),
    0 6px 14px -6px rgba(28, 44, 26, .5);
  cursor: pointer;
  transition: filter .2s ease, opacity .3s ease;
}
.curtain-live .hero__sound { display: grid; }
.hero__sound:hover { filter: brightness(1.08); }
.hero__sound:focus-visible { outline: 3px solid #173f24; outline-offset: 3px; }
.hero__sound svg { overflow: visible; }
.hero__sound-speaker { fill: currentColor; }
.hero__sound-waves,
.hero__sound-mute {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.hero__sound-mute { display: none; }
.hero__sound[data-state="off"] .hero__sound-waves { display: none; }
.hero__sound[data-state="off"] .hero__sound-mute { display: inline; }
.hero__sound[data-state="off"] { opacity: .82; }
/* sound is on but the browser is waiting for a first click/tap */
.hero__sound[data-state="waiting"] .hero__sound-waves { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .hero__sound[data-state="waiting"]::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px solid rgba(251, 248, 240, .8);
    animation: sound-invite 2.4s ease-out infinite;
    pointer-events: none;
  }
}
@keyframes sound-invite {
  from { transform: scale(.9); opacity: .9; }
  to { transform: scale(1.35); opacity: 0; }
}

/* ==========================================================================
   Page sections (placeholders — replace with the existing content)
   ========================================================================== */
.page-section {
  min-height: 60vh;
  min-height: 60svh;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 5vw, 4rem);
  background: linear-gradient(180deg, #d9e6dd 0%, #e9efe6 100%);
  outline: none;
}
.page-section:nth-of-type(odd) { background: #eef2ea; }
.page-section:focus-visible .page-section__title {
  outline: 2px solid #173f24;
  outline-offset: 6px;
}
.page-section__inner {
  max-width: 1120px;
  margin: 0 auto;
}
.page-section__title {
  margin: 0 0 2.5rem;
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: var(--ink-green);
}
.page-section__text {
  margin: 0;
  font-size: 1.25rem;
  color: #3f4b3a;
}
/* ==========================================================================
   Case studies — behind the curtain
   Two-column grid of cards (one column on narrow screens): a 4:3 image,
   a small status line, a light serif title, a short description and tags.
   ========================================================================== */
.hero__work {
  position: relative;
  z-index: 1;
  outline: none;
  padding: clamp(5rem, 12vh, 7rem) clamp(1.25rem, 5vw, 4rem) clamp(4rem, 10vh, 6rem);
  background: linear-gradient(180deg, #d9e6dd 0%, #e9efe6 100%);   /* static fallback */
}
.hero--live .hero__work {
  background: none;   /* the wall behind the curtain shows through */
  /* clear the nav bar, and the thin gathered curtain at each side */
  padding: calc(var(--rod) + 108px) clamp(1.25rem, 6vw, 5.5rem) clamp(5rem, 14vh, 8rem);
}
@media (prefers-reduced-motion: no-preference) {
  .hero--live.is-open .hero__work { animation: work-in .55s cubic-bezier(.25, .7, .25, 1) .22s both; }
  .hero--live.is-closing .hero__work { animation: work-out .32s ease both; }
}
@keyframes work-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes work-out {
  to { opacity: 0; }
}
.hero__work:focus-visible .work__title { outline: 2px solid #173f24; outline-offset: 6px; }
/* opened with a mouse, a tap or a scroll: focus moves, the ring stays hidden */
.is-quiet-focus:focus,
.is-quiet-focus:focus-visible,
.hero__work.is-quiet-focus:focus-visible .work__title { outline: none; }

.work__inner {
  max-width: 1040px;
  margin: 0 auto;
}
.work__eyebrow {
  margin: 0 0 .45rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: #33493b;
}
.work__title {
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
  font-weight: 300;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #152e1d;
}
.work__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3vw, 2.5rem);
}
@media (max-width: 720px) {
  .work__grid { grid-template-columns: minmax(0, 1fr); }
}

.case-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
}
.case-card__link:focus-visible {
  outline: 2px solid #173f24;
  outline-offset: 6px;
}
.case-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(28, 44, 26, .08), 0 18px 36px -26px rgba(28, 44, 26, .45);
  transition: transform .5s cubic-bezier(.25, .7, .25, 1), box-shadow .5s ease;
}
/* placeholder art in the curtain's palette — replace with project images */
.case-card__media--1 { background: linear-gradient(135deg, #f6e3e1 0%, #f1d1d4 45%, #e9eadc 100%); }
.case-card__media--2 { background: linear-gradient(135deg, #e4efe6 0%, #c9dccd 55%, #b4cdb9 100%); }
.case-card__media--3 { background: linear-gradient(135deg, #f7f4ea 0%, #ece6d4 60%, #e3d7c7 100%); }
.case-card__media--4 { background: linear-gradient(135deg, #d98c8f 0%, #c4797c 35%, #dfe7dc 100%); }
.case-card__link:hover .case-card__media {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(28, 44, 26, .1), 0 26px 40px -26px rgba(28, 44, 26, .55);
}
.case-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: .32rem .65rem;
  border-radius: 6px;
  font: .78rem/1.2 'Inder', system-ui, sans-serif;
  color: var(--cream);
  background: rgba(28, 44, 30, .72);
}
.case-card__status {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 1.1rem 0 .4rem;
  font: .72rem/1 'Inder', system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #1f5233;
}
.case-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4fae74;
}
.case-card__status--building { color: #6b3f0c; }
/* company · discipline line (in place of a status) */
.case-card__meta {
  margin: 1.1rem 0 .4rem;
  font: .72rem/1.3 'Inder', system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #33493b;
}

.case-card__video {
  display: block;
  width: 100%;
  height: 100%;
}
.case-card__status--building .case-card__dot { background: #e0a046; }
.case-card__title {
  margin: 0 0 .4rem;
  font-weight: 400;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -.005em;
  color: #152e1d;
}
/* cards without a status line keep the same rhythm */
.case-card__media + .case-card__title { margin-top: 1.1rem; }
.case-card__text {
  margin: 0 0 .9rem;
  max-width: 36em;
  font-size: 1.12rem;
  line-height: 1.45;
  color: #2c3e31;
}
.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-card__tags li {
  padding: .3rem .72rem;
  border-radius: 999px;
  border: 1px solid rgba(176, 74, 108, .3);
  background: rgba(255, 255, 255, .42);
  font: .78rem/1.2 'Inder', system-ui, sans-serif;
  color: #93385a;
}
@media (prefers-reduced-motion: reduce) {
  .case-card__media { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cta,
  .hero__cta-arrow,
  .hero__copy { transition: none; }
}

/* ==========================================================================
   Skip link + nav bar
   ========================================================================== */
.skip-link {
  position: fixed;
  z-index: 40;
  left: 12px;
  top: 12px;
  padding: .75rem 1.1rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--nav-ink);
  font: 1rem/1.2 'Inder', system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 6px 18px -8px rgba(28, 44, 26, .5);
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus-visible {
  transform: none;
  outline: 3px solid var(--nav-ink);
  outline-offset: 2px;
}
main:focus { outline: none; }

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 20px);
  /* over the hero the bar sits just below the curtain rod */
  padding: calc(var(--rod) + 8px) clamp(12px, 3vw, 36px) 8px;
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
}
.site-header.is-solid {
  padding-top: 8px;
  background: rgba(240, 244, 236, .94);
  box-shadow: 0 1px 0 rgba(28, 44, 26, .08), 0 10px 24px -18px rgba(28, 44, 26, .45);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header.is-solid {
    background: rgba(240, 244, 236, .82);
    backdrop-filter: blur(10px);
  }
}

/* logo: a 48px link target; the mark inside is a placeholder */
.site-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-decoration: none;
}
.site-logo svg { display: block; width: 48px; height: 48px; }
/* the one-colour cross-stitch rose */
.site-logo .site-logo__rose { display: block; width: auto; height: 32px; }
.site-logo__mark circle {
  fill: var(--sage);
  stroke: rgba(251, 248, 240, .92);
  stroke-width: 1.5;
}
.site-logo__mark text {
  fill: var(--cream);
  font-family: 'Imperial Script', cursive;
  font-size: 23px;
}
.site-logo:hover { filter: brightness(1.08); }
.site-logo:focus-visible {
  outline: 3px solid var(--nav-ink);
  outline-offset: 3px;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  list-style: none;
  border-radius: 999px;
  /* a frosted strip so the links stay readable over any part of the curtain */
  background: rgba(250, 248, 241, .8);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 6px 18px -10px rgba(28, 44, 26, .45);
}
@supports (backdrop-filter: blur(1px)) {
  .site-nav ul { background: rgba(250, 248, 241, .66); backdrop-filter: blur(6px); }
}
.site-header.is-solid .site-nav ul {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.05rem;
  border-radius: 999px;
  font: 1rem/1 'Inder', system-ui, sans-serif;
  letter-spacing: .01em;
  color: var(--nav-ink);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.site-nav a:hover { background: rgba(95, 108, 86, .14); }
.site-nav a[aria-current="true"],
.site-nav a[aria-current="page"] {
  background: var(--sage);
  color: var(--cream);
}
.site-nav a:focus-visible {
  outline: 3px solid var(--nav-ink);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .site-header { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .site-nav a { padding: 0 .62rem; font-size: .9375rem; }
}
/* very narrow screens: links move to their own row */
@media (max-width: 370px) {
  .site-header { flex-wrap: wrap; row-gap: 4px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; }
  .site-nav ul { justify-content: space-between; }
  .hero__sound { margin-left: auto; }
  html { scroll-padding-top: 132px; }
}

@media (forced-colors: active) {
  .site-nav a[aria-current="true"], .site-nav a[aria-current="page"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .site-nav ul { border-color: CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .skip-link, .site-nav a { transition: none; }
}

/* ==========================================================================
   Glass — nav pill, logo frame, sound button, solid bar and the CTA
   Translucent panes that blur and slightly enrich what's behind them, with a
   bright hairline edge, a top sheen and a soft shadow. Without
   backdrop-filter support they fall back to more opaque fills, so text
   contrast holds either way.
   ========================================================================== */
:root {
  --glass-sheen: linear-gradient(180deg,
    rgba(255, 255, 255, .42) 0%,
    rgba(255, 255, 255, .1) 46%,
    rgba(255, 255, 255, 0) 54%,
    rgba(255, 255, 255, .08) 100%);
  --glass-edge: rgba(255, 255, 255, .62);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -1px 0 rgba(255, 255, 255, .2),
    0 1px 2px rgba(28, 44, 26, .1),
    0 10px 26px -14px rgba(28, 44, 26, .5);
}

/* clear glass: nav pill, logo frame, sound button */
.site-nav ul,
.site-logo,
.hero__sound {
  background: var(--glass-sheen), rgba(248, 250, 244, .7);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-nav ul,
  .site-logo,
  .hero__sound {
    background: var(--glass-sheen), rgba(255, 255, 255, .24);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
  }
}
.hero__sound { color: var(--nav-ink); }
.hero__sound:hover,
.site-logo:hover { filter: none; background-color: rgba(255, 255, 255, .4); }

/* the placeholder mark sits inside the glass frame */
.site-logo__mark circle { fill: transparent; stroke: none; }
.site-logo__mark text { fill: var(--nav-ink); }

/* links on the glass */
.site-nav a:hover { background: rgba(255, 255, 255, .42); }
.site-nav a[aria-current="true"],
.site-nav a[aria-current="page"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%), rgba(52, 88, 62, .9);
  color: var(--cream);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 6px -3px rgba(28, 44, 26, .5);
}

/* past the hero the whole bar becomes a glass sheet */
.site-header.is-solid {
  background: rgba(240, 244, 236, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 12px 30px -22px rgba(28, 44, 26, .5);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-solid {
    background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .25)), rgba(236, 242, 232, .45);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
  }
}
.site-header.is-solid .hero__sound,
.site-header.is-solid .site-logo { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 1px 2px rgba(28, 44, 26, .12); }

/* the CTA: sage-tinted glass, still the clear primary action */
.hero__cta {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, .05) 48%, rgba(255, 255, 255, 0) 54%, rgba(255, 255, 255, .06) 100%),
    rgba(52, 88, 62, .94);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(255, 255, 255, .1),
    0 1px 2px rgba(28, 44, 26, .15),
    0 14px 28px -16px rgba(28, 44, 26, .6);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero__cta {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, .05) 48%, rgba(255, 255, 255, 0) 54%, rgba(255, 255, 255, .06) 100%),
      rgba(48, 84, 58, .84);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
  }
}
.hero__cta:hover {
  filter: none;
  border-color: rgba(255, 255, 255, .72);
  background-color: rgba(48, 84, 58, .9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -1px 0 rgba(255, 255, 255, .12),
    0 1px 2px rgba(28, 44, 26, .18),
    0 18px 30px -16px rgba(28, 44, 26, .65);
}

@media (forced-colors: active) {
  .site-nav ul, .site-logo, .hero__sound, .hero__cta, .site-header.is-solid {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ==========================================================================
   Shared helpers and section labels
   ========================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.thread-mark { display: flex; align-items: center; gap: .65rem; }

/* ---- the work, revealed --------------------------------------------------- */
.work__head { position: relative; margin-bottom: clamp(2rem, 4.5vw, 3.25rem); }
.work__eyebrow { margin: 0 0 .6rem; }
.work__title { margin: 0; }
.work__intro {
  margin: .9rem 0 0;
  max-width: 30em;
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.45;
  font-style: italic;
  color: #2c3e31;
}


/* ---- case cards: real project art ----------------------------------------- */
.case-card__media--2 { background: linear-gradient(135deg, #e4efe6 0%, #cfe0d2 55%, #bcd3c1 100%); }
.case-card__media--3 { background: linear-gradient(135deg, #f8eeec 0%, #f4e6e5 50%, #efece3 100%); }   /* soft blush */
.case-card__media--4 { background: linear-gradient(135deg, #e4efe6 0%, #cfe0d2 55%, #bcd3c1 100%); }   /* green, like Paperless */
/* a card with no case study page yet: not a link, question always shown */
@media (hover: hover) and (pointer: fine) {
  .case-card__link--static .case-card__question { position: static; aspect-ratio: auto; display: block; margin: .9rem 0 0; overflow: visible; }
  .case-card__link--static .case-card__q { padding: 0; background: none; transform: none; opacity: 1; }
  .case-card__link--static:hover .case-card__question { transform: none; }
}
.case-card__link--static:hover .case-card__media { transform: none; }
.case-card__float { position: absolute; inset: 6% 8%; width: 84%; height: 88%; object-fit: contain; }
.case-card__video--cover,
.case-card__anim,
.case-card__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- case cards: the question beneath the surface -------------------------
   Touch screens: always shown, under the description.
   Mouse/trackpad: it rises over the image like a lifted hem on hover or
   keyboard focus; screen readers always get it (aria-describedby). */
.case-card__link { position: relative; }
.case-card__question { order: 1; margin: .9rem 0 0; }
.case-card__q {
  display: block;
  position: relative;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.35;
  color: #152e1d;
}
.case-card__q-k {
  display: block;
  margin-bottom: .25rem;
  font: normal .7rem/1.3 'Inder', system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8f3354;
}
/* in the flow it sits after the tags */
.case-card__link { display: flex; flex-direction: column; }
.case-card__link > .case-card__media { order: -1; }

@media (hover: hover) and (pointer: fine) {
  .case-card__question {
    position: absolute;
    left: 0; right: 0; top: 0;
    aspect-ratio: 4 / 3;
    margin: 0;
    display: flex;
    align-items: flex-end;
    border-radius: 4px;
    overflow: hidden;
    pointer-events: none;
    transition: transform .5s cubic-bezier(.25, .7, .25, 1);
  }
  .case-card__q {
    width: 100%;
    padding: 1.05rem 1.3rem 1.15rem;
    background: rgba(246, 249, 243, .95);
    transform: translateY(101%);
    transition: transform .55s cubic-bezier(.25, .7, .2, 1);
  }
  .case-card__link:hover .case-card__question { transform: translateY(-4px); }
  .case-card__link:hover .case-card__q,
  .case-card__link:focus-visible .case-card__q { transform: none; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .case-card__question, .case-card__q { transition: opacity .2s ease; }
  .case-card__q { transform: none; opacity: 0; }
  .case-card__link:hover .case-card__question { transform: none; }
  .case-card__link:hover .case-card__q,
  .case-card__link:focus-visible .case-card__q { opacity: 1; }
}

/* ---- About · Studio · Contact ---------------------------------------------- */
.page-section { min-height: 0; padding-top: clamp(5rem, 12vh, 8rem); padding-bottom: clamp(5rem, 12vh, 8rem); }
.section-eyebrow {
  margin: 0 0 .6rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: #33493b;
}
.page-section .page-section__title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #152e1d;
}
.section-intro {
  margin: .9rem 0 0;
  max-width: 34em;
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.45;
  font-style: italic;
  color: #2c3e31;
}

/* ==========================================================================
   About · the bio, in two columns
   Left, Rosie's portrait: a postage stamp set down a little askew, franked
   with a postmark in the rose of the logo. Right, the bio.
   ========================================================================== */
.bio {
  display: grid;
  grid-template-columns: minmax(0, 50fr) minmax(0, 50fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin: clamp(3rem, 7vw, 5.5rem) 0 0;
}
.bio__portrait {
  position: relative;
  width: min(100%, 470px);
  margin: 0 auto;
}
.bio__photo {
  display: block;
  width: 100%;
  height: auto;
  rotate: -3deg;
  filter: drop-shadow(0 22px 26px rgba(28, 44, 26, .22));
  transition: rotate .9s cubic-bezier(.22, .7, .2, 1);
}
.bio__portrait:hover .bio__photo { rotate: -1deg; }
.bio__postmark {
  position: absolute;
  left: -11%;
  bottom: -8%;
  width: 54%;
  rotate: -10deg;
  overflow: visible;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.bio__postmark circle,
.bio__postmark-wave { fill: none; stroke: rgba(142, 59, 90, .62); stroke-width: 2.2; }
.bio__postmark circle + circle { stroke-width: 1.4; }
.bio__postmark-wave { stroke-linecap: round; }
.bio__postmark text {
  fill: rgba(142, 59, 90, .72);
  font-family: 'Inder', system-ui, sans-serif;
  text-anchor: middle;
}
.bio__postmark-ring { font-size: 15px; letter-spacing: .02em; }
.bio__postmark-mid { font-family: 'Cormorant Garamond', Georgia, serif !important; font-style: italic; font-size: 20px; }

/* the copy */
.bio__copy { max-width: 31rem; }
.bio__title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: #152e1d;
}
.bio__text + .bio__text { margin-top: .9rem; }
.bio__text {
  margin: 1.2rem 0 0;
  font-size: clamp(1.12rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: #2c3e31;
}
@media (max-width: 860px) {
  .bio { grid-template-columns: minmax(0, 1fr); gap: clamp(1.75rem, 6vw, 2.5rem); }
  .bio__portrait { width: min(80%, 400px); }
  .bio__copy { max-width: 36rem; }
}

/* ==========================================================================
   About · the category galleries (the bio links land here)
   One row per practice: the words, then every piece whole, sized as a
   justified row so nothing is cropped.
   ========================================================================== */
.practices {
  position: relative;
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem);
  margin: clamp(3.5rem, 7vw, 5.5rem) 0 0;
  padding: 0;
  list-style: none;
}
.practice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: start;
  scroll-margin-top: 6rem;       /* lands below the fixed bar */
}
.practice__title { margin: 0 0 .5rem; font-weight: 400; font-size: clamp(1.35rem, 2vw, 1.6rem); line-height: 1.15; color: #152e1d; }
.practice__text { margin: 0; font-size: 1.1rem; line-height: 1.5; color: #2c3e31; }
/* on to the piece's room in the Studio (play.html) */
.practice__link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  margin-top: .8rem;
  font-size: 1.15rem;
  font-style: italic;
  color: #152e1d;
  text-decoration: underline;
  text-decoration-color: rgba(142, 59, 90, .45);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .25s ease, text-decoration-color .25s ease;
}
.practice__link span { font-style: normal; transition: transform .3s ease; }
.practice__link:hover, .practice__link:focus-visible { color: #8e3b5a; text-decoration-color: currentColor; }
.practice__link:hover span, .practice__link:focus-visible span { transform: translateX(5px); }
.practice__link:focus-visible { outline: 2px solid #173f24; outline-offset: 3px; border-radius: 3px; }
.practice__pieces {
  --row-h: clamp(140px, 17vw, 240px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.75rem, 1.6vw, 1.1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.practice__piece {
  /* justified: equal heights in a row, widths from each piece's own shape */
  flex: var(--ar) 1 calc(var(--ar) * var(--row-h));
  max-width: calc(var(--ar) * var(--row-h) * 1.45);
  aspect-ratio: var(--ar);
  border-radius: 3px;
  overflow: hidden;
  background: #fbf9f2;
  box-shadow: 0 1px 2px rgba(28, 44, 26, .08), 0 18px 36px -26px rgba(28, 44, 26, .45);
}
.practice__piece--phone { border-radius: 14px; background: #1d1c21; padding: 3px; }
.practice__piece img,
.practice__piece video { display: block; width: 100%; height: 100%; object-fit: contain; }
.practice__piece--phone img { border-radius: 11px; }
@media (max-width: 860px) {
  .practice { grid-template-columns: minmax(0, 1fr); }
  .practice__pieces { --row-h: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .bio__photo, .practice__link, .practice__link span { transition: none; }
}

/* Studio: the experimental side, a looser 2×2 */
.studio__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.5rem);
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
}
.studio-item__link { display: block; color: inherit; text-decoration: none; border-radius: 6px; }
.studio-item__link:focus-visible { outline: 2px solid #173f24; outline-offset: 6px; }
.studio-item__media {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: #dfe7dc;
  box-shadow: 0 1px 2px rgba(28, 44, 26, .08), 0 18px 36px -26px rgba(28, 44, 26, .45);
  transition: transform .5s cubic-bezier(.25, .7, .25, 1);
}
.studio-item__media--dark { background: #1d1b22; }
.studio-item__media img,
.studio-item__media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.studio-item__title {
  position: relative;
  display: inline-block;
  margin: 1rem 0 .3rem;
  padding-bottom: .2rem;
  font-weight: 400;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  line-height: 1.2;
  color: #152e1d;
}
.studio-item__link:hover .studio-item__media { transform: translateY(-4px); }
.studio-item__meta { margin: 0; font: .78rem/1.3 'Inder', system-ui, sans-serif; letter-spacing: .06em; color: #33493b; }

/* Contact: the closing line */
.contact .page-section__inner { position: relative; }
.contact__title { max-width: 18ch; }
.contact__v { white-space: nowrap; }
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  padding: 0;
  list-style: none;
}
.contact__link {
  display: inline-flex;
  flex-direction: column;
  gap: .2rem;
  min-height: 44px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  color: #152e1d;
  text-decoration: underline;
  text-decoration-color: rgba(21, 46, 29, .3);
  text-underline-offset: .2em;
}
.contact__link:hover { text-decoration-color: currentColor; }
.contact__link:focus-visible { outline: 2px solid #173f24; outline-offset: 4px; border-radius: 3px; }
.contact__k { font: .75rem/1.3 'Inder', system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #33493b; text-decoration: none; display: block; }
.contact__foot { margin: clamp(3rem, 6vw, 4.5rem) 0 0; font: .8rem/1.3 'Inder', system-ui, sans-serif; color: #4a5c4f; }

@media (max-width: 720px) {
  .studio__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .studio-item__media { transition: none; }
}
@media (forced-colors: active) {
  .case-card__q { border: 1px solid CanvasText; }
}

/* Closed curtain at the top: the page holds still, and scrolling down opens
   the curtain instead (hero.js). The gutter keeps the layout from shifting
   when the scrollbar comes and goes. */
html { scrollbar-gutter: stable; }
html.is-curtain-locked,
html.is-curtain-locked body { overflow: hidden; }

/* case cards: "Shipped" status and the project line under each title */
.case-card__shipped { display: inline-flex; align-items: center; gap: .5em; }
.case-card__shipped::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3f7a4f;
  box-shadow: 0 0 0 3px rgba(63, 122, 79, .16);
}
.case-card__shipped--proto::before {          /* tested, not launched: hollow dot */
  background: transparent;
  border: 1.5px solid #3f7a4f;
  box-shadow: none;
}
.case-card__sub {
  display: block;
  margin-top: .3rem;
  font: .82rem/1.35 'Inder', system-ui, sans-serif;
  letter-spacing: .02em;
  color: #33493b;
}

/* Paperless HR card: the mockup has wide margins, so show its central
   1320×990 area (logo to laptop, still 4:3) to match the URBN card's scale.
   Change the four numbers to reframe it. */
.case-card__cover--zoom {
  inset: auto;
  left: -4.55%;       /* 60 / 1320 */
  top: -12.12%;       /* 120 / 990 */
  width: 121.21%;     /* 1600 / 1320 */
  height: 121.21%;
}

/* ==========================================================================
   About · "A threshold, woven from home"
   The hero's curtain again, peeking in from the left edge of the window
   (≈45% column), beside the story (≈55%). It sways and parts softly,
   never opens.
   ========================================================================== */
.threshold {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  margin-top: clamp(5rem, 11vw, 8.5rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  position: relative;
}
.threshold::before {                 /* a hairline opens the spread */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: rgba(23, 63, 36, .14);
}
.threshold__visual { margin: 0; }
.threshold__curtain {
  /* bleeds out to the left edge of the window, so the curtain peeks in */
  --bleed: max(clamp(1.25rem, 5vw, 4rem), calc((100vw - 1120px) / 2));
  position: relative;
  width: calc(100% + var(--bleed));
  margin-left: calc(-1 * var(--bleed));
  height: clamp(420px, 72vh, 700px);
  touch-action: pan-y;               /* vertical swipes still scroll the page */
  cursor: grab;
  outline: none;
}
.threshold__finial {             /* the rod's end: a small turned-wood cap */
  position: absolute;
  left: var(--finial-x, 0);
  top: var(--finial-y, 0);
  width: var(--finial-d, 16px);
  height: var(--finial-d, 16px);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #f1e0c4 0%, #c9a27a 38%, #9c7350 72%, #6f4f34 100%);
  box-shadow: 0 1px 2px rgba(60, 40, 20, .35);
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}
.threshold__curtain.is-live .threshold__finial { opacity: 1; }
.threshold__curtain:focus-visible { outline: 2px solid #173f24; outline-offset: 6px; border-radius: 2px; }
.about { overflow-x: clip; }
.threshold__static,
.threshold__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.threshold__static { object-fit: cover; object-position: 30% 0; }
.threshold__canvas { display: block; opacity: 0; transition: opacity .8s ease; }
.threshold__curtain.is-live .threshold__canvas { opacity: 1; }
.threshold__curtain.is-live .threshold__static { opacity: 0; transition: opacity .8s ease; }
.threshold__hint {
  margin-top: -.4rem;              /* the strands end a little above the frame */
  font: .78rem/1.3 'Inder', system-ui, sans-serif;
  letter-spacing: .04em;
  color: #4a5c4f;
  visibility: hidden;                 /* only once the curtain can move */
}
.threshold__visual:has(.is-live) .threshold__hint { visibility: visible; }
.threshold__story { max-width: 34em; }
.threshold__title {
  margin: 0 0 1.4rem;
  font-weight: 300;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #152e1d;
  text-wrap: balance;
}
.threshold__story p:not(.section-eyebrow) {
  margin: 0 0 1.1rem;
  font-size: clamp(1.15rem, 1.5vw, 1.3rem);
  line-height: 1.6;
  color: #2c3e31;
}
.threshold__story p:not(.section-eyebrow):first-of-type {
  font-style: italic;
  font-size: clamp(1.3rem, 1.9vw, 1.55rem);
  line-height: 1.45;
  color: #152e1d;
}
@media (prefers-reduced-motion: reduce) {
  .threshold__hint { display: none; }
  .threshold__curtain { cursor: default; }
}
/* the keyboard hint shows while the curtain has keyboard focus (screen
   readers always get it through aria-describedby) */
.threshold__keys {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.threshold__visual:has(.threshold__curtain:focus-visible) .threshold__keys {
  position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none;
}
@media (max-width: 860px) {
  .threshold { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .threshold__curtain { height: clamp(380px, 62vh, 560px); }
}

/* ==========================================================================
   About and Play pages (about.html, play.html)
   The same sections as before, now on their own pages under a solid bar.
   ========================================================================== */
.subpage { background: #f4f7f2; }
.subpage .page-section { background: #f4f7f2; padding-top: clamp(7.5rem, 16vh, 10rem); }
.subpage .page-section .page-section__title { font-size: clamp(2.8rem, 6vw, 4.6rem); }
.page-next {
  padding: 0 clamp(1.25rem, 5vw, 4rem) clamp(4rem, 9vw, 6rem);
  background: #f4f7f2;
}
.page-next__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(28, 44, 26, .14);
  color: #152e1d;
  text-decoration: none;
}
.page-next__k { font: .75rem/1.3 'Inder', system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #4a5c4f; }
.page-next__t { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 300; line-height: 1.1; }
.page-next__link span[aria-hidden] { font-size: 1.6rem; transition: transform .3s ease; }
.page-next__link:hover span[aria-hidden] { transform: translateX(6px); }
.page-next__link:focus-visible { outline: 2px solid #173f24; outline-offset: 6px; border-radius: 3px; }

/* home → About: a quiet way into the curtain's story */
.contact__story { margin: clamp(2rem, 4vw, 2.75rem) 0 0; }
.contact__story a {
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: #2c3e31;
  text-decoration: underline;
  text-decoration-color: rgba(176, 74, 108, .35);
  text-underline-offset: .25em;
}
.contact__story a span { display: inline-block; font-style: normal; transition: transform .3s ease; }
.contact__story a:hover { color: #152e1d; text-decoration-color: #b04a6c; }
.contact__story a:hover span { transform: translateX(4px); }
.contact__story a:focus-visible { outline: 2px solid #173f24; outline-offset: 4px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .contact__story a span { transition: none; } }
/* land below the fixed bar when arriving at about.html#threshold */
.threshold { scroll-margin-top: 5.5rem; }

/* About · the curtain at the top, drawn aside and tied at the right; its
   loose ends hang on down the right margin and fade out (js/swag-curtain.js) */
.subpage .about { position: relative; }
.subpage .about > .page-section__inner { position: relative; z-index: 1; }
.swag {
  --sw: clamp(220px, calc(100vw - 820px), 620px);
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: var(--sw);
  height: min(600px, max(300px, calc(var(--sw) * .95)));
  pointer-events: none;                /* the section listens; text stays clickable */
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
          mask-image: linear-gradient(180deg, #000 72%, transparent);
  opacity: 0;
  transition: opacity 1s ease;
}
.swag.is-drawn { opacity: 1; }
@media (max-width: 719px) {
  .swag { --sw: 50vw; height: 175px; }   /* the loose ends fade out above the heading */
}
@media (prefers-reduced-motion: reduce) { .swag { transition: none; } }

/* ==========================================================================
   Home · Fresh from the Playground
   A finite carousel of side projects after the case studies. Set apart from
   them as a small gallery of framed prints: an ivory mat with a fine grain
   and a thin sage inner line, each project's image shown whole and
   untouched in its window. js/playground.js runs the arrows.
   ========================================================================== */
.playground {
  --pg-gap: clamp(1rem, 2.2vw, 1.75rem);
  --pg-per: 3.3;                     /* cards across, the last one peeking */
  --pg-pad: clamp(1.25rem, 5vw, 4rem);
  position: relative;
  padding: 0 0 clamp(4rem, 9vh, 6rem);
  isolation: isolate;
  overflow: clip;                    /* the track bleeds to the right edge */
  /* background: see "seams" in the section-motion block below */
}
.playground__inner { max-width: 1120px; margin: 0 auto; }
.pg-intro { padding: clamp(4.5rem, 10vh, 7rem) var(--pg-pad) 0; }
.playground__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  max-width: calc(1120px + 2 * var(--pg-pad));
  margin: 0 auto;
}
.playground__body { position: relative; z-index: 1; isolation: isolate; padding: 0 var(--pg-pad); }
.playground__title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #152e1d;
}
.playground__line {
  margin: .8rem 0 0;
  max-width: 34em;
  font-size: clamp(1.12rem, 1.6vw, 1.28rem);
  line-height: 1.45;
  font-style: italic;
  color: #2c3e31;
}

/* controls: ← → */
.playground__controls { display: flex; align-items: center; gap: .9rem; }
.playground__controls[hidden] { display: none; }
.pg-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(23, 63, 36, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  color: #173f24;
  font: 1.25rem/1 'Inder', system-ui, sans-serif;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
}
.pg-btn:hover:not(:disabled) { background: #173f24; border-color: #173f24; color: #f6f4ea; }
.pg-btn:focus-visible { outline: 2px solid #173f24; outline-offset: 3px; }
.pg-btn:disabled { opacity: .35; cursor: default; }

/* the track: native horizontal scroll with snapping; bleeds right */
.playground__viewport {
  margin: clamp(2rem, 4vw, 2.75rem) calc(50% - 50vw) 0 0;
}
.playground__track {
  display: flex;
  gap: var(--pg-gap);
  margin: 0;
  padding: 1.4rem clamp(1.25rem, 5vw, 4rem) 3.2rem 0;   /* room for the lift and the full shadow (a scroller clips) */
  margin-bottom: -1.4rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  scrollbar-width: none;
  outline: none;
}
.playground__track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .playground__track { scroll-behavior: smooth; } }

/* width of the visible part of the row = the inner column; cards are sized from it */
.pg-card {
  flex: 0 0 calc((min(1120px, 100vw - 2 * clamp(1.25rem, 5vw, 4rem)) - (var(--pg-per) - 1) * var(--pg-gap)) / var(--pg-per));
  scroll-snap-align: start;
  min-width: 0;
}
/* the mat: warm ivory with a very fine grain (the texture is on the mat
   only; the print window sits above it, untouched) */
.pg-card__link {
  --mat: #fbf8f1;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(.9rem, 1.6vw, 1.2rem) clamp(.9rem, 1.6vw, 1.2rem) clamp(1.1rem, 2vw, 1.4rem);
  border-radius: 2px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    var(--mat);
  color: inherit;
  text-decoration: none;
  box-shadow:
    0 1px 1px rgba(56, 52, 40, .06),
    0 6px 14px -8px rgba(56, 52, 40, .16),
    0 22px 38px -26px rgba(56, 52, 40, .28);
  transition: transform .45s cubic-bezier(.25, .7, .25, 1), box-shadow .45s ease;
}
.pg-card__link::after {              /* the thin sage inner line of the mat */
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(118, 146, 121, .38);
  border-radius: 1px;
  pointer-events: none;
}
.pg-card__link:hover,
.pg-card__link:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 1px 1px rgba(56, 52, 40, .07),
    0 10px 20px -10px rgba(56, 52, 40, .2),
    0 30px 48px -26px rgba(56, 52, 40, .36);
}
.pg-card__link:focus-visible { outline: 2px solid #173f24; outline-offset: 5px; }
/* the print window: each image whole, at its own shape, centred */
.pg-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1440 / 940;          /* every print the same size: Zangdok Palri's frame */
}
.pg-card__media img,
.pg-card__media video {
  position: absolute;                /* taller recordings can't stretch the frame */
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;                 /* wider recordings lose a sliver at each side */
  object-position: 50% 50%;
  box-shadow: 0 0 0 1px rgba(56, 52, 40, .08), 0 2px 6px -3px rgba(56, 52, 40, .25);
}
/* Sqwiish's headline sits near its left edge: keep the words, trim the pot */
.pg-card__media video[data-src$="play-sqwiish.mp4"] { object-position: 35% 50%; }
.pg-card__meta {
  display: block;
  margin: 1rem .2rem 0;
  font: .72rem/1.4 'Inder', system-ui, sans-serif;
  letter-spacing: .06em;
  color: #4a5c4f;
}
.pg-card__no {
  display: inline-block;
  margin-right: .55rem;
  padding-right: .55rem;
  border-right: 1px solid rgba(118, 146, 121, .5);
  letter-spacing: .12em;
  color: #6c8a70;
}
.pg-card__title {
  display: block;
  margin: .35rem .2rem 0;
  font-size: clamp(1.3rem, 1.9vw, 1.55rem);
  font-weight: 400;
  line-height: 1.18;
  color: #152e1d;
  overflow-wrap: anywhere;
}
.pg-card__desc {
  display: block;
  margin: .3rem .2rem 0;
  font-size: clamp(1.02rem, 1.48vw, 1.2rem);
  font-style: italic;
  line-height: 1.3;
  color: #3f4b3a;
}
.pg-card__arrow { display: inline-block; font-style: normal; font-size: .8em; transition: transform .3s ease; }
.pg-card__link:hover .pg-card__arrow { transform: translate(2px, -2px); }

.playground__more { margin: clamp(1.25rem, 3vw, 2rem) 0 0; }
.playground__more a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: #2c3e31;
  text-decoration: underline;
  text-decoration-color: rgba(176, 74, 108, .35);
  text-underline-offset: .25em;
}
.playground__more a span { display: inline-block; font-style: normal; transition: transform .3s ease; }
.playground__more a:hover { color: #152e1d; text-decoration-color: #b04a6c; }
.playground__more a:hover span { transform: translateX(4px); }
.playground__more a:focus-visible { outline: 2px solid #173f24; outline-offset: 4px; border-radius: 3px; }

@media (max-width: 1024px) { .playground { --pg-per: 2.2; } }
@media (max-width: 640px)  { .playground { --pg-per: 1.18; } }
@media (prefers-reduced-motion: reduce) {
  .pg-card__link, .pg-card__arrow, .pg-btn,
  .playground__more a span { transition: none; }
}
/* Contact: the hero's wall again, fainter; the details on the left and,
   on the right, a typewriter to leave a note on (js/typewriter.js) */
.page-section.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #eef2ea;
}
.page-section.contact::before {        /* the wall, as in the hero, at low opacity */
  content: "";
  position: absolute;
  inset: -12px;                        /* hides the blurred edges */
  z-index: -1;
  background: url('../assets/img/wall.webp') center bottom / cover no-repeat;
  filter: blur(3px) brightness(1.07);
  opacity: .38;
  pointer-events: none;
}
.contact .page-section__inner { z-index: 1; }
.contact__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 568px);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.contact__layout > .contact__foot { grid-column: 1 / -1; }
@media (max-width: 1000px) {
  .contact__layout { grid-template-columns: minmax(0, 1fr); }
  /* stacked: room above the machine for the paper as it rolls up */
  .contact__layout > .tw { margin-top: calc(var(--tw-s) * 300px); }
}

/* --------------------------------------------------------------------------
   The typewriter (a photograph, in layers: tools/typewriter_build.py)
   Everything inside .tw__stage is in the photo's own pixels (1243 × 1266)
   and scaled to the column by js/typewriter.js (--tw-s). The carriage
   (paper table, platen, bail) slides as you type; the paper (real fields)
   rolls up a line at a time; keys dip and a typebar strikes.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Courier Prime';
  src: url('../assets/fonts/CourierPrime-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.tw { --tw-s: .45; width: 100%; max-width: 580px; justify-self: center; margin: 0; }
.tw__stage {
  position: relative;
  width: 1243px;
  height: 1266px;
  transform: translateX(var(--tw-pad, 0px)) scale(var(--tw-s));
  transform-origin: 0 0;
  margin-bottom: calc((var(--tw-s) - 1) * 1266px);   /* the layout follows the scale */
}
.tw__stage::after {                   /* the machine's shadow on the table */
  content: "";
  position: absolute;
  left: 90px; right: 90px; bottom: -14px;
  height: 46px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(28, 40, 30, .32);
  filter: blur(22px);
}
.tw__layer { position: absolute; left: 0; top: 0; width: 1243px; height: 1266px; max-width: none; pointer-events: none; user-select: none; }
.tw__carriage {
  --cx: 0px;
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translate3d(var(--cx), 0, 0);
  transition: transform .09s cubic-bezier(.3, .7, .3, 1);
}
.tw.is-returning .tw__carriage { transition: transform .42s cubic-bezier(.5, 0, .15, 1); }
.tw.is-stepping .tw__carriage { transform: translate3d(var(--cx), 1.5px, 0); }
.tw__body { z-index: 2; }

/* the paper: from above the machine down to the platen; it feeds up */
.tw__sheet {
  position: absolute;
  left: 236px;
  width: 769px;
  top: -340px;
  height: 888px;                      /* down to y 548, behind the ribbon */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 220px);
          mask-image: linear-gradient(180deg, transparent 0, #000 220px);
}
.tw__sheet::after {                   /* shade where the paper curls under the bail */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  background: linear-gradient(180deg, transparent, rgba(110, 80, 50, .14));
  pointer-events: none;
}
.tw__page {
  --feed: 0px;
  position: absolute;
  left: 0;
  right: 0;
  top: 372px;                         /* the paper's edge, as in the photograph (y 32) */
  min-height: 1600px;
  padding: 56px 62px 120px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #efe0d2 0, #eedfd0 30%, #ecdccd 100%);
  transform: translate3d(0, var(--feed), 0);
  transition: transform .22s cubic-bezier(.3, .7, .3, 1);
  font: 36px/54px 'Courier Prime', 'Courier New', monospace;
  color: #2a2724;
}
.tw__head { margin: 0 0 22px; color: #6f5f52; }
.tw__label {
  display: block;
  margin: 18px 0 2px;
  font: 22px/1.4 'Inder', system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7f705f;
}
.tw__field {
  display: block;
  box-sizing: content-box;
  width: 30ch;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  caret-color: #8e3b5a;
  outline: none;
  text-shadow: 0 0 1px rgba(30, 26, 22, .5);       /* a little ink spread */
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tw__field::placeholder { color: rgba(42, 39, 36, .32); text-shadow: none; }
.tw__mirror {                          /* measures where the caret is (js) */
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  width: 30ch;
  font: 36px/54px 'Courier Prime', 'Courier New', monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tw__page:has(#tw-from:focus) label[for="tw-from"],
.tw__page:has(#tw-note:focus) label[for="tw-note"] { color: #8e3b5a; }   /* where you're typing */
.tw__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* keys: a copy of the keytop that dips into its own well */
.tw__keys { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.tw-key {
  position: absolute;
  left: calc(var(--x) - var(--rx));
  top: calc(var(--y) - var(--ry));
  width: calc(var(--rx) * 2);
  height: calc(var(--ry) * 2);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
}
.tw-key--space { border-radius: 14px; }
.tw-key::before,
.tw-key::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; }
.tw-key::before { background: rgba(26, 20, 12, .78); filter: blur(3px); }            /* the well it sinks into */
.tw-key::after {
  background: url('../assets/typewriter/body.webp') var(--bx) var(--by) / 1243px 1266px no-repeat;
  filter: brightness(.93);
}
.tw-key.is-down::before { opacity: 1; }
.tw-key.is-down::after { opacity: 1; transform: translateY(7px) scale(.95); }
/* a typebar swings up to the print point */
.tw-arm {
  position: absolute;
  left: 619px;
  top: 548px;
  z-index: 3;
  width: 7px;
  height: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #6e5530, #d9b77a, #7a5d33);
  transform-origin: 50% 0;
  opacity: 0;
  pointer-events: none;
}
.tw.is-striking .tw-arm { opacity: 1; animation: tw-strike .1s cubic-bezier(.4, 0, .6, 1) both; }
@keyframes tw-strike { from { transform: rotate(var(--arm, 0deg)) scaleY(.4); } to { transform: rotate(var(--arm, 0deg)) scaleY(1); } }

.tw__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.25rem;
  margin: 1.5rem 0 0;
  justify-content: center;
}
.tw__send {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 46px;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 999px;
  background: #234d33;
  color: #f6f4ea;
  font: 400 .95rem/1 'Inder', system-ui, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.tw__send:hover { background: #173f24; transform: translateY(-1px); }
.tw__send:focus-visible { outline: 2px solid #173f24; outline-offset: 3px; }
.tw__send[disabled] { opacity: .6; cursor: default; transform: none; }
.tw__status { margin: 0; min-height: 1.4em; font-style: italic; font-size: 1.05rem; color: #2c3e31; text-align: center; }
.tw__status a { color: inherit; }
/* sent: the written part is torn off (js/typewriter.js clones the sheet as
   .tw__torn and flies it away); the sheet left behind is a torn stub, then
   a fresh one feeds in from below the platen */
.tw__torn {
  z-index: 4;
  pointer-events: none;
  -webkit-mask-image: none;
          mask-image: none;
  filter: drop-shadow(0 18px 20px rgba(40, 30, 20, .25));
  will-change: transform, opacity;
}
.tw__torn .tw__page { transition: none; }
.tw__torn::after { display: none; }
.tw__crease {                          /* the fold: a soft shadow line across the page */
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
  margin-top: -13px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(90, 65, 40, .22) 45%, rgba(255, 255, 255, .5) 55%, transparent);
  pointer-events: none;
}
.tw.is-torn .tw__sheet:not(.tw__torn) .tw__page { visibility: hidden; }
.tw.is-torn .tw__sheet:not(.tw__torn)::before {   /* the stub: a ragged strip still in the machine */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 804px;
  bottom: 0;
  background: #ecdccd;
  clip-path: polygon(0 6px, 4% 0, 9% 7px, 13% 2px, 18% 8px, 23% 1px, 28% 6px, 33% 0, 38% 7px, 44% 2px, 49% 8px, 54% 1px, 60% 6px, 65% 0, 70% 7px, 76% 2px, 81% 8px, 86% 1px, 91% 6px, 96% 0, 100% 5px, 100% 100%, 0 100%);
}
.tw.is-fresh .tw__page { transition: none; transform: translate3d(0, 520px, 0); }
.tw__sending { opacity: .7; }

@media (prefers-reduced-motion: reduce) {
  .tw__carriage, .tw.is-returning .tw__carriage, .tw__page { transition: none; }
  .tw.is-stepping .tw__carriage { transform: translate3d(var(--cx), 0, 0); }
  .tw-key.is-down::after { transform: none; }
  .tw.is-striking .tw-arm { animation: none; opacity: 0; }
}

/* ==========================================================================
   Section motion (Home, About, Play · js/motion.js)
   Calm and continuous, after sqwiish.com: things rise out of a soft blur,
   headings sharpen word by word, sections fade into one another, and a
   soft band at the foot of the window lets content surface rather than
   slide in. Only with .motion-ok (set in <head> when motion is welcome).
   ========================================================================== */
/* until the script has tagged them, keep these hidden so nothing flashes
   (a failsafe shows them anyway after 3 s) */
.motion-ok body:not(.m-ready) :is(.section-eyebrow, .section-intro, .playground__line,
  .playground__controls, .pg-card, .playground__more, .contact__links > li, .contact__story,
  .contact__foot, .tw, .bio__portrait, .practice__copy, .practice__piece,
  .threshold__story > p, .studio-item, .page-next, .page-section__title, .playground__title,
  .bio__title, .threshold__title, .chapter__title, .chapter__line, .studio-index li, .wall__hang,
  .studio-more > li, .screens__controls, [data-scrub]) {
  opacity: 0;
  animation: m-failsafe .01s 3s forwards;
}
@keyframes m-failsafe { to { opacity: 1; } }
.motion-ok .m-reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition:
    opacity 1.1s cubic-bezier(.16, 1, .3, 1) var(--rd, 0ms),
    transform 1.1s cubic-bezier(.16, 1, .3, 1) var(--rd, 0ms),
    filter 1.1s cubic-bezier(.16, 1, .3, 1) var(--rd, 0ms);
}
.motion-ok .m-reveal.is-in { opacity: 1; transform: none; filter: none; }
.motion-ok .tw.m-reveal { transform: translateY(40px); transition-duration: 1.4s; }
.motion-ok .tw.m-reveal.is-in { transform: none; }

.m-words .mw { display: inline-block; }
.motion-ok .m-words .mw {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(.18em);
  transition:
    opacity .9s cubic-bezier(.16, 1, .3, 1) var(--wd, 0ms),
    filter 1s cubic-bezier(.16, 1, .3, 1) var(--wd, 0ms),
    transform 1s cubic-bezier(.16, 1, .3, 1) var(--wd, 0ms);
}
.motion-ok .m-words.is-in .mw { opacity: 1; filter: none; transform: none; }

.motion-ok .m-scrub span {
  opacity: clamp(.28, calc((var(--p, 1) * (var(--n) + 8) - var(--i)) / 8), 1);
  transition: opacity .12s linear;
}

.m-edge {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: 56px;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .6) 40%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .6) 40%, transparent 100%);
  opacity: 0;
  transition: opacity .6s ease;
}
.m-edge.is-on { opacity: 1; }

/* seams: each section fades into the next instead of meeting at an edge.
   The open hero's wall softens into the Playground's paper at its foot
   (only once the curtain is open, so the closed hero is untouched). */
.hero--live.is-open::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: clamp(180px, 30vh, 320px);
  background: linear-gradient(180deg, rgba(237, 242, 235, 0) 0%, rgba(237, 242, 235, .6) 55%, #edf2eb 100%);
  pointer-events: none;
}
.playground {
  background:
    linear-gradient(180deg, #edf2eb 0, rgba(237, 242, 235, 0) clamp(140px, 22vh, 260px)),
    linear-gradient(0deg, #eef2ea 0, rgba(238, 242, 234, 0) clamp(140px, 22vh, 260px)),
    radial-gradient(120% 80% at 85% 0%, rgba(205, 222, 208, .45), transparent 60%),
    linear-gradient(180deg, #f6f3ec 0%, #f2efe7 100%);
}
.page-section.contact::before {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 clamp(160px, 30vh, 320px));
          mask-image: linear-gradient(180deg, transparent 0, #000 clamp(160px, 30vh, 320px));
}

@media (prefers-reduced-motion: reduce) {
  .m-reveal, .m-words .mw, .m-scrub span { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .m-edge { display: none; }
}

/* ==========================================================================
   Silk and lotus: the editorial motifs beyond the hero
   The curtain stays the hero's signature; these only support the rest.
   .silk  sheer blush tulle in three layers (assets/img/silk-fold.webp and
          silk-ribbon.webp, rendered by tools/silk_render.py after the
          reference photograph: wide matte veils with fine creases along
          their length, denser where they fold over, thin edges;
          silk-threads.svg: loose threads) that drift past each other
          very slowly, so the folds seem to change. Never over content.
          Tune with --silk-o (opacity).
   .lotus the soft-focus lotus cut from the reference photograph
          (assets/img/lotus-blur.webp, alpha), low-contrast, at an edge,
          never animated. Tune with --lotus-h, --lotus-o, --lotus-blur.
   ========================================================================== */
.silk {
  position: absolute;
  pointer-events: none;
  opacity: var(--silk-o, 1);
}
.silk > span {
  position: absolute;
  inset: -8% -6%;
  background: center / 100% 100% no-repeat;
  will-change: transform;
}
.silk > span:nth-child(1) { background-image: url('../assets/img/silk-fold.webp');    animation: silk-a 26s ease-in-out infinite alternate; }
.silk > span:nth-child(2) { background-image: url('../assets/img/silk-ribbon.webp');  animation: silk-b 19s ease-in-out infinite alternate; }
.silk > span:nth-child(3) { background-image: url('../assets/img/silk-threads.svg'); animation: silk-c 31s ease-in-out infinite alternate; opacity: .6; }
.silk--seam > span:nth-child(1) { background-image: url('../assets/img/silk-seam.webp'); }
.silk--seam > span:nth-child(2) { display: none; }          /* one long veil across the seam */
@keyframes silk-a {
  from { transform: translate3d(-2%, 0, 0) rotate(-.6deg) scaleY(1); }
  50%  { transform: translate3d(.5%, -3%, 0) rotate(.4deg) scaleY(1.08); }
  to   { transform: translate3d(2.5%, 2%, 0) rotate(-.2deg) scaleY(.94); }
}
@keyframes silk-b {
  from { transform: translate3d(2%, 2%, 0) rotate(.8deg) scaleY(.96); }
  to   { transform: translate3d(-2.5%, -2%, 0) rotate(-.6deg) scaleY(1.1); }
}
@keyframes silk-c {
  from { transform: translate3d(-1.5%, 3%, 0) skewX(-2deg); }
  to   { transform: translate3d(2%, -3%, 0) skewX(2deg); }
}
/* behind the Playground row: visible around and below the cards only */
.silk--drape {
  --silk-o: .9;
  left: 0;
  right: 0;
  top: 17%;
  height: clamp(200px, 25vw, 340px);   /* behind the cards, well above "Explore the Playground" */
  z-index: -1;
}
/* across the seam into Contact, in the gap between the two sections' words */
.silk-seam { position: relative; z-index: 3; height: 0; overflow-x: clip; overflow-y: visible; }
.silk--seam {
  --silk-o: .85;
  left: 0;
  right: 0;
  top: clamp(-64px, -5vw, -36px);
  height: clamp(120px, 13vw, 190px);
}

.lotus {
  position: absolute;
  z-index: 0;
  height: var(--lotus-h, 300px);
  width: auto;
  opacity: var(--lotus-o, .5);
  filter: blur(var(--lotus-blur, 2px)) saturate(.9);
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}
/* About: rising beside "Next · The Studio", below the threshold story */
.page-next { position: relative; overflow-x: clip; }
.page-next__link { position: relative; z-index: 1; }
.lotus--rise {
  --lotus-h: clamp(170px, 22vw, 300px);
  right: clamp(-48px, -3vw, -16px);
  bottom: 0;
  transform: scaleX(-1) rotate(-5deg);
  transform-origin: 50% 100%;
}
/* Play: leaning in at the top right, in the whitespace beside the heading */
.studio { position: relative; overflow-x: clip; }
.studio > .page-section__inner { position: relative; z-index: 1; }
.lotus--lean {
  --lotus-h: clamp(220px, 20vw, 290px);
  --lotus-o: .45;
  top: clamp(4.75rem, 9vh, 6rem);
  right: clamp(-40px, -2.5vw, -12px);
  transform: scaleX(-1) rotate(7deg);
}
@media (max-width: 1100px) { .lotus--lean { display: none; } }   /* no quiet space left beside the heading */
@media (max-width: 640px) {
  .lotus--rise { --lotus-h: 150px; --lotus-o: .4; }
  .silk--drape { top: 44%; height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .silk > span { animation: none; }
}

/* ==========================================================================
   Depth: scroll-linked drift (js/motion.js writes --sp / --tp / --ep)
   The individual translate / rotate properties keep this apart from each
   element's own transform. Fallbacks are the resting state, so without
   the script (or with reduced motion) nothing moves.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* About: the swept curtain is drawn further aside as you leave the top */
  .motion-ok .swag {
    translate: calc(var(--sp, 0) * 7vw) calc(var(--sp, 0) * -14vh);
    rotate: calc(var(--sp, 0) * 5deg);
    transform-origin: 100% 0;
    opacity: calc(1 - var(--sp, 0) * .55);
  }
  .motion-ok .swag.is-drawn { transition: opacity 1s ease; }
  /* About: the postmark drifts a little faster than the portrait under it */
  .motion-ok .bio__photo { translate: 0 calc((var(--tp, .5) - .5) * -36px); }
  .motion-ok .bio__postmark { translate: 0 calc((var(--tp, .5) - .5) * -90px); }
  /* About: the threshold curtain slides in from the edge, the story follows */
  .motion-ok .threshold__curtain { translate: calc((1 - var(--ep, 1)) * -16vw) 0; }
  .motion-ok .threshold__story { translate: 0 calc((1 - var(--ep, 1)) * 50px); }
  /* the lotus accents rise / sink slowly */
  .motion-ok .lotus--rise { translate: 0 calc((1 - var(--ep, 1)) * 90px); }
  .motion-ok .lotus--lean { translate: 0 calc(var(--sp, 0) * 120px); }
  /* Play: the second column trails the first, an editorial stagger */
  .motion-ok .studio-item:nth-child(even) { translate: 0 calc((1 - var(--ep, 1)) * 90px); }
  /* Contact: the still life settles up into place; the seam silk drifts */
  .motion-ok .tw { translate: 0 calc((1 - var(--ep, 1)) * 50px); }
  .motion-ok .silk--seam { translate: calc((var(--tp, .5) - .5) * -10vw) 0; }
}

/* page to page (Home, About, Play only; each opts in in its <head>):
   the old page softens away, the new one opens through an aperture */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-soften .55s cubic-bezier(.4, 0, .2, 1) both; }
  ::view-transition-new(root) { animation: vt-aperture .95s cubic-bezier(.7, 0, .2, 1) both; }
}
@keyframes vt-soften { to { opacity: 0; filter: blur(10px); transform: scale(.985); } }
@keyframes vt-aperture {
  from { clip-path: ellipse(0% 0% at 50% 55%); }
  to   { clip-path: ellipse(125% 125% at 50% 55%); }
}

/* ==========================================================================
   Play · The Studio, in four rooms (js/studio.js)
   ========================================================================== */
.studio-hero { position: relative; overflow-x: clip; }
.studio-hero > .page-section__inner { position: relative; z-index: 1; }
/* the index: four rooms, like the contents of a book */
.studio-index { margin: clamp(2.25rem, 5vw, 3.5rem) 0 0; }
.studio-index ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(23, 63, 36, .16);
}
.studio-index li + li { border-left: 1px solid rgba(23, 63, 36, .16); }
.studio-index a {
  display: grid;
  gap: .35rem;
  height: 100%;
  padding: 1.1rem 1.1rem 1.3rem;
  color: #152e1d;
  text-decoration: none;
  transition: background .3s ease;
}
.studio-index a:hover { background: rgba(255, 255, 255, .5); }
.studio-index a:focus-visible { outline: 2px solid #173f24; outline-offset: -2px; }
.studio-index__no { font: .78rem/1 'Inder', system-ui, sans-serif; letter-spacing: .14em; color: #8e3b5a; }
.studio-index__name { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.15; }
.studio-index__count { font: .74rem/1.3 'Inder', system-ui, sans-serif; letter-spacing: .06em; color: #5b6a58; }
@media (max-width: 760px) {
  .studio-index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-index li:nth-child(3) { border-left: 0; }
  .studio-index li:nth-child(n + 3) { border-top: 1px solid rgba(23, 63, 36, .16); }
}

/* a room */
.chapter {
  position: relative;
  padding: clamp(4.5rem, 10vh, 7rem) 0;
  scroll-margin-top: 4.5rem;
  overflow-x: clip;
}
.chapter__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(1rem, 2.5vw, 2rem);
  align-items: end;
  max-width: 1120px;
  margin: 0 auto clamp(2rem, 5vw, 3.25rem);
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}
.chapter__no {
  grid-row: span 2;
  margin: 0;
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 300;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(142, 59, 90, .55);
}
.chapter__title { margin: 0; font-weight: 300; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.05; color: #152e1d; }
.chapter__line { margin: .55rem 0 0; font-style: italic; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: #2c3e31; }

/* ---- 01 · the screen carousel ------------------------------------------ */
.chapter--screens { background: linear-gradient(180deg, #eef2ea, #f3f1ea); }
.screens { position: relative; }
.screens__track {
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
  margin: 0;
  padding: 1.5rem calc(50vw - 120px) 1rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  perspective: 1600px;
  outline: none;
}
.screens__track::-webkit-scrollbar { display: none; }
.screens__track:focus-visible { outline: 2px solid #173f24; outline-offset: -4px; }
.screen {
  --d: 0;        /* signed distance from the centre, in slides (js) */
  --ad: 0;       /* the same, unsigned, capped at 1.5 */
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotateY(calc(var(--d) * -26deg)) scale(calc(1 - var(--ad) * .16));
  transform-origin: 50% 50%;
  opacity: calc(1 - var(--ad) * .42);
  transition: opacity .2s linear;
  will-change: transform;
}
.screen--web { width: clamp(270px, 56vw, 760px); }
.screen--phone { width: clamp(150px, 17vw, 240px); }
.screen__device {
  display: block;
  width: 100%;
  cursor: pointer;
  filter: saturate(calc(1 - var(--ad) * .35));
}
.screen--web .screen__device {
  border-radius: 12px;
  overflow: hidden;
  background: #fbf8f1;
  box-shadow: 0 0 0 1px rgba(56, 52, 40, .1), 0 30px 60px -30px rgba(28, 44, 26, .45);
}
.screen__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: #f1ece2;
  border-bottom: 1px solid rgba(56, 52, 40, .08);
}
.screen__chrome i { width: 9px; height: 9px; border-radius: 50%; background: #d9cfbf; }
.screen__chrome i:first-child { background: #e3a7b6; }
.screen__url {
  flex: 1;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fbf8f1;
  font: .68rem/1.2 'Inder', system-ui, sans-serif;
  color: #6c7a69;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.screen__view { display: block; aspect-ratio: 16 / 9.6; overflow: hidden; background: #e9e5dc; }
.screen__view img, .screen__view video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.screen--phone .screen__view { aspect-ratio: 620 / 1280; background: transparent; }
.screen--phone .screen__view img, .screen--phone .screen__view video { object-fit: contain; filter: drop-shadow(0 26px 30px rgba(28, 44, 26, .35)); }
/* a phone filmed on its own backdrop (tinted to the room) carries no cut-out shadow */
.screen--phone .screen__view video.screen__clip--flat { filter: none; }
/* a mockup cropped at the phone's chin: let the bottom dissolve instead of ending on a hard edge */
.screen--phone .screen__view--middle { display: flex; align-items: center; }
.screen--phone .screen__view .screen__clip--cut { height: auto; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 96%); mask-image: linear-gradient(180deg, #000 70%, transparent 96%); }
.screen__cap {
  width: min(100%, 30rem);
  margin-top: 1.4rem;
  text-align: center;
  opacity: clamp(0, calc(1 - var(--ad) * 2.4), 1);
  transform: translateY(calc(var(--ad) * 14px));
}
.screen--phone .screen__cap { width: 18rem; }
.screen__meta { margin: 0; font: .74rem/1.4 'Inder', system-ui, sans-serif; letter-spacing: .08em; color: #5b6a58; }
.screen__title { margin: .3rem 0 0; font-weight: 400; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.15; color: #152e1d; }
.screen__desc { margin: .3rem 0 0; font-style: italic; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.35; color: #3f4b3a; }
.screen__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  margin-top: .2rem;
  font-style: italic;
  font-size: 1.1rem;
  color: #2c3e31;
  text-decoration: underline;
  text-decoration-color: rgba(176, 74, 108, .35);
  text-underline-offset: .25em;
}
.screen__cta:hover { color: #152e1d; text-decoration-color: #b04a6c; }
.screen__cta:focus-visible { outline: 2px solid #173f24; outline-offset: 3px; border-radius: 3px; }
.screens__controls { display: flex; justify-content: center; gap: .9rem; margin-top: 1rem; }

/* ---- 02 · the screening room --------------------------------------------- */
.chapter--film {
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(80, 104, 86, .35), transparent 70%),
    #18251d;
  color: #f2efe6;
}
.chapter--film .chapter__title { color: #f6f3ea; }
.chapter--film .chapter__line { color: rgba(242, 239, 230, .78); }
.chapter--film .chapter__no { -webkit-text-stroke-color: rgba(233, 184, 197, .6); }
.film { --drift: 0; overflow: hidden; padding: 2rem 0 1rem; }
.film__strip {
  --hole: 14px;
  display: flex;
  align-items: stretch;
  gap: 18px;
  width: max-content;
  margin: 0 auto;
  padding: 38px 18px;
  background:
    radial-gradient(circle at 50% 50%, #18251d 42%, transparent 46%) 0 9px / 26px var(--hole) repeat-x,
    radial-gradient(circle at 50% 50%, #18251d 42%, transparent 46%) 0 calc(100% - 9px) / 26px var(--hole) repeat-x,
    #0b0f0c;
  border-radius: 4px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
  transform: rotate(-2deg) translateX(calc((var(--drift) - .5) * -14vw));
  will-change: transform;
}
.film__leader {
  display: grid;
  place-items: center;
  width: clamp(120px, 14vw, 200px);
  background: #241d14;
  color: rgba(242, 222, 190, .5);
  font: .72rem/1.3 'Inder', system-ui, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.film__frame {
  display: flex;
  flex-direction: column;
  width: clamp(260px, 40vw, 560px);
  color: inherit;
  text-decoration: none;
  background: #1b1915;
}
.film__picture { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.film__picture img, .film__picture video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.25, .7, .25, 1), filter .6s ease; filter: sepia(.18) saturate(.9); }
.film__frame:hover .film__picture img, .film__frame:hover .film__picture video,
.film__frame:focus-visible .film__picture img, .film__frame:focus-visible .film__picture video { transform: scale(1.03); filter: none; }
.film__play {
  position: absolute;
  left: 50%; top: 50%;
  width: 58px; height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: rgba(246, 243, 234, .88);
  transition: opacity .3s ease, transform .3s ease;
}
.film__play::before { content: ""; position: absolute; left: 23px; top: 18px; border-left: 16px solid #18251d; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.film__frame.is-playing .film__play { opacity: 0; transform: scale(.8); }
.film__cap { display: grid; gap: .15rem; padding: .9rem 1rem 1rem; }
.film__meta { font: .72rem/1.4 'Inder', system-ui, sans-serif; letter-spacing: .1em; color: #e9b8c5; text-transform: uppercase; }
.film__title { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.15; color: #f6f3ea; }
.film__frame:focus-visible { outline: 2px solid #e9b8c5; outline-offset: 4px; }
@media (max-width: 720px) {
  .film { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .film__strip { transform: none; padding-left: 18px; }
  .film__frame { scroll-snap-align: center; width: 78vw; }
  .film__leader { width: 64px; }
}

/* ---- 03 · the gallery wall -------------------------------------------- */
.chapter--wall {
  --mx: 50%;
  --my: 30%;
  background:
    radial-gradient(520px 420px at var(--mx) var(--my), rgba(255, 249, 232, .9), rgba(255, 249, 232, 0) 70%),
    linear-gradient(180deg, #ebe4d6, #e5ddcd);
}
.wall {
  columns: 3 260px;
  column-gap: clamp(1.5rem, 3.5vw, 3rem);
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}
.wall__hang { break-inside: avoid; padding: 1.2rem 0 clamp(1.5rem, 3vw, 2.5rem); }
.wall__hang:nth-child(3n + 2) { padding-top: 3rem; }
.wall__piece {
  position: relative;
  display: block;
  width: 100%;
  padding: clamp(10px, 1.4vw, 16px);
  border: 0;
  background: #fbf8f1;
  box-shadow:
    0 0 0 6px #2f2a22,
    0 0 0 7px #4a4236,
    0 26px 40px -22px rgba(40, 32, 20, .55),
    0 4px 8px rgba(40, 32, 20, .12);
  cursor: zoom-in;
  transition: transform .5s cubic-bezier(.25, .7, .25, 1), box-shadow .5s ease;
}
.wall__piece img { display: block; width: 100%; height: auto; }
.wall__piece:hover, .wall__piece:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 0 0 6px #2f2a22, 0 0 0 7px #4a4236, 0 40px 54px -26px rgba(40, 32, 20, .6), 0 6px 10px rgba(40, 32, 20, .14);
}
.wall__piece:focus-visible { outline: 2px solid #8e3b5a; outline-offset: 12px; }
.wall__hang::before {                 /* the picture wire and its nail */
  content: "";
  display: block;
  width: 34%;
  height: 1.2rem;
  margin: -1.2rem auto 0;
  border: 1px solid rgba(60, 50, 36, .45);
  border-bottom: 0;
  transform: translateY(1.2rem) perspective(40px) rotateX(38deg);
  transform-origin: bottom;
}
@media (max-width: 640px) { .wall { columns: 2 140px; } .wall__hang:nth-child(3n + 2) { padding-top: 1.2rem; } .wall__hang:nth-child(even) { padding-top: 2.5rem; } }

/* ---- 04 · the fanned deck ------------------------------------------------ */
.chapter--deck { background: linear-gradient(180deg, #f3f1ea, #eef2ea); }
.deck {
  --n: 5;
  position: relative;
  height: clamp(360px, 40vw, 520px);
  max-width: 1120px;
  margin: 0 auto;
}
.deck__card {
  --i: 0;          /* position from the middle (js) */
  --lift: 0;       /* 1 for the card in focus */
  --push: 0px;     /* nudged aside by the card in focus */
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: clamp(180px, 22vw, 290px);
  aspect-ratio: 4 / 5;
  margin-left: calc(clamp(180px, 22vw, 290px) / -2);
  transform-origin: 50% 120%;
  transform:
    translateX(calc(var(--i) * clamp(70px, 10vw, 150px) + var(--push)))
    translateY(calc(var(--lift) * -46px + var(--i) * var(--i) * 6px))
    rotate(calc(var(--i) * 7deg * (1 - var(--lift))));
  transition: transform .55s cubic-bezier(.25, .8, .25, 1);
  z-index: calc(10 - var(--z, 0));
}
.deck__card.is-up { z-index: 20; }
.deck__piece {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: #fbf8f1;
  box-shadow: 0 0 0 1px rgba(56, 52, 40, .08), 0 24px 40px -24px rgba(40, 32, 20, .5);
  cursor: zoom-in;
}
.deck__piece img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; }
.deck__piece:focus-visible { outline: 2px solid #8e3b5a; outline-offset: 5px; }
@media (max-width: 720px) {
  .deck { display: flex; gap: 1rem; height: auto; padding: 1rem clamp(1.25rem, 5vw, 4rem) 2rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .deck__card { position: relative; left: auto; bottom: auto; flex: 0 0 62vw; width: 62vw; margin: 0; transform: none !important; scroll-snap-align: center; }
}
/* brand and character projects, after the deck */
.studio-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 1120px;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  list-style: none;
}
.studio-more__link { display: grid; grid-template-columns: 38% minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 1.1rem; align-items: start; padding: .8rem; border-radius: 6px; background: rgba(255, 255, 255, .55); color: inherit; text-decoration: none; transition: background .3s ease, transform .3s ease; }
.studio-more__link:hover { background: #fffdf8; transform: translateY(-3px); }
.studio-more__link:focus-visible { outline: 2px solid #173f24; outline-offset: 4px; }
.studio-more__media { grid-row: span 2; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: #1d1b22; }
.studio-more__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.studio-more__media--figure { background: radial-gradient(circle at 50% 40%, #3a3a44, #1d1b22 70%); }
.studio-more__media--figure img { object-fit: contain; padding: 8%; }
.studio-more__meta { margin-top: .3rem; font: .72rem/1.4 'Inder', system-ui, sans-serif; letter-spacing: .06em; color: #5b6a58; }
.studio-more__title { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.2; color: #152e1d; }
@media (max-width: 640px) { .studio-more { grid-template-columns: minmax(0, 1fr); } }

/* ---- the chapter rail ---------------------------------------------------- */
.chapter-rail {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 45;
  display: flex;
  gap: .2rem;
  padding: .3rem;
  border-radius: 999px;
  background: rgba(251, 248, 241, .86);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(23, 63, 36, .1), 0 14px 30px -14px rgba(28, 44, 26, .4);
  transform: translate(-50%, 160%);
  opacity: 0;
  transition: transform .5s cubic-bezier(.25, .8, .25, 1), opacity .4s ease;
}
.chapter-rail.is-on { transform: translate(-50%, 0); opacity: 1; }
.chapter-rail a {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-height: 38px;
  padding: 0 .85rem;
  border-radius: 999px;
  font: .78rem/1 'Inder', system-ui, sans-serif;
  letter-spacing: .06em;
  color: #33493b;
  text-decoration: none;
  transition: background .3s ease, color .3s ease;
}
.chapter-rail a:hover { background: rgba(23, 63, 36, .07); }
.chapter-rail a[aria-current="true"] { background: #234d33; color: #f6f4ea; }
.chapter-rail a:focus-visible { outline: 2px solid #173f24; outline-offset: 2px; }
@media (max-width: 560px) { .chapter-rail a:not([aria-current="true"]) .chapter-rail__name { display: none; } }

/* ---- the lightbox ------------------------------------------------------- */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f6f3ea;
}
.lightbox::backdrop { background: rgba(14, 22, 17, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .35s ease both; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox__figure { display: grid; justify-items: center; gap: .8rem; margin: 0; padding: 4.5rem clamp(4rem, 9vw, 7rem) 2rem; }
.lightbox__img { display: block; max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); animation: lb-img .45s cubic-bezier(.25, .8, .25, 1) both; }
@keyframes lb-img { from { opacity: 0; transform: scale(.97); } }
.lightbox__cap { max-width: 42rem; text-align: center; font-style: italic; font-size: 1.05rem; color: rgba(246, 243, 234, .82); }
.lightbox__btn, .lightbox__close {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(246, 243, 234, .35);
  border-radius: 50%;
  background: rgba(246, 243, 234, .08);
  color: #f6f3ea;
  font: 1.25rem/1 'Inder', system-ui, sans-serif;
  cursor: pointer;
}
.lightbox__btn:hover, .lightbox__close:hover { background: rgba(246, 243, 234, .2); }
.lightbox__btn:focus-visible, .lightbox__close:focus-visible { outline: 2px solid #e9b8c5; outline-offset: 3px; }
.lightbox__btn--prev { left: clamp(.75rem, 2vw, 1.5rem); top: 50%; margin-top: -24px; }
.lightbox__btn--next { right: clamp(.75rem, 2vw, 1.5rem); top: 50%; margin-top: -24px; }
.lightbox__close { right: clamp(.75rem, 2vw, 1.5rem); top: clamp(.75rem, 2vw, 1.5rem); font-size: 1.6rem; }
@media (max-width: 640px) {
  .lightbox__figure { padding: 4.5rem 1rem 5.5rem; }
  .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 1.25rem; margin: 0; }
  .lightbox__btn--prev { left: calc(50% - 60px); }
  .lightbox__btn--next { right: calc(50% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  .screen, .screen__cap { transition: none; }
  .screen { transform: none; }
  .film__strip { transform: rotate(-2deg); }
  .film__picture img, .film__picture video, .film__play, .wall__piece, .deck__card, .studio-more__link, .chapter-rail { transition: none; }
  .lightbox[open], .lightbox__img { animation: none; }
}
