/* =====================================================================
   Ashfaque Salahudeen — portfolio
   Everything in the landing scene is positioned in "design pixels" from
   the 1440 × 853 Figma frame and scaled with --hu (hero unit), so the
   composition scales as one piece instead of reflowing.
   ===================================================================== */

:root {
  --blue: #1f56c4;
  --gold: #c9962c;
  --cream: #f6e7c1;

  /* nav unit: 1 design px, capped so ultra-wide screens don't balloon */
  --u: calc(min(var(--vw, 100vw), 5120px) / 1440);

  /* hero height: full-width scale on desktop; on narrow screens it stays
     at least 560px tall and the scene is cropped from the sides (truck stays centred) */
  --hh: max(calc(853 * var(--u)), 560px);
  --hu: calc(var(--hh) / 853);            /* px per design px inside the hero */
  --nav-h: calc(118 * var(--u));

  --sky-fallback: linear-gradient(#5b97e0 0%, #8dbcec 55%, #cfe6f6 100%);
  --water-fallback: linear-gradient(#9cc4dc 0%, #3f7fae 14%, #2d6a9c 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }   /* no smooth scrolling: nav links jump straight to their section */
body {
  margin: 0;
  background: #EBD9BA;            /* warm cream so nothing flashes green or white */
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: clip;
}
img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 8px; top: -60px; z-index: 100; padding: 8px 12px;
  background: var(--cream); color: #6b4a00; border-radius: 6px; transition: top .2s;
}
.skip:focus { top: 8px; }

/* ============================ NAV ============================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  pointer-events: none;
}
.nav__canvas {
  position: relative; margin: 0 auto;
  width: calc(1440 * var(--u)); height: 100%;
  pointer-events: auto;
}
.nav__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }

.nav__links { display: contents; }
.nav__item {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top:  calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
}
.nav__item img { width: 100%; height: auto; }

/* button / logo: 3 stacked states (rest / hover / pressed) */
.btn, .tv { display: block; }
.btn img.h, .btn img.p, .tv img.h, .tv img.p { position: absolute; inset: 0; opacity: 0; }
.btn img, .tv img { transition: none; }   /* states swap instantly */
@media (hover: hover) {
  .btn:hover img.h, .tv:hover img.h { opacity: 1; }
  .btn:hover > img:not(.h):not(.p), .tv:hover > img:not(.h):not(.p) { opacity: 0; }   /* resting art never shows behind the hover art */
}
.btn:active img.p, .tv:active img.p { opacity: 1; }
.btn:active img.h, .tv:active img.h { opacity: 0; }
.btn:focus-visible, .tv:focus-visible, .cv:focus-visible, .nav__toggle:focus-visible {
  outline: 3px solid #fff; outline-offset: 3px; border-radius: 10px;
}

/* CV box: closed lid image, opens on hover */
.cv { height: calc(64.6 * var(--u)); z-index: 2; }
.cv__closed { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
.cv__open, .cv__pressed { position: absolute; left: 0; top: 0; opacity: 0; }
@media (hover: hover) {
  .cv:hover .cv__closed { opacity: 0; }
  .cv:hover .cv__open { opacity: 1; }
}
.cv:active .cv__open { opacity: 0; }
.cv:active .cv__pressed { opacity: 1; }
.cv:active .cv__closed { opacity: 0; }

/* lemon + chilli charms hanging either side of the TV */
.nimbu { z-index: 2; pointer-events: auto; height: auto; transform-origin: 50% 14%; will-change: rotate; cursor: default; }   /* swing is driven by js/main.js (hover impulse + damped pendulum) */
.tv { z-index: 1; }

/* windscreen mirror: sways a little, like it's hanging off the dash */
.mirror { transform-origin: 50% 0; cursor: default; }
.nav__item .mirror__text { opacity: 0; transition: opacity .25s ease; transform-origin: 50% 60%; pointer-events: none; position: absolute; left: calc(22 / 233 * 100%); top: calc(1 / 93 * 100%); width: calc(184 / 233 * 100%); }
.mirror { animation: sway 5s ease-in-out infinite alternate; }
/* the message only shows while the mirror is hovered (or focused) */
.mirror:hover .mirror__text, .mirror:focus-visible .mirror__text { opacity: 1; animation: mpop .55s cubic-bezier(.2,.9,.3,1) both; }
@keyframes mpop { 0% { opacity: 0; transform: translateY(16%) scale(.88); } 55% { opacity: 1; transform: translateY(-2%) scale(1.02); } 80% { transform: translateY(.6%) scale(.995); } 100% { transform: none; } }   /* gentle pop: the text stays inside the mirror surface */
@keyframes sway { from { transform: rotate(-.35deg); } to { transform: rotate(.35deg); } }

.nav__toggle { display: none; }

/* fringe + tassels on the bar: tops stay fixed, only the lower part swings (physics in js/main.js) */
.fringe { position: absolute; left: 0; top: calc(77 * var(--u)); width: calc(1440 * var(--u)); height: calc(19 * var(--u)); z-index: 0; pointer-events: auto;
  background: url("../assets/nav/bar-fringe.webp") 0 0 / 100% 100% no-repeat; }
.fringe.live { background: none; }
.fringe i { position: absolute; top: 0; height: 100%; left: calc(var(--i) * 8 * var(--u)); width: calc(8.4 * var(--u)); transform-origin: 50% 0; will-change: rotate;
  background: url("../assets/nav/bar-fringe.webp") calc(var(--i) * -8 * var(--u)) 0 / calc(1440 * var(--u)) 100% no-repeat; }
.tassel { position: absolute; z-index: 1; left: calc(var(--x) * var(--u)); top: calc(77.5 * var(--u)); width: calc(23 * var(--u)); height: calc(38 * var(--u)); pointer-events: auto; cursor: default; }
.tassel i { position: absolute; left: 0; width: 100%; display: block; }
.tassel .tk { top: 0; height: calc(8 * var(--u)); z-index: 2; }
.tassel .ts { top: calc(7 * var(--u)); height: calc(31 * var(--u)); transform-origin: 50% 0; will-change: rotate; z-index: 1; }
.tassel img { display: block; width: 100%; height: 100%; pointer-events: none; }
.tassel::before { content: ""; position: absolute; inset: calc(6 * var(--u)) calc(-10 * var(--u)) calc(-2 * var(--u)); }   /* generous invisible hit area so a quick sweep always catches it */

/* nav intro */
.js .nav { transform: translateY(-101%); transition: transform .9s cubic-bezier(.2,.8,.2,1) .15s; }
.js.is-ready .nav { transform: none; }

/* ============================ HERO ============================ */
.hero {
  position: relative; z-index: 1;
  --lift: max(calc(-68 * var(--hu)), min(0px, calc((100svh - 850 * var(--hu)) * .45)));   /* on tall/wide screens the whole scene rides up so the truck's bumper is inside the first screen */
  height: calc(var(--hh) + var(--lift));
  overflow: hidden;
  background: #EBD9BA;
  contain: paint;
  --p: 0;                       /* scroll progress 0→1 set by main.js */
}
.hero__canvas {
  position: absolute; left: 50%; top: var(--lift); translate: -50% 0;
  width: calc(1440 * var(--hu)); height: calc(853 * var(--hu));
}

.l {
  position: absolute;
  left:   calc(var(--x) * var(--hu));
  top:    calc(var(--y) * var(--hu));
  width:  calc(var(--w) * var(--hu));
  height: calc(var(--h) * var(--hu));
  /* scroll parallax: --par slides it down/up, --dx slides it sideways, --zoom grows it (foreground layers grow more = closer) */
  translate: calc(var(--p) * var(--dx, 0) * var(--hu)) calc(var(--p) * var(--par, 0) * var(--hu));
  scale: calc(1 + var(--p) * var(--zoom, 0));
  transform-origin: var(--o, 50% 100%);
  will-change: translate, scale;
}
.l img, .l .in { width: 100%; height: 100%; }
.l img { object-fit: fill; }

/* intro: everything starts hidden/offset, then settles */
.in { transition: opacity 1.1s ease var(--d, 0s), transform 1.4s cubic-bezier(.2,.8,.2,1) var(--d, 0s); }
.js:not(.is-ready) .in { opacity: 0; transform: translate(calc(var(--fx, 0) * var(--hu)), calc(var(--fy, 0) * var(--hu))); }

/* sky + sea: 2880px-wide painting cut at the horizon, shown 150.6% wide so it can drift sideways without showing an edge */
.l.sky .in, .l.sea .in { position: relative; overflow: hidden; }
.l.sky img, .l.sea img { position: absolute; left: -25.3%; top: 0; width: 150.6%; height: 100%; max-width: none; }
.l.sky img { animation: skydrift 70s ease-in-out infinite alternate; }
.l.sea img { animation: seadrift 26s ease-in-out infinite alternate; }
@keyframes skydrift { from { transform: translateX(calc(-45 * var(--hu))); } to { transform: translateX(calc(45 * var(--hu))); } }
@keyframes seadrift { from { transform: translateX(calc(25 * var(--hu))) scaleY(1); } to { transform: translateX(calc(-25 * var(--hu))) scaleY(1.025); } }
/* light ripples sliding toward the viewer across the water (pattern repeats every 40px so the loop is seamless) */
.l.sea .in::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(-40 * var(--hu)); bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0) 0 calc(17 * var(--hu)), rgba(255,255,255,.16) calc(17 * var(--hu)) calc(20 * var(--hu)), rgba(255,255,255,0) calc(20 * var(--hu)) calc(40 * var(--hu)));
  -webkit-mask-image: linear-gradient(rgba(0,0,0,.15), #000 70%); mask-image: linear-gradient(rgba(0,0,0,.15), #000 70%);
  animation: ripple 7s linear infinite;
}
@keyframes ripple { to { transform: translateY(calc(40 * var(--hu))); } }
.haze  .in { background: radial-gradient(60% 55% at 50% 60%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%); }
.sky   { --d: 0s; }
.sea   { --d: .1s; }
.boat--l { --d: .35s; --fy: 20; }
.boat--r { --d: .5s;  --fy: 20; }
.arc   { --d: .55s; --fy: 30; }
.arcmask { --d: .7s; }
.scene { --d: .35s; --fy: 90; }
.grass { --d: .6s;  --fy: 60; }

/* boats bob on the water */
.boat img { animation: bob 6s ease-in-out infinite alternate; transform-origin: 50% 90%; }
.boat--r img { animation-duration: 7.3s; animation-delay: -2s; }
.boat img.mirrored { scale: -1 1; }
@keyframes bob {
  from { transform: translateY(calc(-1.5 * var(--hu))) rotate(-.4deg); }
  to   { transform: translateY(calc( 2.5 * var(--hu))) rotate(.5deg); }
}

/* skills ring: centred on the arch and rotating. The letters sit on the middle of the cream band,
   and the ring is masked by the arch so letters only show while they are inside the band. */
.arcmask .in {
  -webkit-mask: url("../assets/hero/arc.webp") 0 0 / 100% 100% no-repeat;
          mask: url("../assets/hero/arc.webp") 0 0 / 100% 100% no-repeat;
}
.arcmask .ring {                       /* .arcmask prefix beats the generic ".l img" sizing */
  position: absolute; max-width: none;
  left: calc(var(--rx) * var(--hu)); top: calc(var(--ry) * var(--hu));
  width: calc(var(--rw) * var(--hu)); height: calc(var(--rw) * var(--hu));
  transform-origin: 50% 50%;
  animation: spin 60s linear infinite reverse;   /* anticlockwise */
  rotate: calc(var(--p) * -50deg);     /* scrolling nudges it round faster, same direction */
}
@keyframes spin { to { transform: rotate(360deg); } }

/* palms: cut out of the scene, bend gently from the trunk base. Same parallax/zoom as the scene layer, so --ox/--oy is
   the scene's zoom origin (720, 757) expressed inside each palm's own box. */
.palm { --d: .35s; --fy: 90; transform-origin: calc(var(--ox) * var(--hu)) calc(var(--oy) * var(--hu)); }
.palm img { animation: palmsway 6.5s ease-in-out infinite alternate; }
.palm--l img { transform-origin: 87.5% 100%; }
.palm--r img { transform-origin: 17.8% 100%; animation-duration: 7.4s; animation-delay: -3s; }
@keyframes palmsway {
  from { transform: rotate(-1.3deg) skewX(1deg); }
  to   { transform: rotate(1.3deg)  skewX(-1deg); }
}

/* front grass: the tall stems + daisies (top) sway from the grass line; the dense grass (base) only breathes */
.grass .in { position: relative; }
.grass img { position: absolute; left: 0; max-width: none; width: 100%; }
.grass .g-top  { top: 0;                      height: calc(200 / 268 * 100%); transform-origin: 50% 100%; animation: flowers 4.8s ease-in-out infinite alternate; }
.grass .g-base { top: calc(198 / 268 * 100%); height: calc(70 / 268 * 100%);  transform-origin: 50% 100%; animation: breeze 5.5s ease-in-out infinite alternate; }
@keyframes flowers {
  0%   { transform: skewX(-3deg) rotate(-.25deg); }
  50%  { transform: skewX(.6deg)  rotate(.1deg); }
  100% { transform: skewX(3deg)   rotate(.3deg); }
}
@keyframes breeze { from { transform: skewX(-.4deg); } to { transform: skewX(.5deg); } }

/* ============================ BUMPER ============================ */
.bumper {
  position: relative; z-index: 3;
  /* Figma: the bar overlaps the bottom of the grass and the top of the showreel, so it reads as a bumper between the two scenes */
  margin-top: calc(-11 * var(--u));
  margin-bottom: calc(-25 * var(--u));
  overflow: hidden;
  height: max(calc(124 * var(--u)), 56px);
  pointer-events: none;
}
.bumper img {
  position: absolute; left: 50%; top: 0; translate: -50% 0;
  height: 100%; width: auto; min-width: 100%; object-fit: cover;
}

/* ============================ PLACEHOLDERS ============================ */
.stub {
  position: relative; z-index: 2;
  min-height: 70svh; padding: 20vh 24px 10vh; text-align: center;
  background: #0d2f7a; color: var(--cream);
}
.stub:nth-of-type(even) { background: #14408f; }
.stub h2 { margin: 0 0 8px; font: 800 clamp(28px, 5vw, 56px)/1 system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.stub p { margin: 0; opacity: .7; }

/* ============================ TABLET / PHONE ============================ */
@media (max-width: 900px) {
  :root { --nav-h: 64px; }

  .nav__canvas {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px;
    /* the bar artwork drawn at 0.815 px per design unit, so its orange pattern + blue bottom line fill exactly the 64px bar; the fringe and tassels then hang below it just like on desktop */
    background: url("../assets/nav/bar-bg.webp") left top / auto calc(118 * var(--u)) repeat-x;
    overflow-x: clip;
  }
  .nav { --u: 0.815px; }
  .nav__bg, .mirror, .nimbu { display: none; }
  .nav__item { position: relative; left: auto; top: auto; width: auto; }

  /* CV box: a little larger, but always inside the bar and vertically centred */
  .cv { position: relative; width: 118px; height: 35px; order: 1; align-self: center; }
  .cv__closed, .cv__open, .cv__pressed { width: 118px; height: auto; }

  .tv { width: 54px; order: 2; position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
  .tv img { width: 54px; }

  /* menu / close button: Ashfaque's artwork; the bars are drawn on top so they can still morph into the cross */
  .nav__toggle {
    order: 3; display: block; position: relative; flex: none; width: 56px; height: 37px; padding: 0; border: 0;
    background: url("../assets/nav/menu-plate.webp") center / 100% 100% no-repeat; cursor: pointer; align-self: center;
    -webkit-tap-highlight-color: transparent;
  }
  .nav__toggle span, .nav__toggle::before, .nav__toggle::after {
    content: ""; position: absolute; left: 30.3%; width: 43.3%; height: 7.8%; border-radius: 99px; background: #ab6702;
    transition: transform .2s, opacity .2s, top .2s;
  }
  .nav__toggle::before { top: 23.4%; } .nav__toggle span { top: 41.1%; } .nav__toggle::after { top: 58.9%; }
  .nav__toggle[aria-expanded="true"]::before { top: 41.1%; transform: rotate(45deg); }
  .nav__toggle[aria-expanded="true"]::after  { top: 41.1%; transform: rotate(-45deg); }
  .nav__toggle[aria-expanded="true"] span { opacity: 0; }

  .nav__links {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    position: absolute; z-index: 6; left: 0; right: 0; top: 100%;
    padding: 18px 0 22px;
    background: #f4a51c;   /* plain yellow, no second copy of the bar */
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .nav__links .nav__item { width: min(240px, 62vw); }

  .hero { --p: 0; }
}

/* ============================ REDUCED MOTION ============================
   When the OS asks for less motion (on Windows: Settings > Accessibility > Visual effects > Animation effects
   off, which battery saver can also flip) we drop the big movements — intro slide-in and scroll parallax.
   The slow, small ambient loops (ring, boats, grass, charms) keep running so the scene doesn't look dead. */
@media (prefers-reduced-motion: reduce) {
  .js .nav, .js:not(.is-ready) .in { transition: none !important; transform: none; opacity: 1; }
  .l { translate: none; scale: none; }
  .arcmask .ring { rotate: none; }
}

/* ============================ SCENES BELOW THE HERO ============================
   Same idea as the hero: everything is laid out in "design pixels" (Figma 1440-wide frame)
   and scaled by --pu. Below ~720px wide the scene stops shrinking and crops from the sides instead. */
.journey { --pu: calc(max(min(var(--vw, 100vw), 5120px), 720px) / 1440); position: relative; overflow-x: clip; background: #14408f; }
.sec { position: relative; }
.stage { position: relative; width: calc(1440 * var(--pu)); left: 50%; transform: translateX(-50%); }
.stage img { display: block; max-width: none; }

/* showreel */
.showreel { height: calc(1110 * var(--pu)); }
.showreel__bg { width: 100%; height: auto; }
/* the interfaith picture above the dashboard: a sharp copy laid exactly over the one painted into the background */
.faith { position: absolute; left: calc(670 * var(--pu)); top: calc(100 * var(--pu)); width: calc(132 * var(--pu)); height: calc(88 * var(--pu)); pointer-events: none; }   /* soft edges are in the image itself */
/* ---- the TV: one framed box on the glass (screensaver GIF -> reel), 4:3 like the reel ---- */
.tvbox {
  position: absolute; left: calc(577 * var(--pu)); top: calc(421 * var(--pu)); width: calc(302 * var(--pu)); height: calc(228 * var(--pu));
  border-radius: calc(15 * var(--pu)); overflow: hidden; background: #0d0905;
}
/* soft inward vignette, like old CRT glass */
.tvbox::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 calc(28 * var(--pu)) calc(4 * var(--pu)) rgba(0,0,0,.55);
}
.tvbox__hit, .tvbox__ctrls { z-index: 2; }
.tvbox__idle, .tvbox__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tvbox__video { opacity: 0; transition: opacity .45s; pointer-events: none; background: #000; }
.tvbox.has-reel .tvbox__video { opacity: 1; }
.tvbox__video:fullscreen { object-fit: contain; pointer-events: auto; }
.tvbox__video:-webkit-full-screen { object-fit: contain; pointer-events: auto; }

/* big click area over the whole screen: play / pause */
.tvbox__hit {
  position: absolute; inset: 0; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); transition: background .25s;
}
.tvbox__hit:focus-visible { outline: none; }
.tvbox__icon {
  width: calc(34 * var(--pu)); height: calc(40 * var(--pu)); background: #fff;
  clip-path: polygon(8% 0, 100% 50%, 8% 100%); opacity: 0; transform: scale(.85);
  transition: opacity .25s, transform .25s;
}
/* idle screensaver: play button only on hover */
.tvbox:hover .tvbox__icon, .tvbox__hit:focus-visible .tvbox__icon { opacity: .95; transform: scale(1); }
.tvbox:hover .tvbox__hit { background: rgba(0,0,0,.12); }
/* reel paused: play button stays up */
.tvbox.has-reel:not(.is-playing) .tvbox__icon { opacity: .95; transform: scale(1); }
/* reel playing: pause bars, only while hovering */
.tvbox.is-playing .tvbox__icon {
  width: calc(28 * var(--pu)); height: calc(36 * var(--pu)); clip-path: none;
  background: linear-gradient(90deg, #fff 0 34%, transparent 34% 66%, #fff 66%);
  opacity: 0;
}
.tvbox.is-playing:hover .tvbox__icon, .tvbox.is-playing .tvbox__hit:focus-visible .tvbox__icon { opacity: .9; }
.tvbox.is-playing:not(:hover) .tvbox__hit { background: transparent; }

/* mute + fullscreen, bottom right, only while playing and hovering */
.tvbox__ctrls {
  position: absolute; right: calc(10 * var(--pu)); bottom: calc(10 * var(--pu)); display: flex; gap: calc(6 * var(--pu));
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.tvbox.is-playing:hover .tvbox__ctrls, .tvbox.is-playing:has(:focus-visible) .tvbox__ctrls { opacity: 1; pointer-events: auto; }
.tvbox__btn {
  width: calc(28 * var(--pu)); height: calc(28 * var(--pu)); min-width: 24px; min-height: 24px; padding: calc(5 * var(--pu));
  display: grid; place-items: center; border: 0; border-radius: 6px; background: rgba(0,0,0,.5); color: #fff; cursor: pointer;
  transition: background .2s;
}
.tvbox__btn:hover, .tvbox__btn:focus-visible { background: rgba(0,0,0,.8); outline: none; }
.tvbox__btn svg { width: 100%; height: 100%; display: block; }
.tvbox__btn .i-off { display: none; }
.tvbox.is-muted .tvbox__btn .i-on { display: none; }
.tvbox.is-muted .tvbox__btn .i-off { display: block; }
/* touch screens have no hover: keep the play button and controls reachable */
@media (hover: none) {
  .tvbox:not(.is-playing) .tvbox__icon { opacity: .95; transform: scale(1); }
  .tvbox.has-reel .tvbox__ctrls { opacity: 1; pointer-events: auto; }
}

/* clouds + road + truck */
.drive { height: calc(3401 * var(--pu)); z-index: 1; background: #5b5f66; }
.drive .stage { height: 100%; }
.road { position: sticky; top: 0; width: 100%; height: 100svh; background: url("../assets/projects/road.webp") 0 0 / 100% auto no-repeat; }   /* the road stays put while the truck scrolls forward on it; it moves off with the end of the section */
.clouds { position: absolute; z-index: 5; left: calc(-480 * var(--pu)); top: calc(-262 * var(--pu)); width: calc(2400 * var(--pu)); height: calc(790 * var(--pu)); overflow: hidden; pointer-events: none; }   /* bigger than before: spans the whole screen, starts over the steering wheel, ends before the truck */
.clouds img { position: absolute; top: 0; left: 50%; height: 100%; width: auto; max-width: none; translate: -50% 0; animation: cdrift 240s ease-in-out infinite alternate; }   /* very slow, natural drift; no zooming so nothing pixelates */
@keyframes cdrift { from { transform: translateX(-9%); } to { transform: translateX(9%); } }
.clouds__txt { position: absolute; z-index: 6; left: calc(137 * var(--pu)); top: calc(40 * var(--pu)); width: calc(1165 * var(--pu)); margin: 0; text-align: center; pointer-events: none;
  font: 800 calc(33.026 * var(--pu))/normal "Anek Latin", "Arial Narrow", system-ui, sans-serif; font-stretch: 125%; text-transform: uppercase; color: #002169; }
@keyframes drift { from { translate: calc(-24 * var(--pu)) 0; } to { translate: calc(24 * var(--pu)) 0; } }
.truck { position: absolute; z-index: 2; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); height: calc(var(--h) * var(--pu)); }
.truck__body { width: 100%; height: 100%; }
.crate { position: absolute; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); display: block; transition: transform .25s cubic-bezier(.2,.8,.2,1); -webkit-tap-highlight-color: transparent; }
.crate img { width: 100%; height: auto; }
.crate .h { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; }
.crate:hover, .crate:focus-visible { transform: translateY(calc(-6 * var(--pu))) scale(1.03); outline: none; z-index: 3; }
.crate:hover .h, .crate:focus-visible .h { opacity: 1; }

/* footer */
.foot { height: calc(810 * var(--pu)); overflow: hidden; background: #0e2a12; }
.foot .stage { height: 100%; }
.foot__bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.foot__truck { position: absolute; left: calc(var(--x) * var(--pu)); top: calc((var(--y) + 26) * var(--pu)); width: calc(var(--w) * var(--pu)); height: calc(var(--h) * var(--pu));
  transform-origin: 50% 100%; translate: 0 0; scale: var(--fk, .9); }   /* a little smaller and lower; js/main.js shrinks it further on short screens so the whole back shows at once */
.foot__truck > img { width: 100%; height: 100%; }
.fi { position: absolute; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); display: block; }
.fi img { width: 100%; height: auto; }
.fi .h { position: absolute; inset: 0; opacity: 0; }   /* instant swap: a fade here made the browser redraw the whole truck soft for a moment */
.fi:hover .h, .fi:focus-visible .h { opacity: 1; }
.fi:hover > img:not(.h), .fi:focus-visible > img:not(.h) { opacity: 0; }   /* the resting artwork must not show through behind the hover artwork */
.fi:hover, .fi:focus-visible { outline: none; }
/* ABOUT ME / MY STUDIO signs over the two grilles on the truck's back: grow a little on hover, settle back to normal size while pressed */
.fs { --a: .3963; position: absolute; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); display: block; transition: left .18s cubic-bezier(.2,.8,.2,1), top .18s cubic-bezier(.2,.8,.2,1), width .18s cubic-bezier(.2,.8,.2,1); -webkit-tap-highlight-color: transparent; }
.fs img { display: block; width: 100%; height: auto; }
/* grows 7% about its centre by size, not transform: a transform animation made the whole truck blur for a moment */
.fs:hover, .fs:focus-visible { left: calc((var(--x) - var(--w) * .035) * var(--pu)); top: calc((var(--y) - var(--w) * var(--a) * .035) * var(--pu)); width: calc(var(--w) * 1.07 * var(--pu)); outline: none; }
.fs:active { left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); transition-duration: .08s; }
/* phone number + email plates: click copies them (phones: the number dials). On hover the hand-painted lettering
   grows a little inside its tab — done with size, not transform, so the truck never blurs */
.fc { position: absolute; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); height: calc(var(--h) * var(--pu)); padding: 0; margin: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fc:focus-visible { outline: none; }
.fc__plate { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fc__txt { position: absolute; left: var(--tl); top: var(--tt); width: var(--tw); height: auto; display: block; max-width: none; transition: left .18s cubic-bezier(.2,.8,.2,1), top .18s cubic-bezier(.2,.8,.2,1), width .18s cubic-bezier(.2,.8,.2,1); }
.fc:hover .fc__txt, .fc:focus-visible .fc__txt { left: calc(var(--tl) - var(--tw) * (var(--z) - 1) / 2); top: calc(var(--tt) - var(--th) * (var(--z) - 1) / 2); width: calc(var(--tw) * var(--z)); }
.fc__tip { z-index: 2; position: absolute; left: 50%; bottom: calc(100% + 8 * var(--pu)); translate: -50% 0; padding: calc(5 * var(--pu)) calc(11 * var(--pu)); border-radius: 999px; background: #10204d; color: #ffd84a; font-family: "Anek Latin", system-ui, sans-serif; font-stretch: 125%; font-weight: 400; font-size: max(11px, calc(13 * var(--pu))); line-height: 1.2; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.35); }

/* showreel dialog */
.reel { border: 0; padding: 0; background: #000; width: min(92vw, 1100px); aspect-ratio: 16/9; overflow: visible; }
.reel::backdrop { background: rgba(5,12,30,.82); }
.reel__frame, .reel__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.reel__x { position: absolute; right: -6px; top: -42px; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { .clouds img { animation: none; } }

/* ============================ ABOUT PAGE ============================ */
.about { --ap: 0; --ep: 0; position: relative; height: 400svh; background: #2b6f9e; }
.about__sticky { position: sticky; top: 0; height: 100svh; min-height: 620px; overflow: hidden; display: flex; align-items: flex-end; }
.about__bg { position: absolute; inset: 0; background: url("../assets/about/bg.webp") 50% 100% / cover no-repeat; animation: pan 60s linear infinite alternate; }
@keyframes pan { from { background-position: 30% 100%; } to { background-position: 70% 100%; } }
.about__road { position: relative; z-index: 1; pointer-events: none; width: 100%; padding-bottom: 11svh; padding-top: calc(var(--nav-h) + 20px); overflow: hidden; }
/* truck: starts with just its cab on the right edge, drives left to its final spot (Figma start/end frames).
   --tw = truck width; final left edge = -0.155 tw; start left edge = 70vw */
.about__road { --tw: min(94vw, 4800px, calc((100svh - var(--nav-h) - 1svh) * 2.477)); --ml: calc(98.5vw - 0.974 * var(--tw)); padding-bottom: 2.5svh; }   /* truck is ~12% bigger; its tail stays just inside the right edge */
.about__truck { width: var(--tw); margin-left: var(--ml); translate: calc((1 - var(--ap)) * (70vw - var(--ml)) - var(--ep) * (var(--tw) + var(--ml) + 4vw)) 0; will-change: translate; }   /* rolls in from the right, parks, then drives on out of the left edge */
.truckbox { --k: calc(var(--tw) / 2400); position: relative; }
.truckbox__body { width: 100%; height: auto; display: block; }
.js .truckbox:not(.has-body) .wheel, .js .truckbox:not(.has-body) .wheel-light { visibility: hidden; }   /* tyres appear with the truck, not before it */
.wheel { position: absolute; height: auto; aspect-ratio: 1; border-radius: 50%; rotate: calc((var(--ap) + var(--ep) * 1.1) * -1500deg); }
/* each alloy image is cut as a circle centred on its hub, and placed on the tyre's hub, so it spins true */
.wheel--f { left: 13.496%; top: 72.234%; width: 6.25%; }
.wheel--r { left: 69.158%; top: 72.296%; width: 6.25%; }
/* whole tyre + alloy turning together (cut from the truck art, centred on the hub).
   To go back to alloy-only: in about.html use wheel--f / wheel--r with wheel-f.webp / wheel-r.webp */
.wheel--tf { left: 11.371%; top: 66.960%; width: 10.5%; }
.wheel--tr { left: 67.033%; top: 67.022%; width: 10.5%; }
/* the tyre's light & shadow sit on a layer that does NOT turn, so the shine stays put while the tread rolls */
.wheel-light { position: absolute; height: auto; aspect-ratio: 1; pointer-events: none; }
/* interactive toolbox: brightens on hover and the apps come out and line up beside it */
.tools { position: absolute; inset: 0; pointer-events: none; }
.tb { position: absolute; left: 35.14%; top: 66.69%; width: 8.89%; aspect-ratio: 320 / 210; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; border-radius: 4%; }
.tb img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.tools.open .tb img { opacity: 1; }
.tb:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ticons { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.ticons li { position: absolute; left: calc(var(--x) / 24 * 1%); top: calc(var(--y) / 9.67 * 1%); width: calc(60 / 24 * 1%); aspect-ratio: 1; opacity: 0; scale: .35;
  translate: calc((950 - var(--x)) * var(--k)) calc((690 - var(--y)) * var(--k)); transition: translate .22s ease-in, scale .22s ease-in, opacity .18s ease-in; }
.tools.open .ticons li { opacity: 1; scale: 1; translate: 0 0; pointer-events: auto; --fx: calc((950 - var(--x)) * var(--k)); --fy: calc((690 - var(--y)) * var(--k)); animation: ipop .7s cubic-bezier(.25,.8,.3,1) calc(var(--i) * 45ms) both; }   /* each app is thrown out of the box in an arc and settles with a bounce */
@keyframes ipop { 0% { translate: var(--fx) var(--fy); scale: .2; rotate: -30deg; opacity: 0; } 10% { opacity: 1; } 55% { translate: 0 calc(-26 * var(--k)); scale: 1.22; rotate: 9deg; } 78% { translate: 0 calc(4 * var(--k)); scale: .95; rotate: -3deg; } 100% { translate: 0 0; scale: 1; rotate: 0deg; opacity: 1; } }
.ticons img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .18s cubic-bezier(.2,.9,.3,1.4); filter: drop-shadow(0 calc(3 * var(--k)) calc(4 * var(--k)) rgba(0,0,0,.45)); }
.ticons li:hover img { transform: translateY(-7%) scale(1.16); }
.ticons span { position: absolute; top: calc(100% + 3 * var(--k)); left: 50%; translate: -50% 0; white-space: nowrap; font: 800 max(10px, calc(17 * var(--k)))/1.1 "Anek Latin", "Arial Narrow", system-ui, sans-serif; font-stretch: 125%; color: #fff4d6;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.9); opacity: 0; transform: translateY(-4px) scale(.85); transition: opacity .15s, transform .18s cubic-bezier(.2,.9,.3,1.4); pointer-events: none; }
.ticons li:hover span { opacity: 1; transform: none; }
@media (max-width: 900px) { .about__road { --tw: 980px; --ml: calc(0.0829 * var(--tw)); padding-bottom: 6svh; } }
@media (prefers-reduced-motion: reduce) { .ticons li, .ticons img { transition: none !important; animation: none !important; } .about { --ap: 1 !important; height: auto; } .about__sticky { position: relative; } .about__bg, .truckbox { animation: none; } }

/* ============================ STUDIO PAGE ============================
   Laid out in design pixels from the Figma "Frame 2" (1440 wide). --pu scales everything; each section has its own
   top (--y0 is baked into each item's --y). On phones the gallery sections restack into a column, and the two
   interactive scenes (desk + room) shrink as whole pictures so their hotspots stay aligned. */
.page-studio { background: #ecd9b6; color: #4a2f12; --pu: calc(min(var(--vw, 100vw), 5120px) / 1440); }
.studio2 { position: relative; overflow-x: clip; }
.ss { position: relative; height: calc(var(--h) * var(--pu)); background: #ecd9b6 url(../assets/studio/paper-bg.webp) center top / 100% auto repeat-y; }
.ss--room { background: #3a2113 linear-gradient(90deg, #2b170c, #4a2b18 50%, #2b170c); }
.ss__in { position: absolute; left: 50%; top: 0; width: calc(1440 * var(--pu)); height: 100%; translate: -50% 0; }
.ss--intro { --sd: max(0px, calc(50svh + var(--nav-h) / 2 - 355 * var(--pu))); height: calc(var(--h) * var(--pu) + var(--sd)); }   /* title board + text sit in the middle of the first screen; everything below moves down with it */
.ss--intro .ss__in { top: var(--sd); height: calc(var(--h) * var(--pu)); }
.it, .tx, .hot { position: absolute; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); margin: 0; }
.it { height: calc(var(--h) * var(--pu)); }
.it img { width: 100%; height: 100%; object-fit: contain; display: block; max-width: none; }
.it figcaption { display: none; }
/* until the real image is added, show an outlined slot with its file name */
.it.miss { border: calc(2 * var(--pu)) dashed rgba(74,47,18,.28); border-radius: calc(8 * var(--pu)); display: grid; place-items: center; overflow: hidden; }
.it.miss figcaption { display: block; padding: 6px; text-align: center; font: 500 clamp(9px, calc(12 * var(--pu)), 13px)/1.3 ui-monospace, monospace; opacity: .55; word-break: break-all; }
.ss--room .it.miss { border-color: rgba(255,240,215,.3); color: #f5e6c8; }

.tx { height: auto; text-align: center; font-family: "Anek Latin", "Arial Narrow", system-ui, sans-serif; font-stretch: 125%; font-weight: 500; line-height: 1.25; color: #51311c; margin: 0; }
.tx.h { font-weight: 800; font-size: calc(40 * var(--pu)); line-height: 1.05; white-space: nowrap; left: 50%; translate: -50% 0; width: auto; }
.ss--room .tx.h { color: #f7e7c6; }
.tx.kick, .tx.kick2 { font-weight: 800; font-size: calc(32 * var(--pu)); line-height: 1.1; }
.tx.sub { font-size: calc(21 * var(--pu)); line-height: 1.25; }
.tx.keyarts { font-weight: 500; font-size: calc(17 * var(--pu)); letter-spacing: .02em; white-space: nowrap; color: #8a6446; opacity: .62; left: 50%; translate: -50% 0; width: auto; }
.tx.ct { font-weight: 800; font-size: calc(15 * var(--pu)); line-height: 1.2; }
.tx.cb { font-size: calc(12 * var(--pu)); }
.tx.cap { font-size: calc(18 * var(--pu)); }
.tx.rl { font-weight: 800; font-size: calc(17 * var(--pu)); line-height: 1.2; color: #51311c; }
.tx.khenti { color: #5a3a24; transform: skewY(-14deg); transform-origin: 50% 50%; font-size: calc(15 * var(--pu)); white-space: nowrap; letter-spacing: .03em; }   /* sits on the front edge of the floor slab, in perspective */

/* hover targets: soft glow ring, a lifted object and a label chip */
.hot { display: block; height: calc(var(--h) * var(--pu)); background: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: none; border-radius: calc(16 * var(--pu)); z-index: 3;
  -webkit-tap-highlight-color: transparent; }
.hot:hover, .hot:focus-visible { outline: none; }   /* no box: the object itself lights up (see .it.obj below) */
.hot__chip { position: absolute; left: 50%; top: 50%; bottom: auto; translate: -50% calc(-50% + 8 * var(--pu)); opacity: 0; transition: opacity .2s, translate .2s;
  padding: calc(8 * var(--pu)) calc(18 * var(--pu)); border-radius: 999px; background: #4a2f12; color: #fbe9bd; white-space: nowrap;
  box-shadow: 0 calc(6 * var(--pu)) calc(16 * var(--pu)) rgba(30,15,4,.42), 0 calc(2 * var(--pu)) calc(4 * var(--pu)) rgba(30,15,4,.3);
  font: 600 max(11px, calc(14 * var(--pu)))/1 "Anek Latin", "Arial Narrow", system-ui, sans-serif; font-stretch: 125%; letter-spacing: .06em; }
.hot:hover .hot__chip, .hot:focus-visible .hot__chip { opacity: 1; translate: -50% -50%; }
.roomhot { z-index: 3; }
.it.obj { transition: transform .3s cubic-bezier(.2,.8,.2,1), filter .3s; transform-origin: 50% 50%; }
.ss--room:has(.h-mb:hover) .o-mb, .ss--room:has(.h-mb:focus-visible) .o-mb,
.ss--room:has(.h-ts:hover) .o-ts, .ss--room:has(.h-ts:focus-visible) .o-ts,
.ss--room:has(.h-eg:hover) .o-eg, .ss--room:has(.h-eg:focus-visible) .o-eg,
.ss--intro:has(.h-peg:hover) .o-peg, .ss--intro:has(.h-peg:focus-visible) .o-peg,
.ss--intro:has(.h-org:hover) .o-org, .ss--intro:has(.h-org:focus-visible) .o-org,
.ss--intro:has(.h-coc:hover) .o-coc, .ss--intro:has(.h-coc:focus-visible) .o-coc {
  transform: scale(1.06); filter: brightness(1.12); }

@media (max-width: 720px) {
  /* scenes: scale as one picture to the screen width */
  .ss--intro, .ss--room { --pu: calc(var(--vw, 100vw) / 1440); }
  /* galleries: stack in reading order */
  .ss--gal { height: auto; padding: 56px 16px 40px; --pu: calc(var(--vw, 100vw) / 720); }
  .ss--gal .ss__in { position: static; width: auto; height: auto; translate: none; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
  .ss--gal .it, .ss--gal .tx { position: static; width: 100%; height: auto; }
  .ss--gal .it { aspect-ratio: calc(var(--w) / var(--h)); max-width: 420px; }
  .ss--gal .tx.h { font-size: 26px; } .ss--gal .tx.cap { font-size: 15px; } .ss--gal .tx.cb { font-size: 13px; } .ss--gal .tx.ct { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .hot, .hot__chip, .it.obj { transition: none; } }


/* ============================ OPENING SHUTTER ============================
   Truck-shutter loading screen: greets in five languages, then the shutter rolls up (fast, then easing to a stop)
   and the yellow "Ashfaque's Portfolio" board lifts away. Runs once per browser session (see js/intro.js). */
.intro { display: none; position: fixed; inset: 0; z-index: 200; overflow: hidden; pointer-events: auto; --iw: max(100vw, calc(100vh * 1.773)); --ih: max(100vh, calc(100vw * .564)); }
.intro-on .intro { display: block; animation: introfail 0s 14s forwards; }   /* safety net if the script never runs */
.intro-on { overflow: hidden; }
@keyframes introfail { to { visibility: hidden; } }
.intro__shutter, .intro__banner { position: absolute; left: 0; top: 0; width: 100%; height: 100%; will-change: transform; }
.intro__shutter { background: #007bfd; }
.intro__frames, .intro__banner { --w: var(--iw); }
.intro__frames { position: absolute; left: 50%; top: 0; width: var(--iw); height: var(--ih); translate: -50% 0; }
.intro__banner img { position: absolute; left: 50%; top: 0; width: var(--iw); height: var(--ih); translate: -50% 0; max-width: none; }
.intro__frames img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; }
.intro__frames img.is-on { opacity: 1; }
/* tall/narrow screens: show the whole board instead of cropping it */
@media (max-aspect-ratio: 6/5) {
  .intro { --iw: 100vw; --ih: calc(100vw * .564); }
  .intro__frames, .intro__banner img { left: 0; translate: none; }
}
/* phones (portrait): the tall mobile artwork (941 x 1672) fills the screen, cropped at the sides if the phone is narrower than it */
@media (max-width: 700px) and (max-aspect-ratio: 4/5) {
  .intro { --iw: max(100vw, calc(100svh * .5628)); --ih: max(100svh, calc(100vw * 1.777)); }
  .intro__frames, .intro__banner img { left: 50%; translate: -50% 0; }
}
.intro.is-done { display: none !important; }
.intro-on .hero, .intro-on body { background: #EBD9BA; }

/* ---- video edits carousel: cards keep each video's own aspect ratio; arrows sit either side of the cards ---- */
.vreel { position: absolute; left: 0; top: calc(150 * var(--pu)); width: 100%; height: calc(700 * var(--pu)); }
.vreel__stage { position: absolute; inset: 0 0 calc(70 * var(--pu)) 0; overflow: visible; touch-action: pan-y; }
.vc { position: absolute; left: 50%; top: 50%; padding: 0; border: 0; border-radius: calc(14 * var(--pu)); overflow: hidden; background: #1a1410; cursor: pointer;
  box-shadow: 0 calc(14 * var(--pu)) calc(34 * var(--pu)) rgba(60,35,10,.28); transition: transform .55s cubic-bezier(.22,.8,.22,1), opacity .4s, filter .4s; will-change: transform; }
.vc img, .vc video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.vc video { opacity: 0; transition: opacity .3s; }
.vc.is-playing video { opacity: 1; }
.vc::after { content: ""; position: absolute; inset: 0; background: #ecd9b6; opacity: var(--dim, 0); transition: opacity .4s; pointer-events: none; }
.vc__t { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4em 1em .9em; text-align: left; color: #fff; z-index: 2; pointer-events: none;
  font: 800 clamp(13px, calc(19 * var(--pu)), 22px)/1.15 "Anek Latin", system-ui, sans-serif; font-stretch: 125%; background: linear-gradient(transparent, rgba(0,0,0,.65)); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.vc.is-active:hover .vc__t, .vc.is-active:focus-visible .vc__t { opacity: 1; transform: none; }
.vc.is-active::before { content: ""; position: absolute; left: 50%; top: 50%; width: calc(64 * var(--pu)); height: calc(64 * var(--pu)); min-width: 44px; min-height: 44px; translate: -50% -50%; border-radius: 50%; z-index: 2;
  background: rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%2351311c'/%3E%3C/svg%3E") center / 46% no-repeat; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s; pointer-events: none; }
.vc.is-active:hover::before, .vc.is-active:focus-visible::before { opacity: 1; transform: none; }
.vc.is-active.is-playing:hover::before { opacity: 0; }
.vc:not(.is-active):hover { filter: brightness(1.05); }
.vc:focus-visible { outline: 3px solid #51311c; outline-offset: 3px; }
.vreel__nav { position: absolute; top: calc(50% - calc(35 * var(--pu))); translate: 0 -50%; width: calc(76 * var(--pu)); height: calc(76 * var(--pu)); min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: #fff; color: #51311c;
  display: grid; place-items: center; cursor: pointer; z-index: 30; box-shadow: 0 6px 18px rgba(60,35,10,.22); transition: transform .2s, box-shadow .2s; }
.vreel__nav:hover { transform: scale(1.08); box-shadow: 0 8px 22px rgba(60,35,10,.3); }
.vreel__nav:focus-visible { outline: 3px solid #51311c; outline-offset: 3px; }
.vreel__nav--prev { left: calc(60 * var(--pu)); } .vreel__nav--next { right: calc(60 * var(--pu)); }
.vreel__title { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font: 800 calc(24 * var(--pu))/1.2 "Anek Latin", system-ui, sans-serif; font-stretch: 125%; color: #51311c; }
.vreel__title small { display: block; margin-top: .25em; font-weight: 500; font-size: .62em; opacity: .7; }
.vdlg { border: 0; padding: 0; background: #000; border-radius: 14px; max-width: min(92vw, 1100px); max-height: 90vh; overflow: hidden; }
.vdlg::backdrop { background: rgba(20,10,4,.82); }
.vdlg video { display: block; max-width: 92vw; max-height: 86vh; margin: 0 auto; }
.vdlg__x { position: absolute; right: 10px; top: 8px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 26px; line-height: 1; cursor: pointer; }
/* photography keeps the picture's own look: cover-crop into the Figma slots */
.it.ph img { object-fit: cover; border-radius: calc(4 * var(--pu)); }
@media (max-width: 720px) {
  .ss--vreel { height: auto; padding: 56px 0 30px; --pu: calc(var(--vw, 100vw) / 720); }
  .ss--vreel .ss__in { position: static; width: auto; height: auto; translate: none; }
  .ss--vreel .tx.h { position: static; width: auto; font-size: 26px; }
  .vreel { position: relative; top: 0; width: 100%; height: 118vw; margin-top: 24px; }
  .vreel__nav { width: 44px; height: 44px; } .vreel__nav--prev { left: 6px; } .vreel__nav--next { right: 6px; }
  .vreel__title { font-size: 17px; }
  .it.ph { aspect-ratio: calc(var(--w) / var(--h)); }
}
@media (prefers-reduced-motion: reduce) { .vc, .vreel__nav { transition: none; } }

/* ---- showreel: the horn button on the steering wheel is a real button (its pad sinks in on hover / press) ---- */
.horn { position: absolute; left: calc(1166 * var(--pu)); top: calc(756 * var(--pu)); width: calc(98 * var(--pu)); height: calc(92 * var(--pu)); padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: url("../assets/showreel/showreel.webp") calc(-1166 * var(--pu)) calc(-756 * var(--pu)) / calc(1440 * var(--pu)) calc(1110 * var(--pu)) no-repeat; -webkit-tap-highlight-color: transparent; }
.horn:hover, .horn:focus-visible { transform: scale(.94); filter: brightness(1.12); outline: none; }
.horn:active, .horn.is-down { transform: scale(.86); filter: brightness(.8); }
.horn:focus-visible { box-shadow: 0 0 0 calc(3 * var(--pu)) #fff; }

/* ---- projects nav link lands on the PROJECTS board ---- */
.board-anchor { position: absolute; left: 0; width: 100%; top: calc(780 * var(--pu)); height: calc(420 * var(--pu)); pointer-events: none; scroll-margin-top: calc(var(--nav-h) + 12px); }

.fs[style*="--hh"] { --a: calc(var(--hh) / var(--w)); }
.fs[style*="--hh"] img { aspect-ratio: var(--w) / var(--hh); height: auto; }   /* studio plate stretched a little so it fills its frame and hides the grill */

/* about: roadside board. "Stop name: About me" until the truck has driven over it, then the contact board with the social buttons */
.cboard { position: absolute; z-index: 0; left: 50%; bottom: 29svh; width: min(34vw, 52svh); translate: -50% 0; container-type: inline-size; pointer-events: none; filter: drop-shadow(0 1.2cqw 1.2cqw rgba(0,0,0,.28)); }
.cboard__b { display: block; width: 100%; height: auto; }
.cboard__c, .cboard__links { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
.cboard__b--stop { transition: opacity .35s ease; }
.about.passed .cboard__b--stop { opacity: 0; }
.about.passed .cboard__c, .about.passed .cboard__links { opacity: 1; }
.about.passed .cboard__links { pointer-events: auto; }
.cboard__links { pointer-events: none; }
.cboard__t { position: absolute; left: 0; width: 100%; top: 20.5%; translate: 0 -50%; text-align: center; font: 800 4.3cqw/1.12 "Anek Latin", "Arial Narrow", system-ui, sans-serif; font-stretch: 125%; text-transform: uppercase; color: #3b1f0b; letter-spacing: .02em; }
.cb { position: absolute; left: var(--l); top: var(--cy); translate: 0 -50%; width: 22.8%; display: block; -webkit-tap-highlight-color: transparent; }
.cb--w { width: 35.2%; }
.cb img { display: block; width: 100%; height: auto; }
.cb .h { position: absolute; inset: 0; opacity: 0; }
.cb img { transition: opacity .15s ease; }
.cb:hover .h, .cb:focus-visible .h, .cb:active .h { opacity: 1; }
.cb:hover > img:not(.h), .cb:focus-visible > img:not(.h), .cb:active > img:not(.h) { opacity: 0; }
.cb:focus-visible { outline: none; }   /* hover only swaps to the hover artwork: no move, no resize */
@media (max-width: 900px) { .cboard { width: min(78vw, 52svh); bottom: 24svh; } }
@media (prefers-reduced-motion: reduce) { .cboard__b--stop { opacity: 0; } .cboard__c, .cboard__links { opacity: 1; pointer-events: auto; } }

/* studio: the room scene is stretched to touch both sides and the bottom of its frame; everything on it scales with it */
.roomfit { position: absolute; inset: 0; }
/* side quests: the cabin is shown at 80 % (it pixelated when larger), shrunk around the front corner of its base so it
   still stands on the wooden floor; the plain top of the wall is cropped so the section doesn't get taller */
.roomfit { transform: scale(.8); transform-origin: calc(720 * var(--pu)) calc(1120 * var(--pu)); }
.ss--room { overflow: clip; }
.ss--room .ss__in { top: calc(-200 * var(--pu)); height: calc(100% + 200 * var(--pu)); }

/* studio: posters, Advaya collaterals and the matchboxes lift a little and brighten on hover (no click) */
.it.hv img { transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s ease; }
.it.hv img:hover { transform: translateY(calc(-8 * var(--pu))); filter: brightness(1.07) contrast(1.08) drop-shadow(0 calc(10 * var(--pu)) calc(14 * var(--pu)) rgba(60,35,15,.22)); }
/* matchboxes: the empty tray with each box as its own image on top, so each one lifts on its own */
.it.mbset img.mbset__box { position: absolute; height: auto; transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s ease; }
.it.mbset img.mbset__box:hover { transform: translateY(calc(-8 * var(--pu))); filter: brightness(1.07) contrast(1.08) drop-shadow(0 calc(8 * var(--pu)) calc(10 * var(--pu)) rgba(30,15,5,.35)); }

/* studio: things fade in and rise a little as they scroll into view (js/studio.js adds .rv, then .in) */
.it.rv > img, .tx.rv, .ph2.rv { opacity: 0; transform: translateY(calc(34 * var(--pu))); }
.it.rv.in > img, .tx.rv.in, .ph2.rv.in { opacity: 1; transform: none; transition: opacity .9s ease var(--rd, 0ms), transform 1s cubic-bezier(.2,.7,.2,1) var(--rd, 0ms); }
@media (prefers-reduced-motion: reduce) { .it.rv > img, .tx.rv, .ph2.rv { opacity: 1; transform: none; } .it.hv img { transition: none; } }

/* studio: the five Gothic sketch sheets sit in a loose pile and fan out side by side on hover / tap */
.papers { position: absolute; left: calc(50% - 600 * var(--pu)); top: calc(232 * var(--pu)); width: calc(1200 * var(--pu)); height: calc(500 * var(--pu)); cursor: pointer; outline: none; --pq: var(--pu); }
.paper { position: absolute; left: 50%; top: calc(20 * var(--pq)); height: calc(440 * var(--pq)); width: auto; max-width: none; z-index: var(--z); user-select: none; -webkit-user-drag: none;
  translate: calc(-50% + var(--x0) * var(--pq)) 0; rotate: var(--r0); transform-origin: 50% 60%;
  transition: translate .7s cubic-bezier(.2,.9,.25,1) calc(var(--n) * 30ms), rotate .7s cubic-bezier(.2,.9,.25,1) calc(var(--n) * 30ms), filter .3s; }
.papers:hover .paper, .papers:focus-visible .paper, .papers.is-open .paper { translate: calc(-50% + var(--sx) * var(--pq) * .96) calc(var(--sx) * var(--sx) / 250000 * 30 * var(--pq)); rotate: var(--sr); }
.papers:focus-visible { outline: 3px solid rgba(81,49,28,.5); outline-offset: 6px; border-radius: 12px; }
@media (max-width: 720px) { .papers { position: relative; left: auto; top: auto; width: 100%; height: 150vw; --pq: calc(var(--vw, 100vw) / 900); order: 5; } .paper { height: 74vw; top: 6vw; } .papers:hover .paper, .papers:focus-visible .paper, .papers.is-open .paper { translate: calc(-50% + var(--sx) * var(--pq) * .8) calc(var(--n) * 18vw - 30vw); rotate: var(--sr); } }
@media (prefers-reduced-motion: reduce) { .paper { transition: none; } }

/* end-of-scroll strip */
.endbar { position: relative; z-index: 6; height: calc(39 * var(--pu)); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(26 * var(--pu)); box-sizing: border-box; overflow: hidden; }
.journey > .endbar { margin-top: calc(-39 * var(--pu)); }
.endbar--page { margin-top: 0; height: calc(58 * var(--pu)); background: #ecd9b6; }
.endbar__shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; mix-blend-mode: multiply; pointer-events: none; }
.endbar > img:not(.endbar__shade), .endbar__r { position: relative; }
.endbar__l { width: calc(211.8 * var(--pu)); height: auto; }   /* 418px image at the same letter size as before */
.endbar__c { position: absolute !important; left: 50%; top: 50%; translate: -50% -50%; width: calc(152.5 * var(--pu)); height: auto; }
/* all three groups sit on one baseline (the line under the capitals of END OF SCROLL).
   The right group is top-aligned so ©, 2026 and the name share one cap line; the © is a touch taller, so it's nudged up to centre on the caps */
.endbar__l, .endbar__r { translate: 0 calc(1.9 * var(--pu)); }
.endbar__r { display: flex; align-items: flex-start; gap: calc(9 * var(--pu)); }
.endbar__r img:nth-child(1) { margin-top: calc(-2 * var(--pu)); }
.endbar__r img { height: auto; display: block; }
.endbar__r img:nth-child(1) { width: calc(14.5 * var(--pu)); } .endbar__r img:nth-child(2) { width: calc(37.5 * var(--pu)); } .endbar__r img:nth-child(3) { width: calc(168.5 * var(--pu)); }
@media (max-width: 720px) {
  .endbar, .endbar--page { height: auto; flex-direction: column; gap: 10px; padding: 16px 12px 18px; margin-top: 0; background: #0e2a12; }
  .journey > .endbar { margin-top: 0; }
  .endbar__shade { display: none; }
  .endbar__l { width: min(211.5px, 92vw); } .endbar__c { position: relative !important; left: auto; top: auto; translate: none; width: 152px; }
  .endbar__r img:nth-child(1) { width: 15px; } .endbar__r img:nth-child(2) { width: 38px; } .endbar__r img:nth-child(3) { width: 168px; } .endbar__r { gap: 9px; }
  .endbar__l, .endbar__r { translate: none; } .endbar__r img:nth-child(1) { margin-top: -2.3px; }
}

/* studio video carousel: whole section (cards + titles) fits one screen; plain white play icon; muted preview with an unmute button */
.vreel { height: max(380px, min(calc(700 * var(--pu)), calc(100svh - var(--nav-h) - 170px))); }
.vc__t { display: none; }
.vc.is-active::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat; width: calc(56 * var(--pu)); height: calc(56 * var(--pu)); min-width: 40px; min-height: 40px; border-radius: 0; opacity: .95; transform: none; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.vc.is-active:hover::before, .vc.is-active:focus-visible::before { opacity: .95; transform: none; }
.vc.is-active.is-playing::before, .vc.is-active.is-playing:hover::before { opacity: 0; }
.vc__mute { position: absolute; right: calc(14 * var(--pu)); bottom: calc(14 * var(--pu)); width: max(30px, calc(38 * var(--pu))); height: max(30px, calc(38 * var(--pu))); border-radius: 50%; z-index: 3; background: rgba(20,12,6,.55) center / 58% no-repeat; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s, background-color .2s; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z' fill='%23fff'/%3E%3Cpath d='m16 9 5 6M21 9l-5 6'/%3E%3C/svg%3E"); }
.vc__mute.on { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z' fill='%23fff'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E"); }
.vc.is-active:hover .vc__mute, .vc.is-active:focus-visible .vc__mute { opacity: 1; transform: none; }
.vc__mute:hover { background-color: rgba(20,12,6,.8); }

/* ---- barricade hiding the seam between the road and the footer backdrop ---- */
.barri { position: relative; height: 0; z-index: 6; pointer-events: none; }
.barri img { position: absolute; left: 50%; top: 0; width: min(var(--vw,100vw),5120px); max-width: none; height: auto; transform: translate(-50%,-50%); filter: drop-shadow(0 calc(9*var(--pu)) calc(8*var(--pu)) rgba(0,0,0,.5)); }



/* ---- photography: 3 columns, every picture shown whole; hover dims it and names the place ---- */
.phcols { position: absolute; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); display: flex; gap: calc(24 * var(--pu)); align-items: flex-start; }
.phcol { min-width: 0; display: flex; flex-direction: column; gap: calc(24 * var(--pu)); }
.ph2 { position: relative; margin: 0; overflow: hidden; border-radius: calc(4 * var(--pu)); background: rgba(74,47,18,.12); outline: none; }
.ph2 img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .35s ease, transform .6s ease; }
.ph2 figcaption { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 8%; text-align: center; color: #fff; opacity: 0; transition: opacity .35s ease;
  font: 600 clamp(11px, calc(22 * var(--pu)), 28px)/1.2 "Anek Latin", system-ui, sans-serif; font-stretch: 125%; text-shadow: 0 1px 8px rgba(0,0,0,.55); background: rgba(20,10,4,.42); pointer-events: none; }
.ph2:hover figcaption, .ph2:focus-visible figcaption, .ph2:focus figcaption { opacity: 1; }
.ph2:hover img { transform: scale(1.03); }
@media (max-width: 720px) {
  .ss--photo .ss__in { display: block; }
  .ss--photo .tx.h { display: block; text-align: center; margin-bottom: 20px; }
  .ss--photo .phcols { position: static; width: 100%; gap: 8px; }
  .phcol { gap: 8px; }
  .ph2 figcaption { font-size: 10px; padding: 0 6px; }
}

.it.lbl { pointer-events: none; z-index: 2; }
.it.lbl img { object-fit: fill; }

/* ---- showreel: the stereo (333.3 Faque FM) is clickable, brightens on hover, glows while playing ---- */
.stereo { position: absolute; left: calc(var(--x) * var(--pu)); top: calc(var(--y) * var(--pu)); width: calc(var(--w) * var(--pu)); height: calc(var(--h) * var(--pu)); padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: calc(3 * var(--pu)); transition: filter .2s, transform .2s, box-shadow .2s; transform-origin: 50% 50%; }
/* always lit so it reads as a screen you can press; brighter on hover */
.stereo {
  box-shadow: inset 0 0 calc(9 * var(--pu)) 0 rgba(175,255,150,.38);
  background: transparent;
}
.stereo:hover, .stereo:focus-visible {
  transform: scale(1.06); outline: none; background: transparent;
  box-shadow: inset 0 0 calc(12 * var(--pu)) calc(1 * var(--pu)) rgba(190,255,165,.55);
}
.stereo.is-playing { box-shadow: inset 0 0 calc(12 * var(--pu)) calc(1 * var(--pu)) rgba(190,255,165,.55); }

/* ---- stereo / mp3 player: opens from the dashboard screen, matches Ashfaque's mockup art ---- */
.stereoPlayer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.stereoPlayer[hidden] { display: block !important; pointer-events: none; }
.stereoPlayer[hidden] .stereoPlayer__panel { display: none; }

.stereoPlayer__panel {
  position: fixed; left: 50%; bottom: max(20px, 4vh); translate: -50% 0; scale: 1; opacity: 1;
  width: min(27.6vw, 384px); aspect-ratio: 1536/1024; container-type: inline-size;
  background-size: 100% 100%; background-repeat: no-repeat;
  pointer-events: auto; z-index: 61;
  filter: drop-shadow(0 20px 45px rgba(0,0,0,.45));
  transition: opacity .2s, scale .2s;
}
.stereoPlayer__panel.is-popping { opacity: 0; scale: .92; }
.stereoPlayer__panel.is-state1 { background-image: url("../assets/showreel/player/stereo1.webp"); }
.stereoPlayer__panel.is-state2 { background-image: url("../assets/showreel/player/stereo2.webp"); }

.stereoPlayer__x {
  position: absolute; left: 91%; top: 3.4%; width: 7.9%; height: 10.3%;
  background: transparent; border: 0; color: transparent; font-size: 0;
  cursor: pointer;
}
.stereoPlayer__x:hover { filter: brightness(.92); }

.stereoPlayer__lcd { position: absolute; left: 6.2%; top: 15.9%; width: 87.6%; height: 39.3%; background: #E6DBC7; border-radius: 2%; box-shadow: inset 0 0 0 1px rgba(42,32,21,.15); }
.stereoPlayer__art {
  position: absolute; left: 0; top: 0; width: 21%; height: 55%; border-radius: 6%;
  background: #16110d; display: grid; place-items: center; font-size: 9cqw; filter: grayscale(1) brightness(1.4);
}
.stereoPlayer__meta { position: absolute; left: 24%; top: 4%; width: 55%; }
.stereoPlayer__title { margin: 0; font: 800 3.4cqw/1.15 "Courier New", monospace; color: #2a2015; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stereoPlayer__artist { margin: .9cqw 0 0; font: 700 2.4cqw/1.15 "Courier New", monospace; color: #6b5c46; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stereoPlayer__eq { position: absolute; right: 0; top: 2%; width: 34%; height: 50%; display: flex; align-items: flex-end; gap: 2.4%; opacity: .55; }
.stereoPlayer__eq span { flex: 1; background: #2a2015; height: 30%; border-radius: 1px; animation: stereoEq 1.1s ease-in-out infinite; }
.stereoPlayer__eq span:nth-child(2n) { animation-delay: .15s; }
.stereoPlayer__eq span:nth-child(3n) { animation-delay: .3s; }
.stereoPlayer__eq span:nth-child(4n) { animation-delay: .45s; }
.stereoPlayer__panel:not(.is-playing) .stereoPlayer__eq span { animation-play-state: paused; height: 14%; }
@keyframes stereoEq { 0%,100% { height: 18%; } 50% { height: 85%; } }

.stereoPlayer__lcd::before { /* masks the baked static seek-line art so only our live progress shows */
  content: ""; position: absolute; left: 0; top: 58%; width: 100%; height: 12%; background: #E6DBC7;
}
.stereoPlayer__lcd::after { /* masks the baked static volume-slider art */
  content: ""; position: absolute; left: 24%; top: 78%; width: 68%; height: 14%; background: #E6DBC7;
}
.stereoPlayer__seek { position: absolute; left: 0; top: 62%; width: 100%; height: 6%; margin: 0; appearance: none; background: transparent; cursor: pointer; z-index: 1; }
.stereoPlayer__seek::-webkit-slider-runnable-track { height: 5px; background: rgba(42,32,21,.3); border-radius: 2px; }
.stereoPlayer__seek::-webkit-slider-thumb { appearance: none; width: .9cqw; height: 3.4cqw; border-radius: 2px; background: #2a2015; margin-top: calc(2.5px - 1.7cqw); cursor: pointer; }
.stereoPlayer__seek::-moz-range-track { height: 5px; background: rgba(42,32,21,.3); border-radius: 2px; }
.stereoPlayer__seek::-moz-range-thumb { width: .9cqw; height: 3.4cqw; border: 0; border-radius: 2px; background: #2a2015; cursor: pointer; }
.stereoPlayer__cur { position: absolute; left: 0; top: 71%; font: 700 2.3cqw/1 "Courier New", monospace; color: #2a2015; z-index: 1; }
.stereoPlayer__dur { position: absolute; right: 0; top: 71%; font: 700 2.3cqw/1 "Courier New", monospace; color: #2a2015; z-index: 1; }
.stereoPlayer__volIcon { position: absolute; left: 25.2%; top: 81.5%; font-size: 3cqw; line-height: 1; z-index: 1; }
.stereoPlayer__vol { position: absolute; left: 32%; top: 85.5%; width: 58%; height: 5%; margin: 0; appearance: none; background: transparent; cursor: pointer; z-index: 1; }
.stereoPlayer__vol::-webkit-slider-runnable-track { height: 5px; background: rgba(42,32,21,.35); border-radius: 2px; }
.stereoPlayer__vol::-webkit-slider-thumb { appearance: none; width: .9cqw; height: 3.2cqw; border-radius: 2px; background: #2a2015; margin-top: calc(2.5px - 1.6cqw); cursor: pointer; }
.stereoPlayer__vol::-moz-range-track { height: 5px; background: rgba(42,32,21,.35); border-radius: 2px; }
.stereoPlayer__vol::-moz-range-thumb { width: .9cqw; height: 3.2cqw; border: 0; border-radius: 2px; background: #2a2015; cursor: pointer; }

.stereoPlayer__btn { position: absolute; top: 60.5%; width: 13.5%; aspect-ratio: 1; border-radius: 50%; background: transparent; border: 0; cursor: pointer; }
.stereoPlayer__prev { left: 28.7%; }
.stereoPlayer__play { top: 57.974%; left: 44.443%; width: 10.723%; }
.stereoPlayer__next { left: 57.4%; }
.stereoPlayer__btn:hover { filter: brightness(.9); }
.stereoPlayer__btn:active { transform: scale(.95); }

/* play/pause icon on the main panel's transport button: the play icon is baked directly into
   the panel artwork (stereo1.webp/stereo2.webp) since that's the default/idle look; the pause
   icon is a separate pre-baked sprite (same crop, same position/size, pause drawn in instead)
   swapped in via background-image when playing — a straight image swap, not a CSS overlay, so
   it can't drift out of alignment or double up with the baked art again */
.stereoPlayer__panel.is-playing .stereoPlayer__play {
  background-image: url("../assets/showreel/player/stereo1-pause-btn.webp");
  background-size: 100% 100%; background-repeat: no-repeat;
}
.stereoPlayer__panel.is-state2.is-playing .stereoPlayer__play {
  background-image: url("../assets/showreel/player/stereo2-pause-btn.webp");
}

.stereoPlayer__foot { position: absolute; bottom: 6.3%; height: 13.7%; border: 0; background: transparent; cursor: pointer; color: transparent; font-size: 0; }
.stereoPlayer__playlist, .stereoPlayer__minimize { left: 5.5%; width: 44%; }
.stereoPlayer__back { right: 4.3%; width: 44%; }
.stereoPlayer__foot:hover { filter: brightness(.92); }

/* ---- minimized state: circular remote (matches Ashfaque's reference exactly) ---- */
.stereoMin {
  position: fixed; right: 20px; bottom: 20px; z-index: 62; pointer-events: auto;
  width: min(24vw, 168px); aspect-ratio: 1;
  background-image: url("../assets/showreel/player/stereo-min.webp"); background-size: 100% 100%; background-repeat: no-repeat;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,.4));
  opacity: 1; scale: 1; transition: opacity .18s, scale .18s;
}
.stereoMin.is-popping { opacity: 0; scale: .85; }
.stereoMin[hidden] { display: none; }
/* came from another page but the browser blocked sound from starting by itself: a soft pulse says "tap play" */
.stereoMin.is-blocked::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; pointer-events: none; animation: fmTap 1.6s ease-out infinite; }
@keyframes fmTap { 0% { box-shadow: 0 0 0 0 rgba(255,214,120,.75); } 100% { box-shadow: 0 0 0 18px rgba(255,214,120,0); } }
@media (prefers-reduced-motion: reduce) { .stereoMin.is-blocked::before { animation: none; box-shadow: 0 0 0 4px rgba(255,214,120,.8); } }
.stereoMin button { position: absolute; background: transparent; border: 0; color: transparent; font-size: 0; cursor: pointer; }
.stereoMin button:hover { filter: brightness(.92); }
.stereoMin__ring { inset: 0; border-radius: 50%; z-index: 1; }
.stereoMin button.stereoMin__max {
  left: 23.1%; top: 12%; width: 52.7%; height: 14.3%; z-index: 2;
  display: flex; align-items: center; justify-content: center; color: #2a2015;
  /* baked icon pixels were removed directly from the artwork — no flat patch needed */
}
.stereoMin__max svg { height: 74%; width: auto; aspect-ratio: 1; pointer-events: none; display: block; }
.stereoMin__prev { left: 5.2%; top: 26.7%; width: 26.3%; height: 44.7%; z-index: 2; }
.stereoMin__next { left: 68.2%; top: 26.7%; width: 26.7%; height: 44.7%; z-index: 2; }
.stereoMin__play { left: 29.5%; top: 29.5%; width: 39.9%; height: 39.5%; border-radius: 50%; z-index: 2; }
.stereoMin__close { left: 23.1%; top: 71.8%; width: 52.7%; height: 15.1%; z-index: 2; }

@media (max-width: 760px) {
  .stereoPlayer__panel { width: min(56vw, 384px); }
}

/* =====================================================================
   PHONES + TABLETS (Nov 2026). Everything below is gated to touch screens or
   phone widths, so desktop / monitor layouts are untouched.
   ===================================================================== */

/* ---- touch screens (phones + iPads): mobile browsers grow the screen when their toolbars slide away,
   so full-screen backdrops use the LARGE viewport height and nothing underneath peeks out ---- */
@media (hover: none) and (pointer: coarse) {
  .road { height: 100lvh; background-size: cover; }
  .about__sticky { height: 100lvh; }
  .cboard { bottom: calc(29svh + 100lvh - 100svh); }
  .about__road { padding-bottom: calc(2.5svh + 100lvh - 100svh); }
  /* studio: the title board sits just under the nav bar instead of in the middle of a tall screen */
  .ss--intro { --sd: max(0px, calc(var(--nav-h) + 40px - 113 * var(--pu))); }
}
@media (hover: none) and (pointer: coarse) and (max-width: 900px) {
  .cboard { bottom: calc(24svh + 100lvh - 100svh); }
  .about__road { padding-bottom: calc(6svh + 100lvh - 100svh); }
}

/* ---- tablets held upright (iPad portrait): the about truck keeps the same size against the
   scenery and the board as on a monitor (about 3x the board's width, ~60% of the screen's height),
   so it is wider than the screen and shows its cab first, then the rest as it drives on ---- */
@media (hover: none) and (pointer: coarse) and (min-width: 601px) and (max-aspect-ratio: 1/1) {
  .cboard { width: min(78vw, 52svh); }
  .about__road { --tw: calc(100svh * 1.5); --ml: calc(3vw - 0.04 * var(--tw)); padding-bottom: calc(6svh + 100lvh - 100svh); }
}

/* ---- phones: every scene is scaled to the screen's width so nothing is cropped at the sides ---- */
@media (max-width: 600px) {
  /* hero: the whole 1440-wide painting fits the width; it starts under the nav bar (the sky carries on behind it) */
  :root { --hh: calc(853 * var(--u)); }
  .hero { --top: calc(var(--nav-h) + 26px - 120 * var(--hu)); --lift: 0px; height: calc(var(--top) + 853 * var(--hu)); }
  .hero__canvas { top: var(--top); }
  /* bumper strip: shown whole, edge to edge */
  .bumper { height: calc(var(--vw, 100vw) * 242 / 2880); margin-top: 0; margin-bottom: 0; }
  .bumper img { width: 100%; height: 100%; min-width: 0; object-fit: fill; }

  /* showreel, projects truck, footer truck: one scale, fitted to the width */
  .journey { --pu: calc(var(--vw, 100vw) / 1440); }
  .clouds__txt { left: 4%; width: 92%; font-size: 11px; line-height: 1.3; }
  .clouds__txt br { display: none; }

  /* studio galleries: headings centred and a size smaller, pictures with a margin either side */
  .ss--gal .tx.h, .ss--vreel .tx.h { translate: none; left: auto; white-space: normal; font-size: 22px; text-align: center; width: 100%; }
  .ss--gal .it { position: relative; left: auto; top: auto; width: 84%; max-width: 360px; }
  /* matchbox set: keep the boxes on their tray (the set is the frame they're placed in) */
  .ss--gal .it.mbset { width: 100%; max-width: 420px; }
}

/* ---- round 2 (phones + tablets) ---- */
/* about: the roadside board stands on the strip of soil between the grass and the road. The backdrop is drawn
   "cover" from the bottom, and that soil strip is 25% of its height up from the bottom edge (a wide screen draws
   the backdrop taller than the box, hence the vw term). Anything showing under a see-through browser bar is road-coloured. */
@media (hover: none) and (pointer: coarse) {
  .cboard { bottom: max(24.6%, 13.85vw); }
  .about__bg { animation: none; background-position: 50% 100%; }   /* backdrop stays still on phones / tablets, so the board stays planted */
  .about { background: #34392d; }
}
@media (max-width: 600px) {
  /* "Key arts" credit line: centred under its heading like the other text */
  .ss--gal .tx.keyarts { translate: none; left: auto; width: 100%; white-space: normal; text-align: center; font-size: 12px; }
  /* bumper: only its solid bar takes up room; the soft shadow above and below lies over the pictures next to it */
  .bumper { overflow: visible; height: calc(var(--vw, 100vw) * 188 / 2880); }
  .bumper img { top: calc(var(--vw, 100vw) * -23 / 2880); height: calc(var(--vw, 100vw) * 242 / 2880); }
  /* projects: zoomed in so the road and the truck fill the screen (the grass verges go off the sides) */
  .drive { --pu: calc(var(--vw, 100vw) / 1060); }
  .clouds { top: calc(-180 * var(--pu)); }   /* phones: clouds sit a little lower so the FM screen on the dashboard stays clear (still covers the cab's bottom edge) */
  .clouds__txt { left: 50%; width: calc(var(--vw, 100vw) * .92); translate: -50% 0; }
  /* footer: zoomed in a little so the truck's back is bigger, still all on screen */
  .foot { --pu: calc(var(--vw, 100vw) / 980); }
}

/* nav bar on phones / upright tablets: the artwork's blue end-strip only showed on the left, so the bar is
   nudged left until it's just off screen (wide layouts show both ends and stay as they are) */
@media (max-width: 900px) {
  .nav__canvas { background-position: -8px top; }
}

/* iPads held upright (touch, 601–900px wide): there is room for the full dashboard bar, so it uses the
   desktop bar (all buttons, mirror and charms on the bar, no menu button), scaled to the screen width */
@media (hover: none) and (pointer: coarse) and (min-width: 601px) and (max-width: 900px) {
  :root { --nav-h: calc(118 * var(--u)); }
  .nav { --u: calc(min(var(--vw, 100vw), 5120px) / 1440); }
  .nav__canvas { width: calc(1440 * var(--u)); display: block; padding: 0; background: none; overflow-x: visible; }
  .nav__bg, .mirror, .nimbu { display: block; }
  .nav__item, .nav__links .nav__item { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u)); }
  .cv { width: calc(var(--w) * var(--u)); height: calc(64.6 * var(--u)); order: 0; align-self: auto; }
  .cv__closed, .cv__open, .cv__pressed { width: 100%; }
  .tv { translate: none; order: 0; }
  .tv img { width: 100%; }
  .nav__toggle { display: none; }
  .nav__links { display: contents; visibility: visible; opacity: 1; transform: none; transition: none; }
}

/* opening shutter on an upright iPad: the tall phone artwork (sharper than enlarging the wide one) fills the whole
   screen, pinned to the top so the board shows in full; the locks at the very bottom may be cut off */
@media (hover: none) and (pointer: coarse) and (min-width: 701px) and (max-aspect-ratio: 4/5) {
  .intro { --iw: max(100vw, calc(100lvh * .5628)); --ih: max(100lvh, calc(100vw * 1.777)); }
  .intro__frames, .intro__banner img { left: 50%; translate: -50% 0; }
}

/* opening shutter: "tap / click to open" sign, hung on the shutter until the visitor opens it */
.intro__tap {
  position: absolute; left: 50%; bottom: 13%; translate: -50% 0; z-index: 3;
  padding: .7em 1.6em; border: 3px solid #0a2f8a; border-radius: 999px; cursor: pointer;
  background: #ffe9a8; color: #0a2f8a; box-shadow: 0 4px 0 #0a2f8a, 0 10px 24px rgba(0,0,0,.25);
  font: 800 clamp(13px, 1.4vw, 20px)/1 "Anek Latin", system-ui, sans-serif; font-stretch: 125%; letter-spacing: .01em; text-transform: uppercase;
  opacity: 0; transition: opacity .4s ease, transform .3s ease;
}
.intro.is-waiting .intro__tap { opacity: 1; animation: tapNudge 1.6s ease-in-out infinite .6s; }
.intro__tap:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.intro__tap.is-gone { opacity: 0 !important; animation: none !important; pointer-events: none; }
@keyframes tapNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .intro.is-waiting .intro__tap { animation: none; } }
@media (hover: none) and (pointer: coarse) { .intro__tap { font-size: clamp(15px, 2.3vw, 22px); bottom: 15%; } }
/* wide, short browser windows (e.g. 1920 x 870): the artwork is cropped at the bottom, so "Welcome" sits low; the sign
   keeps its usual spot (13% up from the bottom) unless that would cover the lettering, which ends ~69% down the artwork */
@media (hover: hover) and (min-aspect-ratio: 16/9) {
  .intro__tap { bottom: auto; top: max(calc(87% - 2.4em - 6px), calc(var(--ih) * .705)); }
}
/* phones and upright tablets use the tall shutter artwork: the sign hangs just under the "Welcome" lettering
   (which ends 62% of the way down that artwork) instead of being measured from the screen's bottom */
@media (max-width: 700px) and (max-aspect-ratio: 4/5), (hover: none) and (pointer: coarse) and (max-aspect-ratio: 4/5) {
  .intro__tap { bottom: auto; top: min(calc(var(--ih) * .685), calc(100svh - 70px)); }
}

/* touch screens: wheels turn exactly as far as the truck travels (worked out in js/main.js) */
@media (hover: none) and (pointer: coarse) {
  .about.evenDrive .wheel { rotate: var(--wr, 0deg); }
}
/* phones on their side: the scene is only ~400px tall, so it no longer insists on 620px (that cut the bottom off);
   the truck is sized to fit between the nav bar and the road, and the board stands on the roadside as usual */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
  .about__sticky { min-height: 0; }
  .about__road { --tw: min(94vw, calc((100svh - var(--nav-h) - 10px - 5svh) * 2.477)); --ml: calc(98.5vw - 0.974 * var(--tw));
                 padding-top: calc(var(--nav-h) + 10px); padding-bottom: calc(3svh + 100lvh - 100svh); }
  .cboard { width: min(30vw, 44svh); }
}
