/* =========================================================
   MARTIN MATASCI #13 — v3
   - one accent: the yellow of the #13 number plate
   - gold / silver only on the podium
   - glass only over photos and footage
   - separation by space, surfaces and diagonal cuts, no hairlines
   ========================================================= */

:root {
  --bg: #0c0d10;
  --surface: #14161b;
  --surface-2: #1b1e25;
  --text: #f2efe9;
  --text-2: #b0ada6;
  --text-3: #75736e;
  --accent: #ffd60a;
  --accent-ink: #111111;
  --gold: #e9c46a;
  --silver: #c8ced8;

  --f-display: "Saira", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Inter Tight", system-ui, -apple-system, sans-serif;

  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1360px;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --cut: clamp(28px, 5vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }
img, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- type ---------- */

.display {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.num {
  font-family: var(--f-display);
  font-weight: 800;
  font-style: italic;
  font-variant-numeric: tabular-nums;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* three slanted bars: the speed mark used as section eyebrow */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }

.eyebrow::before {
  content: "";
  width: 34px;
  height: 12px;
  background: linear-gradient(105deg, transparent 0 18%, var(--accent) 18% 34%, transparent 34% 50%, var(--accent) 50% 66%, transparent 66% 82%, var(--accent) 82%);
}

.h2 { font-size: clamp(2.8rem, 7.2vw, 7rem); margin-top: 16px; }
.y { color: var(--accent); }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.5; color: var(--text); }
.copy p { color: var(--text-2); max-width: 60ch; }
.copy p + p { margin-top: 1em; }
.copy strong { color: var(--text); font-weight: 600; }

/* ---------- glass ---------- */

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius);
}

/* ---------- buttons: parallelogram, like a number-plate cut ---------- */

.btn {
  --sk: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 30px;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  clip-path: polygon(var(--sk) 0, 100% 0, calc(100% - var(--sk)) 100%, 0 100%);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  transition: background 0.25s, transform 0.25s var(--ease);
}

.btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #ffe24d; }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

.plate {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  border-radius: 8px 8px 14px 14px;
}

/* ---------- start lights ---------- */

.lights {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.lights.is-out { opacity: 0; visibility: hidden; }
.lights-gantry { display: flex; gap: clamp(10px, 2vw, 20px); }
.lights-col { display: grid; gap: 10px; padding: 10px; background: #050506; border-radius: 999px; }

.lights-col i {
  width: clamp(24px, 3.6vw, 40px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #2a0b0b;
  transition: background 0.06s, box-shadow 0.06s;
}

.lights-col.on i { background: #ff2617; box-shadow: 0 0 24px 4px rgba(255, 38, 23, 0.55); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 50;
  width: min(calc(100% - 28px), 1180px);
  height: 60px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
}

.nav:not(.is-solid) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .plate { width: 44px; height: 32px; font-size: 1.15rem; }

.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 108%;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.nav-links .nav-cta { background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-left: 6px; }
.nav-links .nav-cta:hover, .nav-links .nav-cta.is-active { background: #ffe24d; color: var(--accent-ink); }

.menu-btn { display: none; width: 44px; height: 44px; place-items: center; border-radius: 50%; }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--text); box-shadow: 0 6px 0 var(--text), 0 -6px 0 var(--text); }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 90px var(--gutter) 40px;
  background: rgba(12, 13, 16, 0.8);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

.drawer.is-open { opacity: 1; visibility: visible; }
.drawer a { font-size: clamp(2.2rem, 7vw, 3.8rem); padding: 4px 0; }
.drawer a:hover { color: var(--accent); }
.drawer-close { position: absolute; top: 22px; right: var(--gutter); width: 48px; height: 48px; font-size: 1.4rem; border-radius: 50%; }

/* ---------- scroll-scrub stage ---------- */

.scrub { position: relative; height: var(--len, 200vh); }

.scrub-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #000;
}

.scrub-pin canvas, .scrub-pin .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrub-pin canvas { z-index: 1; }
.shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.copy-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.beat { position: absolute; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.beat a, .beat button { pointer-events: auto; }

.scrub-meter {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  width: 220px;
  height: 4px;
  margin-left: -110px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.scrub-meter i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- hero ---------- */

.hero .shade {
  background:
    linear-gradient(90deg, rgba(12, 13, 16, 0.82) 0%, rgba(12, 13, 16, 0.35) 38%, rgba(12, 13, 16, 0) 58%),
    linear-gradient(180deg, rgba(12, 13, 16, 0.55) 0%, rgba(12, 13, 16, 0) 22%),
    linear-gradient(0deg, rgba(12, 13, 16, 0.75) 0%, rgba(12, 13, 16, 0) 35%);
}

.hero-name { left: var(--gutter); top: 30%; max-width: 50vw; }
.hero-name .label { margin-bottom: 18px; display: block; }
.hero-name h1 { font-size: clamp(3.6rem, 9.6vw, 10rem); }

.hero-num { right: var(--gutter); top: 18%; display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }

.hero-num .plate {
  width: clamp(140px, 17vw, 240px);
  height: clamp(104px, 12.6vw, 178px);
  font-size: clamp(5rem, 10vw, 9.5rem);
  border-radius: 18px 18px 32px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.hero-num .side { max-width: 280px; padding: 20px 22px; }
.hero-num .side p { color: rgba(255, 255, 255, 0.8); margin-top: 6px; }

.hero-title { left: var(--gutter); bottom: clamp(60px, 10vh, 110px); width: min(600px, 58vw); padding: clamp(24px, 3vw, 36px); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title h2 { font-size: clamp(2.6rem, 5.4vw, 5.2rem); margin: 18px 0 14px; }
.hero-title p { color: rgba(255, 255, 255, 0.8); margin-bottom: 24px; }

.scroll-cue {
  position: absolute;
  z-index: 4;
  left: var(--gutter);
  bottom: 30px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  transition: opacity 0.4s;
}

/* ---------- numbers ---------- */

.numbers { position: relative; z-index: 5; padding: clamp(60px, 8vw, 110px) 0; background: radial-gradient(80% 120% at 50% 0%, rgba(255, 214, 10, 0.07), transparent 60%), var(--bg); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 28px 26px; border-radius: var(--radius); background: var(--surface); }
.stat .num { display: block; font-size: clamp(3.4rem, 6vw, 5.4rem); line-height: 0.9; }
.stat .label { display: block; margin-top: 14px; color: var(--text); }
.stat p { color: var(--text-3); font-size: 0.9rem; margin-top: 4px; }

/* ---------- sections ---------- */

.section { position: relative; padding: clamp(90px, 12vw, 170px) 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-bottom: clamp(44px, 6vw, 84px);
}

.section-head .note { max-width: 36ch; color: var(--text-2); }

.surface {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 6px), var(--surface);
  clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
  padding-top: calc(clamp(90px, 12vw, 170px) + var(--cut));
}

.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- chi sono ---------- */

.about { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-photo { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }

.facts {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  padding: 20px 22px;
}

.facts .label { display: block; font-size: 0.64rem; color: rgba(255, 255, 255, 0.68); }
.facts .v { display: block; font-weight: 600; font-size: 1.02rem; }
.about .lead { margin: 22px 0 24px; max-width: 30ch; }

/* ---------- titolo ---------- */

.title-sec { position: relative; overflow: hidden; padding: clamp(90px, 12vw, 170px) 0; }
.title-bg { position: absolute; inset: -40px; z-index: 0; }
.title-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(40px) saturate(1.3) brightness(0.45); }

.title-sec::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(12, 13, 16, 0.2) 25%, rgba(12, 13, 16, 0.2) 75%, var(--bg) 100%);
}

.title-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(260px, 5fr) 7fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.title-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55); }
.title-photo img { width: 100%; height: 100%; object-fit: cover; }
.title-big { font-size: clamp(3.2rem, 7.6vw, 7.6rem); margin-top: 20px; }
.title-big .gold { color: var(--gold); }
.title-text p { color: var(--text-2); margin-top: 24px; max-width: 48ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip { padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; }

/* ---------- podium ---------- */

.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: clamp(10px, 1.6vw, 20px); }
.step { display: flex; flex-direction: column; gap: 14px; }
.step-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.step-card img { width: 100%; height: 100%; object-fit: cover; }

.step-card .glass { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; border-radius: 16px; }
.step-card .glass strong { display: block; font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 1.15rem; text-transform: uppercase; line-height: 1.1; }
.step-card .glass span { font-size: 0.86rem; color: rgba(255, 255, 255, 0.8); }

.step-block { padding: 22px 24px; border-radius: 16px 16px 6px 6px; transform-origin: bottom; }
.step-block .num { display: block; font-size: clamp(3rem, 6vw, 5.6rem); line-height: 0.9; }
.step-block .label { color: rgba(0, 0, 0, 0.62); display: block; margin-top: 8px; }
.step-block p { color: rgba(0, 0, 0, 0.72); font-size: 0.92rem; margin-top: 6px; line-height: 1.4; }
.step.p1 .step-block { height: clamp(230px, 24vw, 300px); background: linear-gradient(170deg, #f4d98c, var(--gold) 55%, #b8923a); color: #1d1606; }
.step.p2 .step-block { height: clamp(180px, 18vw, 230px); background: linear-gradient(170deg, #eef1f5, var(--silver) 55%, #8f97a3); color: #15181d; }

.podium .step-block { transform: scaleY(0.2); opacity: 0; transition: transform 1s var(--ease), opacity 0.6s; }
.podium.in .step-block { transform: none; opacity: 1; }
.podium.in .step:nth-child(1) .step-block { transition-delay: 0.15s; }
.podium.in .step:nth-child(2) .step-block { transition-delay: 0.4s; }
.podium.in .step:nth-child(3) .step-block { transition-delay: 0.25s; }

.more-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.result { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 22px 24px; border-radius: var(--radius); background: var(--surface-2); }
.result .pos { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: rgba(255, 255, 255, 0.08); font-size: 1.7rem; }
.result strong { display: block; font-weight: 700; font-size: 1.05rem; }
.result span { color: var(--text-2); font-size: 0.92rem; }
.result .meta { text-align: right; color: var(--text-2); font-size: 0.9rem; }

/* ---------- timeline ---------- */

.timeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 27px;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(233, 196, 106, 0.8));
}

.tl { position: relative; padding-top: 70px; }

.tl::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 5px var(--text-3);
}

.tl.is-y::before { box-shadow: inset 0 0 0 5px var(--accent); }
.tl.is-gold::before { box-shadow: inset 0 0 0 5px var(--gold); background: #2a2210; }
.tl .when { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 1.5rem; }
.tl.is-gold .when { color: var(--gold); }
.tl h3 { font-weight: 700; font-size: 1.02rem; margin: 6px 0; line-height: 1.3; }
.tl p { color: var(--text-2); font-size: 0.92rem; line-height: 1.5; }

/* ---------- gallery ---------- */

.gal { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(70px, 7.5vw, 112px); gap: 14px; margin-top: clamp(60px, 8vw, 110px); }
.gal a { position: relative; overflow: hidden; border-radius: 18px; background: var(--surface-2); }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.gal a:hover img { transform: scale(1.04); }

.gal .glass {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.g1 { grid-column: span 7; grid-row: span 4; }
.g2 { grid-column: span 5; grid-row: span 4; }
.g3, .g4 { grid-column: span 6; grid-row: span 3; }

/* ---------- GT4 ---------- */

.gt-hero { position: relative; height: min(88vh, 860px); min-height: 520px; overflow: hidden; }
.gt-hero video, .gt-hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.gt-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(12, 13, 16, 0) 45%),
    linear-gradient(180deg, var(--bg) 0%, rgba(12, 13, 16, 0) 18%),
    linear-gradient(90deg, rgba(12, 13, 16, 0.55) 0%, rgba(12, 13, 16, 0) 60%);
}

.gt-copy {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(40px, 7vw, 90px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.gt-copy h2 { font-size: clamp(3rem, 8vw, 7.6rem); }
.gt-card { width: min(440px, 100%); padding: 24px 26px; }
.gt-card p { color: rgba(255, 255, 255, 0.85); }
.gt-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.gt-specs div { padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.gt-specs .num { display: block; font-size: 1.5rem; line-height: 1; }
.gt-specs .label { display: block; font-size: 0.6rem; color: rgba(255, 255, 255, 0.72); margin-top: 6px; }

.gt-body { padding: clamp(40px, 5vw, 70px) 0 clamp(90px, 12vw, 160px); }
.trackdays { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: clamp(40px, 5vw, 64px); }
.td { display: grid; grid-template-columns: 40% 1fr; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.td img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }
.td .txt { padding: 24px 26px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.td h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 1.6rem; text-transform: uppercase; line-height: 1; }
.td p { color: var(--text-2); font-size: 0.95rem; }

.strip-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 18px;
  scrollbar-width: none;
  cursor: grab;
}

.strip-track::-webkit-scrollbar { display: none; }
.strip-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.strip-item { flex: 0 0 auto; height: clamp(280px, 40vw, 500px); scroll-snap-align: start; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.strip-item img { height: 100%; width: auto; max-width: none; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.strip-ctrl { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.strip-ctrl button { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); font-size: 1.1rem; transition: background 0.2s; }
.strip-ctrl button:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- partner scrub ---------- */

.partner-scrub .shade {
  background:
    linear-gradient(90deg, rgba(12, 13, 16, 0.88) 0%, rgba(12, 13, 16, 0.4) 34%, rgba(12, 13, 16, 0) 52%),
    linear-gradient(0deg, rgba(12, 13, 16, 0.6) 0%, rgba(12, 13, 16, 0) 30%);
}

.ps-intro { left: var(--gutter); top: 50%; margin-top: -170px; max-width: min(520px, 40vw); }
.ps-intro h2 { font-size: clamp(2.6rem, 5.4vw, 5.4rem); margin: 16px 0; }
.ps-intro p { color: var(--text-2); }

.slot { left: var(--gutter); top: 50%; margin-top: -140px; width: min(420px, 38vw); padding: 26px 28px; }

.slot .tier-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.slot h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.6rem); text-transform: uppercase; line-height: 1; margin: 14px 0 10px; }
.slot p { color: rgba(255, 255, 255, 0.82); }
.slot .step-n { position: absolute; top: 24px; right: 26px; color: rgba(255, 255, 255, 0.55); font-weight: 600; font-size: 0.85rem; }

/* ---------- partner body ---------- */

.sponsors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sponsor { display: grid; place-items: center; height: clamp(140px, 15vw, 200px); border-radius: var(--radius); background: var(--text); transition: transform 0.4s var(--ease); }
.sponsor:hover { transform: translateY(-4px); }
.sponsor img { max-height: 84px; max-width: 66%; object-fit: contain; }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.tier { position: relative; display: flex; flex-direction: column; padding: 30px 28px 28px; border-radius: var(--radius); background: var(--surface-2); }
.tier.is-top { background: radial-gradient(120% 80% at 100% 0%, rgba(255, 214, 10, 0.18), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 2px rgba(255, 214, 10, 0.55); }
.tier h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 2.3rem; text-transform: uppercase; line-height: 1; }
.tier .where { color: var(--accent); font-weight: 600; margin: 8px 0 18px; }
.tier ul { list-style: none; display: grid; gap: 10px; margin-bottom: 28px; flex: 1; }
.tier li { display: flex; gap: 12px; color: var(--text-2); }
.tier li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 9px; border-radius: 2px; background: var(--accent); transform: skewX(-18deg); }
.tier .btn { align-self: flex-start; }

.twint { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; margin-top: 16px; padding: 24px 28px; border-radius: var(--radius); background: var(--surface-2); }
.twint .qr { width: 104px; height: 104px; background: #fff; padding: 6px; border-radius: 12px; }
.twint h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 1.5rem; text-transform: uppercase; }
.twint p { color: var(--text-2); font-size: 0.95rem; }

/* ---------- contatti ---------- */

.contact { position: relative; overflow: hidden; }
.contact-bg { position: absolute; inset: 0; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.36) saturate(1.1); }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(12, 13, 16, 0.3) 35%, rgba(12, 13, 16, 0.55) 100%); }
.contact .wrap { position: relative; z-index: 1; }
.contact-title { font-size: clamp(4rem, 13vw, 13rem); margin-top: 16px; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; margin-top: clamp(36px, 5vw, 64px); }
.form { padding: clamp(22px, 3vw, 34px); display: grid; gap: 16px; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; margin-bottom: 8px; color: rgba(255, 255, 255, 0.75); }

.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.32);
  border: 0;
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.field select option { background: var(--surface); }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.form .hint { color: rgba(255, 255, 255, 0.62); font-size: 0.85rem; }
.form .btn { justify-content: center; }

.channels { display: grid; gap: 12px; align-content: start; }
.channel { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 18px; transition: transform 0.25s var(--ease); }
.channel:hover { transform: translateX(4px); }
.channel .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); }
.channel .ico svg { width: 22px; height: 22px; fill: var(--text); }
.channel .label { display: block; font-size: 0.64rem; color: rgba(255, 255, 255, 0.68); }
.channel .v { display: block; font-weight: 600; font-size: 1.05rem; word-break: break-word; }

/* ---------- footer ---------- */

.chequer { height: 24px; background: conic-gradient(var(--text) 25%, var(--bg) 0 50%, var(--text) 0 75%, var(--bg) 0) 0 0 / 24px 24px; opacity: 0.85; }
.foot { padding: 40px 0 44px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; color: var(--text-3); font-size: 0.9rem; }

/* ---------- lightbox ---------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: 1fr auto;
  background: rgba(8, 8, 10, 0.86);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lb.is-open { opacity: 1; visibility: visible; }
/* the image box always fills the stage; object-fit letterboxes it (Safari mis-sizes % max-height in grid rows) */
.lb-stage { position: relative; min-height: 0; }
.lb-stage img { position: absolute; top: 76px; bottom: 10px; left: 84px; right: 84px; width: calc(100% - 168px); height: calc(100% - 86px); object-fit: contain; }
.lb-bar { display: flex; justify-content: space-between; gap: 16px; padding: 18px var(--gutter) 26px; color: var(--text-2); }
.lb-close, .lb-prev, .lb-next { position: absolute; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; }
.lb-close { top: 16px; right: 16px; }
.lb-prev, .lb-next { top: 50%; margin-top: -27px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .menu-btn { display: grid; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .timeline::before { display: none; }
  .trackdays { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .about, .title-grid { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 4 / 3.4; }
  .title-photo { max-width: 360px; }
  .hero-name { max-width: none; right: var(--gutter); top: auto; bottom: 18%; }
  .hero-num { left: var(--gutter); right: auto; top: auto; bottom: 16%; }
  .hero-title { left: var(--gutter); width: auto; }
  .ps-intro, .slot { right: var(--gutter); max-width: none; width: auto; top: auto; bottom: 64px; margin-top: 0; }
  .partner-scrub .shade { background: linear-gradient(0deg, rgba(12, 13, 16, 0.92) 0%, rgba(12, 13, 16, 0) 60%); }
  .more-results { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr 1fr; }
  .podium .step.p1 { grid-column: span 2; order: -1; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tier.is-top { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .gal { grid-template-columns: repeat(6, 1fr); }
  .g1, .g2 { grid-column: span 6; }
  .g3, .g4 { grid-column: span 3; }
  .td { grid-template-columns: 1fr; }
  .td img { aspect-ratio: 16 / 9; min-height: 0; }
  .twint { grid-template-columns: auto 1fr; }
  .twint .btn { grid-column: span 2; justify-content: center; }
}

@media (max-width: 600px) {
  .brand-name { display: none; }
  .stats, .sponsors, .tiers, .podium { grid-template-columns: 1fr; }
  .podium .step.p1, .tier.is-top { grid-column: auto; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .result { grid-template-columns: auto 1fr; }
  .result .meta { grid-column: span 2; text-align: left; }
  .lb-stage img { left: 10px; right: 10px; width: calc(100% - 20px); }
  .lb-prev, .lb-next { top: auto; bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv, .podium .step-block { opacity: 1; transform: none; }
}

/* =========================================================
   motion layer
   ========================================================= */

/* headings: words rise out of a mask */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.06em 0.08em 0; margin-right: -0.06em; }
.split .w > span { display: inline-block; transform: translateY(105%) skewY(6deg); transition: transform 0.95s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.split.in .w > span { transform: none; }
.split.rv { opacity: 1; transform: none; }

/* photos: diagonal wipe reveal */
/* clip the children, not the observed box, so IntersectionObserver still sees it */
.wipe > * { clip-path: polygon(0 0, 0 0, -30% 100%, -30% 100%); transition: clip-path 1.3s var(--ease); }
.wipe.in > * { clip-path: polygon(0 0, 130% 0, 100% 100%, -30% 100%); }
.wipe.in > .facts { transition-delay: 0.35s; }
.wipe img { transform: scale(1.12); transition: transform 1.8s var(--ease); }
.wipe.in img { transform: scale(1); }

/* circuit marquee driven by scroll */
.marquee { overflow: hidden; padding: clamp(18px, 2.4vw, 30px) 0; background: var(--bg); }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee span {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 0.5em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 239, 233, 0.28);
}
.marquee span.fill { color: var(--accent); -webkit-text-stroke: 0; }

/* timeline line draws with scroll */
.timeline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 27px;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform-origin: left;
  transform: scaleX(var(--tl, 0));
  box-shadow: 0 0 18px rgba(255, 214, 10, 0.45);
}
.tl::before { transition: box-shadow 0.4s, background 0.4s, transform 0.4s var(--ease); }
.tl.lit::before { background: var(--accent); box-shadow: 0 0 0 6px rgba(255, 214, 10, 0.18); transform: scale(1.1); }
.tl.is-gold.lit::before { background: var(--gold); box-shadow: 0 0 0 6px rgba(233, 196, 106, 0.22), 0 0 24px rgba(233, 196, 106, 0.6); }
@media (max-width: 1100px) { .timeline::after { display: none; } }

/* tilt cards */
.tilt { transform-style: preserve-3d; transition: transform 0.5s var(--ease); will-change: transform; }

/* button shine */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}
.btn:hover::after { left: 130%; }

/* nav hides on scroll down */
.nav { transition: transform 0.45s var(--ease), background 0.4s, box-shadow 0.4s; }
.nav.is-hidden { transform: translate(-50%, -120%); }

/* parallax targets */
.title-bg img, .contact-bg img, .gt-hero video, .gt-hero .poster { will-change: transform; }

/* podium number pop */
.podium .step-block .num { transform: translateY(30px); opacity: 0; transition: transform 0.8s var(--ease) 0.7s, opacity 0.6s 0.7s; }
.podium.in .step-block .num { transform: none; opacity: 1; }
.podium .p1 .step-card { box-shadow: 0 0 0 0 rgba(233, 196, 106, 0); transition: box-shadow 1.2s 1s; }
.podium.in .p1 .step-card { box-shadow: 0 0 0 3px rgba(233, 196, 106, 0.7), 0 0 60px rgba(233, 196, 106, 0.25); }

/* stat cards lift */
.stat { transition: transform 0.4s var(--ease), background 0.4s; }
.stat:hover { transform: translateY(-6px); background: var(--surface-2); }

@media (prefers-reduced-motion: reduce) {
  .split .w > span, .wipe > *, .wipe img, .podium .step-block .num { transform: none !important; clip-path: none !important; opacity: 1 !important; }
}

/* performance: no live blur over the scrubbed canvas (it would re-blur every frame) */
.scrub .glass {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: linear-gradient(160deg, rgba(22, 24, 30, 0.82), rgba(12, 13, 16, 0.7));
}
.scrub-meter i { transform: scaleX(0); }

/* lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* three track days side by side: image on top */
.trackdays { grid-template-columns: repeat(3, 1fr); }
.td { grid-template-columns: 1fr; }
.td img { aspect-ratio: 16 / 10; min-height: 0; height: auto; }
@media (max-width: 1100px) { .trackdays { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .trackdays { grid-template-columns: 1fr; } }
@media (min-width: 601px) and (max-width: 1100px) {
  .trackdays .td:last-child { grid-column: span 2; grid-template-columns: 45% 1fr; }
  .trackdays .td:last-child img { aspect-ratio: auto; height: 100%; }
}

/* win card in the results list */
.result.is-win { background: radial-gradient(120% 140% at 0% 0%, rgba(233, 196, 106, 0.2), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 2px rgba(233, 196, 106, 0.45); transition: transform 0.3s var(--ease); }
.result.is-win:hover { transform: translateY(-3px); }
.result.is-win .pos { background: linear-gradient(170deg, #f4d98c, var(--gold) 55%, #b8923a); color: #1d1606; }
.result.is-win .meta { color: var(--gold); font-weight: 600; }
