/* Movement layer: pinned header, intro, stats accordion, scroll reveals and parallax.
   Everything still sits on the design grid; motion only offsets elements while they arrive. */

:root {
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45);
}
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pinned header ---------- */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 40; pointer-events: none; transition: transform .55s var(--ease-io); }
.hdr .art { overflow: visible; }
.hdr header, .hdr a, .hdr button { pointer-events: auto; }
.hdr::before { content: ""; position: absolute; inset: 0; background: rgba(18, 17, 17, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity .4s ease; }
.hdr .board { transition: transform .55s var(--ease-io); }
.hdr.is-scrolled::before { opacity: 1; }
.hdr.is-scrolled .board--desk { transform: translateY(-1.389vw); }
.hdr.is-scrolled::before { height: calc(100% - 1.389vw); }
.hdr.is-hidden { transform: translateY(-100%); }
@media (min-width: 1920px) { .hdr.is-scrolled .board--desk { transform: translateY(-26.7px); } .hdr.is-scrolled::before { height: calc(100% - 26.7px); } }
@media (max-width: 699px) {
  .hdr.is-scrolled .board--mob { transform: translateY(-34px); }
  .hdr.is-scrolled::before { height: calc(100% - 34px); }
}

section.hero { overflow: hidden; }

/* ---------- Hero entrance (also used after the intro) ---------- */
html.js [data-in] { opacity: 0; translate: calc(var(--ix, 0) * var(--u, 1px)) calc(var(--iy, 0) * var(--u, 1px)); }
.hdr[data-in] { translate: 0 calc(var(--iy, 0) * 1px); }
html.hero-in [data-in] { opacity: 1; translate: 0 0; transition: opacity 1.1s var(--ease-out) var(--d, 0s), translate 1.3s var(--ease-out) var(--d, 0s); }
.hero-title .hw { display: inline-block; }
html.js .hero-ph > img { transform: scale(1.08); }
/* safety net: if the script never runs, show the hero anyway */
html.js:not(.intro-on):not(.hero-in) [data-in] { animation: in-failsafe .01s 3s forwards; }
@keyframes in-failsafe { to { opacity: 1; translate: 0 0; } }
html.hero-in .hero-ph > img { transform: scale(1); transition: transform 2.4s var(--ease-out); }

/* ---------- Intro overlay ---------- */
.intro { display: none; position: fixed; inset: 0; z-index: 100; overflow: hidden; background: #f4f2ee; color: #0e0e0e;
  --k: min(calc(100vw / 1340), calc(100vh / 1024)); }
html.intro-on { overflow: hidden; }
html.intro-on .intro { display: block; }
.intro.is-open { background: transparent; pointer-events: none; }
.intro.is-open .intro-bg, .intro.is-open .intro-veil, .intro.is-open .intro-stage, .intro.is-open .strips[data-w="1"] { display: none; }
.intro-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro-veil { position: absolute; inset: 0; background: rgba(255, 255, 255, .3); }
.intro-stage { position: absolute; left: 50%; top: 50%; width: calc(1920 * var(--k)); height: calc(1024 * var(--k)); translate: -50% -50%; }
.ghost { position: absolute; margin: 0; translate: -50% 0; font-family: var(--ff-garamond); font-weight: 500; text-transform: uppercase; white-space: nowrap;
  font-size: calc(257.704 * var(--k)); line-height: 1.2; letter-spacing: calc(-12.885 * var(--k)); color: rgba(14, 14, 14, .05); opacity: 0; }
.ghost[data-g="1"] { left: calc(1028.96 * var(--k)); top: calc(145 * var(--k)); }
.ghost[data-g="2"] { left: calc(750.5 * var(--k)); top: calc(363.38 * var(--k)); }
.ghost[data-g="3"] { left: calc(1126.35 * var(--k)); top: calc(570.74 * var(--k)); }
/* Sized to the logo's box in frame 2282:4884: letters span x 388–1558, cap top at y 286 */
.intro-logo { position: absolute; left: 50%; top: calc(188.4 * var(--k)); margin: 0; translate: -50% 0; font-family: var(--ff-sans); font-weight: 500;
  font-size: calc(359 * var(--k)); line-height: 1.174; white-space: nowrap; color: #0e0e0e; opacity: 0; }
.intro-btn { position: absolute; left: calc(860 * var(--k)); top: calc(617 * var(--k)); width: calc(200 * var(--k)); height: calc(200 * var(--k));
  border: 0; border-radius: 50%; background: #0e0e0e; color: var(--ink); font-family: var(--ff-sans); font-weight: 500; font-size: calc(20 * var(--k));
  line-height: 1.174; cursor: pointer; opacity: 0; outline: 1px solid transparent; outline-offset: calc(6 * var(--k));
  transition: color .3s ease, outline-color .3s ease, transform .4s var(--ease-out); }
.intro-btn span { display: block; width: calc(72 * var(--k)); margin: 0 auto; }
.intro-btn:hover, .intro-btn:focus-visible, .intro-btn.is-clicked { color: var(--gold); outline-color: rgba(255, 214, 118, .55); }
.intro-btn.is-clicked { transform: scale(.96); }
@media (max-width: 699px) {
  .intro-btn { width: max(calc(200 * var(--k)), 96px); height: max(calc(200 * var(--k)), 96px); font-size: max(calc(20 * var(--k)), 13px);
    left: calc(960 * var(--k)); translate: -50% 0; }
  .intro-btn span { width: max(calc(72 * var(--k)), 48px); }
}
.strips { position: absolute; inset: 0; display: flex; pointer-events: none; }
.strip { position: relative; flex: 1; overflow: hidden; visibility: hidden; }
/* Each strip shows its own photo; --c is the centre of the visible slice as a fraction of the photo's
   width (taken from the Figma frames). Photos are 1376 × 768, so their width is 1.7917 × the window height. */
.intro { height: 100vh; height: 100dvh; bottom: auto; }
.strip img { position: absolute; top: 0; height: 100%; width: auto; max-width: none; left: calc(50% - var(--c) * 179.17vh); }
@supports (height: 100dvh) { .strip img { left: calc(50% - var(--c) * 179.17dvh); } }
.intro-skip { position: absolute; right: 24px; bottom: 20px; background: none; border: 0; padding: 6px 0; font-family: var(--ff-sans); font-weight: 600;
  font-size: 13px; letter-spacing: .04em; color: rgba(14, 14, 14, .5); cursor: pointer; transition: color .25s ease, opacity .4s ease; }
.intro-skip:hover { color: #0e0e0e; }
.intro.is-open .intro-skip { opacity: 0; }

/* ---------- Stats accordion ---------- */
@property --h1 { syntax: "<number>"; inherits: true; initial-value: 127; }
@property --h2 { syntax: "<number>"; inherits: true; initial-value: 127; }
@property --m1 { syntax: "<number>"; inherits: true; initial-value: 72; }
@property --m2 { syntax: "<number>"; inherits: true; initial-value: 72; }
@property --s1 { syntax: "<number>"; inherits: true; initial-value: 128; }
@property --t1 { syntax: "<number>"; inherits: true; initial-value: 51; }
/* --dy: how far the stats accordion moves everything below it; --sy: the same for the styles accordion */
.board--desk .acc-root { --h1: 127; --h2: 127; --s1: 128; --dy: calc(var(--h1) + var(--h2) - 1042); --sy: calc(var(--s1) - 925); }
.board--mob .acc-root { --m1: 72; --m2: 72; --t1: 51; --dy: calc(var(--m1) + var(--m2) - 855); --sy: calc(var(--t1) - 882); }
.acc-root { transition: --h1 .95s var(--ease-io), --h2 .95s var(--ease-io), --m1 .95s var(--ease-io), --m2 .95s var(--ease-io), --s1 .95s var(--ease-io), --t1 .95s var(--ease-io); }
.shift { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: translateY(calc(var(--dy) * var(--u))); pointer-events: none; }
.shift > * { pointer-events: auto; }
.shift > .shift2 { transform: translateY(calc(var(--sy) * var(--u))); pointer-events: none; }

.acc { color: var(--ink); transition: color .5s ease; }
.acc.is-open { color: var(--gold); }
.acc .dot { transition: background-color .5s ease; }
.acc-hit { position: absolute; left: 0; top: 0; width: 100%; height: calc(127 * var(--u)); z-index: 2; background: none; border: 0; padding: 0; cursor: pointer; }
.m-acc .acc-hit { height: calc(42 * var(--u)); }
.acc-hit:focus-visible { outline: 1px solid var(--gold); outline-offset: -1px; }
.acc:not(.is-open):hover { color: rgba(255, 214, 118, .8); }
.acc .stat { transition: transform .6s var(--ease-out); }
.acc:not(.is-open):hover .stat { transform: translateX(calc(10 * var(--u))); }
.acc-body { color: var(--ink); }
.acc-body > * { opacity: 0; visibility: hidden; translate: 0 calc(40 * var(--u)); transition: opacity .3s ease, translate .4s ease, visibility 0s .4s; }
.acc.is-open .acc-body > * { opacity: 1; visibility: visible; translate: 0 0;
  transition: opacity .8s var(--ease-out) calc(.25s + var(--i, 0) * .12s), translate 1s var(--ease-out) calc(.25s + var(--i, 0) * .12s), visibility 0s; }
.when-open, .when-closed { transition: opacity .45s ease; }
.acc:not(.is-open) .when-open, .acc.is-open .when-closed { opacity: 0; }
.quote { background: rgba(254, 251, 243, .02); color: var(--grey); }
/* the 306+ row has no glow line while open on mobile, like the design */
.m-head { height: calc(42 * var(--u)); border-bottom: 1px solid var(--line-gold); box-shadow: var(--glow); transition: height .6s var(--ease-io), border-color .5s ease, box-shadow .5s ease; }
.m-acc.is-open .m-head { height: calc(54 * var(--u)); border-bottom-color: transparent; box-shadow: none; filter: drop-shadow(0 calc(10 * var(--u)) calc(11 * var(--u)) rgba(245, 179, 108, .1)); }
/* styles rows: closed rows look like Warm Minimalism, the open one turns gold and lifts to the top of its row */
.sty { overflow: hidden; }
.board--desk .sty:not(.is-open) { color: var(--ink-50); }
.sty .sty-name, .sty .sty-dot { transition: translate .95s var(--ease-io); }
.board--desk .sty:not(.is-open) .sty-name, .board--desk .sty:not(.is-open) .sty-dot { translate: 0 calc(19 * var(--u)); }
.sty:not(.is-open):hover .sty-name { translate: calc(10 * var(--u)) calc(19 * var(--u)); }
.board--mob .sty:not(.is-open):hover .sty-name { translate: calc(6 * var(--u)) 0; }
.sty .when-open, .sty .when-closed { transition: opacity .45s ease; }
.sty:not(.is-open) .when-open, .sty.is-open .when-closed { pointer-events: none; }
.m-sty .chev { position: absolute; left: calc(327 * var(--u)); top: calc(18 * var(--u)); }
.m-sty-head { height: calc(41 * var(--u)); border-bottom: 1px solid var(--line-gold); box-shadow: var(--glow); transition: height .6s var(--ease-io), border-color .5s ease, box-shadow .5s ease; }
.m-sty.is-open .m-sty-head { height: calc(51 * var(--u)); border-bottom-color: transparent; box-shadow: none; filter: drop-shadow(0 calc(10 * var(--u)) calc(11 * var(--u)) rgba(245, 179, 108, .1)); }
.m-slides > img { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.m-slides > img.on { opacity: 1; }
.arrow-btn { background: none; border: 0; padding: 0; cursor: pointer; display: block; line-height: 0; }
.arrow-btn:hover { opacity: .7; }

/* ---------- Scroll reveals ---------- */
html.js .rv { opacity: 0; translate: 0 calc(36 * var(--u)); }
html.js .rv.in { opacity: 1; translate: 0 0; transition: opacity 1s var(--ease-out) var(--rd, 0s), translate 1.1s var(--ease-out) var(--rd, 0s); }
html.js .circle-btn.rv.in { transition: opacity 1s var(--ease-out) var(--rd, 0s), translate 1.1s var(--ease-out) var(--rd, 0s), background-color .35s ease, color .35s ease; }
/* photos never slide or wipe in: they are always there and only drift with the parallax below */

/* ---------- Parallax ---------- */
.px > img { transform: translate3d(0, var(--py, 0px), 0) scale(1.12); will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-in], html.js .rv, .acc-body > * { opacity: 1; translate: none; clip-path: none; }
  .acc:not(.is-open) .acc-body > * { opacity: 0; }
  .px > img, html.js .hero-ph > img { transform: none !important; }
  .acc-root { transition: none; }
}
