/* =========================================================
   THE GREW — portfolio styles
   Edit the tokens below to retune the whole site.
   ========================================================= */

/* Eudoxus Sans — SIL Open Font License 1.1, github.com/stijndevries/Eudoxus-Sans
   Variable font (weights 200–800), kept in the site (assets/fonts) so it loads from the same place as
   everything else; the pinned online copy is only a fallback. */
@font-face {
  font-family: "Eudoxus Sans";
  src: url("../assets/fonts/EudoxusSansGX.woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/gh/stijndevries/Eudoxus-Sans@2f55c84d2581a80d4b0a906fed38f433cbdb7b7f/Eudoxus-Sans-font/Variable/EudoxusSansGX.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #111111;
  --text: #333333;
  --muted: #8a8a86;
  --line: #e8e8e5;
  --ph: #f4f4f2;            /* placeholder / image background */
  --font: "Eudoxus Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --section: clamp(96px, 14vh, 168px);
  /* Motion: short and snappy, like the logo */
  --ease: cubic-bezier(.16, 1, .3, 1);        /* fast attack, quick stop */
  --snap: cubic-bezier(.3, 1.45, .45, 1);     /* fast with a small overshoot (click into place) */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap { max-width: var(--max); margin: 0 auto; width: 100%; }
section { padding: var(--section) var(--gutter); }

.eyebrow {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Reveal on scroll (blur → focus, same language as the logo) ---------- */
.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(22px);
  transition: opacity .38s var(--ease), filter .45s var(--ease), transform .62s var(--snap);
  transition-delay: calc(var(--d, 0s) * .75);
}
.reveal.in { opacity: 1; filter: blur(0); transform: none; }

.split .w {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(.35em);
  transition: opacity .32s var(--ease), filter .38s var(--ease), transform .58s var(--snap);
  transition-delay: calc(var(--i) * 38ms);
}
.split.in .w { opacity: 1; filter: blur(0); transform: none; }

/* ---------- Media + placeholders ---------- */
.media {
  position: relative;
  aspect-ratio: var(--r, 3/2);
  background: var(--ph);
  overflow: hidden;
}
.media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
/* Once a real image loads, show it at its own proportions (drawings never get cropped) */
.media.loaded:not(.fill) { aspect-ratio: auto; background: transparent; }
.media.loaded:not(.fill) img { height: auto; }
.media.loaded .ph-label { display: none; }   /* transparent PNGs would otherwise show the placeholder through them */
.ph-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #a3a39e;
  text-align: center; padding: 16px;
}
.ph-label small { font-size: 11px; letter-spacing: .02em; text-transform: none; color: #bdbdb8; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transform: translateY(-100%);
  transition: transform .35s var(--ease), border-color .35s;
}
.topbar.show { transform: none; border-color: var(--line); }
.topbar__logo { font-size: 13px; font-weight: 600; letter-spacing: .24em; }
.topbar__nav { display: flex; gap: 28px; }
.topbar__nav a { font-size: 13px; color: var(--muted); transition: color .3s; }
.topbar__nav a:hover, .topbar__nav a.active { color: var(--ink); }

/* ---------- 1. Hero ---------- */
.hero {
  height: 100vh; height: 100svh;
  display: grid; place-items: center;
  position: relative; padding: 0;
  background: #fff;
}
/* The logo animation itself (blur-in, roof tilt, letters growing) is driven by js/logo-anim.js */
.hero__logo canvas {
  --w: min(72vw, 600px);
  display: block;
  width: var(--w);
  /* logo area is 870 × 520 (assets/logo/logo-geo.js) plus 560 of empty room on top for the falling roof */
  aspect-ratio: 870 / 1080;
  height: auto;
  margin-top: calc(var(--w) * -560 / 870);   /* pull the extra room up so the logo itself stays centred */
  opacity: 0;                  /* JS fades it in */
  pointer-events: none;
}
.hero { overflow: hidden; }
.logo-text {
  display: block;
  font-size: clamp(36px, 8vw, 112px);
  font-weight: 500;
  letter-spacing: .32em;
  margin-right: -.32em;   /* optically re-centre tracked text */
  white-space: nowrap;
}
.hero__cue {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  opacity: 0; transition: opacity .8s 1.3s;
}
.is-loaded .hero__cue { opacity: 1; }
.hero__cue .ic { height: 64px; color: var(--ink); }
@keyframes cue { to { top: 100%; } }

/* ---------- 2. Identity ---------- */
.identity { min-height: 100vh; display: flex; align-items: center; }
.identity__tagline {
  font-size: clamp(34px, 5.4vw, 80px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.025em;
  max-width: 18ch;
  margin: 28px 0 clamp(56px, 10vh, 112px);
}
.identity__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 112px);
  border-top: 1px solid var(--line); padding-top: 40px;
}
.identity__col h3 {
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 16px;
}
/* project subtitles (Context, Concept, Existing plan, Integration…): one style for all */
.b-text h3, .b-split h3, .sp-text h3, .b-times h3 {
  font-size: 1.17rem; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.6;
  margin-bottom: 16px;
}
.identity__col p { font-size: clamp(16px, 1.25vw, 19px); color: var(--text); max-width: 52ch; }
.identity__col p + p { margin-top: 1em; }

/* ---------- 3. Projects carousel ---------- */
.projects { min-height: 100vh; display: flex; align-items: center; }
.projects__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.counter { font-size: 13px; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter b { color: var(--ink); font-weight: 500; }

.carousel { position: relative; }
.carousel__stage {
  position: relative; width: 100%;
  height: min(56.25vw, 66vh);   /* 16:9, capped so the brief stays on screen */
  overflow: hidden; background: var(--ph);
}
.slide {
  position: absolute; inset: 0; cursor: pointer;
  opacity: 0; filter: blur(18px); transform: scale(1.04);
  transition: opacity .3s var(--ease), filter .35s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.slide.active { opacity: 1; filter: blur(0); transform: none; pointer-events: auto; }
.slide .media { height: 100%; aspect-ratio: auto; }

.carousel__arrow {
  position: absolute; bottom: 20px; z-index: 2;   /* bottom corners of the image */
  width: 40px; height: 40px; border-radius: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92);
  transition: transform .25s var(--snap), background .2s;
}
.carousel__arrow:hover { background: #fff; transform: scale(1.08); }
.carousel__arrow .ic { height: 20px; }
.carousel__arrow--prev { left: 20px; }
.carousel__arrow--next { right: 20px; }

.carousel__info {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
  gap: clamp(24px, 4vw, 72px); align-items: start;
  padding-top: 28px; min-height: 150px;
}
/* Outgoing text: quick fade. Transition lives only on .swap so new text appears instantly. */
.carousel__info.swap > * { opacity: 0; filter: blur(6px); transition: opacity .15s var(--ease), filter .15s var(--ease); }

/* Incoming text, word by word. --delay is set per word in main.js (identity first, then description, then link) */
.carousel__info .w { display: inline-block; opacity: 0; will-change: transform, opacity; }
.carousel__info.play .w--slide {
  animation: wordSlide .54s cubic-bezier(.2, .9, .3, 1) both;
  animation-delay: var(--delay, 0ms);
}
.carousel__info.play .w--fall {
  transform-origin: 0 100%;
  animation: wordFall .58s cubic-bezier(.5, 0, .4, 1) both;   /* gravity in, then a hard landing */
  animation-delay: var(--delay, 0ms);
}
/* Slide in from the right, overshoot slightly left, settle (follow-through) */
@keyframes wordSlide {
  0%   { opacity: 0; transform: translateX(1.6em); }
  55%  { opacity: 1; transform: translateX(-.14em); }
  78%  { transform: translateX(.04em); }
  100% { opacity: 1; transform: none; }
}
/* Drop from above, land a touch low, settle */
@keyframes wordFall {
  0%   { opacity: 0; transform: translateY(-1.1em) rotate(-5deg); }
  55%  { opacity: 1; transform: translateY(.07em) rotate(.6deg); }
  78%  { transform: translateY(-.02em) rotate(0deg); }
  100% { opacity: 1; transform: none; }
}
.ci__num { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.ci__title { font-size: clamp(24px, 2.4vw, 36px); font-weight: 400; letter-spacing: -.015em; line-height: 1.15; margin: 6px 0 8px; }
.ci__meta { font-size: 13px; color: var(--muted); }
.ci__brief { font-size: clamp(15px, 1.1vw, 17px); color: var(--text); max-width: 56ch; }
.ci__link {
  display: inline-block; white-space: nowrap;
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  padding-bottom: 4px; border-bottom: 1px solid var(--ink);
}
.carousel__info .ci__link { border-bottom-color: transparent; }
.carousel__info.play .ci__link { border-bottom-color: var(--ink); transition: border-color .2s calc(var(--group-delay, 0ms) + 120ms); }
.ci__link .ic { height: 20px; margin-left: 8px; vertical-align: -4px; transition: transform .25s var(--snap); }
.ci__link:hover .ic { transform: translateY(3px); }

.carousel__dots { display: flex; gap: 8px; margin-top: 28px; }
.carousel__dots button { flex: 0 0 40px; height: 16px; position: relative; }
.carousel__dots button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--line); transition: background .2s, height .2s;
}
.carousel__dots button.active::after { background: var(--ink); height: 2px; }

/* ---------- 4. Project details ---------- */
.details { padding-top: 0; padding-bottom: 0; }
.project { padding: var(--section) 0; border-top: 1px solid var(--line); }
.project__head {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 112px);
  align-items: end; margin-bottom: clamp(56px, 9vh, 112px);
}
.project__title {
  font-size: clamp(44px, 6.4vw, 104px); font-weight: 400;
  letter-spacing: -.035em; line-height: .98; margin-top: 16px;
}
.project__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.project__meta div { border-top: 1px solid var(--line); padding-top: 10px; }
.project__meta dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.project__meta dd { font-size: 15px; margin-top: 2px; }

.blocks { display: flex; flex-direction: column; gap: clamp(56px, 9vh, 120px); }

.b-text { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 6vw, 112px); }
.b-text p, .b-split p { font-size: clamp(16px, 1.2vw, 19px); color: var(--text); max-width: 60ch; }
.b-text p + p, .b-split p + p { margin-top: 1em; }

.b-image--full { margin: 0 calc(-1 * var(--gutter)); }
.b-image--full figcaption { padding: 0 var(--gutter); }
.b-image--inset { width: min(100%, 880px); margin: 0 auto; }

.b-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 32px); align-items: start; }
/* a small diagram next to a big image, centred against it */
.b-pair--small-large { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); align-items: center; }
.b-pair--small-large > figure:first-child { max-width: 300px; justify-self: center; }
/* several images stacked in one column of a pair */
.b-stack { display: grid; gap: clamp(16px, 2vw, 32px); }
.b-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); align-items: start; }

.b-quote { max-width: 30ch; margin: 0 auto; text-align: center; }
.b-quote p { font-size: clamp(26px, 3.2vw, 48px); line-height: 1.2; letter-spacing: -.02em; }
.b-quote cite { display: block; margin-top: 20px; font-style: normal; font-size: 13px; color: var(--muted); }

.b-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; border-top: 1px solid var(--line); padding-top: 32px; }
.b-facts strong { display: block; font-size: clamp(32px, 4vw, 60px); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.b-facts span { font-size: 13px; color: var(--muted); }

.b-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 112px); align-items: center; }
.b-split.flip { grid-template-columns: 1fr 1.3fr; }
.b-split.flip figure { order: 2; }
/* small image beside a wider text column (e.g. Tuwuhan's 28 m² diagram) */
.b-split.small { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.b-split.small.flip { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.b-split.small figure { width: 100%; max-width: 340px; justify-self: center; }
/* a small drawing under a text block's subtitle */
.b-text__head figure { margin-top: 20px; max-width: 240px; }
/* a statement's drawing never grows taller than the screen, whatever its shape */
.b-statement .b-module__art { max-width: min(100%, calc(84vh * var(--ar, .8))); }

/* Animated module axonometric (js/module-anim.js) with one line beside it */
.b-module {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 112px); align-items: center;
}
.b-module__line {
  font-size: clamp(36px, 4.6vw, 76px); font-weight: 400;
  letter-spacing: -.035em; line-height: 1.02;
}
.b-module__art {
  position: relative; width: 100%; justify-self: center;
  max-width: calc(88vh * 1170 / 1675);   /* whole drawing fits on screen */
  -webkit-tap-highlight-color: transparent;
}
.b-module__art:focus { outline: none; }
.b-module__art:focus-visible { outline: 2px solid currentColor; outline-offset: 8px; }
/* "Press me to see more": over the module's centre while it's blurred */
.b-module__prompt {
  position: absolute; z-index: 1; pointer-events: none; white-space: nowrap;
  font-size: clamp(15px, 1.3vw, 19px); font-weight: 500; letter-spacing: -.01em; color: #111;
  opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.94);
  transition: opacity .16s var(--ease), transform .3s var(--snap);
}
.b-module__art.is-prompt .b-module__prompt { opacity: 1; transform: translate(-50%, -50%); }
.b-module__art.is-still .b-module__prompt { display: none; }

/* ---------- Ecosystem: today → with the hub (js/ecosystem-anim.js) ----------
   A normal block: the line of text and the stage counter above the drawing,
   and a play button in the drawing's lower-right corner. */
.b-eco { --eco-navy: #2E3B5E; }
.eco-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; min-height: 2.4em; margin-bottom: 18px; }
.eco-caption {
  font-size: clamp(24px, 2.6vw, 40px); font-weight: 400; letter-spacing: -.02em; line-height: 1.1;
  color: var(--ink); max-width: 24ch; opacity: 0;
}
.eco-caption.in { animation: ecoIn .9s var(--ease) both; }
@keyframes ecoIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.eco-count { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.eco-count b {
  display: inline-block; margin-right: 8px; vertical-align: -.1em;
  font-size: clamp(36px, 3.4vw, 56px); font-weight: 400; letter-spacing: -.03em; color: var(--eco-navy);
}
.eco-count b.tick { animation: ecoTick .5s var(--snap); }
@keyframes ecoTick { from { opacity: 0; transform: translateY(-40%); } to { opacity: 1; transform: none; } }
.eco-stage { position: relative; width: 100%; aspect-ratio: 2000 / 1091; }
.eco-stage canvas, .eco-stage img { display: block; width: 100%; height: 100%; }
/* play button = the fish, floating in the drawing's lower-right corner as if under water.
   No words: ripples spreading under it and bubbles rising from its mouth say "press me". */
.eco-play {
  position: absolute; right: 6px; bottom: 6px; z-index: 1;
  width: 96px; height: 76px; display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.eco-fish {
  position: relative; z-index: 1; width: 64px; height: auto; overflow: visible;
  transform: scaleX(-1);                             /* faces into the drawing */
  animation: ecoFloat 3.2s ease-in-out infinite;
  transition: transform .3s var(--snap);
}
@keyframes ecoFloat {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(0deg); }
  25%      { transform: scaleX(-1) translateY(-5px) rotate(-3deg); }
  50%      { transform: scaleX(-1) translateY(-1px) rotate(1deg); }
  75%      { transform: scaleX(-1) translateY(4px) rotate(3deg); }
}
.eco-play:hover .eco-fish, .eco-play:focus-visible .eco-fish { animation-duration: 1.4s; }
.eco-play:focus { outline: none; }
.eco-play:focus-visible { outline: 2px solid var(--eco-navy); outline-offset: 2px; }
/* ripples: flat rings spreading out under the fish, like a touch on water */
.eco-ripple {
  position: absolute; left: 50%; top: 66%; width: 46px; height: 12px; margin: -6px 0 0 -23px;
  border: 2px solid #F39A2B; border-radius: 50%; opacity: 0; pointer-events: none;
  animation: ecoRipple 2.4s ease-out infinite;
}
.eco-ripple + .eco-ripple { animation-delay: 1.2s; }
@keyframes ecoRipple {
  0%   { opacity: .9; transform: scale(.4); }
  100% { opacity: 0;  transform: scale(2); }
}
/* bubbles: rise from the fish's mouth and fade */
.eco-bubbles { position: absolute; left: 26px; top: 26px; width: 12px; height: 40px; pointer-events: none; }
.eco-bubbles i {
  position: absolute; bottom: 0; left: 0; width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid var(--eco-navy); background: #fff; opacity: 0;
  animation: ecoBubble 2.6s ease-in infinite;
}
.eco-bubbles i:nth-child(2) { left: 5px; width: 5px; height: 5px; animation-delay: .9s; }
.eco-bubbles i:nth-child(3) { left: -3px; width: 4px; height: 4px; animation-delay: 1.7s; }
@keyframes ecoBubble {
  0%   { opacity: 0; transform: translate(0, 0) scale(.6); }
  15%  { opacity: .9; }
  100% { opacity: 0; transform: translate(-4px, -34px) scale(1.1); }
}
/* while the story plays, the cues stop and the fish just drifts, faded */
.b-eco[data-state="playing"] .eco-ripple, .b-eco[data-state="playing"] .eco-bubbles { display: none; }
.b-eco[data-state="playing"] .eco-fish { opacity: .35; animation-duration: 5s; }
.eco-play:disabled { cursor: default; }
.b-eco.is-static .eco-play { display: none; }

/* ---------- Adaptability: times of day (js/times.js) ---------- */
.b-times { --tm-navy: #2E3B5E; --tm-orange: #F39A2B; }
.tm-strip { position: relative; width: 100%; margin-top: clamp(20px, 3vw, 36px); }
.tm-strip img { width: 100%; height: 100%; user-select: none; }
/* each icon is a button sitting over it */
.tm-btn { position: absolute; background: rgba(255, 255, 255, 0); transition: background .3s var(--ease), transform .25s var(--snap); }
.tm-btn:hover { transform: translateY(-3px); }
.tm-btn::before { content: ""; position: absolute; inset: -12px; }   /* bigger tap area, invisible */
.tm-btn:focus { outline: none; }
.tm-btn:focus-visible { outline: 2px solid var(--tm-navy); outline-offset: 4px; }
/* once one is chosen, the others fade back */
.b-times.has-sel .tm-btn:not([aria-pressed="true"]) { background: rgba(255, 255, 255, .62); }
.b-times.has-sel .tm-btn:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .35); }
/* the chosen icon: four navy corner brackets close in around it, like a viewfinder */
.tm-btn::after {
  content: ""; position: absolute; pointer-events: none; opacity: 0;
  left: var(--fl); top: var(--ft); width: var(--fw); height: var(--fh);   /* one size for all (js/times.js) */
  transform: scale(1.18);
  --c: var(--tm-navy); --l: min(16px, 14%); --t: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
  transition: transform .45s var(--snap), opacity .3s var(--ease);
}
.b-times.has-sel .tm-btn[aria-pressed="true"]::after { opacity: 1; transform: none; }
.tm-sentence {
  margin-top: 34px; max-width: 62ch;
  font-size: clamp(17px, 1.4vw, 22px); line-height: 1.45; color: var(--ink);
}
/* the activity, revealed under the line */
.tm-panel { overflow: hidden; transition: height .6s cubic-bezier(.65, 0, .25, 1); }
.tm-panel__in { padding-top: 0; }
.b-times.has-sel .tm-panel__in { padding-top: clamp(24px, 3vw, 40px); }
/* the hint: a cursor hopping from icon to icon, clicking each, until one is chosen */
.tm-cursor {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; opacity: 0;
  width: clamp(15px, 1.7vw, 22px); margin: -2px 0 0 -2px; transform-origin: 2px 2px;
  filter: drop-shadow(0 2px 3px rgba(20, 28, 48, .25));
}
.tm-cursor svg { display: block; width: 100%; height: auto; overflow: visible; }
.tm-cursor path { fill: var(--tm-navy); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.tm-ring {
  position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; opacity: 0;
  width: clamp(34px, 4vw, 56px); aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--tm-navy); transform: translate(-50%, -50%);
}
.tm-btn.is-hint { transform: translateY(-3px); }
.tm-grid { display: grid; gap: clamp(16px, 2vw, 32px); align-items: start; }
.tm-grid figure { margin: 0; }
.tm-grid img { display: block; width: 100%; height: auto; background: var(--ph); }

/* ---------- Site plan: click a name, see the place (js/site-plan.js) ---------- */
.b-siteplan { --sp-navy: #2E3B5E; --sp-orange: #F39A2B; }
.sp-text { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 6vw, 112px); margin-bottom: clamp(28px, 4vw, 48px); }
.sp-text p { font-size: clamp(16px, 1.2vw, 19px); color: var(--text); max-width: 60ch; }
/* Before a name is clicked the plan sits centred on its own; on the first click it slides
   left into its column and the photo is wiped in beside it. The photo column takes the
   plan's height, so nothing empty ever shows. */
.sp-grid {
  container-type: inline-size;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: stretch;
}
.sp-plan {
  position: relative; width: 100%; align-self: start;
  transform: translateX(calc((100cqw - 100%) / 2));          /* centred in the whole row */
  transition: transform .85s cubic-bezier(.65, 0, .25, 1);
}
.b-siteplan.has-photo .sp-plan { transform: none; }
.sp-plan img { width: 100%; height: 100%; user-select: none; }
.sp-areas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sp-area { fill: var(--sp-orange); opacity: 0; transition: opacity .25s var(--ease); }
.sp-area.hover { opacity: .14; }
.sp-area.on { opacity: .28; }
/* the place names: clickable chips sitting exactly over the names printed on the plan */
.sp-chip {
  position: absolute; z-index: 1; transform: translate(-50%, -50%);
  padding: .3em .8em; background: #fff; color: var(--sp-navy);
  border: 1.5px solid var(--sp-navy); border-radius: 0;
  font-size: clamp(11px, 1.05vw, 14px); font-weight: 600; letter-spacing: .02em; white-space: nowrap; text-align: center;
  transition: transform .25s var(--snap), background .15s, color .15s;
}
.sp-chip:hover, .sp-chip:focus-visible { transform: translate(-50%, -50%) scale(1.07); outline: none; }
.sp-chip[aria-pressed="true"] { background: var(--sp-navy); color: #fff; }
/* until something is chosen, the names pulse gently so it's clear they can be clicked */
.b-siteplan:not(.has-photo) .sp-chip { animation: spPulse 2.2s ease-in-out infinite; }
.b-siteplan:not(.has-photo) .sp-chip:nth-of-type(2) { animation-delay: .25s; }
.b-siteplan:not(.has-photo) .sp-chip:nth-of-type(3) { animation-delay: .5s; }
.b-siteplan:not(.has-photo) .sp-chip:nth-of-type(4) { animation-delay: .75s; }
@keyframes spPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(243, 154, 43, 0); } 40% { box-shadow: 0 0 0 5px rgba(243, 154, 43, .45); } }

.sp-photo {
  margin: 0; min-height: 0; display: flex; flex-direction: column;
  /* hidden, then wiped in from the left as the plan moves out of the way */
  opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-24px); pointer-events: none;
  transition: clip-path .85s cubic-bezier(.65, 0, .25, 1) .12s, transform .85s cubic-bezier(.65, 0, .25, 1) .12s, opacity .3s ease .12s;
}
.b-siteplan.has-photo .sp-photo { opacity: 1; clip-path: inset(0 0 0 0); transform: none; pointer-events: auto; }
.sp-frame { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--ph); }
.sp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-caption { margin-top: 14px; min-height: 3.2em; }
.sp-caption b { display: block; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--sp-navy); }
.sp-caption span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--text); }

/* ---------- Follow the fish (js/fish-tour.js) ---------- */
.b-tour { margin: 0 calc(-1 * var(--gutter)); }
.fish-tour { --navy: #2E3B5E; --orange: #F39A2B; --paper: #F6F3EA; outline: none; }
.ft-view { position: relative; }
.ft-stage {
  position: relative; overflow: hidden; aspect-ratio: 2000 / 1292;
  background: var(--paper); touch-action: pan-y;
}
.ft-cam {
  position: absolute; inset: 0; transform-origin: 0 0;
  will-change: transform;   /* moved every frame by js/fish-tour.js (eased camera), so no CSS transition */
}
.ft-cam img { width: 100%; height: 100%; user-select: none; }
.ft-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ft-dim { fill: #0d1730; opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; }
.fish-tour.is-dim .ft-dim { opacity: .5; }
.ft-ring {
  fill: none; stroke: var(--orange); stroke-width: 5;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: ftRing .5s var(--ease) .1s forwards;
}
@keyframes ftRing { to { stroke-dashoffset: 0; } }
.ft-trail { fill: none; stroke: var(--navy); stroke-width: 6; stroke-dasharray: 14 10; stroke-linecap: round; }
.ft-hot { fill: transparent; pointer-events: all; cursor: help; }
.fish-tour.is-tour .ft-hot { pointer-events: none; }
.ft-fish { cursor: pointer; outline: none; }
.fish-tour.is-tour .ft-fish { cursor: default; }
.ft-fish:focus-visible .ft-bubble__box { stroke: var(--orange); stroke-width: 5; }
.ft-props, .ft-props * { pointer-events: none; }
.ft-shadow { fill: #0d1730; pointer-events: none; }

/* hello bubble: white, navy text, pops in on each new language */
.ft-bubble { opacity: 0; transition: opacity .2s var(--ease); pointer-events: none; }
.fish-tour.is-hello .ft-bubble { opacity: 1; pointer-events: auto; }
.ft-bubble__in { transform-box: fill-box; transform-origin: 50% 100%; }
.ft-bubble__box, .ft-bubble__tail { fill: #fff; }
.ft-bubble__text { fill: var(--navy); font-family: var(--font); font-size: 30px; font-weight: 600; letter-spacing: .01em; }
.ft-fish:hover .ft-bubble__box { fill: var(--paper); }

/* splash: ripples, droplets and a little crown of water */
.ft-ripple { fill: none; stroke: #fff; stroke-width: 4; transform-box: fill-box; transform-origin: center; }
.ft-drop { fill: #fff; transform-box: fill-box; transform-origin: center; }
.ft-crown { fill: #fff; transform-box: fill-box; transform-origin: 50% 100%; }

/* Text boxes shaped like the logo: square corners, a top edge that slants up to the
   right like the logo's roof, and a navy roof bar floating just above it.
   --rise: how much the slant climbs across the box; --bar: roof thickness; --gap: space under the roof */
.ft-tip, .ft-caption { --bar: 6px; --gap: 4px; isolation: isolate; }
.ft-tip::before, .ft-caption::before,
.ft-tip::after, .ft-caption::after {
  content: ""; position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none;
}
.ft-tip::before, .ft-caption::before {          /* the roof bar */
  top: 0; height: calc(var(--rise) + var(--bar)); background: var(--navy);
  clip-path: polygon(0 var(--rise), 100% 0, 100% var(--bar), 0 calc(var(--rise) + var(--bar)));
}
.ft-tip::after, .ft-caption::after {            /* the block under it, same slope */
  top: calc(var(--bar) + var(--gap)); bottom: 0; background: #fff;
  clip-path: polygon(0 var(--rise), 100% 0, 100% 100%, 0 100%);
}

.ft-tip {
  --rise: 12px;
  position: absolute; z-index: 2; max-width: 240px; pointer-events: none;
  padding: calc(var(--bar) + var(--gap) + var(--rise) + 6px) 14px 11px; color: var(--navy);
  font-size: 13px; line-height: 1.4;
  opacity: 0; transform: translate(-50%, calc(-100% - 6px)) scale(.94);
  transition: opacity .15s var(--ease), transform .3s var(--snap);
}
.ft-tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 14px)); }
.ft-tip b { display: block; font-weight: 600; font-size: 14px; letter-spacing: .02em; }

.ft-caption {
  position: absolute; z-index: 2; left: clamp(12px, 2vw, 28px); bottom: clamp(12px, 2vw, 28px);
  --rise: 18px;
  max-width: min(380px, 70%); padding: calc(var(--bar) + var(--gap) + var(--rise) + 8px) 20px 18px;
  color: var(--navy);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .45s var(--snap);
}
.ft-caption.show { opacity: 1; transform: none; pointer-events: auto; }
.ft-caption.right { left: auto; right: clamp(12px, 2vw, 28px); }
.ft-caption b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.ft-caption p { margin-top: 4px; font-size: 14px; line-height: 1.5; color: #44506f; }
.ft-caption .ft-fishicon { width: 30px; }
.ft-caption small { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
/* the split: pick which fish to follow */
.ft-ask { font-weight: 600; color: var(--navy) !important; margin-top: 10px !important; }
.ft-choices { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ft-choice {
  padding: 9px 14px; border: 1.5px solid var(--navy); border-radius: 0;
  font-size: 13px; font-weight: 600; color: var(--navy);
  transition: background .15s, color .15s, transform .25s var(--snap);
}
.ft-choice:hover { background: var(--navy); color: #fff; transform: scale(1.03); }
.ft-choice--other { margin-top: 12px; }
.ft-twin { cursor: pointer; }
.ft-twin .ft-shadow { pointer-events: none; }
.ft-steps button.fork { border-top-style: dashed; color: var(--muted); cursor: default; }

.ft-fishicon { width: 26px; height: auto; flex: none; }
.ft-bar { padding: 18px var(--gutter) 0; }
.ft-explore, .ft-tour { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.ft-tour { display: none; }
.fish-tour.is-tour .ft-explore { display: none; }
.fish-tour.is-tour .ft-tour { display: flex; }
.ft-hint.ft-hint--fish {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 0;
  font-size: 13px; letter-spacing: .02em; text-transform: none; color: var(--navy); font-weight: 500;
}
.ft-hint--fish .ft-fishicon { animation: ftWiggle 1.2s ease-in-out infinite; }
@keyframes ftWiggle { 50% { transform: rotate(-8deg) translateX(2px); } }
.ft-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ft-chip {
  padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--text); transition: border-color .15s, background .15s, color .15s;
}
.ft-chip:hover { border-color: var(--navy); }
.ft-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.ft-hint { margin-left: auto; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.ft-steps { display: flex; gap: 4px; list-style: none; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ft-steps button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; color: var(--muted);
  border-top: 3px solid var(--line); border-radius: 0;
  transition: color .15s, border-color .25s var(--ease);
}
.ft-steps b { font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.ft-steps span { font-size: 13px; }
.ft-steps button:hover { color: var(--navy); }
.ft-steps button.done { border-top-color: var(--orange); color: var(--text); }
.ft-steps button.on { border-top-color: var(--navy); color: var(--navy); }
.ft-nav {
  width: 40px; height: 40px; display: grid; place-items: center; flex: none;
  border: 1.5px solid var(--line); transition: transform .25s var(--snap), border-color .15s;
}
.ft-nav:hover:not(:disabled) { border-color: var(--navy); transform: scale(1.06); }
.ft-nav:disabled { opacity: .35; cursor: default; }
.ft-nav .ic { height: 20px; }
/* previous / next stop: inside the image, lower-right corner, like the carousel arrows */
.ft-stage .ft-nav {
  position: absolute; bottom: 20px; z-index: 3;
  display: none; border: 0; background: rgba(255, 255, 255, .92);
}
.ft-stage .ft-next { right: 20px; }
.ft-stage .ft-prev { right: 68px; }            /* 20px edge + 40px button + 8px gap */
.fish-tour.is-tour .ft-stage .ft-nav { display: grid; }
.ft-stage .ft-nav:hover:not(:disabled) { background: #fff; }
/* keep the caption clear of the button when it sits on the right */
.fish-tour.is-tour .ft-caption.right { bottom: calc(clamp(12px, 2vw, 28px) + 56px); }
.ft-exit { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.ft-exit:hover { color: var(--navy); }
.b-module__art canvas { display: block; width: 100%; height: auto; aspect-ratio: 1170 / 1675; }
.b-module__art.is-still img { display: block; width: 100%; height: auto; }

.back {
  display: inline-block; margin-top: clamp(56px, 9vh, 112px);
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  transition: color .3s;
}
.back:hover { color: var(--ink); }

/* ---------- 5. Misc — scattered, floating images ---------- */
.misc { border-top: 1px solid var(--line); overflow: hidden; }
.misc__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.misc__title { font-size: clamp(34px, 4.4vw, 64px); font-weight: 400; letter-spacing: -.03em; line-height: 1.05; margin-top: 16px; }
.misc__hint { font-size: 13px; color: var(--muted); }
/* the hint matches how the visitor looks closer: a resting cursor, or a tap on touch screens */
.misc__hint .hint-touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .misc__hint .hint-hover { display: none; }
  .misc__hint .hint-touch { display: inline; }
}

.misc__field {
  position: relative;
  height: clamp(560px, 92vh, 960px);
  margin-top: clamp(32px, 6vh, 64px);
}

.misc__item {
  position: absolute;           /* left/right + top/bottom set in main.js */
  z-index: 1;
  display: block; padding: 0; text-align: left;
  cursor: zoom-in;
}
.misc__item.is-open { z-index: 10; cursor: default; }

/* gentle drift; each item gets its own speed/direction */
.misc__float {
  display: block;
  animation: miscFloat var(--dur, 7s) ease-in-out var(--delay, 0s) infinite alternate;
}
.misc__item.is-open .misc__float { animation-play-state: paused; }
@keyframes miscFloat {
  from { transform: translate(0, 0) rotate(var(--r0, 0deg)); }
  to   { transform: translate(var(--fx, 6px), var(--fy, -10px)) rotate(var(--r1, 0deg)); }
}

.misc__card {
  display: block;
  width: var(--w);
  background: var(--bg);
  transition: width .5s var(--snap), box-shadow .3s var(--ease), opacity .3s var(--ease), filter .3s var(--ease), padding .4s var(--ease);
}
.misc__item.is-open .misc__card {
  width: var(--open-w);
  padding-bottom: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .28);
}
.misc__card .media { display: block; }
.misc__card .ph-label { font-size: 10px; letter-spacing: .1em; padding: 8px; gap: 2px; }
.misc__card .ph-label small { font-size: 9px; }

/* 1-second dwell indicator */
.misc__bar {
  display: block; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .15s var(--ease);
}
.misc__item.is-dwell .misc__bar { transform: scaleX(1); transition: transform 1s linear; }
.misc__item.is-open .misc__bar { transform: scaleX(0); transition: none; }

/* description: collapsed until open */
.misc__cap {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.misc__cap > span { overflow: hidden; padding: 0 14px; }
.misc__item.is-open .misc__cap { grid-template-rows: 1fr; }
.misc__cap b, .misc__cap em, .misc__desc {
  display: block;
  opacity: 0; transform: translateX(1.2em);
  transition: opacity .25s var(--ease), transform .45s var(--snap);
}
.misc__item.is-open .misc__cap b, .misc__item.is-open .misc__cap em, .misc__item.is-open .misc__desc { opacity: 1; transform: none; }
.misc__item.is-open .misc__cap b { transition-delay: .12s; }
.misc__item.is-open .misc__desc { transition-delay: .18s; }
.misc__item.is-open .misc__cap em { transition-delay: .24s; }
.misc__cap b { font-weight: 500; font-size: 15px; letter-spacing: -.01em; padding-top: 12px; }
.misc__desc { font-size: 13px; color: var(--text); line-height: 1.5; margin-top: 4px; }
.misc__cap em { font-style: normal; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* everything else steps back while one is open */
.misc__field.has-open .misc__item:not(.is-open) .misc__card { opacity: .25; filter: grayscale(1); }

/* the year, hanging under each thumbnail on a thin line and swaying a little as it floats */
.misc__float { position: relative; }
.misc__tag {
  position: absolute; top: 100%; left: 50%;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  pointer-events: none;
  transform-origin: 50% 0;
  animation: miscSwing calc(var(--dur, 7s) * .55) ease-in-out var(--delay, 0s) infinite alternate;
  transition: opacity .25s var(--ease);
}
.misc__tag-line { width: 1px; height: 14px; background: var(--muted); opacity: .85; }
.misc__tag-year {
  font-size: 10.5px; line-height: 1; letter-spacing: .14em;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
@keyframes miscSwing {
  from { transform: translateX(-50%) rotate(-5deg); }
  to   { transform: translateX(-50%) rotate(5deg); }
}
.misc__item.is-open .misc__tag { opacity: 0; }
.misc__field.has-open .misc__item:not(.is-open) .misc__tag { opacity: .25; }

/* ---------- 6. About ---------- */
.about { border-top: 1px solid var(--line); padding-bottom: 0; }
.about__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 128px); align-items: center;
  min-height: calc(100vh - 2 * var(--section));
}
.about__name { font-size: clamp(44px, 5.6vw, 88px); font-weight: 400; letter-spacing: -.035em; line-height: 1; margin-top: 20px; }
.about__role { font-size: 15px; color: var(--muted); margin-top: 12px; }
.about__bio { margin-top: 36px; }
.about__bio p { font-size: clamp(16px, 1.25vw, 19px); color: var(--text); max-width: 56ch; }
.about__bio p + p { margin-top: 1em; }

.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 44px; }
.contacts div { border-top: 1px solid var(--line); padding: 12px 0; }
.contacts div:first-child { grid-column: 1 / -1; }   /* email on its own row; LinkedIn and Education pair below */
.contacts dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contacts dd { font-size: 15px; overflow-wrap: anywhere; }
.contacts a { transition: opacity .3s; }
.contacts a:hover { opacity: .55; }

.btn-download {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 44px; padding: 18px 28px;
  border: 1px solid var(--ink);
  font-size: 14px; letter-spacing: .06em;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn-download small { font-size: 11px; letter-spacing: .14em; color: var(--muted); transition: color .2s; }
.btn-download .ic { height: 30px; margin: -6px 0; }
.btn-download:hover { background: var(--ink); color: #fff; }
.btn-download:hover small { color: #bbb; }

.footer {
  display: flex; justify-content: space-between;
  margin-top: var(--section); padding: 28px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); letter-spacing: .06em;
}
.footer a:hover { color: var(--ink); }

/* ---------- Icons (js/icons.js) — same roof, same click as the logo ---------- */
.ic {
  display: inline-block; height: 1em; width: auto; fill: currentColor; overflow: visible; flex: none;
  --press: 4px;               /* how far the roof sinks when the block squashes (≈10% of block height, in icon units) */
}
.ic--next, .ic--prev { --press: 3px; }
.ic--prev { transform: scaleX(-1); }   /* mirror of "next": shape and click motion */
.ic--monogram { --press: 27px; }
.ic-roof { transform-box: fill-box; transform-origin: 0 100%; }
/* the block is flat and still; it only squashes (from the bottom) when the roof lands, like the hero logo */
.ic-body { transform-box: fill-box; transform-origin: 50% 100%; }

/* A press: the roof clicks down, the block squashes under it, both spring back */
@keyframes icClick {
  0%   { transform: none; }
  30%  { transform: translateY(var(--press)) rotate(5.5deg); }
  55%  { transform: translateY(calc(var(--press) * -.4)) rotate(-1deg); }
  100% { transform: none; }
}
@keyframes icSquash {
  0%   { transform: none; }
  30%  { transform: scaleY(.9); }
  55%  { transform: scaleY(1.03); }
  100% { transform: none; }
}
.is-click .ic-roof { animation: icClick .38s var(--ease); }
.is-click .ic-body { animation: icSquash .38s var(--ease); }

/* 1. Monogram in the menu bar + footer */
.topbar__logo { display: flex; align-items: center; color: var(--ink); }
.topbar__logo .ic { height: 28px; }
.topbar__logo:hover .ic-roof, .footer__top:hover .ic-roof { animation: icClick .38s var(--ease); }
.topbar__logo:hover .ic-body, .footer__top:hover .ic-body { animation: icSquash .38s var(--ease); }
.footer__top { display: inline-flex; align-items: center; gap: 10px; }
.footer__top .ic { height: 20px; color: var(--ink); }

/* 2. Section marks: the roof drops onto the number when the section arrives */
.eyebrow--mark { display: flex; align-items: center; gap: 14px; }
.eyebrow--mark .ic { height: 30px; color: var(--ink); }
.eyebrow--mark .ic-roof { opacity: 0; }
.eyebrow--mark.in .ic-roof { animation: icDrop .55s var(--ease) .25s both; }
.eyebrow--mark.in .ic-body { animation: icDropSquash .55s var(--ease) .25s both; }
@keyframes icDrop {
  0%   { opacity: 0; transform: translateY(-16px); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  40%  { opacity: 1; transform: translateY(0); }
  50%  { transform: translateY(var(--press)); }
  65%  { transform: translateY(-2px); }
  82%, 100% { opacity: 1; transform: none; }
}
@keyframes icDropSquash {
  0%, 40% { transform: none; }
  50%     { transform: scaleY(.9); }
  65%     { transform: scaleY(1.03); }
  82%, 100% { transform: none; }
}

/* 4. Scroll cue: drop → click (block squashes) → hold → lift, on a loop */
.hero__cue .ic-roof { animation: icCue 2.4s infinite; }
.hero__cue .ic-body { animation: icCueSquash 2.4s infinite; }
.hero__cue .ic-ticks { opacity: 0; animation: icTicks 2.4s infinite; }
@keyframes icCue {
  0%, 8%   { opacity: 0; transform: translateY(-24px); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  27%      { opacity: 1; transform: translateY(0); }
  31%      { transform: translateY(var(--press)); }
  37%      { transform: translateY(-2.5px); }
  43%, 82% { opacity: 1; transform: translateY(0); }
  100%     { opacity: 0; transform: translateY(-24px); }
}
@keyframes icCueSquash {
  0%, 27%   { transform: none; }
  31%       { transform: scaleY(.9); }
  37%       { transform: scaleY(1.03); }
  43%, 100% { transform: none; }
}
@keyframes icTicks {
  0%, 27% { opacity: 0; }
  30%     { opacity: 1; }
  42%, 100% { opacity: 0; }
}

/* 5. Download: the lid swings open on hover, slams shut on click (box squashes under it) */
.btn-download .ic-roof { transition: transform .4s var(--snap); }
.btn-download:hover .ic-roof { transform: rotate(-18deg); }
.btn-download.is-slam .ic-roof { transform: none; animation: icSlam .45s var(--ease); }
.btn-download.is-slam .ic-body { animation: icSlamSquash .45s var(--ease); }
@keyframes icSlam {
  0%   { transform: rotate(-18deg); animation-timing-function: cubic-bezier(.6, 0, 1, .6); }
  40%  { transform: rotate(0); }
  52%  { transform: translateY(var(--press)) rotate(0); }
  66%  { transform: translateY(-1px) rotate(-3deg); }
  84%, 100% { transform: none; }
}
@keyframes icSlamSquash {
  0%, 40% { transform: none; }
  52%     { transform: scaleY(.9); }
  66%     { transform: scaleY(1.03); }
  84%, 100% { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .topbar__nav { gap: 18px; }
  /* phones: pictures fade and slide in without the blur (blurring a large image is heavy for them);
     text keeps its blur-to-focus */
  .reveal:has(img, canvas, .media), .slide { filter: none !important; }
  .identity__grid, .project__head, .b-text, .b-split, .b-split.flip, .b-module, .about__grid, .sp-text, .sp-grid { grid-template-columns: 1fr; }
  /* adaptability on phones: the activity's pictures stack */
  .tm-grid { grid-template-columns: 1fr !important; }
  /* ecosystem on phones: caption above the counter, smaller play button */
  .eco-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .eco-play { width: 80px; height: 64px; right: 0; bottom: 0; }
  .eco-fish { width: 52px; }
  /* phones: plan full width; the photo appears underneath only once a place is chosen */
  .sp-plan { transform: none; }
  .b-siteplan:not(.has-photo) .sp-photo { display: none; }
  .sp-frame { flex: none; aspect-ratio: 4 / 5; }
  /* Follow the fish: caption moves under the aerial; steps show numbers only */
  .ft-caption { position: static; max-width: none; margin: 14px var(--gutter) 0; padding: 0; transform: translateY(8px); }
  .ft-caption::before, .ft-caption::after { display: none; }   /* on phones the caption is plain text under the aerial */
  .ft-stage .ft-nav { width: 32px; height: 32px; bottom: 10px; }
  .ft-stage .ft-nav .ic { height: 16px; }
  .ft-stage .ft-next { right: 10px; }
  .ft-stage .ft-prev { right: 48px; }
  .ft-caption:not(.show) { display: none; }
  .ft-steps span { display: none; }
  .ft-steps { flex-basis: 100%; order: -1; gap: 3px; }
  .ft-steps li { flex: 1; }
  .ft-steps button { width: 100%; align-items: center; padding: 6px 0; }
  .ft-exit { margin-left: auto; }
  .b-split.flip figure { order: 0; }
  .b-pair { grid-template-columns: 1fr; }
  .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carousel__stage { height: 62vw; }
  .carousel__arrow { width: 32px; height: 32px; bottom: 10px; }
  .carousel__arrow .ic { height: 16px; }
  .carousel__arrow--prev { left: 10px; }
  .carousel__arrow--next { right: 10px; }
  .carousel__info { grid-template-columns: 1fr; gap: 16px; min-height: 0; }
  .about__grid { min-height: 0; }
  .misc__field { height: max(940px, 250vw); }   /* taller on phones: room for 13 works and their hanging years */
  .about__portrait { max-width: 420px; }
}
@media (max-width: 480px) {
  .contacts { grid-template-columns: 1fr; }
  /* names on the small plan sit close together: tighter chips so Market and Auction Hall don't touch */
  .sp-chip { font-size: 10px; padding: .2em .45em; border-width: 1px; }
  .sp-chip[data-id="market"] { margin-top: 7px; }   /* clears the Auction Hall chip on the small plan */
  .b-grid { grid-template-columns: 1fr; }
  .topbar__logo .ic { height: 22px; }
  .topbar__nav a { font-size: 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .split .w, .hero__logo, .slide, .hero__cue { transition: none !important; animation: none !important; }
  .carousel__info .w, .misc__float, .misc__tag, .ic-roof, .ic-body, .ic-ticks { animation: none !important; }
  .ic-roof { opacity: 1 !important; }
  .reveal, .split .w, .carousel__info .w, .hero__logo, .hero__cue { opacity: 1 !important; filter: none !important; transform: none !important; }
}
