:root {
  --ink: #edf1f6;          /* soft cool white */
  --ink-dim: rgba(237, 241, 246, 0.72);
  --accent: #9cc8ff;       /* soft blue: the cabin light, links and highlights */
  --accent-deep: #5f93d6;
  --night: #0d1424;
  --cabin-bg: #0d1219;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- forest homepage ---------- */
.home { overflow-x: hidden; } /* the homepage scrolls: the hero stays fixed, the statement rises over it */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.scene img,
.scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scene img { transition: transform 1.2s cubic-bezier(.7, 0, .3, 1); }
.scene canvas { opacity: 0; transition: opacity .8s ease; }
.scene canvas.ready { opacity: 1; }
.scene #leaves { opacity: 1; pointer-events: none; }

.grain {
  position: absolute; inset: -50%;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(8, 10, 18, .78) 0%, rgba(8, 10, 18, .35) 32%, transparent 58%),
    linear-gradient(to bottom, rgba(8, 10, 18, .45) 0%, transparent 18%),
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(5, 6, 12, .45) 100%);
}

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) 0;
  font-size: 14px;
  letter-spacing: .02em;
}
.home .topbar { position: fixed; z-index: 3; } /* stays put while the page scrolls */
.topbar-right { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.lang {
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-decoration: none;
  color: var(--ink-dim);
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid rgba(228, 236, 245, .22);
  transition: color var(--snap, .15s), border-color var(--snap, .15s), background var(--snap, .15s);
}
.lang:hover, .lang:focus-visible { color: var(--ink); border-color: var(--accent); background: rgba(132, 176, 230, .12); }
/* job-hunting status: small and calm, a soft green "available" dot */
.status {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 24px;
  font-size: 13px; color: var(--ink);
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: rgba(8, 10, 18, .35); border: 1px solid rgba(228, 236, 245, .14);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #8fd18a;
  box-shadow: 0 0 0 0 rgba(143, 209, 138, .6); animation: avail 2.6s ease-out infinite;
}
@keyframes avail { 70% { box-shadow: 0 0 0 6px rgba(143, 209, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 209, 138, 0); } }
.intro:has(.status) .lede { margin-bottom: 16px; }
.mark { font-family: var(--serif); font-size: 19px; text-decoration: none; }
.sr-only { /* readable by screen readers and agents, invisible on screen */
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.topbar nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.topbar nav a { text-decoration: none; color: var(--ink-dim); transition: color .2s; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--ink); }

.intro {
  position: absolute;
  left: var(--gutter);
  bottom: max(clamp(28px, 7vh, 72px), env(safe-area-inset-bottom));
  max-width: min(520px, calc(100vw - 2 * var(--gutter)));
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 92px);
  line-height: .95;
  letter-spacing: -.02em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
/* headline: "I craft product experiences where design and engineering meet" */
.intro h1.headline {
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -.015em;
  max-width: 17em; /* two lines on desktop, three on phones */
  text-wrap: balance; /* even line lengths, no lonely last word */
}
.headline .keep { white-space: nowrap; } /* "engineering meet" / "de l'ingénierie" stay together */
.intro:has(.headline) { max-width: min(960px, calc(100vw - 2 * var(--gutter))); }
.intro .headline + .status { margin-top: 22px; } /* the status pill follows the headline directly */
:root { --snap: 150ms cubic-bezier(.4, 0, .2, 1); } /* one quick, consistent ease for hovers */
.w-design, .w-eng { position: relative; display: inline-block; cursor: pointer; outline: none; }
/* "design": a design-tool selection frame with handles and a layer label */
.w-design .sel {
  position: absolute; inset: -.02em -.14em -.06em; pointer-events: none;
  border: 1.5px dashed var(--accent);
  border-radius: 2px;
  opacity: 0; transform: scale(.97);
  transition: opacity var(--snap), transform var(--snap);
}
.w-design .sel i {
  position: absolute; width: 7px; height: 7px; background: var(--night); border: 1.5px solid var(--accent);
}
.w-design .sel i:nth-child(1) { left: -4px; top: -4px; }
.w-design .sel i:nth-child(2) { right: -4px; top: -4px; }
.w-design .sel i:nth-child(3) { left: -4px; bottom: -4px; }
.w-design .sel i:nth-child(4) { right: -4px; bottom: -4px; }
/* the layer label: "type here". Click it to name the layer (js/headline.js swaps in an input) */
.w-design .sel-hit {
  position: absolute; z-index: 2; left: calc(-.14em - 2px); top: calc(-.02em - 21px);
  padding-bottom: 6px; /* bridges the gap to the word so hover isn't lost on the way up */
  font: 500 11px/1 var(--sans); letter-spacing: .02em;
  opacity: 0; pointer-events: none; cursor: text;
  transition: opacity var(--snap);
}
.w-design .sel-hit::before {
  content: attr(data-label); display: block; white-space: nowrap;
  color: var(--night); background: var(--accent);
  padding: 3px 5px; border-radius: 3px;
  transition: box-shadow .2s ease;
}
.w-design .sel-hit:hover::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.w-design:hover .sel-hit, .w-design:focus-visible .sel-hit, .w-design.selected .sel-hit { opacity: 1; pointer-events: auto; }
.w-design.selected .sel, .w-design.editing .sel { opacity: 1; transform: none; }
.w-design.selected, .w-design.editing { color: #fff; }
.w-design.editing .sel-hit { opacity: 0; pointer-events: none; }
.w-design .sel-input {
  position: absolute; z-index: 3; left: calc(-.14em - 2px); top: calc(-.02em - 21px);
  height: 17px; min-width: 6ch; margin: 0; border: 0; outline: none;
  font: 500 11px/1 var(--sans); letter-spacing: .02em;
  color: var(--night); background: var(--accent); caret-color: var(--night);
  padding: 3px 5px; border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55);
}
.w-design .sel-input::placeholder { color: rgba(13, 18, 25, .5); }
.w-design { cursor: pointer; }
.w-exp, .w-eng { cursor: pointer; }
.w-design:hover .sel, .w-design:focus-visible .sel { opacity: 1; transform: none; }
.w-design:hover, .w-design:focus-visible { color: #fff; }
/* letters are wrapped in .ch spans by js/headline.js (the real characters, not copies) */
.headline .ch { display: inline-block; white-space: pre; }
.w-exp, .w-eng { white-space: nowrap; } /* never split a word between letter spans */
.w-exp { position: relative; display: inline-block; }

/* "engineering": the word re-types itself like code. Everything stays inside its own box. */
.w-eng::before { /* editor "current line" highlight, inset inside the word */
  content: ""; position: absolute; left: 0; right: 0; top: .16em; bottom: .04em;
  background: rgba(132, 176, 230, .13);
  border-radius: 3px;
  opacity: 0; transition: opacity var(--snap);
  pointer-events: none;
}
.w-eng:hover::before, .w-eng:focus-visible::before, .w-eng.typing::before { opacity: 1; }
.w-eng:hover, .w-eng:focus-visible { color: #fff; }
.w-eng.typing .ch {
  animation: type-in 1ms steps(1, end) both, caret .32s steps(1, end) both;
  animation-delay: calc(var(--i) * 26ms), calc(var(--i) * 26ms);
  color: var(--accent);
}
.w-eng.typing .ch:last-child { /* the caret rests at the end and blinks a few times */
  animation: type-in 1ms steps(1, end) both, caret-blink .9s steps(1, end) 3 both;
  animation-delay: calc(var(--i) * 26ms), calc(var(--i) * 26ms);
}
.w-eng.typed .ch { color: var(--accent); transition: color .6s ease .2s; }
@keyframes type-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes caret { 0% { box-shadow: inset -2px 0 0 var(--accent); } 99% { box-shadow: inset -2px 0 0 var(--accent); } 100% { box-shadow: none; } }
@keyframes caret-blink { 0%, 49% { box-shadow: inset -2px 0 0 var(--accent); } 50%, 100% { box-shadow: none; } }

/* "experiences": a gust through the aspens. Letters lift and tilt in a wave (transforms only). */
.w-exp { cursor: pointer; outline: none; }
.w-exp.gust .ch {
  animation: leaf-sway .95s cubic-bezier(.3, .7, .3, 1) both;
  animation-delay: calc(var(--i) * 32ms);
}
@keyframes leaf-sway {
  0% { transform: none; color: inherit; }
  30% { transform: translate(1.5px, -3px) rotate(-6deg); color: #abc9ee; }
  55% { transform: translate(-.5px, -1px) rotate(3deg); color: var(--accent); }
  80% { transform: translate(.3px, 0) rotate(-1deg); }
  100% { transform: none; }
}
.w-exp:focus-visible { text-decoration: underline 1.5px dotted var(--accent); text-underline-offset: .14em; }

@media (prefers-reduced-motion: reduce) {
  .w-exp.gust .ch { animation: none; }
  .w-exp:hover { color: var(--accent); transition: color var(--snap); }
  .w-eng.typing .ch, .w-eng.typing .ch:last-child { animation: none; }
}

.lede {
  margin: 18px 0 26px;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  color: var(--ink-dim);
}
.actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(228, 236, 245, .1);
  border: 1px solid rgba(228, 236, 245, .28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .25s, border-color .25s;
}
.btn:hover, .btn:focus-visible { background: rgba(132, 176, 230, .18); border-color: var(--accent); }
.hint { font-size: 13px; color: var(--ink-dim); font-style: italic; font-family: var(--serif); }

/* clickable cabin: positioned by js/main.js over the cabin in the image */
.cabin {
  position: absolute;
  display: none;
  border-radius: 12px;
  outline-offset: 6px;
  cursor: pointer;
}
.cabin.placed { display: block; }
.cabin:focus-visible { outline: 2px solid var(--accent); }
.cabin-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 6px);
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(13, 18, 25, .7);
  border: 1px solid rgba(132, 176, 230, .45);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cabin:hover .cabin-label,
.cabin:focus-visible .cabin-label { opacity: 1; transform: translate(-50%, 0); }

/* live Bordeaux weather label */
.live {
  position: fixed;
  right: var(--gutter);
  bottom: max(clamp(28px, 7vh, 72px), env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 18px;
  max-width: calc(100vw - 2 * var(--gutter)); /* never wider than the screen: wrap instead */
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink-dim);
  background: rgba(8, 10, 18, .35);
  border: 1px solid rgba(228, 236, 245, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.live[hidden] { display: none; }
#live-text { transition: opacity .3s; white-space: nowrap; }
.live-src { white-space: nowrap; }
.live.loading #live-text { opacity: .45; }
.live.loading .live-dot { animation-duration: .8s; }
.places { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(228, 236, 245, .06); }
.places button {
  font: inherit;
  color: var(--ink-dim);
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.places button:hover { color: var(--ink); }
.places button[aria-checked="true"] {
  color: var(--ink);
  background: rgba(132, 176, 230, .18);
  border-color: rgba(132, 176, 230, .55);
}
.places button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sound {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(228, 236, 245, .16);
  background: rgba(228, 236, 245, .06);
  color: var(--ink-dim);
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.sound:hover { color: var(--ink); }
.sound:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sound .wave { display: none; }
.sound[aria-pressed="true"] { color: var(--ink); background: rgba(132, 176, 230, .18); border-color: rgba(132, 176, 230, .55); }
.sound[aria-pressed="true"] .wave { display: inline; }
.sound[aria-pressed="true"] .mute { display: none; }
.sound.armed { animation: armed 2s ease-in-out infinite; } /* remembered "on": waiting for a first tap */
@keyframes armed { 50% { border-color: rgba(132, 176, 230, .9); } }
.live-src { text-decoration: none; color: inherit; }
.live-src:hover, .live-src:focus-visible { color: var(--ink); }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(132, 176, 230, .6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 6px rgba(132, 176, 230, 0); } 100% { box-shadow: 0 0 0 0 rgba(132, 176, 230, 0); } }
.live-src { opacity: .6; }

/* amber fade used for the walk-into-the-cabin transition */
.warmth {
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--wx, 64%) var(--wy, 50%), #98bdea 0%, var(--accent-deep) 45%, var(--cabin-bg) 100%);
  opacity: 0;
  transition: opacity .55s ease;
}
.warmth.on { opacity: 1; }

@media (max-aspect-ratio: 1/1) {
  .topbar nav a:not(:first-child) { display: none; }
  .hint { flex-basis: 100%; }
  .live {
    top: max(58px, calc(env(safe-area-inset-top) + 44px)); bottom: auto; font-size: 11px;
    left: auto; max-width: calc(100vw - 2 * var(--gutter));
    flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; border-radius: 18px;
  }
  .live-src { display: none; }
}
/* short phones (e.g. iPhone SE): keep the intro below the cabin */
/* phones: the headline carries the message; keep the cabin clear above it */
@media (max-aspect-ratio: 1/1) {
  /* small enough that "design and engineering meet" always fits one line, so cycling the word never adds a line */
  .intro h1.headline { font-size: min(clamp(27px, 7.4vw, 36px), calc((100vw - 2 * var(--gutter)) / 12.9)); }
  .intro:has(.headline) .lede { display: none; }
  .intro:has(.headline) .actions { margin-top: 0; }
  .intro .status { margin: 16px 0 18px; font-size: 12px; }
}
@media (max-aspect-ratio: 1/1) and (max-height: 720px) {
  .intro h1 { font-size: 40px; }
  .intro h1.headline { font-size: min(25px, calc((100vw - 2 * var(--gutter)) / 12.9)); }
  .eyebrow { margin-bottom: 8px; font-size: 11px; }
  .lede { margin: 10px 0 16px; font-size: 14px; }
  .hint { display: none; }
}

/* ---------- inside the cabin (work.html) ---------- */
.cabin-page {
  min-height: 100%;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(118, 167, 227, .18), transparent 60%),
    var(--cabin-bg);
  animation: arrive .9s ease both;
}
@keyframes arrive { from { background-color: var(--accent-deep); opacity: .6; } }
.cabin-page .topbar { position: static; padding-bottom: 24px; }
.cabin-page main {
  padding: 4vh var(--gutter) 10vh;
  max-width: 1200px;
  margin: 0 auto;
}
.cabin-page h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 76px);
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.cabin-page .lede { max-width: 560px; }
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin-top: 48px;
}
.card {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(228, 236, 245, .04);
  border: 1px solid rgba(228, 236, 245, .1);
  transition: transform .3s, border-color .3s;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: rgba(132, 176, 230, .5); }
.card .thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #1b2837, #111922 60%, #1a2e46);
}
.card .body { padding: 18px 20px 22px; }
.card h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.card p { margin: 0; font-size: 14px; color: var(--ink-dim); }
.about { margin-top: 80px; max-width: 640px; }
.about h2 { font-family: var(--serif); font-weight: 300; font-size: 34px; margin: 0 0 12px; }
.about p { color: var(--ink-dim); line-height: 1.65; }
.credits { margin-top: 80px; padding-top: 20px; border-top: 1px solid rgba(228, 236, 245, .1); max-width: 760px; }
.credits p { font-size: 12px; line-height: 1.6; color: rgba(228, 236, 245, .5); }
.credits a { color: rgba(228, 236, 245, .7); }
.back { font-size: 14px; color: var(--ink-dim); text-decoration: none; }
.back:hover { color: var(--ink); }

/* ---------- homepage: design statement below the hero ----------
   --p (0..1) is set by js/main.js from the scroll position. */
.home .topbar::before { /* soft backing so text scrolling underneath never collides with the header */
  content: ""; position: absolute; inset: 0 0 -26px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(6, 8, 15, .94), rgba(6, 8, 15, .78) 62%, transparent);
  opacity: min(1, calc(var(--p, 0) * 2));
}
.shade { /* the forest dims as the statement rises over it */
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(9, 11, 20, .88), rgba(6, 8, 15, .97));
  opacity: calc(var(--p, 0) * 1.1);
}
.home .intro {
  transform: translateY(calc(var(--p, 0) * -48px));
  opacity: calc(1 - var(--p, 0) * 1.7);
  will-change: transform, opacity;
}
.hero-space { height: 100vh; height: 100svh; pointer-events: none; }
.scroll-cue {
  position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--ink-dim); text-decoration: none; font-size: 15px;
  border: 1px solid rgba(228, 236, 245, .22);
  background: rgba(8, 10, 18, .3);
  opacity: calc(1 - var(--p, 0) * 4);
  transition: color var(--snap, .15s), border-color var(--snap, .15s);
}
.scroll-cue span { animation: nudge 2.2s ease-in-out infinite; }
.scroll-cue:hover, .scroll-cue:focus-visible { color: var(--ink); border-color: var(--accent); }
.statement { position: relative; z-index: 2; padding: 14vh var(--gutter) 30vh; }
.statement-inner { max-width: 900px; margin: 0 auto; }
.statement .eyebrow { margin-bottom: clamp(28px, 5vh, 48px); }
/* every paragraph is the same large serif: the words brighten one by one as you scroll (js/statement.js) */
.stmt {
  margin: 0 0 clamp(30px, 6vh, 56px);
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(25px, 3.15vw, 43px); line-height: 1.27; letter-spacing: -.012em;
  text-wrap: pretty;
}
.statement .w, .statement .kw { transition: opacity .22s linear; }
.statement-cta { margin: clamp(36px, 6vh, 60px) 0 0; }
/* the button eases in once it scrolls into view (only hidden when JS will reveal it) */
.reveal { transition: opacity .9s ease, transform 1s cubic-bezier(.2, .8, .2, 1); }
.js-reveal .reveal:not(.in) { opacity: 0; transform: translateY(22px); }

/* ---- key words: each reacts to the cursor in a way that matches its meaning ---- */
.statement .kw { position: relative; display: inline-block; cursor: default; }
.statement .ch { display: inline-block; white-space: pre; }
.kw .ico { /* small inline icon chip, like a logo dropped into the sentence */
  display: inline-grid; place-items: center;
  width: .66em; height: .66em; margin: 0 .1em 0 .18em; vertical-align: .04em;
  border-radius: .2em;
  border: 1px solid rgba(132, 176, 230, .42);
  background: rgba(132, 176, 230, .1);
  transition: transform .4s cubic-bezier(.3, 1.5, .5, 1), background .3s ease, border-color .3s ease, box-shadow .4s ease;
}
.kw .ico svg { width: 66%; height: 66%; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: fill .3s ease, stroke .3s ease; }

/* "team effort": the one line you should remember, bold and underlined */
.statement .stmt-lead { font-size: clamp(34px, 5.1vw, 70px); line-height: 1.12; letter-spacing: -.02em; }
@media (min-width: 600px) { .statement .stmt-lead { white-space: nowrap; } }
.statement .stmt-note { font-size: clamp(15px, 1.35vw, 19px); line-height: 1.55; max-width: 44em; }
.statement .stmt-note a { color: inherit; text-underline-offset: 3px; }
.statement strong { font-weight: 600; }
.kw-team strong {
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: .06em; text-underline-offset: .15em;
  transition: text-decoration-thickness .35s ease, text-underline-offset .35s ease, color .35s ease;
}
.kw-team:hover strong { text-decoration-thickness: .1em; text-underline-offset: .2em; color: #fff; }

/* "the problem": the lightbulb switches on */
.kw-idea { transition: color .4s ease, text-shadow .5s ease, opacity .22s linear; }
.kw-idea:hover { color: #c2d9f5; text-shadow: 0 0 28px rgba(143, 183, 232, .55); }
.kw-idea:hover .ico {
  background: rgba(134, 178, 231, .32); border-color: #9ec1eb;
  box-shadow: 0 0 20px rgba(126, 172, 229, .8);
  animation: bulb-on .8s steps(1, end) both;
}
.kw-idea:hover .ico svg { fill: rgba(168, 199, 237, .95); stroke: #d8e7f9; }
@keyframes bulb-on { 0% { opacity: .35; } 18% { opacity: 1; } 28% { opacity: .45; } 52% { opacity: 1; } 66% { opacity: .75; } 100% { opacity: 1; } }

/* "grow": the letters stretch upward, one after another, like a seedling */
.kw-grow .ch { transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.3, 1.6, .5, 1), color .35s ease; }
.kw-grow:hover .ch { transform: scale(1.07, 1.36) translateY(-.015em); color: #abc9ee; transition-delay: calc(var(--i) * 75ms); }

/* icon words: a small icon chip beside the words. On hover the chip lights up and the icon does a little something. */
.kw-icon { white-space: nowrap; transition: color .4s ease, opacity .22s linear; }
.kw-icon:hover { color: #c2d9f5; }
.kw-icon:hover .ico { background: rgba(134, 178, 231, .26); border-color: #9ec1eb; box-shadow: 0 0 16px rgba(126, 172, 229, .6); }
/* a question mark: curious, it tips and wobbles */
.kw-ask:hover .ico svg { animation: wonder .8s ease-in-out; transform-origin: 50% 80%; }
@keyframes wonder { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 55% { transform: rotate(10deg); } 80% { transform: rotate(-4deg); } }
/* two people: they step toward each other */
.kw-people .person { transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); }
.kw-people:hover .person-a { transform: translateX(1.6px); }
.kw-people:hover .person-b { transform: translateX(-1.6px); }
/* a compass: the needle swings and settles on a heading */
.kw-direction .needle { transform-origin: 12px 12px; transition: transform .9s cubic-bezier(.3, 1.7, .5, 1); }
.kw-direction:hover .needle { transform: rotate(60deg); }

/* the ending: lamplight blooms around the words, and the little flame flickers */
.kw-warm { transition: color .6s ease, opacity .22s linear; }
.kw-warm:hover { color: #c8ddf6; animation: hearth 3.4s linear infinite; }
@keyframes hearth {
  0%, 100% { text-shadow: 0 0 26px rgba(101, 156, 224, .6), 0 0 60px rgba(76, 140, 219, .25); }
  14% { text-shadow: 0 0 20px rgba(101, 156, 224, .45), 0 0 48px rgba(76, 140, 219, .18); }
  29% { text-shadow: 0 0 30px rgba(109, 162, 226, .7), 0 0 70px rgba(76, 140, 219, .3); }
  46% { text-shadow: 0 0 22px rgba(101, 156, 224, .5), 0 0 52px rgba(76, 140, 219, .2); }
  63% { text-shadow: 0 0 32px rgba(114, 164, 226, .72), 0 0 72px rgba(80, 143, 220, .3); }
  81% { text-shadow: 0 0 24px rgba(101, 156, 224, .52), 0 0 54px rgba(76, 140, 219, .22); }
}
.kw-warm .ico svg { transform-origin: 50% 90%; }
.kw-warm:hover .ico { background: rgba(93, 151, 222, .3); border-color: #84b0e6; box-shadow: 0 0 22px rgba(85, 146, 220, .75); }
.kw-warm:hover .ico svg { fill: rgba(118, 167, 227, .9); stroke: #bdd5f2; animation: flame 1.1s ease-in-out infinite; }
@keyframes flame { 0%, 100% { transform: scale(1, 1); } 22% { transform: scale(.92, 1.1); } 50% { transform: scale(1.06, .95); } 78% { transform: scale(.96, 1.06); } }

/* phones: leave clear space under the fixed header and pill */
@media (max-aspect-ratio: 1/1) {
  .scroll-cue { display: none; }
  .statement { padding-top: 150px; }
  .statement .eyebrow { margin-bottom: 22px; }
  .stmt { font-size: clamp(23px, 6.3vw, 30px); line-height: 1.3; }
}
#philosophy, #philosophie { scroll-margin-top: 0; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal:not(.in) { opacity: 1; transform: none; }
  .reveal, .statement .w, .statement .kw { transition: none; }
  .home .intro { transform: none; }
  .kw-idea:hover .ico, .kw-ask:hover .ico svg, .kw-warm:hover, .kw-warm:hover .ico svg { animation: none; }
  .kw-grow:hover .ch { transform: none; }
}

/* ---- the weather toggle tucks away once you scroll, so the page stays calm ---- */
.live .places, .live .live-src {
  max-width: 240px; overflow: hidden; white-space: nowrap;
  transition: max-width .45s ease, opacity .3s ease, margin .45s ease, padding .45s ease, visibility 0s;
}
.scrolled .live .places, .scrolled .live .live-src {
  max-width: 0; opacity: 0; margin-left: -8px; padding-left: 0; padding-right: 0; visibility: hidden;
  transition: max-width .45s ease, opacity .25s ease, margin .45s ease, padding .45s ease, visibility 0s .45s;
}
/* ---------- work page: inside the cabin ---------- */
.interior {
  background: #090d11;
  animation: arrive .9s ease both; /* fades in from the amber "walk-in" */
}
.room { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.stage {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(1.06);
  transform-origin: 50% 45%;
  will-change: transform;
}
.stage > img, .stage > canvas { position: absolute; display: block; }
.stage .inside { inset: 0; width: 100%; height: 100%; z-index: 3; }
/* the window view: a zoomed-in stretch of the forest image, left of the cabin (we're inside it) */
.stage .view { position: absolute; z-index: 1; overflow: hidden; }
.stage .outside {
  position: absolute; height: 165%; width: auto; max-width: none; left: -6%; top: -32%;
  filter: blur(1.5px) brightness(.85) saturate(.9); /* soft: it's outside, through glass */
  transition: opacity .5s ease, filter 1.2s ease;
}
.stage .outside.wet { filter: blur(2.5px) brightness(.75) saturate(.75); }
.stage img.fading { opacity: 0; }
.stage .inside { transition: opacity .5s ease; }
.stage .glass { z-index: 2; }
.glow {
  position: absolute; z-index: 4;
  width: 46vmax; height: 46vmax; margin: -23vmax 0 0 -23vmax;
  border-radius: 50%;
  mix-blend-mode: screen;
  pointer-events: none;
}
.stove-glow {
  background: radial-gradient(circle, rgba(93, 151, 222, .32) 0%, rgba(76, 140, 219, .1) 35%, transparent 65%);
  animation: flicker 3.2s infinite steps(1, end);
}
.lamp-glow {
  width: 30vmax; height: 30vmax; margin: -15vmax 0 0 -15vmax;
  background: radial-gradient(circle, rgba(143, 183, 232, .2) 0%, transparent 60%);
}
@keyframes flicker {
  0% { opacity: .85; } 9% { opacity: .7; } 17% { opacity: 1; } 26% { opacity: .78; } 38% { opacity: .92; }
  47% { opacity: .74; } 58% { opacity: .98; } 66% { opacity: .82; } 79% { opacity: .9; } 88% { opacity: .72; }
}
/* dim the room so the frames are the focus; a little more while a frame is in view */
.room-dim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(5, 8, 11, .55) 0%, rgba(5, 8, 11, .35) 45%, rgba(2, 4, 6, .7) 100%);
  transition: background-color .8s ease;
}
.focus .room-dim { background-color: rgba(3, 5, 8, .25); }
.interior .grain { position: absolute; }

.interior .topbar {
  position: fixed; z-index: 5;
  padding-bottom: 28px;
  background: linear-gradient(rgba(5, 8, 11, .78), rgba(5, 8, 11, .45) 60%, transparent);
}
.interior .topbar nav a[aria-current] { color: var(--ink); }
.cabin-content { position: relative; z-index: 2; }
.welcome {
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter);
  max-width: 1100px; margin: 0 auto;
}
.welcome h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(46px, 7vw, 96px); line-height: .95; letter-spacing: -.02em;
  margin: 8px 0 14px; text-shadow: 0 2px 40px rgba(0, 0, 0, .5);
}
.welcome .back { margin-bottom: 36px; }
.welcome .lede { max-width: 520px; }
.scroll-hint { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); margin-top: 40px; }
.scroll-hint span { display: inline-block; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

/* ---------- the projects: books that open as you scroll ----------
   js/work.js sets --open (cover swing, 0..1) and --shots (the image landing, 0..1) on each .project.
   Without JavaScript, or with reduced motion, they stay at 1: every book simply sits open. */
.projects-hall { counter-reset: book; padding: 0; }
.project {
  --open: 1; --shots: 1;
  --pw: min(47vw, 540px, calc((100svh - 200px) / 1.34)); /* width of one page */
  --ph: calc(var(--pw) * 1.34);
  --pages: 2;                                              /* a spread: two pages */
  --shift: .5;                                             /* closed book slides left to centre itself */
  --cloth: #25406b; --cloth-2: #13243f; --c1: #6d93c4; --c2: #25406b;
  counter-increment: book;
  position: relative;
  min-height: 100vh;
}
.project:nth-child(2) { --cloth: #3d5874; --cloth-2: #202f42; --c1: #8ea6c2; --c2: #3d5874; }
.project:nth-child(3) { --cloth: #2f6670; --cloth-2: #173a41; --c1: #7fb1b9; --c2: #2f6670; }
.project:nth-child(4) { --cloth: #4f4a72; --cloth-2: #2a2742; --c1: #a29dc8; --c2: #4f4a72; }
.js-books .project { height: 235vh; min-height: 0; }
.stage-book { /* the sticky stage: the book stays on screen while you scroll through its section */
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center;
  padding: 92px var(--gutter) 38px;
  perspective: 2600px; perspective-origin: 50% 40%;
  overflow: clip;
}
.book { position: relative; width: calc(var(--pw) * var(--pages)); height: var(--ph); }
.book-shadow { /* soft contact shadow; it stretches as the book opens */
  position: absolute; left: 50%; bottom: -3.5%; width: 94%; height: 9%;
  transform: translateX(-50%) scaleX(calc(.55 + var(--open) * .45));
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .62), transparent 70%);
  filter: blur(8px); pointer-events: none;
}
.book-body {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform:
    translateX(calc((1 - var(--open)) * var(--pw) * var(--shift) * -1))
    rotateX(calc((1 - var(--open)) * 8deg))
    rotateY(calc((1 - var(--open)) * -9deg));
  will-change: transform;
}
.page, .cover, .leaf-left { position: absolute; top: 0; height: 100%; width: var(--pw); }
.page-right, .cover { left: calc(var(--pw) * (var(--pages) - 1)); }
.leaf-left { left: 0; }

/* paper */
.page-right, .cover-back {
  background:
    linear-gradient(90deg, rgba(24, 43, 66, .26), rgba(24, 43, 66, 0) 10%),
    repeating-linear-gradient(0deg, rgba(55, 82, 115, .035) 0 1px, transparent 1px 4px),
    #d8e3f1;
  box-shadow:
    1px 1px 0 #c5d2e1, 2px 2px 0 #d8e3f1, 3px 3px 0 #beccde, 4px 4px 0 #d8e3f1, 5px 5px 0 #b5c3d5,
    8px 10px 26px rgba(0, 0, 0, .45);
  border-radius: 2px 7px 7px 2px;
}
.cover-back { /* the inside of the cover: it becomes the left-hand page once the book is open */
  background:
    linear-gradient(270deg, rgba(24, 43, 66, .26), rgba(24, 43, 66, 0) 10%),
    repeating-linear-gradient(0deg, rgba(55, 82, 115, .035) 0 1px, transparent 1px 4px),
    #d8e3f1;
  box-shadow: -1px 1px 0 #c5d2e1, -2px 2px 0 #d8e3f1, -3px 3px 0 #beccde, -4px 4px 0 #d8e3f1, -5px 5px 0 #b5c3d5;
  border-radius: 7px 2px 2px 7px;
}

/* the cover: hinged at the spine, swings open to the left */
.cover {
  transform-origin: 0 50%;
  transform: translateZ(1px) rotateY(calc(var(--open) * -180deg));
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: none;
}
.cover-front, .cover-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cover-back { transform: rotateY(180deg); }
.cover-front {
  border-radius: 3px 10px 10px 3px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .42) 0, rgba(0, 0, 0, .12) 5.5%, rgba(255, 255, 255, .06) 6.5%, transparent 14%),
    linear-gradient(135deg, rgba(255, 255, 255, .1), transparent 38%, rgba(0, 0, 0, .3)),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .06) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    var(--cloth);
  box-shadow: inset 0 0 0 1px rgba(184, 210, 241, .16), 4px 6px 22px rgba(0, 0, 0, .5);
  outline: 1px solid rgba(117, 160, 213, .55); outline-offset: -16px; /* gold-foil frame */
  display: grid; place-items: center; text-align: center;
}
.cover-front::before { /* "No. 1" in foil near the top */
  content: "No. " counter(book);
  position: absolute; top: 11%; left: 0; right: 0;
  font: 500 calc(var(--pw) * .028)/1 var(--sans); letter-spacing: .28em; text-transform: uppercase;
  color: rgba(126, 167, 218, .85);
}
.cover-front::after { /* the title, drawn by CSS so it's not repeated in the page text */
  content: attr(data-title);
  padding: 0 12%;
  font-family: var(--serif); font-weight: 300; line-height: 1.05; letter-spacing: -.01em;
  font-size: calc(var(--pw) * .125);
  color: #a0c0e6;
  text-shadow: 0 1px 0 rgba(199, 220, 246, .25), 0 -1px 1px rgba(0, 0, 0, .55);
}

/* the left page: the (smaller) title and details */
.leaf-left {
  transform: translateZ(3px);
  padding: calc(var(--pw) * .1) calc(var(--pw) * .095);
  display: flex; flex-direction: column; align-items: flex-start;
  color: #121d2b;
  opacity: clamp(0, calc((var(--open) - .88) * 9), 1);
  pointer-events: none;
}
.leaf-left::before {
  content: "No. " counter(book);
  margin-bottom: calc(var(--pw) * .035);
  font: 500 calc(var(--pw) * .024)/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  color: #456893;
}
.leaf-left h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: calc(var(--pw) * .068); line-height: 1.08; letter-spacing: -.01em; }
.leaf-left .meta { margin: calc(var(--pw) * .025) 0 0; font-size: calc(var(--pw) * .026); letter-spacing: .1em; text-transform: uppercase; color: #3a4f69; }
.leaf-left .summary {
  margin: calc(var(--pw) * .06) 0 0; max-width: 24em; text-align: left;
  font-family: var(--serif); font-style: italic; font-weight: 300; font-size: calc(var(--pw) * .04); line-height: 1.45;
  color: #253447;
}
.book-link {
  margin-top: auto; padding-bottom: 2px;
  font-size: calc(var(--pw) * .03); font-weight: 500; letter-spacing: .02em;
  color: #121d2b; text-decoration: none;
  border-bottom: 1px solid rgba(18, 29, 43, .45);
  pointer-events: auto;
  transition: border-color .2s, color .2s;
}
.book-link:hover, .book-link:focus-visible { border-bottom-color: #2b5991; color: #294a73; }
.js-books .project:not([data-open]):not(.kb) .book-link { pointer-events: none; } /* not clickable while the cover is closed */

/* one 3:4 image lands on the right-hand page. Until assets/work/<project>.webp exists, the <img> removes itself
   (onerror) and the frame shows a placeholder in the book's own colours. */
.book-img {
  position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 3 / 4; margin: 0; overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .22), transparent 55%),
    linear-gradient(135deg, var(--c1), var(--c2));
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(23, 38, 57, .14), 0 10px 22px rgba(12, 24, 38, .3), 0 2px 5px rgba(12, 24, 38, .22);
  opacity: var(--shots);
  transform: translate(-50%, calc(-50% + (1 - var(--shots)) * 34px)) scale(calc(.96 + var(--shots) * .04));
}
.book-img::after {
  content: "Image to come"; position: absolute; inset: auto 0 7% 0; text-align: center;
  font: 500 calc(var(--pw) * .022)/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
:lang(fr) .book-img::after { content: "Image à venir"; }
.book-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.book-img:has(img)::after { display: none; }

/* phones: a single page. The cover swings off to the left and the page holds the title, details and screenshots */
@media (max-aspect-ratio: 1/1) {
  .project {
    --pw: min(84vw, calc((100svh - 215px) / 1.42));
    --ph: calc(var(--pw) * 1.42);
    --pages: 1; --shift: 0;
  }
  .stage-book { padding-top: 112px; }
  .leaf-left { height: 34%; padding: calc(var(--pw) * .07) calc(var(--pw) * .08) 0; transform: translateZ(3px); }
  .leaf-left h2 { font-size: calc(var(--pw) * .075); }
  .leaf-left .summary { margin-top: calc(var(--pw) * .03); font-size: calc(var(--pw) * .042); line-height: 1.35; max-width: none; }
  .leaf-left .meta { font-size: calc(var(--pw) * .03); }
  .book-link { margin-top: calc(var(--pw) * .03); font-size: calc(var(--pw) * .036); }
  .leaf-left::before { margin-bottom: calc(var(--pw) * .02); font-size: calc(var(--pw) * .028); }
  .book-img { top: auto; bottom: 5%; height: 47%; width: auto; transform: translate(-50%, calc((1 - var(--shots)) * 34px)) scale(calc(.96 + var(--shots) * .04)); }
  .cover { opacity: clamp(0, calc(1 - (var(--open) - .75) * 4), 1); } /* the flipped cover fades away off-screen */
}
@media (prefers-reduced-motion: reduce) {
  .book-body { transform: none; }
  .cover { display: none; }
  .leaf-left { opacity: 1; }
}
.interior > .credits { position: relative; z-index: 2; }
.interior .about, .interior .credits { position: relative; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.interior .about { margin-top: 10vh; }
.interior .credits { padding-bottom: 14vh; }
.interior .live { z-index: 6; }



/* ---------- case study pages (work/*.html): reading by the stove ----------
   A dark opening over the blurred cabin, then the story printed on the same cream paper as the books. */
.case { background: #090d11; animation: arrive .9s ease both; }
.case { overflow-x: clip; }   /* the oversized grain layer must never widen the page on small phones */
.case-backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.case-backdrop::before {
  content: ""; position: absolute; inset: -40px;
  background: url("../assets/interior-desktop-night.webp") center / cover no-repeat;
  filter: blur(14px) brightness(.42) saturate(.9);
}
@media (max-aspect-ratio: 1/1) { .case-backdrop::before { background-image: url("../assets/interior-mobile-night.webp"); } }
.case-backdrop::after { /* warm stove light in one corner, darker towards the edges */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 18% 78%, rgba(93, 151, 222, .16), transparent 55%),
    radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(2, 4, 6, .6) 100%);
}
.case-backdrop .grain { position: absolute; }
.case .topbar {
  position: fixed; z-index: 5; padding-bottom: 28px;
  background: linear-gradient(rgba(5, 8, 11, .96), rgba(5, 8, 11, .9) 62%, transparent);
}
.case .topbar nav a[aria-current] { color: var(--ink); }
.case main { position: relative; z-index: 2; }

/* opening */
.case-hero { max-width: 1100px; margin: 0 auto; padding: clamp(120px, 18vh, 190px) var(--gutter) clamp(48px, 8vh, 90px); }
.case-hero .back { display: inline-block; margin-bottom: 34px; }
.case-hero h1 {
  margin: 6px 0 0; font-family: var(--serif); font-weight: 300;
  font-size: min(clamp(48px, 8vw, 112px), calc((100vw - 2 * var(--gutter)) / 7.8)); line-height: .95; letter-spacing: -.025em; /* "QueerAmerica.co" always fits one line */
  text-shadow: 0 2px 40px rgba(0, 0, 0, .5);
}
.pride-line { /* a quiet six-stripe hairline */
  display: block; width: min(220px, 40vw); height: 4px; margin: 24px 0 30px; border-radius: 2px;
  background: linear-gradient(90deg, #d9695a 0 16.6%, #5791d9 0 33.3%, #679cdd 0 50%, #6faa76 0 66.6%, #5f8fc9 0 83.3%, #9a76c2 0);
  opacity: .85;
}
.case-statement {
  margin: 0; max-width: 23em;
  font-family: var(--serif); font-weight: 300; font-size: clamp(25px, 3.1vw, 42px); line-height: 1.25; letter-spacing: -.012em;
  text-wrap: pretty;
}
.case-overview {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  margin: clamp(44px, 7vh, 72px) 0 clamp(40px, 6vh, 64px); padding-top: 24px;
  border-top: 1px solid rgba(228, 236, 245, .16);
}
.case-overview dt { margin-bottom: 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.case-overview dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-dim); }

/* image placeholders: swap a .ph-frame for an <img> and it takes the same shape */
.ph { margin: 0; }
.ph-frame, .ph img { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; }
.ph-frame {
  background:
    repeating-linear-gradient(135deg, rgba(132, 176, 230, .06) 0 14px, transparent 14px 28px),
    rgba(234, 242, 251, .04);
  border: 1px dashed rgba(132, 176, 230, .35);
}
.ph figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-dim); }
.ph-hero .ph-frame, .ph-hero img { aspect-ratio: 21 / 9; }

/* the paper */
.case-paper {
  position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(48px, 8vw, 112px) clamp(20px, 7vw, 96px);
  color: #121f30;
  background:
    repeating-linear-gradient(0deg, rgba(55, 82, 115, .03) 0 1px, transparent 1px 4px),
    #d8e3f1;
  border-radius: 6px;
  box-shadow: 0 1px 0 #c5d2e1, 0 3px 0 #cedbeb, 0 5px 0 #beccde, 0 30px 80px rgba(0, 0, 0, .55);
}
.case-paper .ph-frame {
  background: repeating-linear-gradient(135deg, rgba(41, 74, 115, .06) 0 14px, transparent 14px 28px), rgba(41, 74, 115, .03);
  border-color: rgba(41, 74, 115, .3);
}
.case-paper .ph figcaption { color: #485d76; }
.case-section { max-width: 720px; margin: 0 auto clamp(64px, 11vh, 120px); }
.case-section.case-wide { max-width: 980px; }
.kicker { margin: 0 0 12px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #2b5991; }
.case-paper h2 {
  margin: 0 0 26px; font-family: var(--serif); font-weight: 300;
  font-size: clamp(32px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -.02em; color: #0c1622;
}
.case-paper p { font-family: var(--serif); font-weight: 300; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.65; margin: 0 0 1.1em; }
.case-quote { margin: 40px 0; padding: 4px 0 4px 26px; border-left: 3px solid #3a75bd; }
.case-quote p { font-style: italic; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.3; color: #0c1622; margin: 0; }
.case-paper .case-callout {
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
  padding: 18px 22px; border-radius: 8px; background: rgba(58, 117, 189, .1);
  font-weight: 400; color: #0c1622;
}
.case-callout span { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: #2b5991; }
.case-paper .case-sub { margin: 52px 0 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 27px); line-height: 1.2; color: #0c1622; }
.case-list { margin: 0 0 1.3em; padding-left: 1.2em; font-family: var(--serif); font-weight: 300; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; }
.case-list li { margin-bottom: .6em; }
.case-list li::marker { color: #3a75bd; }
.case-list strong { font-weight: 600; color: #0c1622; }
.case-section .partners { margin-bottom: 1.4em; }
.steps-text strong { display: block; margin-bottom: 4px; font-family: var(--serif); font-weight: 600; font-size: 17px; color: #0c1622; }

/* before -> after, e.g. an API error message */
.compare { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; margin: 0 0 1.6em; }
.compare figure { margin: 0; padding: 18px 20px; border-radius: 10px; }
.compare figcaption { margin-bottom: 10px; font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #2b5991; }
.compare code { display: block; font: 500 14px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.compare-before { background: rgba(30, 55, 85, .08); color: #485d76; }
.compare-after { background: #0c1622; color: #e4ecf5; }
.compare-after figcaption { color: var(--accent); }
.case-paper .compare-after p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: #c7d4e3; }

.case-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px;
  max-width: 980px; margin: -40px auto clamp(56px, 9vh, 96px);
}
.case-card {
  padding: 24px 24px 8px; border-radius: 10px; background: rgba(246, 250, 254, .65);
  box-shadow: 0 0 0 1px rgba(30, 55, 85, .1), 0 8px 24px rgba(14, 33, 56, .07);
}
.case-card h3 { margin: 14px 0 8px; font-family: var(--serif); font-weight: 400; font-size: 21px; color: #0c1622; }
.case-paper .case-card p { font-size: 16px; line-height: 1.55; }
.case-ico {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: rgba(58, 117, 189, .14); border: 1px solid rgba(58, 117, 189, .35);
}
.case-ico svg { width: 20px; height: 20px; fill: none; stroke: #2b5991; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.case-gallery {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
  max-width: 1000px; margin: 0 auto clamp(72px, 12vh, 130px);
}
.case-gallery .ph-tall { grid-column: span 2; }
.case-gallery .ph-tall .ph-frame, .case-gallery .ph-tall img { aspect-ratio: 4 / 5; }
.case-gallery .ph-wide { grid-column: span 6; }
.case-gallery .ph-wide .ph-frame, .case-gallery .ph-wide img { aspect-ratio: 21 / 9; }
.case-gallery .ph-screen { grid-column: span 3; }
.case-gallery .ph-screen .ph-frame, .case-gallery .ph-screen img { aspect-ratio: 4 / 3; }

/* what we heard -> what I designed -> what it led to */
.flow { display: grid; gap: 12px; }
.flow-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.flow-row > span {
  position: relative; padding: 18px 20px; border-radius: 10px;
  font-family: var(--serif); font-weight: 300; font-size: 17px; line-height: 1.45;
  background: rgba(246, 250, 254, .7); box-shadow: 0 0 0 1px rgba(30, 55, 85, .1);
}
.flow-row > span:nth-child(2) { background: rgba(58, 117, 189, .12); }
.flow-row > span:nth-child(3) { background: #0c1622; color: #e4ecf5; }
.flow-row > span:not(:last-child)::after { /* the arrow between columns */
  content: "→"; position: absolute; right: -27px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 18px; color: #3a75bd;
}
.flow-row.flow-head > span {
  padding: 0 2px; background: none; box-shadow: none; color: #2b5991;
  font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
}
.flow-row.flow-head > span::after { display: none; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 40px 0 26px; padding: 0; }
.steps li { position: relative; padding-top: 30px; font-size: 14px; line-height: 1.4; color: #253447; }
.steps li::before { /* a dot on a line */
  content: ""; position: absolute; top: 6px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #d8e3f1; border: 2px solid #3a75bd;
}
.steps li:last-child::before { background: #3a75bd; }
.steps li::after { content: ""; position: absolute; top: 12px; left: 16px; right: -10px; height: 2px; background: rgba(58, 117, 189, .35); }
.steps li:last-child::after { display: none; }
.partners { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.partners li { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(30, 55, 85, .25); font-size: 14px; color: #121f30; }

/* impact: a dark band inside the paper */
.case-impact {
  max-width: 1000px; margin: 0 auto clamp(72px, 12vh, 130px);
  padding: clamp(36px, 6vw, 72px); border-radius: 14px;
  background: radial-gradient(ellipse at 15% 0%, rgba(93, 151, 222, .18), transparent 60%), #0d1219;
  color: var(--ink);
}
.case-impact .kicker { color: var(--accent); }
.case-paper .case-impact h2 { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 30px 26px; margin: 10px 0 34px; }
.stats dt { font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 4.4vw, 58px); line-height: 1; letter-spacing: -.02em; color: var(--accent); }
.stats dd { margin: 10px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-dim); }
.impact-notes { margin: 0 0 30px; padding: 22px 0 0; list-style: none; border-top: 1px solid rgba(228, 236, 245, .14); display: flex; flex-wrap: wrap; gap: 10px 28px; }
.impact-notes li { font-size: 15px; color: var(--ink-dim); }
.impact-notes li::before { content: "✦ "; color: var(--accent); }
.case-paper .impact-intro { max-width: 40em; color: var(--ink-dim); }
.outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px 26px; margin: 0 0 34px; padding: 26px 0 0; border-top: 1px solid rgba(228, 236, 245, .14); }
.outcomes h3 { margin: 0 0 12px; font: 500 12px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.outcomes ul { margin: 0; padding: 0; list-style: none; }
.outcomes li { margin-bottom: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-dim); }
.case-paper .impact-line { margin: 0; max-width: 34em; font-size: clamp(20px, 2vw, 25px); line-height: 1.4; color: var(--ink); }

.lessons { list-style: none; counter-reset: lesson; margin: 0; padding: 0; }
.lessons li { counter-increment: lesson; position: relative; padding: 22px 0 6px 64px; border-top: 1px solid rgba(30, 55, 85, .16); }
.lessons li::before {
  content: counter(lesson, decimal-leading-zero); position: absolute; left: 0; top: 20px;
  font-family: var(--serif); font-weight: 300; font-size: 30px; line-height: 1; color: #3a75bd;
}
.lessons h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 22px; color: #0c1622; }
.case-paper .lessons p { font-size: 17px; }

/* closing */
.case-close { max-width: 1000px; margin: 0 auto; padding: clamp(80px, 14vh, 150px) var(--gutter) clamp(90px, 16vh, 170px); text-align: center; }
.case-close .case-statement { margin: 0 auto 36px; }
.case-close .actions { justify-content: center; }

/* leaving the work page: the room fades to paper before the case study opens */
.turning::after {
  content: ""; position: fixed; inset: 0; z-index: 50; background: #d8e3f1;
  animation: to-paper .38s ease-in both;
}
@keyframes to-paper { from { opacity: 0; } }

@media (max-width: 760px) {
  .case-overview { grid-template-columns: 1fr 1fr; gap: 22px; }
  .case-paper { border-radius: 4px; margin: 0 6px; }
  .case-cards { margin-top: -20px; }
  .case-gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .case-gallery .ph-tall { grid-column: span 1; }
  .case-gallery .ph-tall:nth-child(3) { display: none; }
  .case-gallery .ph-wide, .case-gallery .ph-screen { grid-column: span 2; }
  .flow-row.flow-head { display: none; }
  .flow-row > span::before { display: block; margin-bottom: 6px; font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #2b5991; }
  .flow-row > span:nth-child(1)::before { content: "What we heard"; }
  .flow-row > span:nth-child(2)::before { content: "What I designed"; }
  .flow-row > span:nth-child(3)::before { content: "What it led to"; color: var(--accent); }
  .flow { gap: 30px; }
  .flow-row { grid-template-columns: 1fr; gap: 26px; }
  .flow-row > span:not(:last-child)::after { content: "↓"; right: auto; left: 22px; top: auto; bottom: -25px; transform: none; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 18px 28px; }
  .steps li::before { top: 3px; }
  .steps li::after { top: 18px; left: 5px; right: auto; bottom: -2px; width: 2px; height: auto; }
  .lessons li { padding-left: 50px; }
  .compare { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .case-overview { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* the hero's eyebrow sits on a glass chip, so it reads over any sky: night, dawn, bright day */
.intro .eyebrow-chip {
  display: inline-block; width: fit-content;
  padding: 6px 12px; border-radius: 14px;
  background: rgba(8, 12, 20, .55); border: 1px solid rgba(228, 236, 245, .16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-shadow: none;
}
.intro .headline + .actions { margin-top: 26px; }   /* (the status line that sat here is gone) */
@media (max-width: 440px) { .intro .eyebrow-chip { font-size: 10px; letter-spacing: .1em; padding: 6px 10px; } }

.case-close .contact-line { margin-top: 28px; font-size: .95rem; opacity: .8; }
.case-close .contact-line a { color: inherit; text-underline-offset: 3px; }
