/* ═══════════════════════════════════════════════════════════════════════════
   Portfolio — styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #e8e4e0;
  --bg-2: #f6f3ef;
  --ink: #1a1818;
  --ink-2: #807a74;
  --ink-3: #a7a19a;
  --line: rgba(26, 24, 24, 0.12);
  --chip: rgba(255, 255, 255, 0.3);
  --chip-b: rgba(26, 24, 24, 0.1);
  --wall: #d8d3cd;
  --wall-hi: #e9e5e0;
  --footer: #1c1a1a;
  --paper: #f8f6f1;
  --hdr-back: rgba(232, 228, 224, 0.86);
  --gut: clamp(16px, 7.2vw, 140px);
  --hdr: 86px;
  --r: 30px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #161514;
  --bg-2: #1c1b19;
  --ink: #ece7e1;
  --ink-2: #8d877f;
  --ink-3: #6b665f;
  --line: rgba(236, 231, 225, 0.12);
  --chip: rgba(255, 255, 255, 0.04);
  --chip-b: rgba(236, 231, 225, 0.12);
  --wall: #2a2724;
  --wall-hi: #34302c;
  --footer: #0d0c0b;
  --paper: #f1ede6;
  --hdr-back: rgba(22, 21, 20, 0.84);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
/* scroll lock keeps the scrollbar's space, so freezing the page never shifts the layout */
html.lenis.lenis-stopped { overflow: hidden; }
html.mode-anim,
html.mode-anim * { transition: background-color 0.7s var(--ease), color 0.7s var(--ease), border-color 0.7s var(--ease) !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Onest, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }
html:has(body.is-loading) { background: #0e0d0c; }

img, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.shell { width: 100%; padding-inline: var(--gut); margin-inline: auto; max-width: 1920px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 12px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); font-weight: 450; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.eyebrow--dark { color: rgba(236, 231, 225, 0.6); }

/* ── reveal on intro ─────────────────────────────────────────────────────── */
html.js .rv { opacity: 0; transform: translateY(26px); }
html.js body.is-in .rv { opacity: 1; transform: none; transition: opacity 1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s); }

/* ── pills (buttons) ─────────────────────────────────────────────────────── */
.pill {
  --pb: var(--ink); --pf: var(--bg);
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 8px 0 32px; border-radius: 999px;
  background: var(--pb); color: var(--pf); font-weight: 600; font-size: 17px;
  transition: transform 0.5s var(--spring), box-shadow 0.4s var(--ease), background-color 0.3s;
  will-change: transform;
}
.pill__ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--pf); color: var(--pb); font-size: 18px;
  transition: transform 0.5s var(--spring);
}
.pill:hover .pill__ico { transform: translateX(3px) rotate(-8deg); }
.pill--ghost { --pb: transparent; --pf: var(--ink); padding: 0 38px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.12); }
.pill--light { --pb: #ece7e1; --pf: #1a1818; }
.pill--ghost-dark { --pb: transparent; --pf: #ece7e1; padding: 0 32px; border: 1px solid rgba(236, 231, 225, 0.22); }
.pill--sm { height: 48px; padding-left: 22px; font-size: 15px; }
.pill--sm .pill__ico { width: 36px; height: 36px; }
.pill:not(.pill__ico):hover { box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45); }

/* ═══ intro loader ═══════════════════════════════════════════════════════ */
.ldr {
  position: fixed; inset: 0; z-index: 120; background: #0e0d0c; color: #ece7e1;
  display: grid; grid-template-rows: auto 1fr auto; padding: 64px clamp(20px, 3.4vw, 64px) 72px;
  transition: transform 1.05s var(--ease-io), border-radius 1.05s var(--ease-io);
  overflow: hidden;
}
html:not(.js) .ldr { display: none; }
.ldr__glow { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 50% at 0% 75%, rgba(140, 70, 30, 0.28), transparent 70%),
    radial-gradient(35% 40% at 100% 70%, rgba(120, 110, 100, 0.14), transparent 70%),
    radial-gradient(60% 40% at 50% 0%, rgba(80, 70, 60, 0.25), transparent 70%); }
.ldr__top { position: relative; display: flex; justify-content: space-between; gap: 16px; font-size: 15px; color: rgba(236, 231, 225, 0.72); }
.ldr__top b { color: #fff; font-weight: 600; }
.ldr__stack { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: 16px; }
.ldr__pill {
  --c: #2a2725;
  width: min(556px, 78vw); height: clamp(96px, 16vh, 150px); border-radius: 999px;
  margin-top: calc(clamp(96px, 16vh, 150px) * -0.4);
  padding: clamp(22px, 3.6vh, 34px) clamp(36px, 4.6vw, 88px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, white) 0%, var(--c) 34%, color-mix(in srgb, var(--c) 82%, black) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 -10px 30px -8px rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.82); font-weight: 600; font-size: clamp(15px, 1.1vw, 20px);
  opacity: 0; transform: translateY(-36px) scale(0.97);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--spring);
}
.ldr__pill:first-child { margin-top: 0; }
.ldr__pill.in { opacity: 1; transform: none; }
.ldr__pill.light { color: rgba(26, 24, 24, 0.78); }
.ldr__bot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.ldr__lbl { font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(236, 231, 225, 0.55); margin-bottom: 6px; }
.ldr__num { font-size: clamp(80px, 9vw, 168px); font-weight: 650; line-height: 0.86; letter-spacing: -0.04em; }
.ldr__bar { width: min(300px, 32vw); height: 2px; background: rgba(236, 231, 225, 0.12); margin-bottom: 18px; overflow: hidden; }
.ldr__bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #8a837b, #d8b46a); }
.ldr.out .ldr__pill { transition: transform 1s var(--ease-io), opacity 0.8s ease; transition-delay: calc(var(--k) * 0.06s); opacity: 0; }
.ldr.out .ldr__pill:nth-child(odd) { transform: translateX(-115vw) rotate(-7deg); }
.ldr.out .ldr__pill:nth-child(even) { transform: translateX(115vw) rotate(7deg); }
.ldr.out .ldr__bot, .ldr.out .ldr__top { opacity: 0; transition: opacity 0.5s; }
.ldr.lift { transform: translateY(-100%); border-radius: 0 0 50% 50% / 0 0 14vh 14vh; }
.ldr.gone { display: none; }

/* ═══ header ═════════════════════════════════════════════════════════════ */
.hdr { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--hdr); transition: background-color 0.5s var(--ease), box-shadow 0.5s, transform 0.6s var(--ease); }
.hdr::before { content: ""; position: absolute; inset: 0; background: var(--hdr-back); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); opacity: 0; transition: opacity 0.5s var(--ease); }
.hdr.is-scrolled::before { opacity: 1; }
.hdr.is-hidden { transform: translateY(-110%); }
.hdr__in { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1180px; }
html.js .hdr { opacity: 0; transform: translateY(-14px); }
html.js body.is-in .hdr { opacity: 1; transform: none; transition: opacity 0.9s var(--ease) 0.15s, transform 0.9s var(--ease) 0.15s, background-color 0.5s; }
.nav { display: flex; gap: clamp(14px, 1.6vw, 30px); }
.nav a { position: relative; text-decoration: none; font-size: clamp(14px, 1.06vw, 20px); color: var(--ink); opacity: 0.86; white-space: nowrap; transition: opacity 0.3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav a:hover, .nav a[aria-current="true"] { opacity: 1; }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.hdr__right { display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px; border-radius: 16px; background: var(--chip); border: 1px solid var(--chip-b); font-size: clamp(13px, 0.95vw, 18px); white-space: nowrap; }
.menu-btn { display: none; width: 52px; padding: 0; justify-content: center; }

/* "Bored?": the way into the pinball machine, where the clock used to be */
.bored { color: var(--ink); font-weight: 560; transition: transform 0.5s var(--spring), background-color 0.3s; }
.bored:hover { transform: translateY(-2px); }

/* the Work menu: the six doors, gathered under one word */
.ndd { position: relative; }
.ndd__btn { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: clamp(14px, 1.06vw, 20px); color: var(--ink); opacity: 0.86; white-space: nowrap; transition: opacity 0.3s; }
.ndd__btn svg { width: 12px; height: 12px; transition: transform 0.45s var(--ease); }
.ndd__btn::after { content: ""; position: absolute; left: 0; right: 18px; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.ndd__btn:hover, .ndd.open .ndd__btn, .ndd.is-current .ndd__btn { opacity: 1; }
.ndd__btn:hover::after, .ndd.is-current .ndd__btn::after { transform: scaleX(1); transform-origin: left; }
.ndd.open .ndd__btn svg { transform: rotate(180deg); }
.ndd__panel {
  --ink: #1a1818; --ink-2: #807a74; --ink-3: #a7a19a; --line: rgba(26, 24, 24, 0.1);
  position: absolute; top: calc(100% + 20px); left: -20px; z-index: 5; width: 330px; padding: 10px; border-radius: 22px; color: var(--ink);
  background: rgba(248, 245, 241, 0.94); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--line); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(-8px) scale(0.98); transform-origin: 30px 0; pointer-events: none; visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.3s;
}
.ndd__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; } /* a bridge, so the menu stays open on the way down */
:root[data-theme="dark"] .ndd__panel, .room-ov[data-type="edit"] .ndd__panel { --ink: #ece7e1; --ink-2: #8d877f; --ink-3: #6b665f; --line: rgba(236, 231, 225, 0.12); background: rgba(30, 28, 26, 0.94); }
.ndd.open .ndd__panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.3s var(--ease), transform 0.45s var(--ease); }
.ndd__k { padding: 8px 12px 6px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.ndd__list li { opacity: 0; transform: translateY(6px); }
.ndd.open .ndd__list li { opacity: 1; transform: none; transition: opacity 0.35s var(--ease) calc(var(--k, 0) * 35ms), transform 0.5s var(--ease) calc(var(--k, 0) * 35ms); }
.ndd__list a { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 13px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 520; transition: background-color 0.25s; }
.ndd__list a:hover, .ndd__list a:focus-visible, .ndd__list a[aria-current="true"] { background: color-mix(in srgb, var(--ink) 7%, transparent); }
/* each door as a little door: its colour, rounded at the top */
.ndd__list i { width: 11px; height: 16px; border-radius: 6px 6px 1px 1px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); transition: transform 0.4s var(--spring); }
.ndd__list a:hover i { transform: scaleY(1.15) rotate(-6deg); }
.ndd__list b { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink-3); }
.ndd__all { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding: 13px 12px 8px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.ndd__all span { transition: transform 0.4s var(--spring); }
.ndd__all:hover span { transform: translateX(4px); }
/* when the links don't fit, "Bored?" drops its Play tag, then the links fold into the menu */
.hdr.fit-2 .nav { display: none; }
.hdr.fit-2 .menu-btn { display: inline-flex; }
.menu-btn span, .menu-btn span::before { display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; position: relative; }
.menu-btn span::before { content: ""; position: absolute; top: 6px; width: 12px; }
.menu-btn span { transform: translateY(-3px); }

/* ═══ light / dark: a lens aperture ══════════════════════════════════════
   Wide open lets the light in; stopped down, the page goes dark. */
.ap { position: relative; width: 52px; padding: 0; justify-content: center; color: var(--ink); transition: transform 0.5s var(--spring), background-color 0.3s, border-color 0.3s; }
.ap svg { width: 24px; height: 24px; overflow: visible; transition: transform 0.9s var(--spring); }
.ap:hover svg { transform: rotate(-24deg); }
.ap:active { transform: scale(0.92); }
.ap__ring { fill: none; stroke: currentColor; stroke-width: 1.4; }
.ap__b { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; }
/* light through the opening: warm when open, cool once stopped down */
.ap__o { fill: color-mix(in srgb, #8fa4ff calc(var(--ap, 0) * 100%), #f5b65c); opacity: 0.32; }
.ap:hover .ap__o { opacity: 0.55; }
.ap__tip { position: absolute; top: calc(100% + 10px); right: 0; padding: 7px 11px; border-radius: 8px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; opacity: 0; transform: translateY(-4px); transition: opacity 0.25s, transform 0.4s var(--ease); pointer-events: none; z-index: 2; }
.ap:hover .ap__tip, .ap:focus-visible .ap__tip { opacity: 1; transform: none; }
/* the new mode opens over the old one through an iris (View Transitions); without them, the colours fade */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* the header sits on the photo at the top of the page: light type until it gets its backing */
#hdr:not(.is-scrolled) { color: #f7f3ed; --ink: #f7f3ed; --ink-2: rgba(247, 243, 237, 0.74); --ink-3: rgba(247, 243, 237, 0.5); --chip: rgba(12, 10, 9, 0.24); --chip-b: rgba(255, 255, 255, 0.2); }
#hdr:not(.is-scrolled) .chip { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ═══ hero ═══════════════════════════════════════════════════════════════
   The photo fills the screen; scrolling closes a frame around it. */
.hero {
  position: relative; z-index: 3; background: var(--bg); border-radius: 0 0 var(--r) var(--r);
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.22); overflow: clip;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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");
}
.hero__pin {
  --hp: 0; --dev: 0; --scrim: 1; --edge: 0; --af: 1;
  /* type colour: light on the photo, ink on the page */
  --on: color-mix(in srgb, var(--ink) calc(var(--hp) * 100%), #f7f3ed);
  --on-2: color-mix(in srgb, var(--ink-2) calc(var(--hp) * 100%), rgba(247, 243, 237, 0.76));
  --on-line: color-mix(in srgb, var(--line) calc(var(--hp) * 100%), rgba(247, 243, 237, 0.24));
  --on-bg: color-mix(in srgb, var(--bg) calc(var(--hp) * 100%), #121110);
  --on-edge: color-mix(in srgb, var(--ink) calc(var(--hp) * 100%), rgba(247, 243, 237, 0.7));
  position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 560px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: calc(var(--hdr) + 14px); overflow: hidden; background: var(--bg);
}
.hero__photo { position: absolute; inset: 0; background: #0d0b0a; }
.hero__img { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.hero__img img, .hero__img canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 40%); }
.hero.is-cutout .hero__img img { object-fit: contain; }
.hero.is-cutout .hero__photo { background: radial-gradient(60% 70% at 64% 45%, #5a4334, #1a1311 60%, #0b0908); }
.hero__bw { filter: grayscale(1) contrast(1.08); }
.hero__photo.has-reveal .hero__bw { visibility: hidden; }
/* the colour develops in as the frame closes */
.hero__col { opacity: var(--dev); }
.hero__scrim { position: absolute; inset: 0; pointer-events: none; opacity: var(--scrim);
  background: linear-gradient(270deg, rgba(10, 8, 7, 0.8), rgba(10, 8, 7, 0.5) 34%, rgba(10, 8, 7, 0) 62%), linear-gradient(0deg, rgba(10, 8, 7, 0.6), rgba(10, 8, 7, 0) 30%), linear-gradient(180deg, rgba(10, 8, 7, 0.5), rgba(10, 8, 7, 0) 22%); }
.hero__grain { position: absolute; inset: -50%; background-image: var(--grain); opacity: 0.08; pointer-events: none; animation: hgrain 0.6s steps(3) infinite; }
@keyframes hgrain { 0% { transform: translate(0, 0); } 33% { transform: translate(-5%, 4%); } 66% { transform: translate(4%, -3%); } 100% { transform: translate(-2%, -5%); } }
/* entrance: the photo comes up out of the dark, like a print in the developer */
html.js .hero__photo { transform: scale(1.1); filter: brightness(0.12) contrast(1.25); }
html.js body.is-in .hero__photo { transform: none; filter: none; transition: transform 2.6s var(--ease), filter 2.2s var(--ease); }

/* viewfinder: frame lines that follow the photo's corners, an AF point on the face, film-edge print */
.vf { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.vf__c { position: absolute; width: 26px; height: 26px; border: 0 solid rgba(255, 255, 255, 0.82); }
.vf__c.is-a { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; }
.vf__c.is-b { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.vf__c.is-c { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; }
.vf__c.is-d { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }
html.js .vf__c { opacity: 0; scale: 0.6; }
html.js body.is-in .vf__c { opacity: 1; scale: 1; transition: opacity 0.8s var(--ease) 0.9s, scale 1.1s var(--spring) 0.9s; }
.vf__af { position: absolute; left: 0; top: 0; width: 72px; height: 72px; margin: -36px; opacity: calc(var(--af) * 0.85); --c: rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(var(--c), var(--c)) left top / 13px 1.5px, linear-gradient(var(--c), var(--c)) left top / 1.5px 13px,
    linear-gradient(var(--c), var(--c)) right top / 13px 1.5px, linear-gradient(var(--c), var(--c)) right top / 1.5px 13px,
    linear-gradient(var(--c), var(--c)) left bottom / 13px 1.5px, linear-gradient(var(--c), var(--c)) left bottom / 1.5px 13px,
    linear-gradient(var(--c), var(--c)) right bottom / 13px 1.5px, linear-gradient(var(--c), var(--c)) right bottom / 1.5px 13px;
  background-repeat: no-repeat; }
.vf__af.lock { --c: #8dffb8; }
html.js .vf__af { visibility: hidden; }
html.js body.is-in .vf__af { visibility: visible; animation: afLock 1.4s var(--ease) 1.1s both; }
@keyframes afLock { 0% { scale: 1.8; opacity: 0; } 55% { scale: 1; opacity: 0.9; } 64% { opacity: 0.15; } 74% { opacity: 1; } 100% { scale: 1; opacity: calc(var(--af) * 0.85); } }
.vf__edge { position: absolute; left: 9px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.32em; color: rgba(255, 245, 230, 0.72); opacity: var(--edge); }

.hero__content { position: relative; flex: 1; display: flex; justify-content: flex-end; align-items: center; pointer-events: none; }
.hero__txt { width: min(47vw, 780px); padding-bottom: clamp(8px, 3vh, 40px); pointer-events: auto; }
/* the words are white, inverted against whatever is behind them: light on the photo, ink on the page,
   split exactly along the photo's edge as it slides past */
.hero__name, .hero__tag, .hero .bt { color: #fff; mix-blend-mode: difference; }
.hero__eye { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.hero__eye .bt { color: rgba(255, 255, 255, 0.82); }
.hero__eye .hero__dot { margin-right: 0; }
.hero__dash { display: inline-block; width: 34px; height: 1px; background: rgba(255, 255, 255, 0.7); }
/* the roles roll by, one word at a time */
.hero__role { display: inline-block; height: 1.4em; line-height: 1.4em; overflow: hidden; }
.hero__role span { display: inline-block; transition: transform 0.42s var(--ease), opacity 0.42s; }
.hero__role span.out { transform: translateY(-110%); opacity: 0; }
.hero__role span.pre { transform: translateY(110%); opacity: 0; transition: none; }
/* the name: a thin, tall display serif, the second line set in, each letter rising out of a blur */
.hero__name { margin-top: clamp(14px, 2.6vh, 26px); font-family: Italiana, "Didot", "Bodoni 72", Georgia, serif; font-weight: 400; font-size: clamp(50px, min(6.3vw, 12.5vh), 136px); line-height: 0.98; letter-spacing: 0.015em; text-transform: uppercase; white-space: nowrap; }
.hero__name .ln { display: block; overflow: hidden; padding: 0.07em 0 0.03em; margin: 0; }
.hero__name .ln--2 { padding-left: 0.6em; }
html.js .hero__name .ln__in { transform: none; }
.hero__name .nm { display: inline-block; }
html.js .hero__name .nm { transform: translateY(100%); opacity: 0; filter: blur(10px); }
html.js body.is-in .hero__name .nm { transform: none; opacity: 1; filter: none; transition: transform 1.3s var(--ease) calc(0.2s + var(--i) * 0.045s), opacity 1s var(--ease) calc(0.2s + var(--i) * 0.045s), filter 1.1s var(--ease) calc(0.2s + var(--i) * 0.045s); }
.hero__tag { margin-top: clamp(16px, 3vh, 30px); max-width: 33em; font-size: clamp(15px, 1.12vw, 19px); line-height: 1.65; font-weight: 300; color: rgba(255, 255, 255, 0.84); }
.hero__tag em { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.08em; }
/* square-edged buttons; on hover a fill sweeps across them */
.hbtn { position: relative; display: inline-flex; align-items: center; gap: 14px; height: clamp(50px, 7.4vh, 58px); padding: 0 30px; font-size: 13.5px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; overflow: hidden; isolation: isolate; transition: color 0.45s var(--ease), border-color 0.45s; }
.hbtn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: right; transition: transform 0.6s var(--ease); }
.hbtn:hover::before { transform: scaleX(1); transform-origin: left; }
.hbtn i { font-style: normal; transition: transform 0.5s var(--spring); }
.hbtn:hover i { transform: translateX(5px); }
.hbtn--solid { background: var(--on); color: var(--on-bg); }
.hbtn--solid::before { background: #c9b38a; }
.hbtn--line { color: var(--on); border: 1px solid var(--on-edge); background: rgba(20, 18, 16, calc(0.18 * (1 - var(--hp)))); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hbtn--line::before { background: var(--on); }
.hbtn--line:hover { color: var(--on-bg); }
.h1 { margin-top: clamp(10px, 3vh, 26px); font-size: clamp(42px, min(5.5vw, 11.5vh), 112px); font-weight: 620; line-height: 1; letter-spacing: -0.04em; }
.ln { display: block; overflow: hidden; padding: 0.04em 0 0.1em; margin-bottom: -0.08em; }
.ln__in { display: inline-block; }
.ln--muted { color: var(--ink-2); }
html.js .ln__in { transform: translateY(110%); }
html.js body.is-in .ln__in { transform: none; transition: transform 1.25s var(--ease); }
html.js body.is-in .ln:nth-child(2) .ln__in { transition-delay: 0.1s; }
.ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: clamp(18px, 4.5vh, 48px); }
.ctas .pill { height: clamp(52px, 8.5vh, 64px); }
.ctas .pill__ico { width: clamp(40px, 6.5vh, 48px); height: clamp(40px, 6.5vh, 48px); }
.hero__bar { position: relative; }
/* the numbers along the foot of the hero */
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3vw; padding-block: clamp(14px, 2.6vh, 26px); }
.stat { display: flex; align-items: center; gap: 18px; }
.stat__n { flex: none; font-family: Italiana, "Didot", Georgia, serif; font-size: clamp(34px, min(3.3vw, 6vh), 58px); line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.stat__l { font-size: 13.5px; line-height: 1.45; max-width: 19em; color: rgba(255, 255, 255, 0.7) !important; }
.hero__bar::before { content: ""; position: absolute; left: var(--gut); right: var(--gut); top: 0; height: 1px; background: rgba(255, 255, 255, 0.28); mix-blend-mode: difference; }
.hero__dot { display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: #6fbf5f; box-shadow: 0 0 0 0 rgba(111, 191, 95, 0.6); animation: ping 2.2s infinite; vertical-align: 1px; }
@keyframes bob { 50% { transform: translateY(4px); } }
/* the brush: a ring under the cursor showing where the colour goes */
.brush { position: fixed; left: 0; top: 0; z-index: 3; width: 0; height: 0; pointer-events: none; }
.brush::before { content: ""; position: absolute; width: 96px; height: 96px; margin: -48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.06); opacity: 0; scale: 0.5; transition: opacity 0.35s, scale 0.6s var(--spring); }
.brush::after { content: ""; position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity 0.2s; }
.brush b { position: absolute; left: 60px; top: -8px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; white-space: nowrap; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.4s; }
.brush.on::before { opacity: 1; scale: 1; }
.brush.on::after { opacity: 1; }
.brush.on b { opacity: 0.92; }
.brush.used b { opacity: 0; }
.hero__pin:has(.brush.on) { cursor: none; }

/* ── flip calendar ────────────────────────────────────────────────────── */
.flip { --fs: clamp(34px, min(4.6vw, 9vh), 94px); position: relative; margin-top: clamp(16px, 3.6vh, 30px); font-size: var(--fs); width: max-content; transform: rotate(-1.4deg); transform-origin: left center; }
.flip__body { position: relative; perspective: 1400px; }
.flip__slab { position: absolute; left: 0.22em; right: -0.18em; top: 0.42em; bottom: -0.16em; border-radius: 0.16em; background: #141212; transform: rotate(1.2deg); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.45); }
:root[data-theme="dark"] .flip__slab { background: #050505; }
.flip__page {
  position: relative; display: flex; align-items: center;
  width: var(--pw, 8em); height: 1.62em; padding: 0.18em 0.42em 0;
  border-radius: 0.12em; background: var(--paper);
  font-weight: 720; letter-spacing: -0.035em; color: #161414; line-height: 1;
}
.flip__edges { position: absolute; inset: 0; border-radius: 0.12em; box-shadow: 0 0.05em 0 #e7e2da, 0 0.1em 0 #dcd6cd, 0 0.15em 0 #d2ccc2, 0 0.2em 0 #c8c1b6; }
.flip__under { position: absolute; inset: 0; }
.flip__leaf { position: relative; transform-origin: 50% 0; transform-style: preserve-3d; background: transparent; padding: 0; }
.flip__face { position: absolute; inset: 0; display: flex; align-items: center; padding: 0.18em 0.42em 0; border-radius: 0.12em; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__front { background: var(--paper); box-shadow: inset 0 -0.02em 0 rgba(0, 0, 0, 0.06); }
.flip__back { transform: rotateX(180deg); background: linear-gradient(180deg, #fbfaf6, #d9d3c9); }
.flip__leaf .flip__shade { position: absolute; inset: 0; border-radius: 0.12em; background: #000; opacity: 0; pointer-events: none; }
.flip__under::after { content: ""; position: absolute; inset: 0; border-radius: 0.12em; background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 60%); opacity: 0; pointer-events: none; }
.flip__word { white-space: nowrap; }
.flip__count { position: absolute; right: 0.6em; bottom: 0.32em; font-size: 0.17em; letter-spacing: 0.12em; font-weight: 600; color: #a39d95; z-index: 4; }
.flip__rings { position: absolute; left: 0.35em; right: 0.35em; top: -0.17em; height: 0.42em; display: flex; justify-content: space-between; z-index: 5; pointer-events: none; }
.flip__rings i { position: relative; width: 0.11em; height: 0.36em; border-radius: 0.06em; background: linear-gradient(90deg, #8f8f8f, #fdfdfd 45%, #b9b9b9 70%, #7a7a7a); box-shadow: 0 0.02em 0.03em rgba(0, 0, 0, 0.35); }
.flip__rings i::after { content: ""; position: absolute; left: 50%; bottom: -0.05em; width: 0.13em; height: 0.08em; margin-left: -0.065em; border-radius: 50%; background: #3c3a37; box-shadow: inset 0 0.015em 0.02em #000; z-index: -1; }

/* ═══ doors ══════════════════════════════════════════════════════════════ */
.doors { position: relative; z-index: 2; margin-top: calc(var(--r) * -1); padding-top: calc(var(--r) + clamp(70px, 11vh, 140px)); background: var(--wall); overflow: hidden; }
.doors__tex { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, var(--wall-hi), transparent 30%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.doors__pin { position: relative; }
.doors__wall { position: relative; transform-origin: 50% 70%; will-change: auto; }
.paint {
  position: relative; text-align: center; font-weight: 720; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(36px, 5vw, 104px); color: var(--ink);
  mix-blend-mode: multiply; opacity: 0.94; z-index: 2;
}
:root[data-theme="dark"] .paint { mix-blend-mode: normal; color: #d9d3cc; }
.doors__hint, .doors__dots { display: none; }
.doors__row { --dw: clamp(110px, 9.1vw, 190px); position: relative; display: flex; justify-content: space-around; padding-top: clamp(40px, 9vh, 96px); }
.unit { position: relative; display: flex; justify-content: center; flex: 1; transition: opacity 0.5s var(--ease), filter 0.5s; }
.doors.has-hover .unit:not(.is-hover) { opacity: 0.22; filter: saturate(0.4); }
.unit::before { /* wall light above each door */
  content: ""; position: absolute; left: 50%; top: calc(var(--dw) * -0.95); width: calc(var(--dw) * 2.4); height: calc(var(--dw) * 2.2);
  transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 30%, rgba(255, 250, 238, 0.85), rgba(255, 248, 236, 0.25) 45%, transparent 70%); pointer-events: none;
}
:root[data-theme="dark"] .unit::before { background: radial-gradient(50% 50% at 50% 30%, rgba(255, 220, 160, 0.22), rgba(255, 210, 150, 0.06) 45%, transparent 70%); }
.doorway { position: relative; display: block; width: calc(var(--dw) + 32px); height: calc(var(--dw) * 2.38 + 16px); cursor: none; }
@media (hover: none) { .doorway { cursor: pointer; } }
.casing { position: absolute; inset: 0; border-radius: 999px 999px 0 0; background: linear-gradient(90deg, #e9e6e1, #fbfaf8 30%, #f1eee9 70%, #dcd8d2); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.04); }
:root[data-theme="dark"] .casing { background: linear-gradient(90deg, #3a3631, #4a4540 30%, #423d38 70%, #34302c); }
.opening { position: absolute; left: 16px; right: 16px; top: 16px; bottom: 0; border-radius: 999px 999px 0 0; perspective: 900px; }
.room { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(80% 60% at 30% 100%, #2b2622, #090807 70%); overflow: hidden; }
.spill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 214, 150, 0.0), rgba(255, 214, 150, 0.0)); opacity: 0; transition: opacity 0.6s; }
.door {
  position: absolute; inset: 0; border-radius: 999px 999px 0 0; transform-origin: 0 50%;
  background: var(--door); transform: rotateY(0deg); transform-style: preserve-3d;
  transition: transform 0.9s var(--ease); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.door__flute { position: absolute; inset: 9% 10% 4%; border-radius: 999px 999px 0 0;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0 1.5px, rgba(255, 255, 255, 0.05) 1.5px 3px, transparent 3px 7px), var(--door-dk);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06), inset 0 4px 8px rgba(0, 0, 0, 0.25); }
.plate {
  position: absolute; left: 50%; top: 31%; transform: translateX(-50%); width: 68%; padding: 0.55em 0.3em; text-align: center;
  font-size: calc(var(--dw) * 0.062); font-weight: 750; letter-spacing: 0.12em; line-height: 1.15; text-transform: uppercase; color: #3b2d14;
  background: linear-gradient(160deg, #f4dc93, #c9a24a 45%, #e9cf82 60%, #b48b35);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.35); border-radius: 2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.plate::before, .plate::after { content: ""; position: absolute; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: #8a6a28; }
.plate::before { left: 4px; } .plate::after { right: 4px; }
.handle { position: absolute; right: 14%; top: 64%; width: 32%; height: 22%; }
.handle__lever { position: absolute; right: 0; top: 0; width: 100%; height: calc(var(--dw) * 0.055); border-radius: 99px; background: linear-gradient(180deg, #f3d887, #b38a35 60%, #7d5e20); box-shadow: 0 3px 4px rgba(0, 0, 0, 0.4); transform-origin: 85% 50%; transition: transform 0.5s var(--spring); }
.handle__lever::after { content: ""; position: absolute; right: -3px; top: 50%; width: calc(var(--dw) * 0.11); height: calc(var(--dw) * 0.11); margin-top: calc(var(--dw) * -0.055); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fbe7a6, #b38a35 60%, #6f531c); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45); }
.handle__lock { position: absolute; right: 12%; top: 34%; width: calc(var(--dw) * 0.05); height: calc(var(--dw) * 0.1); border-radius: 3px; background: linear-gradient(180deg, #f0d585, #a07a2c); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4); }
.handle__lock::after { content: ""; position: absolute; left: 50%; top: 30%; width: 3px; height: 45%; margin-left: -1.5px; border-radius: 2px; background: #2a1e0a; }
.door__shade { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.0)); pointer-events: none; transition: background 0.8s; }
.door::after { /* back side of the door when it swings into the room */
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: color-mix(in srgb, var(--door) 55%, black); transform: translateZ(-1px) rotateY(180deg); backface-visibility: hidden;
}
.leak { position: absolute; right: -2px; top: 4%; bottom: 0; width: 4px; border-radius: 4px; background: linear-gradient(180deg, transparent, rgba(255, 220, 160, 0.95) 30%, rgba(255, 220, 160, 0.95)); filter: blur(2px); opacity: 0; transition: opacity 0.6s; }
.sill { position: absolute; left: -16px; right: -16px; bottom: -10px; height: 10px; background: linear-gradient(180deg, #f3f0eb, #d4cfc8); box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.25); }
:root[data-theme="dark"] .sill { background: linear-gradient(180deg, #4a4540, #2e2a27); }
.pool { position: absolute; left: 50%; bottom: -70px; width: 160%; height: 70px; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 0%, rgba(255, 220, 160, 0.0), transparent 70%); pointer-events: none; transition: background 0.6s; }
.unit.is-hover .door { transform: rotateY(-24deg); }
.unit.is-hover .door__shade { background: linear-gradient(90deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.28)); }
.unit.is-hover .leak { opacity: 1; }
.unit.is-hover .spill { opacity: 1; background: linear-gradient(90deg, rgba(255, 206, 140, 0.05) 60%, rgba(255, 206, 140, 0.35)); }
.unit.is-hover .pool { background: radial-gradient(50% 50% at 60% 0%, rgba(255, 214, 150, 0.35), transparent 70%); }
.unit.is-hover .handle__lever { transform: rotate(-16deg); }
.unit.is-open .door { transform: rotateY(-104deg); transition: transform 1s var(--ease-io); }
.unit.is-open .leak { opacity: 0; }
.doors__floor { position: relative; height: clamp(90px, 16vh, 170px); background: linear-gradient(180deg, #f2efeb, #e8e4df 60%, var(--bg-2)); box-shadow: inset 0 10px 18px -12px rgba(0, 0, 0, 0.25); }
:root[data-theme="dark"] .doors__floor { background: linear-gradient(180deg, #24211e, var(--bg-2)); }
html.js .unit { opacity: 0; transform: translateY(30px); }
html.js .doors.is-seen .unit { opacity: 1; transform: none; transition: opacity 0.9s var(--ease) calc(var(--i) * 0.09s), transform 1.1s var(--ease) calc(var(--i) * 0.09s), filter 0.5s; }
html.js .doors.is-seen.has-hover .unit:not(.is-hover) { opacity: 0.1; transition: opacity 0.5s var(--ease), filter 0.5s; }

.dinfo { position: absolute; z-index: 5; top: 0; left: 0; width: min(330px, 26vw); pointer-events: none; opacity: 0; transform: translateY(10px); transition: opacity 0.45s var(--ease), transform 0.6s var(--ease); }
.dinfo.on { opacity: 1; transform: none; }
.dinfo__h { font-size: clamp(22px, 1.8vw, 34px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.08; }
.dinfo__t { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.dinfo__p { margin-top: 18px; display: grid; gap: 8px; }
.dinfo__p li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.dinfo__p li::before { content: ""; width: 14px; height: 1.5px; background: currentColor; opacity: 0.5; }

.door-cursor { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translate(-50%, -50%); transition: opacity 0.25s; }
.door-cursor.on { opacity: 1; }

/* walk-through: the wall may grow past its own section until the room's dark fills the screen */
body.walking .doors { z-index: 50; overflow: visible; }
body.walking .doors__tex, body.walking .doors__floor { visibility: hidden; }
/* the rooms behind the doors live in rooms.css */

/* ═══ my story ═══════════════════════════════════════════════════════════ */
.story { position: relative; background: var(--bg-2); padding-block: clamp(60px, 10vh, 120px) 20vh; }
.story::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, transparent 0 26px, rgba(0, 0, 0, 0.022) 26px 27px); }
:root[data-theme="dark"] .story::before { background: repeating-linear-gradient(135deg, transparent 0 26px, rgba(255, 255, 255, 0.02) 26px 27px); }
/* the backdrop light stays with you while the chapters scroll, and takes each chapter's colour */
.story__amb { position: absolute; inset: 0; pointer-events: none; overflow: clip; }
.story__amb-in { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.story__amb i { position: absolute; display: block; width: 62vmax; height: 62vmax; border-radius: 50%; filter: blur(90px); opacity: 0.6; transition: background-color 1.4s var(--ease); background: var(--amb, #e9a37f); }
:root[data-theme="dark"] .story__amb i { opacity: 0.16; }
.story__amb i:nth-child(1) { left: -34vmax; top: -30vmax; }
.story__amb i:nth-child(2) { right: -34vmax; bottom: -34vmax; background: var(--amb2, #a7b8e3); opacity: 0.55; }
.story__amb i:nth-child(3) { left: 30%; top: 30%; width: 30vmax; height: 30vmax; background: var(--amb, #e9a37f); opacity: 0.12; }
.story__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4vw; }
.story__left { position: relative; }
.story__sticky { position: sticky; top: calc(var(--hdr) + 9vh); padding-bottom: 6vh; }
.story__tunnel { position: absolute; left: 50%; top: 52%; width: min(900px, 54vw); height: min(900px, 54vw); transform: translate(-58%, -50%); pointer-events: none; z-index: 0; }
.story__sticky > :not(canvas) { position: relative; z-index: 1; }
.story__h { margin-top: 14px; font-size: clamp(38px, 3.9vw, 78px); font-weight: 680; letter-spacing: -0.04em; line-height: 1.04; }
.year { margin-top: 3.5vh; display: flex; font-size: clamp(96px, 14vw, 270px); font-weight: 720; letter-spacing: -0.05em; line-height: 0.86; height: 0.9em; overflow: hidden; }
.year__col { position: relative; display: block; height: 0.9em; overflow: hidden; width: 0.6em; }
.year__strip { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -0.9em)); transition: transform 1.1s var(--spring); transition-delay: calc(var(--c) * 0.06s); }
.year__strip span { display: block; height: 0.9em; text-align: center; }
.story__range { margin-top: 4vh; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; }
.story__count { margin-top: 3vh; display: flex; align-items: center; gap: 10px; font-size: 18px; }
.story__count b { font-weight: 650; }
.story__count span:not(.story__prog) { color: var(--ink-2); }
.story__ico { width: 24px; height: 24px; transition: transform 0.9s var(--spring); }
.story__prog { position: relative; margin-left: 18px; width: 230px; height: 2px; background: var(--line); }
.story__prog i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: transform 0.9s var(--ease); }
.story__prog::before { content: ""; position: absolute; left: 0; top: -2px; width: 3px; height: 3px; border-radius: 50%; background: var(--ink); }
.story__right { position: relative; }
/* the first chapter starts level with the middle of the screen, where the dot sits */
.tl { position: relative; padding-left: clamp(36px, 3.4vw, 64px); padding-top: max(0px, calc(50vh - var(--hdr) - 30px)); }
.tl__line { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl__fill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--ink); transform-origin: top; transform: scaleY(0); }
.tl__dot { position: absolute; left: 1px; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 7px color-mix(in srgb, var(--ink) 10%, transparent); transition: background-color 0.5s; }
.tl__dot.at-start { background: #6aa45e; box-shadow: 0 0 0 7px rgba(106, 164, 94, 0.18); }
.tl__list { display: grid; }
.ch { min-height: 56vh; padding-block: 2vh 6vh; opacity: 0.32; transition: opacity 0.7s var(--ease); }
.ch.on { opacity: 1; }
.ch__d { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.ch__t { margin-top: 10px; font-size: clamp(30px, 2.6vw, 50px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.05; }
.ch__p { margin-top: 8px; font-size: clamp(17px, 1.2vw, 22px); color: color-mix(in srgb, var(--ink) 80%, transparent); }
.ch__ul { margin-top: 26px; display: grid; gap: 14px; max-width: 34em; }
.ch__ul li { position: relative; padding-left: 26px; font-size: clamp(16px, 1.15vw, 21px); line-height: 1.55; }
.ch__ul li::before { content: "–"; position: absolute; left: 0; color: var(--ink-2); }

/* ═══ footer ═════════════════════════════════════════════════════════════ */
.sfw { position: relative; background: var(--bg-2); }
.sf { position: relative; background: var(--footer); color: #ece7e1; border-radius: var(--r) var(--r) 0 0; padding: clamp(80px, 14vh, 140px) 0 34px; overflow: hidden; }
.sf__eye { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(236, 231, 225, 0.6); }
.sf__eye i { width: 8px; height: 8px; border-radius: 50%; background: #6fbf5f; box-shadow: 0 0 0 0 rgba(111, 191, 95, 0.6); animation: ping 2.2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(111, 191, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 191, 95, 0); } }
.sf__h { margin-top: 20px; display: grid; font-weight: 680; letter-spacing: -0.045em; line-height: 0.98; }
.sf__h > span:first-child { font-size: clamp(38px, 4.6vw, 92px); }
.sf__big { font-size: var(--fit, clamp(56px, 9.6vw, 190px)); color: #6f6a65; white-space: nowrap; }
.sf__p { margin-top: 34px; max-width: 37em; font-size: clamp(17px, 1.25vw, 23px); color: rgba(236, 231, 225, 0.72); line-height: 1.6; }
.sf__cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; }
.sf__cols { margin-top: clamp(60px, 10vh, 110px); padding-top: 54px; border-top: 1px solid rgba(236, 231, 225, 0.12); display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.sf__k { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(236, 231, 225, 0.5); margin-bottom: 20px; }
.sf__cols ul { display: grid; gap: 12px; }
.sf__cols .sf__work { grid-template-columns: repeat(3, max-content); column-gap: clamp(30px, 5vw, 100px); row-gap: 12px; }
.sf__cols button, .sf__cols li { font-size: clamp(16px, 1.1vw, 20px); font-weight: 520; color: #ece7e1; text-align: left; }
.sf__cols button { transition: opacity 0.3s; opacity: 0.92; }
.sf__cols button:hover { opacity: 0.6; }
.sf__status li { color: rgba(236, 231, 225, 0.86); }
.sf__bot { margin-top: 54px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 15px; color: rgba(236, 231, 225, 0.62); }
.sf__soc { display: flex; gap: 20px; }
.sf__soc a { text-underline-offset: 4px; }
.sf__bot button { color: rgba(236, 231, 225, 0.8); }

/* ═══ floating back-to-top ═══════════════════════════════════════════════ */
.totop {
  position: fixed; right: 26px; bottom: 26px; z-index: 35; display: flex; align-items: center; justify-content: center;
  height: 70px; min-width: 70px; padding: 0; border-radius: 999px; background: #1a1818; color: #f2eee8;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.45);
  transform: scale(0.6); opacity: 0; pointer-events: none; transition: transform 0.6s var(--spring), opacity 0.4s, background-color 0.4s, color 0.4s, padding 0.5s var(--ease);
}
.totop.on { transform: none; opacity: 1; pointer-events: auto; }
.totop.flip-c, :root[data-theme="dark"] .totop { background: #f2eee8; color: #1a1818; }
.totop__ring { position: absolute; left: 3px; top: 3px; width: 64px; height: 64px; transform: rotate(-90deg); }
.totop__ring circle { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-dasharray: 125.66; stroke-dashoffset: var(--off, 125.66); opacity: 0.9; }
.totop__arr { width: 18px; height: 18px; }
.totop .lbl { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 15px; font-weight: 600; transition: max-width 0.5s var(--ease), margin 0.5s var(--ease); }
.totop:hover { padding: 0 26px 0 24px; }
.totop:hover .totop__ring { opacity: 0; }
.totop:hover .lbl { max-width: 120px; margin-left: 10px; }

/* ═══ overlays: menu, modal ═══════════════════════════════════ */
.navm { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; justify-content: space-between; padding-block: 18px 30px; }
.navm[hidden] { display: none; }
.navm__top { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 650; }
.close-btn, .x-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); transition: transform 0.5s var(--spring); }
.close-btn svg, .x-btn svg { width: 22px; height: 22px; }
.close-btn:hover, .x-btn:hover { transform: rotate(90deg); }
.navm__nav ul { display: grid; gap: 4px; }
.navm__item { font-size: clamp(34px, 9vw, 60px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.12; opacity: 0; transform: translateY(30px); }
.navm.on .navm__item { opacity: 1; transform: none; transition: opacity 0.6s var(--ease) calc(var(--i) * 0.05s + 0.1s), transform 0.8s var(--ease) calc(var(--i) * 0.05s + 0.1s); }
.navm__bot { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(14, 13, 12, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.4s var(--ease); }
.modal[hidden] { display: none; }
.modal.on { opacity: 1; }
.modal__panel { position: relative; width: min(640px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; border-radius: 28px; background: var(--bg); color: var(--ink); padding: clamp(26px, 4vw, 44px); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6); transform: translateY(40px) scale(0.97); transition: transform 0.7s var(--spring); }
.modal.on .modal__panel { transform: none; }
.x-btn { position: absolute; right: 20px; top: 20px; }
.mhead__eye { font-size: 14px; color: var(--ink-2); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.mhead h2 { margin-top: 10px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 680; letter-spacing: -0.035em; line-height: 1.08; padding-right: 50px; }
.qz__top { margin-top: 26px; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); }
.qz__bar { flex: 1; height: 2px; background: var(--line); }
.qz__bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0.2); transition: transform 0.6s var(--ease); }
.qz { border: 0; margin: 0; padding: 0; margin-top: 26px; display: none; }
.qz.on { display: block; animation: qzIn 0.6s var(--ease); }
@keyframes qzIn { from { opacity: 0; transform: translateX(24px); } }
.qz legend { font-size: 22px; font-weight: 620; letter-spacing: -0.02em; padding: 0; margin-bottom: 18px; }
.qz__opts { display: grid; gap: 10px; }
.qz__opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer; transition: border-color 0.3s, background-color 0.3s, transform 0.4s var(--spring); }
.qz__opt:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.qz__opt input { position: absolute; opacity: 0; }
.qz__opt .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-3); display: grid; place-items: center; flex: none; }
.qz__opt input:checked + .dot { border-color: var(--ink); }
.qz__opt input:checked + .dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.qz__opt:has(input:checked) { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.qz__opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.qz label.fld { display: grid; gap: 8px; margin-bottom: 14px; font-size: 14px; color: var(--ink-2); }
.qz input[type="text"], .qz input[type="email"], .qz textarea { font: inherit; font-size: 17px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; width: 100%; transition: border-color 0.3s; }
.qz textarea { min-height: 150px; resize: vertical; }
.qz input:focus, .qz textarea:focus { outline: none; border-color: var(--ink); }
.qz__err { min-height: 22px; margin-top: 12px; color: #c0412b; font-size: 14px; }
.mform__bot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.qz__back { color: var(--ink-2); font-size: 15px; transition: color 0.3s; }
.qz__back:hover { color: var(--ink); }
.qz__back[disabled] { visibility: hidden; }
.msuccess { text-align: center; padding: 20px 0 6px; }
.msuccess[hidden] { display: none; }
.msuccess__badge { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.msuccess__badge svg { width: 30px; height: 30px; }
.msuccess h2 { font-size: 32px; font-weight: 680; letter-spacing: -0.03em; }
.msuccess p { margin: 14px auto 0; max-width: 38ch; color: var(--ink-2); }
.msuccess .pill { margin-top: 28px; }
.qz__stopbtns { margin-top: 26px; display: flex; justify-content: center; align-items: center; gap: 22px; }
.qz__stopbtns .pill { margin-top: 0; }

/* ═══ responsive ═════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 900px) {
  :root { --hdr: 72px; --r: 22px; }
  .chip { height: 46px; padding: 0 14px; }
  .menu-btn { width: 46px; }
  .ap { width: 46px; }
  .ap__tip { display: none; }
  /* phones: the photo fills the screen and the words sit at its foot */
  .hero__pin { justify-content: flex-end; padding-top: calc(var(--hdr) + 10px); }
  .hero__content { flex: none; justify-content: flex-start; }
  .hero__txt { width: 100%; padding: 0 0 18px; }
  .hero__scrim { background: linear-gradient(0deg, rgba(10, 8, 7, 0.92), rgba(10, 8, 7, 0.66) 46%, rgba(10, 8, 7, 0) 76%), linear-gradient(180deg, rgba(10, 8, 7, 0.55), rgba(10, 8, 7, 0) 22%); }
  /* on phones the words always sit on the photo: plain light type reads best */
  .hero__name, .hero__tag, .hero .bt { mix-blend-mode: normal; color: #f7f3ed; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45); }
  .hero__eye { font-size: 10.5px; letter-spacing: 0.16em; gap: 9px; }
  .hero__dash { width: 18px; }
  .hero__name { font-size: clamp(42px, 13vw, 76px); }
  .hero__name .ln--2 { padding-left: 0.35em; }
  .hero__tag { font-size: 14.5px; line-height: 1.55; }
  .hbtn { height: 50px; padding: 0 20px; font-size: 12px; }
  .hero__stats { gap: 14px; padding-block: 14px 18px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 6px; }
  .stat__n { font-size: 30px; }
  .stat__l { font-size: 11px; }
  .hero__bar::before { mix-blend-mode: normal; }
  .vf__c.is-c, .vf__c.is-d { display: none; }
  .h1 { font-size: clamp(38px, 11vw, 64px); }
  .vf__edge { display: none; }
  .flip { --fs: clamp(30px, 8.6vw, 60px); }
  .doors__row { --dw: 128px; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; margin-inline: calc(var(--gut) * -1); padding-inline: calc(50% + var(--gut) - 80px); scrollbar-width: none; padding-top: 140px; margin-top: -60px; }
  .doors__row::-webkit-scrollbar { display: none; }
  .unit { flex: 0 0 160px; scroll-snap-align: center; }
  .doors.has-hover .unit:not(.is-hover) { opacity: 1; filter: none; }
  .doors__hint { display: block; text-align: center; margin-top: 14px; color: var(--ink-2); font-size: 14px; }
  .doors__dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
  .doors__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: 0.2; transition: opacity 0.3s, transform 0.3s; }
  .doors__dots i.on { opacity: 0.9; transform: scale(1.3); }
  .dinfo { position: relative; width: auto; margin: 22px auto 0; text-align: center; opacity: 1; transform: none; max-width: 30em; }
  .dinfo__p { justify-items: center; }
  .story__grid { grid-template-columns: 1fr; }
  .story__sticky { position: relative; top: 0; padding-bottom: 0; }
  .story__left { position: sticky; top: var(--hdr); z-index: 2; background: color-mix(in srgb, var(--bg-2) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); padding-top: 10px; }
  .story__h { font-size: 26px; }
  .story__left .eyebrow { display: none; }
  .year { font-size: 72px; margin-top: 6px; }
  .story__range { margin-top: 8px; font-size: 12px; }
  .story__count { margin-top: 8px; font-size: 15px; padding-bottom: 12px; }
  .story__prog { width: 120px; }
  .story__tunnel { display: none; }
  .ch { min-height: 48vh; }
  .sf__cols { grid-template-columns: 1fr 1fr; }
  .sf__cols > div:first-child { grid-column: 1 / -1; }
  .sf__cols .sf__work { grid-template-columns: repeat(2, max-content); }
  .sf__bot { flex-direction: column; align-items: flex-start; }
  .totop { right: 16px; bottom: 16px; height: 58px; min-width: 58px; }
  .totop__ring { width: 52px; height: 52px; }
}
@media (max-width: 560px) {
  .pill { height: 56px; padding-left: 24px; font-size: 16px; }
  .pill__ico { width: 42px; height: 42px; }
  .pill--ghost { padding: 0 26px; }
}

/* reduced motion: keep the content, drop the big moves */
html.rm *, html.rm *::before, html.rm *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; transition-delay: 0s !important; }

/* hire-me: other ways to send when no email app opens */
#mGmail { text-decoration: none; }
#mSuccess .qz__stopbtns { justify-content: center; }
#mSuccess #mDone { margin-top: 22px; }
#mPanel { scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }

/* ── WhatsApp button in the hire-me form ── */
.pill--wa { --pb: #25d366; --pf: #fff; text-decoration: none; }
.qz__alt { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.qz__alt:hover { color: var(--ink); }
#mSuccess .pill__in { white-space: nowrap; }
#mSuccess .qz__stopbtns { flex-wrap: wrap; gap: 12px; }

/* ── language: a split-flap tile, and the shutters that close over the page while it changes ── */
.lang { position: relative; display: grid; place-items: center; width: 56px; padding: 0; }
.lang__flap { position: relative; display: block; width: 34px; height: 28px; perspective: 140px; font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; }
.lang__h { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--ink); color: var(--bg); }
.lang__h b { position: absolute; left: 0; right: 0; height: 28px; line-height: 28px; text-align: center; font-weight: 700; }
.lang__top { top: 0; border-radius: 6px 6px 0 0; }
.lang__top b { top: 0; }
.lang__bot { bottom: 0; border-radius: 0 0 6px 6px; }
.lang__bot b { bottom: 0; }
.lang__leaf { position: absolute; left: 0; right: 0; top: 0; height: 50%; transform-origin: 50% 100%; transform-style: preserve-3d; transition: transform 0.45s cubic-bezier(0.55, 0, 0.35, 1); z-index: 2; }
.lang__leaf .lang__h { inset: 0; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.lang__front { border-radius: 6px 6px 0 0; }
.lang__front b { top: 0; }
.lang__back { transform: rotateX(180deg); border-radius: 0 0 6px 6px; }
.lang__back b { bottom: 0; }
.lang__axle { position: absolute; left: -2px; right: -2px; top: calc(50% - 0.5px); height: 1px; background: var(--bg); opacity: 0.55; z-index: 3; }
.lang:hover .lang__leaf { transform: rotateX(-16deg); }
.lang.is-flipping .lang__leaf { transform: rotateX(-180deg); }
.lang__tip { position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.35s var(--ease); }
.lang:hover .lang__tip, .lang:focus-visible .lang__tip { opacity: 1; transform: translate(-50%, 0); }
.lsh { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.lsh__p { position: absolute; left: 0; right: 0; height: 50.5%; background: #141312; transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1); }
.lsh__t { top: 0; transform: translateY(-100%); box-shadow: inset 0 -1px 0 rgba(236, 231, 225, 0.12); }
.lsh__b { bottom: 0; transform: translateY(100%); }
.lsh.is-closed .lsh__p { transform: none; }
.lsh__w { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; margin: 0; color: #ece7e1; opacity: 0; transition: opacity 0.35s 0.25s; }
.lsh.is-closed .lsh__w { opacity: 1; }
.lsh.is-opening .lsh__w { opacity: 0; transition-delay: 0s; transition-duration: 0.2s; }
.lsh__w small { font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(236, 231, 225, 0.55); }
.lsh__w span { font-family: Italiana, serif; font-size: clamp(56px, 11vw, 150px); line-height: 1; letter-spacing: 0.02em; }
@media (max-width: 520px) { .lang { width: 48px; } }
