/* Desert Challenge, Year 5 */

@font-face {
  font-family: "Orbitron";
  src: url("fonts/orbitron-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Readex Pro";
  src: url("fonts/readex-pro-latin-wght-normal.woff2") format("woff2");
  font-weight: 160 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Readex Pro";
  src: url("fonts/readex-pro-arabic-wght-normal.woff2") format("woff2");
  font-weight: 160 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Reem Kufi";
  src: url("fonts/reem-kufi-arabic-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  /* Year 5 kit */
  --olive-950: #1f2a20;
  --olive-900: #2a382b;
  --olive-800: #354636;
  --olive-700: #4e644f;
  --olive-600: #5c735d;
  --sage: #7c9b7c;
  --sage-300: #a9c0a6;
  --sage-100: #dde7da;
  --bone: #f2f0e9;
  --white: #ffffff;
  /* Inflatables */
  --tan: #c99466;
  --tan-deep: #8a6040;
  --camo: #2e2a26;
  --cream: #ece6da;

  --ink: var(--white);
  --ink-soft: var(--sage-100);

  --font-display: "Orbitron", "Reem Kufi", system-ui, sans-serif;
  --font-body: "Readex Pro", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --header-h: 68px;

  color-scheme: dark;
}

html[lang="ar"] {
  --font-display: "Reem Kufi", "Orbitron", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--olive-900);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 340;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--sage); color: var(--olive-950); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1; text-wrap: balance; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-weight: 700; line-height: 1.25; }

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

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--white); color: var(--olive-950); padding: 10px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Shared pieces ---------- */

.splatter {
  position: absolute; inset: 0; pointer-events: none;
  background-color: var(--splat, var(--sage));
  -webkit-mask: url("img/splatter.svg") center / cover no-repeat;
          mask: url("img/splatter.svg") center / cover no-repeat;
  opacity: var(--splat-o, 0.55);
}

.btn {
  --btn-bg: var(--white);
  --btn-fg: var(--olive-950);
  display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 52px; padding: 0 26px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--btn-bg);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
html[lang="ar"] .btn { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; font-size: 1.05rem; clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.btn svg { width: 18px; height: 18px; flex: none; }
html[dir="rtl"] .btn svg.arrow { transform: scaleX(-1); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { --btn-bg: var(--tan); --btn-fg: var(--camo); }
}
.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; padding-inline: 4px; clip-path: none; }
.btn--ghost span { border-bottom: 2px solid var(--sage); padding-bottom: 2px; transition: border-color 160ms ease; }
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover { --btn-bg: transparent; color: var(--ink); }
  .btn--ghost:hover span { border-color: var(--tan); }
}
.btn--dark { --btn-bg: var(--camo); --btn-fg: var(--cream); }
@media (hover: hover) and (pointer: fine) {
  .btn--dark:hover { --btn-bg: var(--olive-950); --btn-fg: var(--white); }
}

.section-title {
  font-size: clamp(2.4rem, 6.4vw, 5.5rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
html[lang="ar"] .section-title { text-transform: none; letter-spacing: 0; font-size: clamp(2.4rem, 6vw, 4.8rem); }

.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }

.tag {
  display: inline-block; padding: 3px 9px 2px;
  font-family: "Orbitron", "Reem Kufi", sans-serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; background: var(--tan); color: var(--camo);
  vertical-align: middle;
}
html[lang="ar"] .tag { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; font-size: 0.8rem; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color 240ms ease, box-shadow 240ms ease;
}
.site-header.is-scrolled { background: var(--olive-950); box-shadow: 0 6px 24px -10px rgb(0 0 0 / 0.5); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.brand svg { width: 38px; height: auto; color: var(--white); }
.brand b {
  font-family: "Orbitron", sans-serif; font-weight: 800; font-size: 0.8rem; line-height: 1.05; letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav { display: none; }
.nav ul { display: flex; gap: clamp(14px, 1.6vw, 26px); list-style: none; margin: 0; padding: 0; }
.nav a { white-space: nowrap; text-decoration: none; font-size: 0.92rem; font-weight: 400; color: var(--ink-soft); padding: 8px 0; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--white); } }
@media (min-width: 900px) { .nav { display: block; } }

.lang {
  appearance: none; border: 1px solid rgb(255 255 255 / 0.35); background: transparent; color: var(--white);
  min-height: 40px; padding: 0 14px; font: 500 0.95rem var(--font-body); cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.lang:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .lang:hover { border-color: var(--white); background: rgb(255 255 255 / 0.08); } }
.lang [lang="ar"] { font-family: "Readex Pro", sans-serif; }

.site-header .btn { min-height: 40px; padding: 0 16px; font-size: 0.78rem; }
html[lang="ar"] .site-header .btn { font-size: 0.95rem; }
@media (max-width: 480px) {
  .brand b { display: none; }
  .site-header .wrap { gap: 10px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, 100svh);
  background: linear-gradient(180deg, var(--olive-700) 0%, var(--olive-700) 55%, #45594a 100%);
  display: grid; align-items: center;
  padding-block: calc(var(--header-h) + 40px) 72px;
}
.hero .splatter { --splat-o: 0.6; z-index: -1; }

.hero__peaks {
  position: absolute; z-index: -1; pointer-events: none;
  inset-inline-end: -4vw; bottom: 0;
  width: min(56vw, 860px); height: auto;
}
html[dir="rtl"] .hero__peaks { transform: scaleX(-1); }
.hero__sun {
  position: absolute; z-index: 0;
  inset-inline-end: -7vw; top: calc(var(--header-h) + 4vh);
  width: clamp(200px, 26vw, 400px); aspect-ratio: 1; border-radius: 50%;
  background: var(--sage);
  display: grid; place-content: center; text-align: center;
  color: var(--olive-950);
  padding-inline-end: 6vw;
}
.countdown__num { font-family: "Orbitron", sans-serif; font-weight: 900; font-size: clamp(2.6rem, 5.4vw, 5rem); line-height: 0.9; font-variant-numeric: tabular-nums; }
.countdown__label { font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 700; font-size: clamp(0.7rem, 0.95vw, 0.9rem); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 8px; }
html[lang="ar"] .countdown__label { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; font-size: clamp(0.95rem, 1.2vw, 1.15rem); }

.hero__copy { position: relative; z-index: 1; }

.wordmark {
  display: flex; align-items: stretch; gap: 0.12em; width: fit-content;
  font-family: "Orbitron", sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: clamp(3rem, 10.2vw, 9.4rem); line-height: 0.92; letter-spacing: 0.01em;
}
.wordmark__lines { display: block; }
.wordmark__lines span { display: block; }
.wordmark__year {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 0.17em; font-weight: 700; letter-spacing: 0.3em; line-height: 1;
  align-self: flex-end; color: var(--sage-100); margin-bottom: 0.06em;
}
html[dir="rtl"] .wordmark { direction: ltr; }

.hero__ar-name { display: none; font-family: "Reem Kufi", sans-serif; font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 3rem); margin-top: 14px; line-height: 1.2; }
html[lang="ar"] .hero__ar-name { display: block; }

.hero__meta {
  margin-top: clamp(22px, 3vw, 34px);
  font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 600; text-transform: uppercase;
  font-size: clamp(0.92rem, 1.5vw, 1.2rem); letter-spacing: 0.08em; color: var(--white);
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
}
html[lang="ar"] .hero__meta { font-family: "Readex Pro", sans-serif; letter-spacing: 0; font-weight: 500; font-size: clamp(1.05rem, 1.7vw, 1.35rem); }
.hero__meta i { width: 7px; height: 7px; background: var(--tan); transform: rotate(45deg); display: inline-block; }

.hero__intro { margin-top: 16px; max-width: 40ch; color: var(--ink-soft); font-size: clamp(1.05rem, 1.4vw, 1.2rem); }

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }

.hero__free {
  font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sage-100); margin-top: 18px;
}
html[lang="ar"] .hero__free { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; font-size: 1rem; }

@media (max-width: 760px) {
  .hero { align-items: start; padding-top: calc(var(--header-h) + 28px); min-height: 100svh; padding-bottom: 46vw; }
  .hero__peaks { width: 118vw; inset-inline-end: -26vw; opacity: 0.95; }
  .hero__sun { width: 130px; inset-inline-end: -26px; top: auto; bottom: 34vw; padding-inline-end: 20px; }
  .countdown__label { font-size: 0.6rem; letter-spacing: 0.1em; }
  .countdown__num { font-size: 2.2rem; }
  html[lang="ar"] .countdown__label { font-size: 0.8rem; }
}

/* Entrance: rare, first-view only */
@keyframes rise { from { opacity: 0; transform: translateY(14%); } to { opacity: 1; transform: none; } }
@keyframes rise-rtl { from { opacity: 0; transform: scaleX(-1) translateY(14%); } to { opacity: 1; transform: scaleX(-1); } }
@keyframes lift { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.js .hero__peaks { animation: rise 1100ms var(--ease-out) both; }
html.js[dir="rtl"] .hero__peaks { animation-name: rise-rtl; }
.js .hero__sun { animation: lift 1000ms var(--ease-out) 180ms both; }
.js .hero__copy > * { animation: settle 700ms var(--ease-out) both; }
.js .hero__copy > :nth-child(1) { animation-delay: 60ms; }
.js .hero__copy > :nth-child(2) { animation-delay: 120ms; }
.js .hero__copy > :nth-child(3) { animation-delay: 180ms; }
.js .hero__copy > :nth-child(4) { animation-delay: 240ms; }
.js .hero__copy > :nth-child(5) { animation-delay: 300ms; }
.js .hero__copy > :nth-child(6) { animation-delay: 360ms; }
@media (prefers-reduced-motion: reduce) {
  .js .hero__peaks, html.js[dir="rtl"] .hero__peaks, .js .hero__sun, .js .hero__copy > * { animation: fade 400ms ease both; }
}

/* ---------- Races ---------- */

.races { background: var(--olive-900); padding-block: clamp(80px, 11vw, 150px); position: relative; }
.races__head { display: grid; gap: 18px 60px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) { .races__head { grid-template-columns: 1.2fr 1fr; } }
.races__head .lede { margin: 0; }

.lanes { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgb(124 155 124 / 0.45); }
.lane {
  display: grid; gap: 10px 32px; align-items: center;
  grid-template-columns: auto 1fr;
  padding-block: clamp(26px, 3.4vw, 40px);
  border-bottom: 1px solid rgb(124 155 124 / 0.45);
}
.lane__dist {
  grid-row: span 2;
  font-family: "Orbitron", sans-serif; font-weight: 900; line-height: 0.85;
  font-size: clamp(4.2rem, 13vw, 11rem); letter-spacing: -0.03em;
  color: transparent; -webkit-text-stroke: 2px var(--sage);
  min-width: 2.2ch;
}
.lane__dist small { font-size: 0.32em; letter-spacing: 0; -webkit-text-stroke: 0; color: var(--sage); margin-inline-start: 0.08em; }
.lane--kids .lane__dist { color: var(--sage); -webkit-text-stroke: 0; }
.lane__dist { direction: ltr; text-align: start; }
.lane__name { font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 800; text-transform: uppercase; font-size: clamp(1.25rem, 2.4vw, 2rem); letter-spacing: 0.02em; }
html[lang="ar"] .lane__name { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; }
.lane__facts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; padding: 0; list-style: none; color: var(--ink-soft); }
.lane__facts b { color: var(--white); font-weight: 600; font-family: "Orbitron", "Readex Pro", sans-serif; font-variant-numeric: tabular-nums; }
.lane__note { grid-column: 2; font-size: 0.95rem; color: var(--sage-300); margin: 0; max-width: 62ch; }
.lane__go { grid-column: 2; justify-self: start; margin-top: 6px; }
@media (min-width: 900px) {
  .lane { grid-template-columns: minmax(300px, 0.9fr) 1.4fr auto; }
  .lane__dist { grid-row: span 3; }
  .lane__go { grid-column: 3; grid-row: 1 / span 3; align-self: center; margin: 0; }
}
@media (max-width: 560px) {
  .lane { grid-template-columns: 1fr; }
  .lane__dist { grid-row: auto; }
  .lane__note, .lane__go { grid-column: 1; }
}

.lanes__foot { margin-top: 22px; color: var(--sage-300); font-size: 0.95rem; }

/* ---------- Inflatables (camo) ---------- */

.course {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--tan); color: var(--camo);
  padding-block: clamp(80px, 11vw, 150px);
  --ink-soft: #3d3029;
}
.course .section-title { color: var(--camo); }
.course__grid { display: grid; gap: 40px 64px; align-items: center; }

.course__copy .lede { color: #3d3029; }
.course__stats { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--camo); }
.course__stats li { display: flex; align-items: baseline; gap: 18px; padding: 14px 0; border-bottom: 1px solid rgb(46 42 38 / 0.35); }
.course__stats b { font-family: "Orbitron", sans-serif; font-weight: 900; font-size: clamp(1.8rem, 3vw, 2.6rem); min-width: 2ch; line-height: 1; font-variant-numeric: tabular-nums; }
.course__stats span { font-weight: 450; }

.map-slot {
  margin-top: clamp(48px, 7vw, 80px);
  display: grid; gap: 8px 32px; align-items: center;
  padding: 22px clamp(18px, 3vw, 32px);
  border: 2px dashed rgb(46 42 38 / 0.55);
}
@media (min-width: 760px) { .map-slot { grid-template-columns: auto 1fr; } }
.map-slot h3 { font-size: clamp(1.1rem, 1.8vw, 1.5rem); text-transform: uppercase; }
html[lang="ar"] .map-slot h3 { text-transform: none; }
.map-slot p { margin: 0; color: #3d3029; }

/* ---------- Village ---------- */

.village { position: relative; isolation: isolate; overflow: hidden; background: var(--olive-700); padding-block: clamp(80px, 11vw, 150px); }
.village .splatter { --splat-o: 0.32; z-index: -1; transform: scaleX(-1); }
.village__head { display: grid; gap: 18px 60px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
@media (min-width: 900px) { .village__head { grid-template-columns: 1fr 1fr; } }
.village__head .lede { margin: 0; }

.stations { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 clamp(18px, 2.4vw, 40px); align-items: baseline; }
.stations li {
  font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.9rem, 5.4vw, 4.6rem); line-height: 1.12; letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 0.3em;
}
html[lang="ar"] .stations li { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; line-height: 1.4; }
.stations li:nth-child(even) { color: var(--sage-100); }
.stations li::after { content: ""; width: 0.22em; height: 0.22em; background: var(--sage); transform: rotate(45deg); margin-inline-start: clamp(10px, 1.2vw, 20px); }
.stations li:last-child::after { display: none; }
.stations .tag { font-size: 0.7rem; }
html[lang="ar"] .stations .tag { font-size: 0.85rem; }
.stations .station--big { color: var(--tan); }
.village__foot { margin-top: clamp(30px, 4vw, 48px); color: var(--ink-soft); display: flex; gap: 10px 20px; flex-wrap: wrap; align-items: center; }

/* ---------- Race day (light passage) ---------- */

.raceday { background: var(--bone); color: var(--olive-950); padding-block: clamp(80px, 11vw, 150px); --ink-soft: #3a4a3b; }
.raceday .section-title { color: var(--olive-800); }
.raceday__grid { display: grid; gap: 48px 72px; margin-top: clamp(36px, 5vw, 60px); }
@media (min-width: 980px) { .raceday__grid { grid-template-columns: 1.5fr 1fr; } }

.clock { }
.clock__hours { display: flex; align-items: baseline; gap: 0 0.3em; flex-wrap: wrap; font-family: "Orbitron", sans-serif; font-weight: 900; font-size: clamp(2.6rem, 6.6vw, 5.4rem); line-height: 1; color: var(--olive-800); }
.clock__t { unicode-bidi: isolate; white-space: nowrap; }
.clock__t small { font-size: max(0.4em, 1rem); color: var(--olive-600); font-weight: 800; }
html[lang="ar"] .clock__t small { font-family: "Readex Pro", sans-serif; font-weight: 600; }
.clock__cap { margin: 12px 0 34px; color: var(--ink-soft); }

.timeline { position: relative; padding-block: 34px 30px; }
.timeline__axis { position: relative; height: 2px; background: var(--olive-800); }
.timeline__ticks { position: absolute; inset: 0; }
.timeline__ticks i {
  position: absolute; inset-inline-start: calc(var(--t) / 300 * 100%);
  width: 3px; margin-inline-start: -1.5px; background: var(--olive-700);
}
.timeline__ticks--adult i { bottom: 2px; height: 20px; }
.timeline__ticks--kids i { top: 2px; height: 22px; background: var(--tan); width: 7px; margin-inline-start: -3.5px; }
.timeline__labels { position: relative; height: 1.4em; margin-top: 30px; font-family: "Orbitron", sans-serif; font-weight: 600; font-size: 0.78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.timeline__labels span { position: absolute; inset-inline-start: calc(var(--t) / 300 * 100%); transform: translateX(-50%); white-space: nowrap; }
html[dir="rtl"] .timeline__labels span { transform: translateX(50%); }
.timeline__labels span:first-child { transform: none; }
.timeline__labels span:last-child { transform: translateX(-100%); }
html[dir="rtl"] .timeline__labels span:last-child { transform: translateX(100%); }

.legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.legend li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; }
.legend i { width: 22px; height: 22px; margin-top: 3px; background: var(--olive-700); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.legend li:nth-child(2) i { background: var(--tan); }
.legend b { display: block; font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 800; text-transform: uppercase; font-size: 1rem; letter-spacing: 0.04em; }
html[lang="ar"] .legend b { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; font-size: 1.15rem; }
.legend span { color: var(--ink-soft); }

.raceday__side { display: grid; gap: 28px; align-content: start; }
.infoblock { border-top: 2px solid var(--olive-800); padding-top: 18px; }
.infoblock h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; color: var(--olive-800); }
html[lang="ar"] .infoblock h3 { text-transform: none; letter-spacing: 0; font-size: 1.3rem; }
.infoblock p { color: var(--ink-soft); margin-bottom: 0.6em; }
.infoblock a { color: var(--olive-800); font-weight: 500; }
.infoblock ul { margin: 0; padding-inline-start: 1.1em; color: var(--ink-soft); }
.infoblock li { margin-bottom: 6px; }
.infoblock li::marker { color: var(--tan-deep); }

/* ---------- Kit ---------- */

.kit { position: relative; isolation: isolate; overflow: hidden; background: var(--olive-800); padding-block: clamp(80px, 11vw, 150px); }
.kit__grid { display: grid; gap: 40px 60px; align-items: center; }
@media (min-width: 980px) { .kit__grid { grid-template-columns: 0.85fr 1.4fr; } }
.kit__shirts { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
.kit__shirts img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.35)); }
.kit__shirts figure { margin: 0; }
.kit__shirts figure:last-child { margin-inline-start: -12%; margin-top: 18%; }
.kit__shirts figcaption { margin-top: 10px; text-align: center; font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage-300); }
html[lang="ar"] .kit__shirts figcaption { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; font-size: 0.9rem; }
.kit .swatches { display: flex; gap: 8px; margin-top: 26px; }
.kit .swatches i { width: 44px; height: 44px; }

/* ---------- History: five kits ---------- */

.history { background: var(--olive-950); padding-block: clamp(80px, 11vw, 150px); }
.history__head { display: grid; gap: 18px 60px; align-items: end; margin-bottom: clamp(30px, 4vw, 48px); }
@media (min-width: 900px) { .history__head { grid-template-columns: 1fr 1fr; } }
.history__head .lede { margin: 0; }

.years { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid rgb(255 255 255 / 0.18); }
.year-tab {
  appearance: none; background: transparent; color: var(--ink-soft); border: 0; cursor: pointer;
  padding: 16px 6px 18px; text-align: start; font: inherit;
  display: grid; gap: 10px; border-inline-end: 1px solid rgb(255 255 255 / 0.12);
  transition: color 150ms ease, background-color 150ms ease;
}
.year-tab:last-child { border-inline-end: 0; }
.year-tab .chip { display: flex; height: 10px; }
.year-tab .chip i { flex: 1; }
.year-tab b { font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 800; text-transform: uppercase; font-size: clamp(0.72rem, 1.4vw, 1rem); letter-spacing: 0.06em; color: var(--white); padding-inline: 10px; }
html[lang="ar"] .year-tab b { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; font-size: clamp(0.9rem, 1.6vw, 1.15rem); }
.year-tab span { font-size: 0.85rem; padding-inline: 10px; }
.year-tab[aria-selected="true"] { background: rgb(255 255 255 / 0.07); color: var(--white); }
.year-tab[aria-selected="true"] .chip { height: 14px; margin-top: -4px; }
@media (hover: hover) and (pointer: fine) { .year-tab:hover { background: rgb(255 255 255 / 0.05); } }
@media (max-width: 560px) { .year-tab span { display: none; } .year-tab b { padding-inline: 4px; font-size: 0.7rem; } }

.stage {
  --g: #4e644f; --s: #7c9b7c; --k: #ffffff;
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--g); color: var(--k);
  min-height: clamp(380px, 46vw, 600px);
  display: grid; align-items: center;
  transition: background-color 480ms var(--ease-in-out), color 480ms var(--ease-in-out);
}
.stage .splatter { --splat: var(--s); --splat-o: 0.7; z-index: -1; transition: background-color 480ms var(--ease-in-out); }
.stage__inner { display: grid; gap: 30px 60px; align-items: center; padding-block: 56px; }
@media (min-width: 860px) { .stage__inner { grid-template-columns: auto 1fr; } }
.stage__mark { width: clamp(150px, 22vw, 300px); color: var(--k); transition: color 480ms var(--ease-in-out); }
.stage__mark .sun { fill: var(--k); }
.stage__year { font-family: "Orbitron", sans-serif; font-weight: 900; font-size: clamp(4rem, 12vw, 10rem); line-height: 0.85; letter-spacing: -0.02em; direction: ltr; }
html[dir="rtl"] .stage__year { text-align: end; }
.stage__label { margin-top: 14px; font-family: "Orbitron", "Reem Kufi", sans-serif; font-weight: 800; text-transform: uppercase; font-size: clamp(1.1rem, 2.4vw, 1.9rem); letter-spacing: 0.03em; }
html[lang="ar"] .stage__label { font-family: "Reem Kufi", sans-serif; letter-spacing: 0; }
.stage__note { margin-top: 8px; opacity: 0.85; max-width: 40ch; }
.stage__text { transition: opacity 200ms ease; }
.stage.is-swapping .stage__text { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .stage, .stage .splatter, .stage__mark { transition-duration: 1ms; }
}

/* ---------- FAQ ---------- */

.faq { background: var(--olive-900); padding-block: clamp(80px, 11vw, 150px); }
.faq__grid { display: grid; gap: 30px 72px; }
@media (min-width: 980px) { .faq__grid { grid-template-columns: 0.8fr 1.4fr; } }
.faq__list { border-top: 1px solid rgb(124 155 124 / 0.45); }
.faq details { border-bottom: 1px solid rgb(124 155 124 / 0.45); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 22px 0; font-weight: 500; font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; flex: none; color: var(--sage); transition: transform 200ms var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details > div { padding: 0 0 22px; color: var(--ink-soft); max-width: 64ch; }
.faq details > div p:last-child { margin-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { color: var(--sage-100); } }

/* ---------- Closing ---------- */

.closing {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--olive-700); text-align: center;
  padding-block: clamp(90px, 12vw, 170px) clamp(180px, 24vw, 340px);
}
.closing .splatter { --splat-o: 0.45; z-index: -1; transform: rotate(180deg); }
.closing__peaks { position: absolute; z-index: -1; bottom: 0; left: 50%; transform: translateX(-50%); width: min(140vw, 1500px); }
.closing h2 { font-size: clamp(2.4rem, 7.4vw, 6.6rem); text-transform: uppercase; letter-spacing: -0.01em; }
html[lang="ar"] .closing h2 { text-transform: none; letter-spacing: 0; }
.closing p { margin: 20px auto 30px; color: var(--ink-soft); font-size: clamp(1.05rem, 1.6vw, 1.3rem); }

/* ---------- Footer ---------- */

.site-footer { background: var(--olive-950); padding-block: 48px; color: var(--sage-300); font-size: 0.95rem; }
.site-footer .wrap { display: grid; gap: 24px 48px; align-items: center; }
@media (min-width: 860px) { .site-footer .wrap { grid-template-columns: auto 1fr auto; } }
.site-footer .brand b { color: var(--white); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--sage-100); }

.section-title + .lede { margin-top: clamp(18px, 2vw, 28px); }

/* Arabic: Reem Kufi is a display face; small UI text sets in Readex Pro */
html[lang="ar"] .btn,
html[lang="ar"] .countdown__label,
html[lang="ar"] .hero__free,
html[lang="ar"] .tag,
html[lang="ar"] .kit__shirts figcaption,
html[lang="ar"] .year-tab b,
html[lang="ar"] .legend b {
  font-family: "Readex Pro", sans-serif; font-weight: 600; letter-spacing: 0; text-transform: none;
}
html[lang="ar"] .countdown__label { font-weight: 500; }

@media (max-width: 520px) {
  .wordmark { font-size: clamp(2.4rem, 11.4vw, 3rem); }
  .hero__meta i { display: none; }
  .hero__meta { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* Legibility floor */
.stations .station--big { color: #e6bd92; }
.lane__dist small { color: var(--sage-300); }
.tag { font-size: 0.74rem; }
@media (max-width: 760px) { .countdown__label { font-size: 0.72rem; } }


/* Inflatables: three selected units, large and staggered */
.course__grid { align-items: center; }
.rigs { position: relative; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; row-gap: clamp(16px, 2.6vw, 40px); }
.rigs img { width: 100%; height: auto; filter: drop-shadow(0 24px 22px rgb(46 42 38 / 0.35)); }
.rig--a { grid-column: 1 / span 4; grid-row: 1; }
.rig--b { grid-column: 3 / span 4; grid-row: 2; margin-top: 0; }
.rig--c { grid-column: 1 / span 4; grid-row: 3; margin-top: 0; }
.rigs figcaption {
  grid-column: 1 / -1; margin-top: 16px;
  font-family: "Orbitron", sans-serif; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: #3d3029;
}
html[lang="ar"] .rigs figcaption { font-family: "Readex Pro", sans-serif; letter-spacing: 0; font-size: 0.9rem; font-weight: 600; }
html[dir="rtl"] .rigs img { transform: scaleX(-1); }
@media (min-width: 980px) { .course__grid { grid-template-columns: 0.9fr 1.3fr; } .rigs { margin-inline-end: calc(var(--gutter) * -0.5); } }

/* Village: tag stays with its station */
.stations li { display: inline-block; }
.stations .tag { margin-inline-start: 0.35em; position: relative; top: -0.3em; }
@media (max-width: 560px) { .stations li { font-size: clamp(1.5rem, 7.6vw, 1.9rem); } }

/* Year tabs: numeral only on narrow screens */
@media (max-width: 560px) {
  .year-tab .yt-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .year-tab b { font-size: 1.5rem; font-family: "Orbitron", sans-serif; }
  html[lang="ar"] .year-tab b { font-family: "Orbitron", sans-serif; font-size: 1.5rem; }
}

/* History stage peaks, dyed per year */
.stage__peaks { position: absolute; z-index: -1; bottom: 0; inset-inline-end: 0; width: min(62vw, 900px); height: auto; pointer-events: none; }
html[dir="rtl"] .stage__peaks { transform: scaleX(-1); }
.stage__peak-front { fill: var(--s); opacity: 0.85; transition: fill 480ms var(--ease-in-out); }
.stage__peak-back { fill: none; stroke: var(--s); stroke-width: 16; opacity: 0.7; transition: stroke 480ms var(--ease-in-out); }
@media (max-width: 860px) { .stage__peaks { width: 110vw; inset-inline-end: -30vw; opacity: 0.7; } }

/* Mobile hero details */
@media (max-width: 760px) {
  .hero__sun { width: 156px; inset-inline-end: -34px; padding-inline-end: 44px; }
  .countdown__num { font-size: 2rem; }
}
.wordmark__year { font-size: max(0.17em, 12px); }
.stage__peak-front { stroke: var(--g); stroke-width: 44; paint-order: stroke; transition: fill 480ms var(--ease-in-out), stroke 480ms var(--ease-in-out); }
.stage__peaks { opacity: 1; }
.stage__peak-front { opacity: 1; fill-opacity: 0.85; }
.stations .tag { margin-inline-start: 0; margin-inline-end: 0.4em; }
.stations li::after { display: inline-block; vertical-align: middle; margin-inline: clamp(10px, 1.2vw, 20px) 0; position: relative; top: -0.08em; }
.year-tab .yt-word { padding: 0; font-size: inherit; }

.years { list-style: none; margin: 0; padding: 0; }
.year-tab { cursor: default; }
.year-tab.is-current { background: rgb(255 255 255 / 0.07); color: var(--white); }
.year-tab.is-current .chip { height: 14px; margin-top: -4px; }
@media (hover: hover) and (pointer: fine) { .year-tab:hover { background: transparent; } .year-tab.is-current:hover { background: rgb(255 255 255 / 0.07); } }

/* Kit: medal stands beside the shirts, on the dark ground */
.kit__shirts { grid-template-columns: 1fr 1fr 0.9fr; }
.kit__medal { margin: 0; margin-inline-start: 4%; align-self: end; margin-top: -30%; }
.kit__medal img { width: 100%; height: auto; filter: drop-shadow(0 22px 26px rgb(0 0 0 / 0.45)); }
@media (min-width: 980px) { .kit__grid { grid-template-columns: 0.7fr 1.6fr; } }
@media (max-width: 560px) { .kit__shirts { grid-template-columns: 1fr 1fr; } .kit__medal { grid-column: 1 / -1; width: 62%; justify-self: center; margin: 24px 0 0; } }

/* Header: event photos link (all sizes) */
.photos-link {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 4px;
  color: var(--white); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .photos-link:hover { color: var(--tan); } }
@media (max-width: 400px) { .photos-link { font-size: 0.85rem; } }

/* Photos lives in the nav on wide screens; standalone link only when the nav is hidden */
@media (min-width: 900px) { .photos-link { display: none; } }
.photos-link { white-space: nowrap; }
.btn { white-space: nowrap; }

/* iOS Safari draws a box around large drop-shadowed transparent images: no filter shadows there */
@supports (-webkit-touch-callout: none) {
  .kit__shirts img, .kit__medal img, .rigs img { filter: none; }
}
@media (max-width: 760px) {
  .kit__shirts img, .kit__medal img, .rigs img { filter: none; }
}

/* Mid widths (laptops): keep the full menu, just tighter */
@media (min-width: 900px) and (max-width: 1180px) {
  .brand b { display: none; }
  .nav ul { gap: 16px; }
  .nav a { font-size: 0.86rem; }
  .site-header .wrap { gap: 14px; }
  .site-header .btn { padding: 0 12px; }
}
