/* =====================================================================
   Home: full-screen landing (3.9)
   One stage holds the graded photograph, the name and a cutout of the
   figure, in that order, so the name passes behind him. The stage keeps
   the photograph's aspect ratio and covers the viewport, so the three
   layers stay registered on every screen.
   ===================================================================== */
body[data-page="home"] { --headline: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif; }

/* ---------- header: transparent over the photograph, solid after it ---------- */
body[data-page="home"] .site-header { position: fixed; left: 0; right: 0; top: 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background-color .4s ease, border-color .4s ease, color .4s ease; }
.no-js body[data-page="home"] .site-header { position: absolute; }
body[data-page="home"] .site-header:not(.is-solid) { color: #fff; }
body[data-page="home"] .site-header:not(.is-solid) :is(.nav > a, .nav__more > summary, .brand__name, .lang-link) { color: #fff; }
body[data-page="home"] .site-header:not(.is-solid) :is(.nav > a, .nav__more > summary):hover { background: rgba(255, 255, 255, .12); }
body[data-page="home"] .site-header:not(.is-solid) .nav > a[aria-current="page"] { box-shadow: inset 0 -2px 0 #fff; }
body[data-page="home"] .site-header:not(.is-solid) .header-actions > .btn { color: #fff; border-color: rgba(255, 255, 255, .8); }
body[data-page="home"] .site-header:not(.is-solid) .header-actions > .btn:hover { background: #fff; color: var(--text); }
body[data-page="home"] .site-header:not(.is-solid) .nav-m > summary { color: #fff; border-color: rgba(255, 255, 255, .55); }
body[data-page="home"] .site-header:not(.is-solid) :focus-visible { outline-color: #fff; }
body[data-page="home"] .site-header.is-solid { background: color-mix(in srgb, var(--paper) 95%, transparent); border-bottom-color: var(--rule); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); }
body[data-page="home"] .nav-m__panel, body[data-page="home"] .nav__menu { color: var(--text); }

/* ---------- the landing ---------- */
.hero2 { position: relative; height: 100vh; height: 100svh; min-height: 540px; overflow: hidden; overflow: clip; isolation: isolate; container-type: size; background: #1e2429; color: #f3eee4; }
.hero2__stage {
  --ar: 1.4997; --anchor: .30;
  position: absolute; left: 50%; translate: -50% 0;
  width: max(100vw, 150vh); width: max(100cqw, calc(100cqh * var(--ar)));
  aspect-ratio: var(--ar);
  top: calc((100cqh - max(100cqw / var(--ar), 100cqh)) * var(--anchor));
  transform-origin: 50% 42%;
}
.hero2__layer, .hero2__layer img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero2__bg { z-index: 0; }
.hero2__fg { z-index: 2; pointer-events: none; }
.hero2__veil { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 16, 20, .55) 0, rgba(12, 16, 20, 0) 16%, rgba(12, 16, 20, 0) 58%, rgba(10, 13, 16, .62) 82%, rgba(9, 11, 14, .9) 100%); }
.hero2__veil::after { content: ""; position: absolute; inset: 0; background: #0b0e11; opacity: calc(var(--p, 0) * .7); }

.hero2__name {
  position: absolute; z-index: 1; left: 50.7%; top: 26.8%; margin: 0;
  translate: -50% 0;
  transform: translate3d(calc(var(--mx, 0) * -1.1cqw), calc(var(--p, 0) * 22cqh + var(--my, 0) * -.8cqh), 0);
  opacity: calc(1 - var(--p, 0) * 1.25);
  width: max-content; white-space: nowrap; font-family: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif; font-optical-sizing: auto;
  font-weight: 500; font-variation-settings: "opsz" 54; font-size: min(14.4cqw, 27cqh); line-height: .86; letter-spacing: -.026em;
  text-transform: uppercase; color: #f4efe5; font-kerning: normal;
  text-shadow: 0 .02em .12em rgba(10, 14, 18, .18);
}
.hero2__word { display: inline-block; white-space: nowrap; transform: translateX(calc(var(--p, 0) * var(--dir, 0) * 11cqw)); }
.hero2__word[data-word="0"] { --dir: -1; }
.hero2__word[data-word="1"] { --dir: 1; }
.hero2__ch { display: inline-block; }

.hero2__foot {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 32px;
  padding: 0 var(--gut) clamp(22px, 4.2cqh, 46px); max-width: calc(var(--wrap) + var(--gut) * 2); margin-inline: auto;
  opacity: calc(1 - var(--p, 0) * 2.2);
}
.hero2__tag { grid-column: 1; font: italic 400 clamp(1.15rem, 2cqw, 1.7rem)/1.25 "Bodoni Moda", Georgia, serif; letter-spacing: -.005em; max-width: 36ch; text-wrap: balance; color: #f6f1e7; }
.hero2__tag::first-letter { text-transform: uppercase; }
.hero2__roles { grid-column: 1; font: 500 .72rem/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(243, 238, 228, .78); }
.hero2__cue { grid-column: 2; grid-row: 1 / span 2; justify-self: end; display: grid; justify-items: center; gap: 10px; color: #f4efe5; text-decoration: none; font: 500 .68rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; min-width: 44px; padding-top: 6px; }
.hero2__cue i { display: block; width: 1px; height: clamp(38px, 7cqh, 72px); background: linear-gradient(rgba(244, 239, 229, .25), rgba(244, 239, 229, .25)); position: relative; overflow: hidden; }
.hero2__cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #f4efe5; }
.hero2__cue:focus-visible { outline-color: #fff; }

/* Phones and portrait tablets: the tall crop, the name on two lines behind the head. */
@media (max-aspect-ratio: 1/1) {
  .hero2__stage { --ar: .5625; --anchor: .38; }
  .hero2__name { display: grid; justify-items: center; top: 24.5%; left: 50.4%; white-space: normal; font-size: min(31cqw, 15.5cqh); line-height: .84; letter-spacing: -.03em; }
  .hero2__word { transform: translateX(calc(var(--p, 0) * var(--dir, 0) * 16cqw)); }
  .hero2__foot { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; }
  .hero2__tag { font-size: clamp(1.05rem, 4.6cqw, 1.35rem); }
  .hero2__roles { font-size: .64rem; letter-spacing: .1em; }
}

/* ---------- motion: the opening sequence ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero2__stage { animation: h2-stage 2.8s cubic-bezier(.16, 1, .3, 1) both; }
  .hero2__ch { animation: h2-ch 1.7s cubic-bezier(.16, 1, .3, 1) both, h2-glint 1.4s ease-in-out both; animation-delay: calc(.45s + var(--o) * 95ms), calc(2.05s + var(--i) * 70ms); }
  .hero2__foot > * { animation: h2-up 1.1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: 1.5s; }
  .hero2__foot > :nth-child(2) { animation-delay: 1.65s; }
  .hero2__foot > :nth-child(3) { animation-delay: 1.8s; }
  .hero2__cue i::after { animation: h2-cue 2.4s cubic-bezier(.65, 0, .35, 1) 2.4s infinite; }
}
@keyframes h2-stage { from { transform: scale(1.09); filter: brightness(.55) saturate(.7); } 45% { filter: brightness(.92) saturate(.95); } to { transform: none; filter: none; } }
@keyframes h2-ch {
  from { opacity: 0; transform: translateY(.42em) scaleY(1.18); filter: blur(16px); font-weight: 900; letter-spacing: .32em; }
  55% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: blur(0); font-weight: 500; letter-spacing: 0; }
}
@keyframes h2-glint { 0%, 100% { color: #f4efe5; text-shadow: 0 .02em .12em rgba(10, 14, 18, .18); } 45% { color: #fff; text-shadow: 0 0 .22em rgba(255, 250, 236, .55); } }
@keyframes h2-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes h2-cue { 0% { top: -40%; } 60%, 100% { top: 100%; } }

/* ---------- statement: one sentence, revealed word by word on scroll ---------- */
.statement { padding-block: clamp(72px, 13vw, 190px) clamp(56px, 8vw, 120px); background: var(--paper); }
.statement__text { font: 400 clamp(1.85rem, 4.4vw, 4.1rem)/1.13 var(--headline); letter-spacing: -.022em; max-width: 24ch; text-wrap: balance; color: var(--text); }
.js .statement__text.is-split .sw { opacity: .14; transition: opacity .35s ease; }
.js .statement__text.is-split .sw.on { opacity: 1; }
.statement__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 84px); border-top: 1px solid var(--text); }
.statement__facts > div { padding: 16px 18px 18px 0; border-right: 1px solid var(--rule); }
.statement__facts > div + div { padding-left: 18px; }
.statement__facts > div:last-child { border-right: 0; }
.statement__facts dt { font: 500 .7rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.statement__facts dd { margin-top: 6px; font: 400 clamp(1.15rem, 1.7vw, 1.45rem)/1.2 var(--headline); letter-spacing: -.01em; }
.statement__links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; }
@media (max-width: 860px) {
  .statement__facts { grid-template-columns: 1fr 1fr; }
  .statement__facts > div:nth-child(2n) { border-right: 0; }
  .statement__facts > div:nth-child(2n+1) { padding-left: 0; }
  .statement__facts > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) {
  /* No movement; the scroll fades stay so the caption never sits under the clear header. */
  .hero2__name, .hero2__word, .hero2__foot { transform: none !important; }
}
@media print {
  .hero2 { height: auto; min-height: 0; background: none; color: #000; container-type: normal; }
  .hero2__stage, .hero2__veil, .hero2__cue { display: none; }
  .hero2__name { position: static; translate: none; transform: none; color: #000; font-size: 36pt; opacity: 1; }
  .hero2__foot { position: static; color: #000; }
  .hero2__tag, .hero2__roles { color: #000; }
}

/* Home: pinned project theatre and section styles (kept from 3.8, retyped in 3.9). */
body[data-page="home"] {
  --paper: #f7f5ef;
  --paper-2: #eeeae1;
  --card: #fcfbf7;
  --text: #20231f;
  --muted: #52574f;
  --ink: #20241f;
  --rule: #d7d5ca;
  --rule-2: #a7aa9f;
  --accent: #734331;
  --accent-deep: #613725;
  --accent-wash: #efe5dc;
  --accent-ink: #e6bca2;
  --headline: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --wrap: 1200px;
  --gut: clamp(20px, 5vw, 76px);
  --section: clamp(48px, 7vw, 96px);
  background: var(--paper);
}
.header-actions > .btn { border-color: var(--text); border-radius: 3px; }
.nav-m__panel { overscroll-behavior: contain; padding-bottom: max(28px,env(safe-area-inset-bottom)); }

.chapter-link, .stage-heading a, .merchant-ref a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; font-weight: 575; }
.chapter-link:hover, .stage-heading a:hover, .merchant-ref a:hover { text-decoration: underline; }


.project-theatre { background: #222723; color: #faf7ed; --muted: #ced1c9; --rule: #575e55; }
.project-theatre :focus-visible { outline-color: #f5ceb5; }
.project-runway { position: relative; }
@supports (height: 100svh) { .project-runway:has(.project-chapter + .project-chapter) { min-height: 100svh; } }
.project-stage { padding-block: clamp(42px, 5.8vw, 78px); }
.stage-heading, .project-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stage-heading { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.stage-heading h2, .section .h-sec { font: 400 clamp(2.45rem, 4.3vw, 4rem)/1.06 var(--headline); letter-spacing: -.043em; }
.stage-heading a { font-size: .91rem; }
.project-chapter { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(24px, 5vw, 72px); padding-block: clamp(24px, 3.5svh, 42px); }
.project-chapter + .project-chapter { border-top: 1px solid var(--rule); }
.chapter-sector { color: #c5cabb; font-size: .9rem; }
.chapter-copy h3 { margin: 11px 0 15px; max-width: 17ch; font: 450 clamp(2.3rem, 3.9vw, 3.9rem)/1.02 var(--headline); letter-spacing: -.03em; text-wrap: balance; }
.chapter-note { max-width: 44ch; color: #d1d4cc; font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.5; }
.chapter-link { margin-top: 13px; text-decoration: underline; text-underline-offset: 5px; font-size: .94rem; }
.chapter-visual { background: #adbfaf; border-radius: 2px; overflow: hidden; padding: 5% 5% 0; aspect-ratio: 1.68; max-height: 44svh; }
[data-project="twwd"] .chapter-visual { background: #b8a588; }
[data-project="iftyazad"] .chapter-visual { background: #acb7cd; }
[data-project="voreliqa"] .chapter-visual { background: #d4acb7; }
[data-project="voreliqa-technologies"] .chapter-visual {
  background: #42332d;
}
.chapter-window { overflow: hidden; border-radius: 2px 2px 0 0; box-shadow: 0 7px 20px #181d182a; }
.chapter-window img { width: 100%; height: auto; }
.project-controls { border-top: 1px solid var(--rule); padding-top: 8px; }
.project-steps, .step-arrows { display: flex; align-items: center; gap: 4px; }
.project-steps button, .step-arrows button { min-width: 44px; min-height: 44px; color: #d6dacd; }
.project-steps button { border-bottom: 2px solid transparent; font-variant-numeric: tabular-nums; font-size: .91rem; }
.project-steps button[aria-pressed="true"] { color: #fff; border-color: #eac3a6; }
.step-arrows button { display: grid; place-items: center; border: 1px solid #777f73; border-radius: 50%; }
.step-arrows button:hover { background: #343d33; }
.step-arrows button[aria-disabled="true"] { opacity: .43; cursor: default; }
.is-pinned .project-stage { position: sticky; top: var(--pin-top); height: var(--pin-height); padding-block: 0; display: grid; align-items: center; overflow: clip; }
.is-pinned .stage-shell { padding-block: clamp(12px, 3vh, 36px); }
.is-pinned .project-stack { position: relative; isolation: isolate; perspective: 1400px; height: var(--stack-height); }
.is-pinned .project-chapter { position: absolute; inset: 0; border: 0; pointer-events: none; opacity: 0; }
.is-pinned .project-chapter.current { pointer-events: auto; }
.is-pinned .project-chapter:not(.current) .chapter-copy { visibility: hidden; }

.section .sec-head .h-sec { margin: 0; }
.section:has(#story-title) { background: var(--paper-2); }
.section:has(#proof-title) .metrics { gap: 0; border-block: 1px solid var(--rule-2); background: transparent; }
.section:has(#proof-title) .metric { align-content: start; background: transparent; border: 0; padding: 20px clamp(12px, 1.8vw, 28px); border-right: 1px solid var(--rule); }
.section:has(#proof-title) .metric:last-child { border-right: 0; }
.section:has(#proof-title) .metric__value { color: var(--accent-deep); font: 400 clamp(2.3rem, 3.4vw, 3.5rem)/1.1 var(--headline); letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: lining-nums; }
.merchant-ref a { margin-top: 10px; color: var(--accent-deep); font-size: .95rem; }
@media (min-width: 900px) and (min-height: 580px) and (prefers-reduced-motion: no-preference) {
  .split:has(#story-title) > div:first-child { position: sticky; top: 100px; align-self: start; }
}
@media (max-width: 760px) {
  .site-header__bar { min-height: 58px; }
  .project-stage { padding-block: 34px; }
  .stage-heading h2 { font-size: clamp(1.85rem, 7vw, 2.5rem); }
  .stage-heading a { font-size: .86rem; }
  .project-chapter { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 16px; }
  .chapter-visual { order: -1; aspect-ratio: 2 / 1; max-height: 26svh; }
  .chapter-copy h3 { max-width: none; font-size: clamp(1.65rem, 6vw, 2.45rem); margin: 4px 0 7px; }
  .chapter-note { font-size: 1rem; }
  .chapter-sector { font-size: .84rem; }
  .chapter-link { margin-top: 3px; }
  .section:has(#proof-title) .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .section:has(#proof-title) .metric { padding: 15px 11px; }
  .section:has(#proof-title) .metric:nth-child(2n) { border-right: 0; }
  .section:has(#proof-title) .metric:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .section:has(#proof-title) .metric__value { font-size: clamp(1.95rem, 7vw, 3rem); }
}
@media (max-width: 360px) {
  .project-steps, .step-arrows { gap: 0; }
  .project-controls { gap: 2px; }
}
@media print {
  .project-runway, .project-stage, .project-stack { height: auto !important; min-height: 0 !important; position: static !important; }
  .project-chapter { position: static !important; opacity: 1 !important; }
  .chapter-visual, .chapter-copy { transform: none !important; visibility: visible !important; }
  .project-controls, .hero-buttons { display: none !important; }
}

[data-project="fiberpunk"] .chapter-visual { padding: 0; background: #e9e7df; }
[data-project="fiberpunk"] .chapter-window { box-shadow: none; }
[data-project="fiberpunk"] .chapter-window img { object-fit: cover; }
@media (max-width: 420px) {
  .project-controls .step-arrows { display: none; }
  .project-steps { width: 100%; justify-content: space-between; }
}
