/* Shared layer for the ten concept-hero sites. Loads after board.css + motion.css.
   Each page sets: --bg --ink --muted --line --accent --display --body (+ --H for plate height). */
:root { --pad: clamp(16px, 4vw, 56px); --H: 1024; --ease: cubic-bezier(.2, .7, .1, 1); }
html, body { background: var(--bg); }
body { font-family: var(--body); color: var(--ink); font-size: 17px; line-height: 1.6; overflow-x: clip; }
::selection { background: var(--accent); color: var(--bg); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.progress { background: var(--accent); height: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Compact nav: hidden over the hero (the hero carries its own), drops in after. */
.nav { position: fixed; z-index: 50; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--pad); font-size: 14px; font-weight: 500; transform: translateY(-110%); transition: transform .6s var(--ease), background .4s;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav.on { transform: none; }
.nav .logo { font-family: var(--display); font-size: 22px; line-height: 1; }
.nav ul { display: flex; gap: clamp(16px, 2.4vw, 32px); list-style: none; align-items: center; }
.nav ul a { position: relative; }
.nav ul a:not(.pill)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav ul a:not(.pill):hover::after { transform: scaleX(1); transform-origin: left; }
.nav .pill { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); transition: background .3s, color .3s; }
.nav .pill:hover { background: var(--accent); color: var(--ink); }

/* Hero: a design-space plate (1536 wide) that always covers the viewport, so live type
   stays registered to the photo at any size. Children use board.css .a/--x/--y/--fs. */
.hero { position: relative; height: min(100svh, 100vw * var(--H) / 1536); min-height: 480px; overflow: hidden; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
/* The hero is never taller than the plate, so the plate only ever crops at the bottom
   (on wide, short screens) and type registered to the left/right edges stays put. */
.plate { container-type: inline-size; position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1536 / var(--H); }
.plate .art { --u: calc(100cqw / 1536); }
.plate .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plate .a { margin: 0; }
.hero-links { display: flex; gap: calc(28 * var(--u)); list-style: none; align-items: center; }
.hero-links a { position: relative; }
.hero-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.2em; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.hero-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.hero-links .sep { opacity: .5; }

/* Split-text masks get room for ascenders, descenders and italic overhang. */
.m-m { padding: .16em .12em; margin: -.16em -.12em; }
/* Hero items near the bottom of the design ride up by however much the plate is
   cropped on short screens, so they never fall below the fold. --cap limits it. */
.plate .lift { top: calc(var(--y) * var(--u) - min(var(--cap, 9999px), max(0px, 100cqw * var(--H) / 1536 - 100svh))); }

/* Crops of the hero photo: --cx --cy --cw --ch in design px, --img the plate. */
.crop { position: relative; overflow: hidden; aspect-ratio: var(--cw) / var(--ch); }
.crop > i { position: absolute; inset: 0; background-image: var(--img); background-repeat: no-repeat;
  background-size: calc(1536 / var(--cw) * 100%) auto;
  background-position: calc(var(--cx) / (1536 - var(--cw)) * 100%) calc(var(--cy) / (var(--H) - var(--ch)) * 100%);
  will-change: transform; transition: transform 1.2s var(--ease); }
a:hover > .crop > i, .crop.zoom:hover > i { transform: scale(1.05); }

/* Section rhythm */
.wrap { max-width: 1400px; margin-inline: auto; padding-inline: var(--pad); }
.sec { padding-block: clamp(96px, 12vw, 180px); }
.eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.statement { padding: clamp(120px, 16vw, 240px) var(--pad); display: grid; place-items: center; text-align: center; }
.statement p { font-family: var(--display); font-size: clamp(30px, 4.2vw, 64px); line-height: 1.16; letter-spacing: -.01em; max-width: 24ch; }

/* Marquee: a track of two identical halves; JS or CSS slides it. */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee .track { display: inline-flex; will-change: transform; }
.marquee .track > * { flex: none; padding-right: .5em; }
@media (prefers-reduced-motion: no-preference) {
  .marquee .track { animation: mq var(--mq, 28s) linear infinite; }
}
@keyframes mq { to { transform: translateX(-50%); } }

/* Buttons share a fill-wipe hover */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; overflow: hidden; isolation: isolate; transition: color .45s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wipe, var(--accent)); transform: translateX(-101%); transition: transform .55s var(--ease); }
.btn:hover::before { transform: none; }
.btn .arr { display: inline-block; transition: transform .45s var(--ease); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn:hover .arr.r { transform: translateX(4px); }

footer.end { padding: clamp(64px, 8vw, 120px) var(--pad) 28px; }
footer.end .big { font-family: var(--display); line-height: .8; white-space: nowrap; padding-block: .06em; }
footer.end .big > span { display: inline-block; padding-inline: .04em; }
footer.end .fine { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; font-size: 14px; color: var(--muted); }
footer.end .fine a:hover { color: var(--ink); }

/* Pinned sections render as plain stacked content until JS adds .is-pinned
   (desktop + motion allowed), so reduced motion and phones get a calm layout. */
.steps-static > * + * { margin-top: 48px; }

@media (max-width: 820px) {
  .hero { height: auto; min-height: 0; }
  .hero-media { position: relative; }
  .plate { position: relative; left: 0; width: 100%; aspect-ratio: auto; translate: none; display: flex; flex-direction: column; container-type: normal; }
  .plate .art { --u: calc(100vw / 1536); position: relative; display: flex; flex-direction: column; padding: 72px var(--pad) 28px; gap: 14px; }
  .plate .a { position: relative; left: auto !important; right: auto !important; top: auto !important; width: auto !important; }
  .plate .bg { position: relative; inset: auto; height: auto; aspect-ratio: 4 / 5; object-position: var(--mpos, 70% 50%); order: 9; }
  .plate .d-only, .hero-links { display: none !important; }
  .nav { transform: none; }
  .nav .logo { opacity: 0; transition: opacity .4s; }
  .nav.on .logo { opacity: 1; }
  .nav ul li:not(:last-child) { display: none; }
}
