/* Rupesh Durairaj site.
   Base rules are the static, stacked layout (mobile, reduced motion, no JS).
   html.is-motion (added by main.js on wide screens) switches sections to their pinned layouts. */

:root {
  --steel: #DFE3E6;
  --steel-2: #C3CBD1;
  --whites: #F7F8F8;
  --carbon: #16181B;
  --carbon-2: #262A30;
  --rosso: #D2101D;
  --rosso-2: #9E0A14;
  --saffron: #F5B301;
  --gutter: clamp(20px, 3.2vw, 48px);
  --sans: 'Archivo', system-ui, sans-serif;
  --menu: 'Cormorant', Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --cutmax: 4.5vw;   /* how far a diagonal section edge rises across the screen, and so how far it overlaps the section above */
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
html.is-loading, html.is-loading body { overflow: hidden; }
body {
  font-family: var(--sans);
  font-stretch: 100%;
  line-height: 1.5;
  color: var(--carbon);
  background: var(--carbon);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus, var(--saffron)); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--saffron); color: var(--carbon); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Textures ---------- */
.tx-steel {
  --focus: var(--carbon);
  background-color: var(--steel);
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 2px, rgba(22, 24, 27, .022) 2px 3px),
    linear-gradient(100deg, rgba(255, 255, 255, .5), transparent 30%, rgba(22, 24, 27, .05) 55%, rgba(255, 255, 255, .35) 80%, rgba(22, 24, 27, .04));
}
.tx-carbon {
  background-color: var(--carbon);
  background-image:
    linear-gradient(45deg, #1F2328 25%, transparent 25%, transparent 75%, #1F2328 75%),
    linear-gradient(45deg, #1F2328 25%, transparent 25%, transparent 75%, #1F2328 75%);
  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
}
.grain {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Display type ---------- */
.giant {
  display: inline-block;
  font-weight: 900;
  font-stretch: 62%;
  text-transform: uppercase;
  letter-spacing: -.012em;
  transform: skewX(calc(var(--skew, 0) * 1deg));
  transform-origin: 50% 100%;
}
.mask { display: block; overflow: hidden; line-height: .84; padding-top: .04em; }
.rise { display: block; }
/* avoid-ai-design-ignore: C6 (single-colour halftone dots clipped to the type, not a colour gradient) */
.halftone {
  color: transparent;
  background: radial-gradient(circle, var(--dot, currentColor) 0 36%, transparent 38%) 0 0 / .03em .03em;
  -webkit-background-clip: text; background-clip: text;
  -webkit-mask-image: linear-gradient(#000 35%, rgba(0, 0, 0, .4)); mask-image: linear-gradient(#000 35%, rgba(0, 0, 0, .4));
}

/* ---------- Placeholders (swap for real images) ---------- */
.ph {
  position: relative; display: grid; place-items: center; overflow: hidden; margin: 0;
  background: repeating-linear-gradient(135deg, var(--steel-2) 0 12px, #B3BCC3 12px 24px);
  color: var(--carbon);
}
.ph::after {
  content: attr(data-slot);
  font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center;
  background: var(--whites); padding: 5px 9px; max-width: 86%;
}
.ph--cut, .arch { border-radius: 48% 48% 0 0 / 32% 32% 0 0; }
/* clip-path as well as overflow: some browsers drop the rounded clip once the frame holds a playing video */
.arch { overflow: hidden; margin: 0; clip-path: inset(0 round 48% 48% 0 0 / 32% 32% 0 0); }

/* ---------- Real images in the slots ---------- */
.shot { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.polaroid .shot { height: auto; aspect-ratio: 4 / 5; }

/* ---------- Sunglasses: the intro video plays through the lens ---------- */
/* The hero image has a transparent lens. .shades__video sits behind it, a little larger than the hole.
   The four numbers come from tools/key_lens.py (hole: left 21.64%, top 32.45%, width 56.73%, height 16.02%). */
.shades { position: relative; }
.shades .shot { position: relative; }
.shades__video {
  position: absolute; left: 20.6%; top: 31.4%; width: 58.8%; height: 18.1%; overflow: hidden;
  background: linear-gradient(115deg, var(--carbon) 10%, var(--rosso-2) 55%, var(--saffron) 120%);   /* mirrored tint until the video is in */
}
.shades__video iframe {
  position: absolute; top: 50%; left: 50%; width: 640px; height: 360px; border: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--lens-scale, .5));   /* main.js sets the scale so the player covers the lens */
}
.shades__video::after {   /* glass sheen over the video */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, rgba(255, 255, 255, .3), transparent 36%, rgba(22, 24, 27, .38));
}
.ph--round { border-radius: 50%; }

.polaroid {
  position: relative; margin: 0; background: var(--whites); color: var(--carbon); padding: 12px 12px 46px;
  box-shadow: 0 1px 0 rgba(22, 24, 27, .3), 0 26px 44px -18px rgba(22, 24, 27, .6);
}
.polaroid .ph { aspect-ratio: 4 / 5; }
.polaroid figcaption { position: absolute; left: 14px; right: 14px; bottom: 12px; font-size: 14px; font-weight: 700; font-stretch: 108%; }

.rows { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 10px; }
.rows dt { opacity: .6; }
.rows dd { font-weight: 600; }

.marquee { overflow: hidden; white-space: nowrap; border-top: 1px solid rgba(247, 248, 248, .16); }
.marquee__in {
  display: inline-flex; gap: 2.2em; padding: 14px 0;
  font-weight: 800; font-stretch: 112%; text-transform: uppercase; font-size: 15px;
  animation: marquee 30s linear infinite;
}
.marquee__in span::after {
  content: ''; display: inline-block; width: .5em; height: .5em; margin-left: 2.2em; vertical-align: middle;
  background: var(--saffron); transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Loader ---------- */
/* The footer's carbon weave (.tx-carbon on the element) with one thing on it: the name, drawn as line art
   while the page loads and filled when it is ready. The load reads as one lap: a racing line under the name,
   in three sectors. The loader's small type is set the way F1 titles are (capitals, tracked), which was asked for. */
.lights { display: none; }
.js .lights {
  --f1: 'Goldman', 'Archivo', sans-serif;   /* open-licensed stand-in for the F1 titles' typeface, which is proprietary */
  --name: min(12.4vw, 30vh);                /* font size of the name */
  --name-w: calc(var(--name) * 6.6);        /* its drawn width: 6.6em in Archivo at this weight and width */
  --under: calc(44% + var(--name) * .4);    /* just under the letters */
  --p: 0;                                   /* load progress, 0 to 1, set by main.js */
  display: block; position: fixed; inset: 0; z-index: 100; color: var(--whites);
  transition: transform 1s cubic-bezier(.76, 0, .24, 1);
  animation: lights-failsafe 0s linear 9s forwards; /* if the scripts never load, get out of the way */
}
/* diagonal trailing edge for the wipe out, same angle as the section cuts */
.js .lights::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: var(--cutmax);
  background: inherit; clip-path: polygon(0 0, 100% 0, 0 100%);
}
.lights.is-out { transform: translateY(calc(-100% - var(--cutmax))); }

/* The name. Each letter's outline is one long dash, pulled into view by --d, letter after letter.
   It leans forward the way race graphics do. */
.lights__art { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .35s; }
.lights__art text {
  font-family: 'Archivo', sans-serif; font-weight: 800; font-stretch: 62%; font-size: var(--name);
  text-anchor: middle; dominant-baseline: central;
  fill: transparent; stroke: var(--whites); stroke-width: 1.25px; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: 50% 50%; transform: skewX(-9deg);
}
.lights__art tspan {
  --d: clamp(0, calc(var(--p) * 2.4 - var(--i) * .1), 1);
  stroke-dasharray: 5em; stroke-dashoffset: calc(5em * (1 - var(--d)));
  transition: fill .5s calc(var(--i) * 35ms);
}
.lights.is-ready .lights__art tspan { fill: var(--whites); }

/* The racing line: a hairline as wide as the name, red up to the car. */
.lights__lap {
  position: absolute; left: 50%; top: calc(var(--under) + 28px); width: var(--name-w); height: 1px; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(247, 248, 248, .16); font-family: var(--f1); transition: opacity .35s;
}
.lights__lap::before { content: ''; position: absolute; inset: -.5px 0; background: var(--rosso); transform-origin: 0 50%; transform: scaleX(var(--p)); }
.lights__car { position: absolute; left: calc(var(--p) * 100%); top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--rosso); }
/* a tick and a label at the end of each sector; the label brightens once the car has passed it */
.lights__lap span {
  position: relative; padding-top: 14px; margin-right: -.2em; text-align: right; font-size: 10px; line-height: 1; letter-spacing: .2em;
  opacity: clamp(.35, calc((var(--p) - var(--at)) * 100 + 1), 1);
}
.lights__lap span::before { content: ''; position: absolute; right: .2em; top: -3px; width: 1px; height: 7px; background: currentColor; }

/* Shown when the lap is done. */
.lights__go { position: absolute; left: 0; right: 0; top: calc(var(--under) + 92px); display: grid; justify-items: center; gap: 20px; transition: opacity .35s; }
.lights__go[hidden] { display: none; }
/* avoid-ai-design-ignore: SD4 (F1 title styling asked for on the loader) */
.lights__btn {   /* an outline, so the name stays the brightest thing on screen; it fills on hover */
  width: 220px; height: 52px; border-radius: 2px; border: 1px solid rgba(247, 248, 248, .4); background: transparent; color: var(--whites);
  font-family: var(--f1); font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; padding-left: .18em;
  transition: background-color .25s, color .25s, border-color .25s;
}
.lights__btn:hover, .lights__btn:focus-visible { background: var(--whites); color: var(--carbon); border-color: var(--whites); }
.lights__skip { font-weight: 500; font-size: 12px; opacity: .55; transition: opacity .2s; }
.lights__skip:hover, .lights__skip:focus-visible { opacity: 1; }

/* One counter and the current sector, bottom left. */
.lights__hud { position: absolute; left: 48px; bottom: 48px; display: flex; align-items: baseline; gap: 14px; font-family: var(--f1); transition: opacity .35s; }
.lights__count { font-weight: 700; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
/* avoid-ai-design-ignore: SD4 (F1 title styling asked for on the loader) */
.lights__label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .5; }

/* type waits for the webfont so the loader never flashes a fallback face */
html:not(.fonts-in) :is(.lights__art, .lights__lap, .lights__go, .lights__hud) { opacity: 0; }
.lights.is-out :is(.lights__lap, .lights__go, .lights__hud) { opacity: 0; }
@media (max-width: 767.98px) {
  .lights__hud { left: 20px; bottom: 24px; }
}
@keyframes lights-failsafe { to { visibility: hidden; } }

/* ---------- Header and menu ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter); color: var(--whites); pointer-events: none; transition: color .35s;
}
.bar > * { pointer-events: auto; }
html[data-tone=light] .bar, html[data-tone=saffron] .bar { color: var(--carbon); --focus: var(--carbon); }
html.menu-open .bar { color: var(--whites); --focus: var(--saffron); }
.bar__mark {
  font-weight: 900; font-stretch: 62%; font-size: 26px; line-height: 1; text-decoration: none;
  border: 2.5px solid currentColor; padding: 5px 8px 4px; transform: skewX(-10deg);
}
.bar__name { font-weight: 700; font-stretch: 112%; font-size: 15px; }
.bar__menu { display: flex; align-items: center; gap: 10px; font-weight: 700; font-stretch: 112%; font-size: 15px; padding: 8px 0; }
.bar__bars { position: relative; width: 30px; height: 12px; }
.bar__bars::before, .bar__bars::after {
  content: ''; position: absolute; left: 0; right: 0; height: 3px; background: currentColor;
  transform: skewX(-24deg); transition: transform .35s var(--ease), top .35s var(--ease), left .35s var(--ease);
}
.bar__bars::before { top: 0; }
.bar__bars::after { top: 9px; left: 6px; }
.menu-open .bar__bars::before { top: 4.5px; transform: rotate(22deg); }
.menu-open .bar__bars::after { top: 4.5px; left: 0; transform: rotate(-22deg); }

.menu {
  position: fixed; inset: 0; z-index: 65; color: var(--whites); overflow-y: auto;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: 96px var(--gutter) 36px;
  clip-path: circle(0 at calc(100% - var(--gutter) - 15px) 38px);
  visibility: hidden;
  transition: clip-path .7s var(--ease), visibility 0s .7s;
}
.menu-open .menu {
  clip-path: circle(150% at calc(100% - var(--gutter) - 15px) 38px);
  visibility: visible;
  transition: clip-path .8s var(--ease), visibility 0s;
}
.menu ul { display: grid; gap: 2px; }
.menu li a {
  display: inline-block; font-weight: 900; font-stretch: 62%; text-transform: uppercase; text-decoration: none;
  font-size: clamp(40px, 8.6vh, 104px); line-height: .92;
  transition: font-stretch .45s var(--ease), color .2s;
}
.menu li a:hover, .menu li a:focus-visible { font-stretch: 100%; color: var(--saffron); }
.menu__foot { display: flex; gap: 24px; font-weight: 600; }

/* ---------- Sound toggle ---------- */
.sound {
  position: fixed; right: var(--gutter); bottom: 18px; z-index: 70;
  display: flex; align-items: center; gap: 9px; padding: 9px 4px;
  color: var(--whites); font-weight: 700; font-stretch: 112%; font-size: 13px; transition: color .35s;
}
html[data-tone=light] .sound, html[data-tone=saffron] .sound { color: var(--carbon); --focus: var(--carbon); }
html.menu-open .sound { color: var(--whites); --focus: var(--saffron); }
.sound__bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.sound__bars i { width: 3px; height: 100%; background: currentColor; transform-origin: 50% 100%; animation: sound-bar .9s ease-in-out infinite alternate; }
.sound__bars i:nth-child(2) { animation-delay: -.35s; }
.sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed=false] .sound__bars i { animation: none; transform: scaleY(.2); }
@keyframes sound-bar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@media (max-width: 767.98px) { .sound__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }

/* ---------- Entry video ---------- */
.entry { position: relative; z-index: 0; height: 100svh; overflow: hidden; background: #000; color: var(--whites); }
.entry__video { position: absolute; inset: 0; background: center / cover no-repeat; }
.entry__video iframe {
  position: absolute; top: 50%; left: 50%; border: 0; pointer-events: none;
  width: max(100vw, 177.78svh); height: max(100svh, 56.25vw);
  transform: translate(-50%, -50%) scale(calc(1.2 * var(--push, 1))); /* crops the player chrome; main.js eases --push at the start */
}
.entry::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(22, 24, 27, .5), transparent 28%, transparent 62%, rgba(22, 24, 27, .8));
  opacity: var(--shade, 1);
}
.entry__cue { position: absolute; left: 50%; bottom: 26px; z-index: 1; transform: translateX(-50%); font-weight: 700; font-stretch: 112%; font-size: 14px; text-align: center; }
.entry__cue::after { content: ''; display: block; width: 2px; height: 38px; margin: 8px auto 0; background: currentColor; transform-origin: 50% 0; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.entry__credit { position: absolute; left: var(--gutter); bottom: 26px; z-index: 1; font-size: 12px; opacity: .75; }
/* With motion on, the video lies over the hero and zooms into the sunglasses as you scroll (entry() in main.js).
   The mask has two layers: the lens shape (tools/lens_mask.py), and a veil over the whole frame. As --veil
   goes to 0, only the lens shape is left. */
.is-motion .entry { z-index: 3; background: none; pointer-events: none; }
.is-motion .hero { margin-top: -100svh; }
.is-motion .entry__video {
  --veil: 1;
  -webkit-mask: url(assets/lens-mask.webp) center / var(--lens-w, 0px) var(--lens-h, 0px) no-repeat, linear-gradient(rgba(0, 0, 0, var(--veil)), rgba(0, 0, 0, var(--veil)));
  mask: url(assets/lens-mask.webp) center / var(--lens-w, 0px) var(--lens-h, 0px) no-repeat, linear-gradient(rgba(0, 0, 0, var(--veil)), rgba(0, 0, 0, var(--veil)));
}

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 110px var(--gutter) 0; }
.hero__namewrap { text-align: center; line-height: 0; }
.hero__name {
  display: inline-block; white-space: nowrap; font-size: 13vw; line-height: .8;
  font-weight: 900; font-stretch: calc(var(--wdth, 62) * 1%); text-transform: uppercase; letter-spacing: -.012em;
}
.hero__left { display: flex; gap: 18px; align-items: center; max-width: 42ch; }
.hero__left p { font-weight: 600; font-size: 15px; line-height: 1.35; }
.minicard {
  flex: 0 0 auto; width: 112px; aspect-ratio: 3 / 4; padding: 10px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--carbon); color: var(--whites); border: 3px solid var(--saffron); border-radius: 8px;
  transform: rotate(-6deg);
}
.minicard__year { font-weight: 900; font-stretch: 62%; font-size: 46px; line-height: .8; }
.minicard__role { font-size: 12px; font-weight: 600; line-height: 1.2; }
.hero__portrait { width: min(78vw, 440px); aspect-ratio: 1100 / 1473; justify-self: center; }   /* the image's own ratio, so the lens overlay lines up */
.hero__intro { max-width: 44ch; padding-bottom: calc(var(--cutmax) + 24px); }
.hero__line { font-weight: 900; font-stretch: 70%; font-size: clamp(34px, 4.2vw, 62px); line-height: .95; margin-bottom: 14px; }
.hero__intro p + p { margin-top: 10px; }

/* ---------- Career laps ---------- */
.laps {
  position: relative; z-index: 2; color: var(--whites);
  margin-top: calc(var(--cutmax) * -1);
  clip-path: polygon(0 var(--cut, var(--cutmax)), 100% 0, 100% 100%, 0 100%);
}
.laps__pin { position: relative; padding: calc(var(--cutmax) + 40px) 0 64px; }
.laps__title { padding-inline: var(--gutter); font-size: 17.4vw; white-space: nowrap; --dot: var(--rosso); }
.laps__sub { padding: 10px var(--gutter) 28px; font-weight: 600; font-stretch: 108%; }
.laps__years { display: none; }
.laps__track { display: flex; gap: 22px; overflow-x: auto; padding: 8px var(--gutter) 24px; scroll-snap-type: x mandatory; }
.lap { flex: 0 0 min(72vw, 300px); scroll-snap-align: center; }
.lap__art {
  aspect-ratio: 3 / 4; place-items: end start; padding: 14px; color: var(--whites);
  border: 3px solid var(--saffron); border-radius: 10px;
  background: repeating-linear-gradient(135deg, #2B3037 0 14px, #22262B 14px 28px);
}
.lap__art::after { position: absolute; top: 10px; left: 10px; color: var(--carbon); }
.lap__art:not(.ph) { position: relative; display: grid; overflow: hidden; }
.lap__art .shot { position: absolute; inset: 0; object-position: 50% 0; }
.lap__art .lap__year { position: relative; text-shadow: 0 2px 18px rgba(22, 24, 27, .8); }
.lap__year { font-weight: 900; font-stretch: 62%; font-size: clamp(64px, 7vw, 104px); line-height: .78; }
.lap h3 { font-weight: 800; font-stretch: 112%; font-size: 19px; line-height: 1.15; margin-top: 16px; }
.lap p { font-size: 14px; line-height: 1.4; opacity: .82; margin-top: 6px; }

/* ---------- Quote ---------- */
.quote { position: relative; z-index: 2; background: var(--saffron); color: var(--carbon); --focus: var(--carbon); }
.quote__pin { position: relative; padding: 18vh var(--gutter); }
.quote__fig { text-align: center; }
.quote__text {
  max-width: 9.5em; margin-inline: auto; text-wrap: balance;
  font-weight: 900; font-stretch: 66%; font-size: clamp(46px, 9vw, 168px); line-height: .88; letter-spacing: -.01em;
}
.quote__text::before { content: '\201C'; display: block; height: .42em; font-size: 1.1em; line-height: .6; color: var(--rosso); }
.quote__src { margin-top: 26px; font-weight: 600; }
.quote__stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 56px; }

/* ---------- Kitchen ---------- */
.kitchen { position: relative; z-index: 2; color: var(--whites); }
.kitchen__pin { position: relative; padding: 14vh 0 0; overflow: hidden; }
.kitchen__title { padding-inline: var(--gutter); font-size: 17.4vw; white-space: nowrap; --dot: var(--saffron); }
.kitchen__grid { display: grid; gap: 32px; padding: 32px var(--gutter) 48px; }
.menucard {
  max-width: 340px; padding: 22px 22px 26px; background: var(--whites); color: var(--carbon);
  transform: rotate(-2deg); box-shadow: 0 28px 46px -22px #000;
}
.menucard__head { font-weight: 800; font-stretch: 112%; font-size: 13px; border-bottom: 2px solid var(--carbon); padding-bottom: 8px; margin-bottom: 10px; }
.dish { display: grid; gap: 2px; padding: 9px 0 9px 14px; border-left: 4px solid transparent; }
.dish__name { font-family: var(--menu); font-style: italic; font-weight: 700; font-size: 32px; line-height: 1; }
.dish__note { font-size: 14px; line-height: 1.35; }
.plates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 520px; }
.plate {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, var(--whites) 0 56%, var(--steel) 57% 61%, var(--whites) 62% 100%);
  box-shadow: 0 30px 50px -18px #000;
}
.plate .ph { width: 58%; aspect-ratio: 1; }
.kitchen__lead { font-weight: 700; font-stretch: 104%; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.25; max-width: 20ch; }
.kitchen__count { display: none; }
#dish-n { font-weight: 900; font-stretch: 62%; font-size: 96px; line-height: .8; color: var(--saffron); }
.kitchen__of { font-weight: 700; }
.kitchen__cook { width: min(60vw, 300px); aspect-ratio: 3 / 4; margin-top: 24px; }

/* ---------- Paddock ---------- */
.paddock { position: relative; z-index: 2; background: var(--rosso); color: var(--whites); }
.paddock__pin { position: relative; padding: 14vh var(--gutter) 64px; overflow: hidden; }
.paddock__title { font-size: 17.4vw; white-space: nowrap; }
.paddock__grid { display: grid; gap: 36px; margin-top: 28px; }
.paddock__lead { font-weight: 700; font-stretch: 104%; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.25; max-width: 26ch; }
.tower { margin-top: 26px; max-width: 420px; padding: 18px 20px 20px; background: var(--carbon); font-variant-numeric: tabular-nums; }
.tower__lap { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid rgba(247, 248, 248, .2); }
.tower__lap span { font-weight: 600; font-size: 14px; }
#lap-time { font-weight: 800; font-size: 44px; line-height: 1; }
.sector { display: grid; grid-template-columns: 12px 8.5em 1fr; gap: 12px; align-items: center; padding-top: 10px; font-size: 15px; }
.sector::before { content: ''; width: 12px; height: 12px; background: rgba(247, 248, 248, .25); transition: background-color .2s; }
.sector.done::before { background: var(--saffron); }
.sector dt { font-weight: 700; }
.sector dd { opacity: .82; }
.paddock__track { position: relative; }
.circuit { width: 100%; height: auto; overflow: visible; margin-top: 8px; }
.circuit path, .circuit line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* Thin strokes: the marina section's corners sit only a few units apart. */
.circuit__bed { stroke: var(--rosso-2); stroke-width: 11; }
.circuit__line { stroke: var(--whites); stroke-width: 3; }
.circuit__grid { stroke: var(--whites); stroke-width: 3.5; }
.circuit__car { fill: var(--saffron); stroke: var(--carbon); stroke-width: 3; transform: translate(333.5px, 155.7px); } /* start line; main.js takes over in motion mode */
.paddock__portrait { width: min(44vw, 220px); aspect-ratio: 4 / 5; margin-top: 18px; border: 10px solid var(--whites); border-bottom-width: 34px; transform: rotate(4deg); }

/* ---------- Writing ---------- */
.writing { position: relative; z-index: 2; padding: 16vh var(--gutter) 12vh; }
.writing__head { display: grid; gap: 14px; margin-bottom: 36px; }
.writing__head h2 { font-size: clamp(72px, 17vw, 300px); }
.writing__head p { max-width: 40ch; font-weight: 600; font-size: 19px; }
.strip { display: grid; gap: 10px; }
.piece { position: relative; display: block; overflow: hidden; min-height: 150px; padding: 22px; border-radius: 6px; text-decoration: none; }
.piece--carbon { background: var(--carbon); color: var(--whites); }
.piece--rosso { background: var(--rosso); color: var(--whites); }
.piece--saffron { background: var(--saffron); color: var(--carbon); }
.piece::before {
  content: ''; position: absolute; inset: 0; opacity: .14;
  background: radial-gradient(circle, currentColor 0 30%, transparent 32%) 0 0 / 9px 9px;
  -webkit-mask-image: linear-gradient(200deg, #000, transparent 55%); mask-image: linear-gradient(200deg, #000, transparent 55%);
}
.piece__tab { display: none; }
.piece__body { position: relative; display: grid; gap: 8px; max-width: 34ch; }
.piece__date { font-size: 13px; font-weight: 600; opacity: .85; }
.piece__title { font-weight: 800; font-stretch: 88%; font-size: clamp(22px, 2vw, 30px); line-height: 1.05; }
.piece__sum { font-size: 15px; line-height: 1.4; }
.piece__go { margin-top: 6px; font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Off the clock ---------- */
.reel { position: relative; z-index: 2; padding: 4vh 0 16vh; overflow: hidden; }
.reel__head { display: grid; gap: 10px; padding: 0 var(--gutter); margin-bottom: 40px; }
.reel__head h2 { font-size: clamp(60px, 13vw, 230px); }
.reel__hint { font-weight: 600; }
.reel__view { overflow-x: auto; padding: 24px 0 34px; }
.reel__track { display: flex; gap: clamp(18px, 3vw, 44px); width: max-content; padding: 0 var(--gutter); }
.reel .polaroid { flex: 0 0 auto; width: clamp(220px, 24vw, 340px); transform: rotate(var(--rot, 0deg)); }

/* ---------- Footer ---------- */
.foot { position: relative; z-index: 2; color: var(--whites); padding: 16vh 0 0; overflow: hidden; }
.foot__main { position: relative; z-index: 1; display: grid; gap: 22px; justify-items: start; padding: 0 var(--gutter); }
.foot__line { font-size: clamp(54px, 9.4vw, 190px); }
.foot__line .giant { max-width: 5.2em; }   /* breaks the line after "paper": two lines at every size */
.foot__lead { max-width: 36ch; font-size: 19px; font-weight: 600; }
.pill {
  display: inline-block; padding: 16px 28px; border-radius: 999px; background: var(--saffron); color: var(--carbon);
  font-weight: 800; font-stretch: 108%; text-decoration: none; transition: font-stretch .35s var(--ease);
}
.pill:hover, .pill:focus-visible { font-stretch: 125%; }
.foot__portrait { width: min(70vw, 360px); aspect-ratio: 3 / 4; margin: 40px auto 0; }
.foot__nav { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 36px var(--gutter); font-weight: 700; }
.foot__nav a { text-decoration: none; }
.foot__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__small { padding: 14px var(--gutter) 22px; font-size: 13px; opacity: .75; }

/* ---------- Wide screens: layouts that do not depend on motion ---------- */
@media (min-width: 768px) {
  /* The player is rendered at twice the size and scaled back, so YouTube serves a sharper stream. */
  .entry__video iframe { width: calc(max(100vw, 177.78svh) * 2); height: calc(max(100svh, 56.25vw) * 2); transform: translate(-50%, -50%) scale(calc(.6 * var(--push, 1))); }

  .hero { min-height: 100svh; grid-template-columns: minmax(0, 1fr) minmax(0, 44vw) minmax(0, 1fr); align-items: end; gap: 3vw; padding-top: 0; }
  .hero__namewrap { position: absolute; inset: 15vh var(--gutter) auto; }
  .hero__left { grid-column: 1; grid-row: 1; flex-direction: column; align-items: flex-start; max-width: 24ch; padding-bottom: calc(var(--cutmax) * .35 + 5vh); }
  .hero__portrait { grid-column: 2; grid-row: 1; width: min(100%, 520px, 55.2svh); }   /* 55.2svh wide is 74svh tall */
  .hero__intro { grid-column: 3; grid-row: 1; padding-bottom: calc(var(--cutmax) + 5vh); }

  .strip { display: flex; height: min(58vh, 520px); }
  .strip li { flex: 1 1 0; min-width: 0; display: flex; transition: flex-grow .65s var(--ease); }
  .piece { flex: 1; min-height: 0; display: flex; align-items: flex-end; }
  .piece__tab {
    display: block; position: absolute; left: 18px; bottom: 20px; white-space: nowrap;
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-weight: 800; font-stretch: 112%; font-size: 17px; transition: opacity .25s;
  }
  .piece__body { flex: 0 0 auto; width: min(34ch, 30vw); opacity: 0; transition: opacity .25s; }
  /* open column: hovered, focused, or the first one while nothing is hovered */
  .strip li:hover, .strip li:focus-within, .strip:not(:hover):not(:focus-within) li:first-child { flex-grow: 4.4; }
  .strip li:hover .piece__body, .strip li:focus-within .piece__body, .strip:not(:hover):not(:focus-within) li:first-child .piece__body { opacity: 1; transition-delay: .25s; }
  .strip li:hover .piece__tab, .strip li:focus-within .piece__tab, .strip:not(:hover):not(:focus-within) li:first-child .piece__tab { opacity: 0; }

  /* Footer: headline and links on the left, the portrait in its own column on the right, and the
     marquee and small print full width underneath, so nothing sits on top of anything else. */
  .foot { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto auto; column-gap: 4vw; }
  .foot__main { grid-column: 1; grid-row: 1; align-self: center; }
  .foot__line { font-size: clamp(54px, min(11vw, 17vh), 220px); }   /* two lines, sized to fit the left column */
  .foot__portrait { grid-column: 2; grid-row: 1 / 3; align-self: end; width: min(46svh, 34vw); margin: 0 var(--gutter) 0 0; }
  .foot__nav { grid-column: 1; grid-row: 2; }
  .foot .marquee, .foot__small { grid-column: 1 / -1; }
}

/* ---------- Motion mode: pinned layouts ---------- */
.is-motion .laps__pin { height: 100svh; padding: 0; overflow: hidden; }
.is-motion .laps__title { position: absolute; inset: 11vh 0 auto; padding: 0; text-align: center; font-size: min(17.4vw, 30vh); }   /* height cap for wide, short screens */
.is-motion .laps__sub { position: absolute; left: var(--gutter); bottom: 20px; z-index: 2; padding: 0; }
.is-motion .laps__years {
  display: flex; gap: 30vw; position: absolute; left: 36vw; bottom: 7vh; white-space: nowrap;
  font-weight: 900; font-stretch: 62%; font-size: 17vh; line-height: .8; color: rgba(247, 248, 248, .09);
}
.is-motion .laps__track {
  position: relative; z-index: 1; overflow: visible; width: max-content; height: 100%;
  gap: 6vw; padding: 17vh 16vw 0 34vw; align-items: flex-start; scroll-snap-type: none;
}
.is-motion .lap__art { aspect-ratio: 4 / 5; }
.is-motion .laps__track::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 6vh; height: 14px;
  background:
    linear-gradient(rgba(247, 248, 248, .3), rgba(247, 248, 248, .3)) 0 100% / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, rgba(247, 248, 248, .3) 0 2px, transparent 2px 6vw);
}
.is-motion .lap {
  flex-basis: max(190px, min(17.5vw, 29vh)); margin-top: var(--drop); scroll-snap-align: none;
  transform: rotate(calc(var(--rot, 0deg) + var(--skew, 0) * .4deg));
}

.is-motion .quote__pin { height: 100svh; padding: 0 var(--gutter); display: grid; place-items: center; overflow: hidden; }
.is-motion .quote__stack { position: absolute; inset: 0; display: block; margin: 0; pointer-events: none; }
.is-motion .quote__stack .polaroid { position: absolute; left: 50%; top: 50%; width: clamp(240px, 25vw, 380px); }

.is-motion .kitchen__pin { height: 100svh; padding: 0; }
.is-motion .kitchen__title { position: absolute; inset: 11vh 0 auto; padding: 0; text-align: center; font-size: min(17.4vw, 30vh); }
.is-motion .kitchen__grid {
  position: absolute; inset: 27vh 0 52px; padding: 0 var(--gutter);
  grid-template-columns: minmax(0, 26vw) minmax(0, 1fr) minmax(0, 24vw); align-items: center; gap: 3vw;
}
.is-motion .dish { opacity: .34; transition: opacity .35s, border-color .35s; }
.is-motion .dish.is-active { opacity: 1; border-left-color: var(--rosso); }
.is-motion .plates { position: relative; display: block; width: min(52vh, 30vw); max-width: none; aspect-ratio: 1; justify-self: center; }
.is-motion .plate { position: absolute; inset: 0; }
.is-motion .kitchen__side { position: relative; align-self: stretch; padding-top: 13vh; }
.is-motion .kitchen__count { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; font-variant-numeric: tabular-nums; }
.is-motion .kitchen__cook { position: absolute; right: 0; bottom: 0; width: min(100%, 30vh); margin: 0; }
.is-motion .kitchen .marquee { position: absolute; left: 0; right: 0; bottom: 0; }

/* --title is the headline size (capped by height so wide, short screens do not let it run into the content);
   --grid-top is where the content starts, a fixed gap under the headline on every screen shape. */
.is-motion .paddock__pin { height: 100svh; padding: 0 var(--gutter); --title: min(17.4vw, 30vh); --grid-top: calc(11vh + var(--title) * .9 + 2vh); }
.is-motion .paddock__title { position: absolute; inset: 11vh var(--gutter) auto; font-size: var(--title); }
.is-motion .paddock__grid { position: absolute; inset: var(--grid-top) var(--gutter) 8vh; margin: 0; grid-template-columns: minmax(300px, 30vw) minmax(0, 1fr); gap: 5vw; align-items: center; }
.is-motion .paddock__track { position: static; display: grid; justify-items: center; gap: 2vh; }   /* static, so the portrait below is placed against the whole grid */
/* Sized in vh: a percentage height does not resolve for the SVG inside this grid row, and it then grows off screen. */
/* As wide as its column, unless that would make it taller than the room under the headline.
   --ratio is the viewBox width over its height. Sized from vh because a percentage height does not resolve here. */
.is-motion .circuit { --ratio: 1.967; width: min(100%, calc((92vh - var(--grid-top) - 64px) * var(--ratio))); height: auto; margin: 0; }
/* The portrait is pinned over the end of the headline, like a photo stuck on a pit wall. */
.is-motion .paddock__portrait { position: absolute; right: 0; top: calc(var(--title) * -.6); bottom: auto; margin: 0; width: min(9.5vw, 17vh); border-width: 7px; border-bottom-width: 24px; }

.is-motion .reel__view { overflow: hidden; cursor: grab; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee__in, .entry__cue::after, .sound__bars i { animation: none; }
  * { transition-duration: .01ms !important; }
}
html.reduce .marquee__in, html.reduce .entry__cue::after, html.reduce .sound__bars i { animation: none; }
