/* ALABRAJ Cycling Team — site styles */

@font-face {
  font-family: "Alexandria";
  src: url("../fonts/alexandria-var.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-ExtraBoldItalic.woff") format("woff");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-SemiBoldItalic.woff") format("woff");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0b0b0d;
  --bg-raised: #141417;
  --bg-sunken: #070708;
  --line: #2a2a30;
  --ink: #f4f1ea;
  --ink-soft: #b9b6ae;
  --ink-faint: #85827b;
  --red: #e2181f;
  --red-deep: #b30f15;
  --paper: #f4f1ea;
  --paper-ink: #0b0b0d;

  --font-body: "Alexandria", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-latin-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-display: var(--font-body);

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --header-h: 80px;
  --slant: -14deg;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --z-header: 50;
  --z-menu: 60;
  --z-intro: 100;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

html[lang="en"] body { line-height: 1.6; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -100px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 16px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* Latin display voice: the slanted condensed face that echoes the wordmark */
.latin {
  font-family: var(--font-latin-display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}
html[lang="en"] .display {
  font-family: var(--font-latin-display);
  font-style: italic;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.005em;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0; font-family: var(--font-body); font-style: normal; line-height: 1.7;
  font-size: 0.9375rem; font-weight: 500; color: var(--ink-soft);
}
.eyebrow::before {
  content: ""; width: 28px; height: 3px; background: var(--red);
  transform: skewX(var(--slant));
}
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8125rem; }
.section h2.eyebrow, html[lang="en"] .section h2.eyebrow { font-size: 0.9375rem; }
html[lang="en"] .section h2.eyebrow { font-size: 0.8125rem; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--red); --btn-ink: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  background: none; border: 0; color: var(--btn-ink);
  font-weight: 600; font-size: 0.9375rem; text-decoration: none; cursor: pointer;
  isolation: isolate;
  transition: transform 160ms var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-bg);
  transform: skewX(var(--slant));
  transition: background-color 180ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--ghost { --btn-bg: transparent; --btn-ink: var(--ink); }
.btn--ghost::before { box-shadow: inset 0 0 0 1.5px var(--line); }
.btn .arrow { transition: transform 200ms var(--ease-out); }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { background: var(--red-deep); }
  .btn--ghost:hover::before { background: var(--bg-raised); box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
  .btn:hover .arrow { transform: translateX(4px); }
  [dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }
}
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: var(--z-header);
  height: var(--header-h);
  background: var(--bg);
  transition: border-color 250ms ease;
  border-bottom: 1px solid transparent;
}
.header.is-stuck { border-bottom-color: var(--line); }
.header__in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 56px; width: auto; }
.nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 14px; text-decoration: none; font-size: 0.9rem; font-weight: 450; color: var(--ink-soft);
  transition: color 160ms ease;
}
.nav a:hover { color: var(--ink); }
.header__tools { display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px;
  text-decoration: none; font-size: 0.875rem; font-weight: 600; color: var(--ink-soft);
  border: 1.5px solid var(--line);
  transition: color 160ms ease, border-color 160ms ease;
}
.lang:hover { color: var(--ink); border-color: var(--ink-faint); }
.header .btn { min-height: 44px; padding: 8px 20px; font-size: 0.875rem; }

.burger {
  display: none; width: 44px; height: 44px; padding: 0; background: none; border: 1.5px solid var(--line); cursor: pointer;
  align-items: center; justify-content: center;
}
.burger span, .burger span::before, .burger span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); transition: transform 200ms var(--ease-out), opacity 150ms ease;
}
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; inset-inline-start: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: var(--bg-sunken);
  padding: calc(var(--header-h) + 24px) var(--gutter) max(32px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 200ms ease, transform 250ms var(--ease-out), visibility 0s 250ms;
  overflow-y: auto; overscroll-behavior: contain;
}
.menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu a:not(.btn) {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 1.5rem; font-weight: 700; text-decoration: none;
}
.menu .btn { margin-top: 28px; align-self: flex-start; }
.menu__lang { margin-top: auto; padding-top: 24px; color: var(--ink-soft); font-size: 0.9rem; }
.menu__lang a { color: var(--ink); font-weight: 600; }
body.menu-open { overflow: hidden; }
body.menu-open .header { z-index: calc(var(--z-menu) + 1); background: var(--bg-sunken); }

@media (max-width: 940px) {
  .nav, .header__tools .btn, .header__tools .lang { display: none; }
  .header__tools { margin-inline-start: auto; }
  .burger { display: inline-flex; }
}
@media (min-width: 941px) { .menu { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-block-start: var(--header-h);
  overflow: hidden; isolation: isolate;
}
.hero__bg { position: absolute; inset: var(--header-h) 0 0 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero__word {
  position: absolute; inset-inline-end: -4vw; bottom: 9%;
  font-size: clamp(7rem, 27vw, 26rem); line-height: 0.8; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(244, 241, 234, 0.09);
  direction: ltr; user-select: none;
}
.hero__slab {
  --slab-w: min(40vw, 580px);
  position: absolute; inset-block: 0; inset-inline-end: 6%; width: var(--slab-w);
  transform: skewX(var(--slant)); transform-origin: center;
}
.hero__slab::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: -46px; width: 22px; background: var(--red);
}
[dir="rtl"] .hero__slab::before { inset-inline-start: auto; inset-inline-end: -46px; }
.hero__clip { position: absolute; inset: 0; overflow: hidden; background: #1b1b1f; }
.hero__clip::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 13, 0.35) 0%, transparent 28%, transparent 60%, rgba(11, 11, 13, 0.6) 100%);
}
.hero__photo {
  position: absolute; top: 0; left: -25%; width: 150%; max-width: none; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  transform: skewX(14deg) scale(1.03);
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: skewX(14deg) scale(1.03); }
  to { transform: skewX(14deg) scale(1.13) translateY(-1.5%); }
}

@media (max-width: 760px) {
  .hero__slab { --slab-w: 66vw; inset-block: 0 auto; height: 290px; inset-inline-end: 6%; }
  .hero__slab::before { width: 14px; inset-inline-start: -30px; }
  [dir="rtl"] .hero__slab::before { inset-inline-start: auto; inset-inline-end: -30px; }
  .hero .hero__in { align-items: flex-start; padding-block: 322px 40px; }
  .hero__word { bottom: 16%; }
}

.streaks { position: absolute; inset: 0; overflow: hidden; transform: skewY(-9deg); opacity: 0.9; }
.streaks i {
  position: absolute; inset-inline-start: 0; height: 2px; width: 34vw; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 241, 234, 0.5), transparent);
  animation: streak 4.2s linear infinite;
}
.streaks i:nth-child(1) { top: 22%; animation-delay: -0.4s; }
.streaks i:nth-child(2) { top: 41%; width: 22vw; animation-duration: 3.1s; animation-delay: -1.9s; background: linear-gradient(90deg, transparent, var(--red), transparent); }
.streaks i:nth-child(3) { top: 63%; width: 44vw; animation-duration: 5.4s; animation-delay: -2.6s; }
.streaks i:nth-child(4) { top: 78%; width: 18vw; animation-duration: 2.7s; animation-delay: -0.9s; background: linear-gradient(90deg, transparent, var(--red), transparent); }
@keyframes streak { from { transform: translateX(-60vw); } to { transform: translateX(160vw); } }

.hero__in { flex: 1; display: flex; align-items: center; padding-block: clamp(32px, 6vh, 80px); }
.hero__copy { max-width: min(620px, 100%); }
@media (min-width: 761px) { .hero__copy { max-width: min(620px, 48vw); } }
.hero h1 {
  margin-block: 20px 22px;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
}
html[lang="en"] .hero h1 { font-size: clamp(3.4rem, 8.4vw, 7rem); }
.hero h1 .line { display: block; overflow: hidden; padding-block: 0.08em; }
.hero h1 .line > span { display: block; }
.hero h1 em { font-style: inherit; color: var(--red); }
.hero__sub { max-width: 46ch; color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.125rem); text-wrap: pretty; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 34px; }

.ticker {
  border-block: 1px solid var(--line); background: var(--bg-sunken);
  overflow: hidden; direction: ltr;
}
.ticker__track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker__group { display: flex; flex: none; }
.ticker span {
  display: inline-flex; align-items: center; gap: 28px; padding: 16px 14px; white-space: nowrap;
  font-size: 0.9375rem; font-weight: 600; color: var(--ink-soft);
}
.ticker span::after { content: ""; width: 22px; height: 3px; background: var(--red); transform: skewX(var(--slant)); }
html[lang="en"] .ticker span { font-family: var(--font-latin-display); font-style: italic; text-transform: uppercase; font-size: 1.25rem; letter-spacing: 0.04em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }
.section__head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }
.section h2 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); }
html[lang="en"] .section h2 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
.section__lead { color: var(--ink-soft); max-width: 58ch; text-wrap: pretty; font-size: clamp(1.0625rem, 1.35vw, 1.25rem); }

/* Team / pillars */
.pillars { border-top: 1px solid var(--line); }
.pillar {
  display: grid; grid-template-columns: minmax(64px, 0.6fr) minmax(0, 2fr) minmax(0, 3fr);
  gap: 12px 32px; align-items: baseline;
  padding-block: clamp(24px, 3.4vw, 44px); border-bottom: 1px solid var(--line);
}
.pillar__n { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; color: var(--red); direction: ltr; text-align: start; }
.pillar h3 { font-size: clamp(1.35rem, 2.6vw, 2.1rem); font-weight: 750; line-height: 1.3; }
html[lang="en"] .pillar h3 { font-family: var(--font-latin-display); font-style: italic; text-transform: uppercase; font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.75rem); line-height: 1; }
.pillar p { color: var(--ink-soft); max-width: 52ch; }
@media (max-width: 720px) {
  .pillar { grid-template-columns: 56px minmax(0, 1fr); }
  .pillar p { grid-column: 2; }
}

/* Photo slots */
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); margin-top: 24px; }
.shot { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-raised); }
.shot--big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .shot:hover img { transform: scale(1.04); } }
@media (max-width: 760px) {
  .shots { grid-template-columns: 1fr 1fr; }
  .shot--big { aspect-ratio: 4 / 5; }
}
.slot {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; padding: 20px; text-align: center;
  background:
    repeating-linear-gradient(calc(90deg + var(--slant)), transparent 0 18px, rgba(244, 241, 234, 0.035) 18px 19px),
    var(--bg-raised);
  border: 1px dashed var(--line);
  color: var(--ink-faint); font-size: 0.8125rem;
}
.slot b { color: var(--ink-soft); font-weight: 600; font-size: 0.9375rem; }
.shot__cap {
  position: absolute; inset-inline-start: 0; bottom: 0; padding: 8px 14px; background: var(--bg); font-size: 0.8125rem; font-weight: 500;
}

/* Team statement */
.team { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.team__quote { margin: 0; }
.team__quote blockquote { margin: 22px 0 0; }
.team__quote p { font-size: clamp(1.55rem, 3.5vw, 2.9rem); font-weight: 750; line-height: 1.5; text-wrap: pretty; }
html[lang="en"] .team__quote p { font-family: var(--font-latin-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 4.6vw, 3.9rem); line-height: 1.02; }
.team__quote figcaption { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9375rem; }
.team__img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-raised); clip-path: polygon(0 0, 100% 0, 100% 88%, 82% 100%, 0 100%); }
[dir="rtl"] .team__img { clip-path: polygon(0 0, 100% 0, 100% 100%, 18% 100%, 0 88%); }
.team__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; } .team__img { aspect-ratio: 5 / 4; } }

/* Races */
.section--sunken { background: var(--bg-sunken); border-block: 1px solid var(--line); }
.race { display: grid; gap: 22px; }
.race + .race { margin-top: clamp(56px, 8vw, 110px); }
.race__media { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.race:nth-child(even) .race__media { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); }
.race:nth-child(even) .race__main { order: 2; }
.race__main { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-raised); }
.race__second { position: relative; overflow: hidden; background: var(--bg-raised); }
.race__main img { width: 100%; height: 100%; object-fit: cover; }
.race__second img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.race__badge {
  position: absolute; inset-inline-start: 0; bottom: 0; padding: 14px 30px 14px 22px;
  background: var(--red); color: #fff; font-weight: 800; font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}
[dir="rtl"] .race__badge { padding: 14px 22px 14px 30px; clip-path: polygon(0 0, 100% 0, 100% 100%, 16px 100%); }
html[lang="en"] .race__badge { font-family: var(--font-latin-display); font-style: italic; text-transform: uppercase; font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: 0.03em; line-height: 1; }
.race__info { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 40px; }
.race__meta { color: var(--red); font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; }
.race h3 { font-size: clamp(1.5rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1.3; }
html[lang="en"] .race h3 { font-family: var(--font-latin-display); font-style: italic; text-transform: uppercase; font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; }
.race__alt { color: var(--ink-faint); font-size: 1rem; }
@media (max-width: 760px) {
  .race__media, .race:nth-child(even) .race__media { grid-template-columns: 1fr; }
  .race:nth-child(even) .race__main { order: 0; }
  .race__second { aspect-ratio: 1 / 1; }
}

/* Coaches */
.coaches-sec { background: var(--paper); color: var(--paper-ink); }
.coaches-sec .eyebrow, .coaches-sec .section__lead { color: #55524c; }
.coaches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.coach { display: grid; gap: 18px; align-content: start; }
.coach__photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #e6e2d8;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 82% 100%, 0 100%);
}
[dir="rtl"] .coach__photo { clip-path: polygon(0 0, 100% 0, 100% 100%, 18% 100%, 0 88%); }
.coach__photo img { width: 100%; height: 100%; object-fit: cover; }
.coach__photo .slot {
  background:
    repeating-linear-gradient(calc(90deg + var(--slant)), transparent 0 18px, rgba(11, 11, 13, 0.05) 18px 19px),
    #e6e2d8;
  border-color: #c9c4b8; color: #6d6a63;
}
.coach__photo .slot b { color: #3a3833; }
.coach__n { position: absolute; inset-inline-start: 14px; top: 10px; font-size: 2.25rem; line-height: 1; color: var(--red); direction: ltr; }
.coach h3 { font-size: 1.375rem; font-weight: 750; line-height: 1.35; }
html[lang="en"] .coach h3 { font-family: var(--font-latin-display); font-style: italic; text-transform: uppercase; font-size: 1.9rem; line-height: 1; font-weight: 800; }
.coach__role { color: var(--red-deep); font-weight: 600; font-size: 0.9375rem; margin-top: 4px; }
.coach__bio { color: #45423d; font-size: 0.9375rem; max-width: 40ch; }
.draft {
  display: inline-flex; align-items: center; gap: 8px; align-self: start; justify-self: start;
  padding: 4px 10px; border: 1px dashed #b9b3a5; color: #6d6a63; font-size: 0.75rem; font-weight: 500;
}
.draft::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
@media (max-width: 860px) {
  .coaches { grid-template-columns: 1fr; }
  .coach { grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.6fr); align-items: center; gap: 18px; }
  .coach__n { font-size: 1.5rem; }
}

/* Join */
.join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.join .section__head { margin-bottom: 28px; }
.steps { display: grid; gap: 18px; margin-top: 8px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: baseline; color: var(--ink-soft); }
.steps li::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-latin-display); font-style: italic; font-weight: 800; font-size: 1.5rem; color: var(--red); direction: ltr;
}
.steps b { display: block; color: var(--ink); font-weight: 600; }

.form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); background: var(--bg-raised); border: 1px solid var(--line); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); }
.field label small { color: var(--ink-faint); font-weight: 400; font-size: inherit; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font-size: 1rem;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 0; color: var(--ink);
  transition: border-color 160ms ease;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-size: 6px 6px; background-repeat: no-repeat; background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; padding-inline-end: 38px; }
[dir="rtl"] .field select { background-position: 14px 21px, 20px 21px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-faint); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--red); }
.field [aria-invalid="true"] { border-color: var(--red); }
.field__err { color: #ff6b70; font-size: 0.8125rem; min-height: 0; }
.field__err:empty { display: none; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form__status { flex: 1 1 220px; font-size: 0.9375rem; }
.form__status[data-state="ok"] { color: #7ddc9a; }
.form__status[data-state="err"] { color: #ff6b70; }
.form__status:empty { display: none; }
.join__img { margin-top: 36px; max-width: 340px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-raised); }
.join__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .join { grid-template-columns: 1fr; } .join__img { display: none; } }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }

/* Sponsors */
.sponsor {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--red); color: #fff;
  padding: clamp(36px, 6vw, 80px) clamp(24px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: 28px 48px; align-items: end;
}
.sponsor::before {
  content: ""; position: absolute; z-index: -1; inset-block: -20%; inset-inline-end: -8%; width: 38%;
  background: var(--red-deep); transform: skewX(var(--slant));
}
.sponsor .eyebrow { color: rgba(255, 255, 255, 0.85); }
.sponsor .eyebrow::before { background: #fff; }
.sponsor h2 { margin-block: 14px 16px; }
.sponsor p { max-width: 54ch; color: #fff; font-size: clamp(1.0625rem, 1.35vw, 1.1875rem); }
.sponsor .btn { --btn-bg: #0b0b0d; }
@media (hover: hover) and (pointer: fine) { .sponsor .btn:hover::before { background: #000; } }
@media (max-width: 760px) { .sponsor { grid-template-columns: 1fr; } }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 56px 36px; background: var(--bg-sunken); }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) auto auto; gap: 32px 72px; align-items: start; }
.footer__brand img { height: 84px; width: auto; }
.footer__brand p { margin-top: 16px; color: var(--ink-soft); max-width: 36ch; font-size: 0.9375rem; }
.footer h3 { font-size: 0.8125rem; font-weight: 600; color: var(--ink-faint); margin-bottom: 12px; }
html[lang="en"] .footer h3 { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; }
.footer li a { display: inline-block; padding: 6px 0; text-decoration: none; color: var(--ink-soft); font-size: 0.9375rem; transition: color 160ms ease; }
.footer li a:hover { color: var(--ink); }
.footer__bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--ink-faint); font-size: 0.8125rem; }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.nf { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); position: relative; overflow: hidden; }
.nf__n { font-size: clamp(8rem, 34vw, 22rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 2px var(--red); direction: ltr; }
.nf h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin-block: 24px 12px; }
.nf p { color: var(--ink-soft); margin-bottom: 28px; }
.nf__links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Cinematic intro ---------- */
.intro { display: none; }
html.intro-running .intro {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: var(--z-intro);
  background: var(--bg-sunken);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  animation: intro-failsafe 0.4s ease 7s forwards;
}
.intro__stage { position: relative; width: min(78vw, 520px); direction: ltr; }
.intro__logo { width: 100%; clip-path: inset(0 100% 0 0); }
.intro__streak {
  position: absolute; inset-inline: -40vw; top: 58%; height: 3px; background: linear-gradient(90deg, transparent, var(--red) 40%, #fff 50%, var(--red) 60%, transparent);
  transform: translateX(-120%) skewX(var(--slant));
}
.intro__skip {
  position: absolute; inset-block-end: max(22px, env(safe-area-inset-bottom)); inset-inline-end: var(--gutter);
  min-height: 44px; padding: 8px 14px; background: none; border: 0; color: var(--ink-faint); font-size: 0.8125rem; cursor: pointer;
}
.intro__skip:hover { color: var(--ink); }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- The Road: route line, checkpoints, HUD ---------- */
main { position: relative; }
main > section > .wrap { position: relative; z-index: 2; }
.route { position: absolute; inset-block-end: 0; left: 0; right: 0; pointer-events: none; z-index: 1; }
.route__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.route__bg { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; }
.route__line { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.route__node circle { fill: var(--bg); stroke: var(--ink-faint); stroke-width: 2; transition: fill 300ms ease, stroke 300ms ease; }
.route__node text { font-family: var(--font-latin-display); font-style: italic; font-weight: 800; font-size: 20px; fill: var(--ink-faint); transition: fill 300ms ease; }
.route__node.is-passed circle { fill: var(--red); stroke: var(--red); }
.route__node.is-passed text { fill: var(--ink); }
.hero-off .hero__photo, .hero-off .streaks i, .hero-off .ticker__track { animation-play-state: paused; }
.route__dot {
  position: fixed; top: 0; left: 0; opacity: 0; transition: opacity 200ms ease; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px var(--red), 0 0 22px 6px rgba(226, 24, 31, 0.55);
  will-change: transform;
}
@media (max-width: 899px) {
  .route__line { stroke-width: 2; }
  .route__dot { width: 10px; height: 10px; margin: -5px 0 0 -5px; box-shadow: 0 0 0 3px var(--red), 0 0 14px 4px rgba(226, 24, 31, 0.5); }
  .route__node text { font-size: 16px; }
}

.progress { position: fixed; inset-inline: 0; top: var(--header-h); height: 2px; z-index: var(--z-header); pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }
[dir="rtl"] .progress i { transform-origin: 100% 50%; }

.hud {
  position: fixed; inset-inline-start: 24px; bottom: 24px; z-index: 40;
  display: none; align-items: center; gap: 14px; padding: 10px 18px 10px 14px;
  background: rgba(7, 7, 8, 0.9); border: 1px solid var(--line); border-inline-start: 3px solid var(--red);
  opacity: 0; transform: translateY(12px); transition: opacity 250ms ease, transform 350ms var(--ease-out);
  pointer-events: none;
}
.hud.is-on { opacity: 1; transform: none; }
.hud__n { font-size: 2rem; line-height: 1; color: var(--red); direction: ltr; min-width: 2ch; }
.hud__text { display: grid; line-height: 1.35; }
.hud__text small { color: var(--ink-faint); font-size: 0.6875rem; }
.hud__text b { font-weight: 600; font-size: 0.9375rem; }
html[lang="en"] .hud__text small { text-transform: uppercase; letter-spacing: 0.12em; }
@media (min-width: 900px) { .hud { display: flex; } }
html.intro-running .hud, html.intro-running .progress, html.intro-running .route__dot, body.menu-open .hud, body.menu-open .route__dot { visibility: hidden; }

.race__profile { display: block; width: 100%; height: clamp(54px, 7vw, 92px); margin-top: 4px; overflow: visible; }
.race__profile path { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.2s; }
[dir="rtl"] .race__profile { transform: scaleX(-1); }
.race__profile.is-in path { stroke-dashoffset: 0; }

.finish {
  position: relative; height: 64px; display: grid; place-items: center;
  background: repeating-conic-gradient(var(--paper) 0 25%, var(--bg-sunken) 0 50%) 0 0 / 32px 32px;
}
.finish span { transition: transform 450ms var(--ease-out), background-color 300ms ease, color 300ms ease; }
.finish:not(.is-crossed) span { background: var(--bg-sunken); color: var(--ink-soft); transform: skewX(var(--slant)) scale(0.9); }
.finish span { padding: 6px 22px; background: var(--red); color: #fff; font-weight: 800; font-size: 1rem; transform: skewX(var(--slant)); }
html[lang="en"] .finish span { font-family: var(--font-latin-display); font-style: italic; text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.375rem; line-height: 1.2; }

/* ---------- Layout pass: tighter rhythm, anchored blocks ---------- */
.section { padding-block: clamp(64px, 8.5vw, 124px); }
.section__head { margin-bottom: clamp(28px, 4vw, 52px); }

.team { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: stretch; }
.team__quote { display: flex; flex-direction: column; justify-content: center; }
.team__quote p { font-size: clamp(1.5rem, 3.1vw, 2.6rem); }
html[lang="en"] .team__quote p { font-size: clamp(1.9rem, 4vw, 3.4rem); }
.team__img { aspect-ratio: 1 / 1; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; } .team__img { aspect-ratio: 5 / 4; } }

.race { gap: 18px; }
.race + .race { margin-top: clamp(44px, 6vw, 84px); }
.race__info { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-content: start; gap: clamp(16px, 2.4vw, 32px); }
.race__n { font-size: clamp(3.2rem, 7vw, 6.2rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 2px var(--red); direction: ltr; }
.race__alt { margin-top: 6px; }
[dir="rtl"] .race__alt { text-align: right; }
[dir="ltr"] .race__alt { text-align: left; }
.race__profile { height: clamp(40px, 5vw, 64px); margin-top: 0; }

.finish { z-index: 3; }
.finish:not(.is-crossed) span { background: var(--paper); color: var(--paper-ink); }
.route__node text { direction: ltr; unicode-bidi: bidi-override; }
.join { align-items: center; }

/* ---------- Premium pass ---------- */
html[lang="ar"] .display { font-weight: 900; }
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: url("../img/noise.png"); opacity: 0.26; }

.hero__slab { --slab-w: min(44vw, 680px); inset-inline-end: 4%; }
.hero__word { -webkit-text-stroke: 1.5px rgba(244, 241, 234, 0.15); }
.hero h1 { font-size: clamp(2.8rem, 8vw, 6.6rem); margin-block: 18px 22px; }
html[lang="en"] .hero h1 { font-size: clamp(3.4rem, 6.5vw, 6rem); }
html[lang="en"] .hero h1 .line > span { white-space: nowrap; }
@media (min-width: 761px) { .hero__copy { max-width: min(680px, 46vw); } }
@media (max-width: 760px) { .hero__slab { --slab-w: 66vw; inset-inline-end: 6%; } }
.proof { display: inline-flex; align-items: center; gap: 14px; margin-top: 30px; min-height: 44px; text-decoration: none; color: var(--ink-soft); font-size: 0.9375rem; transition: color 160ms ease; }
.proof b { padding: 7px 20px 7px 14px; background: var(--red); color: #fff; font-weight: 800; white-space: nowrap; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
[dir="rtl"] .proof b { padding: 7px 14px 7px 20px; clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%); }
html[lang="en"] .proof b { font-family: var(--font-latin-display); font-style: italic; text-transform: uppercase; font-size: 1.25rem; letter-spacing: 0.03em; line-height: 1.1; }
.proof span { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.proof:hover { color: var(--ink); }

.section--strip { padding-inline: 0; }
.strip-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.strip-nav { display: flex; gap: 10px; }
.strip-nav button { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 1.5px solid var(--line); color: var(--ink); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out); }
.strip-nav button:hover { border-color: var(--red); background: var(--red); }
.strip-nav button:active { transform: scale(0.95); }
[dir="rtl"] .strip-nav svg { transform: scaleX(-1); }
.strip {
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  position: relative; z-index: 2; display: flex; gap: clamp(10px, 1.4vw, 18px); margin-top: 26px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding-inline: var(--edge); scroll-padding-inline: var(--edge);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { display: none; }
.strip .shot { flex: none; height: clamp(300px, 58vh, 620px); aspect-ratio: 4 / 5; scroll-snap-align: start; }
.strip:focus-visible { outline-offset: -3px; }

.footer { overflow: hidden; padding-block-end: 0; }
.footer__mark {
  margin-top: 40px; margin-bottom: -0.1em; text-align: center; white-space: nowrap; direction: ltr; user-select: none;
  font-size: clamp(5rem, 24.5vw, 27rem); line-height: 0.74; color: transparent; -webkit-text-stroke: 1.5px var(--line);
}

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block; position: fixed; top: 0; left: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
    border: 1.5px solid var(--red); pointer-events: none; z-index: 95; opacity: 0; will-change: transform;
    transition: opacity 200ms ease, width 250ms var(--ease-out), height 250ms var(--ease-out), margin 250ms var(--ease-out), background-color 250ms ease;
  }
  .cursor.is-on { opacity: 1; }
  .cursor.is-big { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: rgba(226, 24, 31, 0.14); }
}

/* ---------- Bike motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
.bike { display: block; width: 100%; height: auto; overflow: visible; }

.route__dot {
  width: 60px; height: auto; margin: -20px 0 0 -30px; border-radius: 0; background: none; box-shadow: none;
  color: #fff; filter: drop-shadow(0 0 7px rgba(226, 24, 31, 0.95));
}
.route__dot .bike { transform: rotate(var(--rot, 0deg)) scaleX(var(--face, 1)); transform-origin: 50% 50%; }
.route__dot .wh { transform: rotate(var(--spin, 0deg)); }
.route__dot .rd, .route__dot .hd { color: var(--red); }
.route__dot .rd { stroke: var(--red); }
.route__dot .hd { fill: var(--red); }
@media (max-width: 899px) { .route__dot { width: 42px; height: auto; margin: -14px 0 0 -21px; box-shadow: none; } }

.peloton {
  position: relative; z-index: 2; height: clamp(170px, 22vw, 290px); overflow: hidden;
  background: var(--bg-sunken); border-top: 1px solid var(--line);
}
[dir="rtl"] .peloton { transform: scaleX(-1); }
.peloton__road { position: absolute; inset-inline: 0; bottom: 26px; border-top: 2px dashed var(--line); }
.rider {
  position: absolute; bottom: calc(30px + var(--up)); left: calc(var(--at) * 100%);
  width: calc(clamp(96px, 13vw, 190px) * var(--s)); color: #4a4a52; will-change: transform;
}
.peloton.is-js .rider { left: 0; }
.rider--us { color: var(--ink); z-index: 2; }
.rider--us .rd { stroke: var(--red); }
.rider--us .hd { fill: var(--red); }
.rider--us::before {
  content: ""; position: absolute; right: 78%; top: 18%; width: 160%; height: 64%;
  background:
    linear-gradient(90deg, transparent, var(--red)) 0 12% / 100% 3px no-repeat,
    linear-gradient(90deg, transparent, rgba(244, 241, 234, 0.7)) 0 48% / 70% 2px no-repeat,
    linear-gradient(90deg, transparent, var(--red)) 0 86% / 85% 3px no-repeat;
  background-position: 100% 12%, 100% 48%, 100% 86%;
}
.peloton.is-live .wh { animation: spin 1.1s linear infinite; }
.peloton.is-live .rider--us .wh { animation-duration: 0.75s; }

.intro__stage { isolation: isolate; }
.intro__wheel {
  position: absolute; z-index: -1; left: 50%; top: 46%; width: 128%; margin: -64% 0 0 -64%;
  color: var(--red); opacity: 0.28; animation: spin 2.4s linear infinite;
}

/* ---------- Detail pass ---------- */
.peloton { z-index: auto; border-bottom: 1px solid var(--line); }
.peloton + .section--sunken { border-top: 0; }
.peloton__road { bottom: 20px; }
.rider { bottom: calc(22px + var(--up)); }
.route__node circle { r: 6px; }
.route__node text { font-size: 18px; paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round; }
.section--sunken .route__node text { stroke: var(--bg-sunken); }
@media (max-width: 899px) { .route__dot { width: 34px; margin: -11px 0 0 -17px; } .route__node text { font-size: 15px; } }
.strip-nav, .strip-head .eyebrow { position: relative; z-index: 2; }

@media (max-width: 1239px) { .hud { display: none; } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .streaks, .intro { display: none !important; }
  .hero__photo { animation: none; }
  .race__profile path { stroke-dashoffset: 0; }
  .peloton .wh, .intro__wheel { animation: none !important; }
  .ticker__track { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
