/* ASIL · a mashrabiya of glass at race night, in the club's own colours: racing green, champagne gold and desert sand.
   The ground is the asil sky, moving from first light over the dunes to floodlit night on the turf
   with the scroll; every surface is glass in a fine champagne lattice. Expanded capitals for the voice, Kufi in Arabic. */
:root {
  --ink: #080B0A;
  --midnight: #0D110F;
  --night-2: rgba(25, 33, 29, 0.62);
  --bone: #F6F2EA;
  --bone-2: rgba(246, 242, 234, 0.8);
  --bone-3: rgba(246, 242, 234, 0.64);
  --dune: #E4CDA5;
  --gold: #E7C68C;
  --gold-2: #B98D4A;
  --gold-text: #EDCF97;
  --turf: #7FCAA9;
  --live: #FF6B5E;
  --line: rgba(246, 242, 234, 0.15);
  /* glass: light comes from the top left, so the rim is bright there and falls away */
  --rim: rgba(255, 255, 255, 0.34) rgba(255, 255, 255, 0.08) rgba(255, 255, 255, 0.05) rgba(255, 255, 255, 0.2);
  --tint: rgba(18, 23, 20, 0.42);
  --tint-strong: rgba(13, 18, 15, 0.66);
  --sheen: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0) 62%);
  --pane: linear-gradient(165deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.028) 46%, rgba(255, 255, 255, 0.018));
  --lift: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 18px 34px -22px rgba(2, 3, 3, 0.75);
  --f-display: "Archivo", "Reem Kufi", system-ui, sans-serif;
  --f-ui: "Archivo", "Readex Pro", system-ui, sans-serif;
  --f-ar: "Reem Kufi", "Readex Pro", sans-serif;
  --gut: clamp(20px, 5vw, 80px);
  --bar-h: 58px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --spring: cubic-bezier(0.34, 1.42, 0.5, 1);
  color-scheme: dark;
}
html[lang="ar"] { --f-display: "Reem Kufi", "Readex Pro", sans-serif; --f-ui: "Readex Pro", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--bone); font: 400 16px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video, canvas { display: block; max-width: 100%; }
/* a picture is sized by its container; the image inside always fills it exactly once */
picture { display: block; }
picture > img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: rgba(231, 198, 140, 0.85); color: #140E04; }
html { scrollbar-color: rgba(231, 198, 140, 0.45) var(--ink); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { padding-inline: var(--gut); }

/* the asil sky: one fixed ground for the whole page; main.ts moves its colours from first light to night */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(0deg, color-mix(in oklab, var(--s-glow, #C77A45) 62%, transparent) 0%, transparent 38%),
    linear-gradient(205deg, color-mix(in oklab, var(--s-high, #3B3F78) 80%, transparent) 0%, transparent 46%),
    linear-gradient(180deg, var(--s-1, #1F2823) 0%, var(--s-2, #131916) 52%, var(--s-3, #090C0B) 100%); }
/* two slow fields of colour, a cool one and the floodlights' warmth, so every pane has light to catch */
.sky::before, .sky::after { content: ''; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; }
.sky::before { left: -18vmax; top: 8vh; background: radial-gradient(closest-side, rgba(68, 123, 98, 0.24), transparent); animation: drift-a 46s ease-in-out infinite alternate; }
.sky::after { right: -22vmax; bottom: -16vh; background: radial-gradient(closest-side, rgba(240, 168, 96, 0.19), transparent); animation: drift-b 58s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(18vw, 30vh, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-24vw, -26vh, 0) scale(0.9); } }

/* ---------- type ---------- */
.display { font-family: var(--f-display); font-weight: 560; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.006em; line-height: 0.94; }
html[lang="ar"] .display { text-transform: none; font-weight: 600; letter-spacing: 0; line-height: 1.22; }
h1.display { font-size: clamp(40px, 6.2vw, 112px); }
h2.display { font-size: clamp(34px, 4.6vw, 84px); }
/* card and panel titles: the same face, a little expanded, in sentence case */
.t-title { font-family: var(--f-display); font-weight: 600; font-stretch: 112%; letter-spacing: -0.01em; }
.lede { font-size: clamp(16.5px, 1.2vw, 19px); line-height: 1.6; color: var(--bone-2); max-width: 34em; margin-top: 20px; }
.note { font-size: 13px; color: var(--bone-3); margin-top: 14px; }

/* ---------- glass ----------
   .glass sits over film and photographs: it blurs what is behind it.
   .pane sits on the sky, where there is nothing to blur: the same rim and sheen, no filter to pay for. */
.glass {
  position: relative; isolation: isolate;
  background: var(--sheen), var(--tint);
  -webkit-backdrop-filter: blur(22px) saturate(175%); backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid; border-color: var(--rim);
  box-shadow: var(--lift);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(340px circle at var(--mx, 24%) var(--my, 0%), rgba(255, 246, 225, 0.13), transparent 62%);
}
.pane { background: var(--pane); border: 1px solid; border-color: var(--rim); box-shadow: var(--lift); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: var(--sheen), rgba(15, 20, 18, 0.9); } }
@media (prefers-reduced-transparency: reduce) { .glass { background: rgba(15, 20, 18, 0.94); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font: 600 14.5px/1 var(--f-ui); font-stretch: 108%; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 220ms ease, transform 140ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 13.5px; }
.btn-gold { background: #E7C68C; color: #1A1206; border-color: rgba(255, 246, 226, 0.8) rgba(255, 246, 226, 0.32) rgba(110, 72, 24, 0.3) rgba(255, 246, 226, 0.5); box-shadow: 0 10px 24px -12px rgba(4, 5, 4, 0.7); }
.btn-ghost { color: var(--bone); background: rgba(255, 255, 255, 0.07); border-color: var(--rim);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
@media (hover: hover) and (pointer: fine) {
  .btn-gold:hover { background: #F0D4A0; box-shadow: 0 14px 30px -12px rgba(4, 5, 4, 0.75); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.13); }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- loader ---------- */
#loader { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(90% 60% at 50% 110%, rgba(199, 122, 69, 0.35), transparent 60%), linear-gradient(180deg, #1A231E, var(--ink));
  transition: opacity 700ms var(--ease), visibility 0s linear 700ms; }
#loader.done { opacity: 0; visibility: hidden; }
.mark { width: 32px; height: 32px; color: var(--gold); flex: none; }
.mark-md { width: 58px; height: 58px; }
/* the loader draws the arch as the hero film arrives, then the A and the pearl settle in */
.mark-lg { width: 96px; height: 96px; overflow: visible; }
.mark-lg .m-arch, .mark-lg .m-base { fill: none; stroke: var(--gold); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 300ms linear; }
.mark-lg .m-a { fill: var(--gold); opacity: clamp(0, calc(var(--p, 0) * 3 - 1.6), 1); transition: opacity 400ms ease; }
.mark-lg .m-pearl { transform-origin: 22.9px 31px; transform: scale(clamp(0, calc(var(--p, 0) * 4 - 3), 1)); transition: transform 500ms var(--ease); }
.ld-line { font: 560 15px/1 var(--f-display); font-stretch: 125%; letter-spacing: 0.32em; text-transform: uppercase; color: var(--bone); margin-right: -0.32em; }
html[lang="ar"] .ld-line { letter-spacing: 0; font-size: 22px; margin: 0; }
.ld-pct { font: 500 12px/1 var(--f-ui); letter-spacing: 0.2em; color: var(--bone-3); }

/* ---------- header: a floating glass dock ---------- */
.skip { position: fixed; z-index: 300; left: var(--gut); top: 8px; padding: 10px 14px; background: var(--gold); color: var(--ink); border-radius: 8px; text-decoration: none; transform: translateY(-160%); }
.skip:focus { transform: none; }
.bar {
  position: fixed; z-index: 60; top: 14px; left: var(--gut); right: var(--gut); height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 9px 0 18px; border-radius: 999px;
  --tint: rgba(16, 21, 18, 0.48);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .word { font: 600 16px/1 var(--f-display); font-stretch: 125%; letter-spacing: 0.3em; margin-right: -0.3em; }
.brand-rule { width: 1px; height: 18px; background: rgba(231, 198, 140, 0.55); margin: 0 2px; }
.brand .word-ar { font: 600 19px/1 var(--f-ar); color: var(--gold-text); transform: translateY(-1px); }
.brand-lg { gap: 16px; align-items: center; }
.brand-words { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; column-gap: 14px; row-gap: 10px; }
.brand-lg .word { font-size: 26px; }
.brand-lg .word-ar { font-size: 28px; }
.brand-tag { grid-column: 1 / -1; font: 600 11.5px/1 var(--f-ui); font-stretch: 118%; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone-3); }
html[lang="ar"] .brand-tag { letter-spacing: 0; font-size: 13px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--bone-2); text-decoration: none; transition: color 160ms ease, background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--bone); background: rgba(255, 255, 255, 0.08); } }
.bar-end { display: flex; align-items: center; gap: 8px; }
.lang { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid; border-color: var(--rim); background: rgba(255, 255, 255, 0.05); cursor: pointer; font-size: 14px; }
.lang .lang-en { display: none; }
html[lang="ar"] .lang .lang-en { display: inline; }
html[lang="ar"] .lang .lang-ar { display: none; }
.lang-ar { font-family: var(--f-ar); font-size: 16px; }

.progress { position: fixed; z-index: 61; top: 0; left: 0; right: 0; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), #F4DEB0); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); }
@supports (animation-timeline: scroll()) {
  .progress span { transform: scaleX(0); animation: fill linear both; animation-timeline: scroll(root block); }
  @keyframes fill { to { transform: scaleX(1); } }
}
html[dir="rtl"] .progress span { transform-origin: 100% 50%; }

/* the chapter rail: one lattice unit per chapter, the current one filled in gold */
.rail { position: fixed; z-index: 55; right: max(10px, calc(var(--gut) - 58px)); top: 50%; transform: translateY(-50%); list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 4px 0; font: 600 11px/1 var(--f-ui); font-stretch: 118%; letter-spacing: 0.14em; text-transform: uppercase; color: transparent; text-decoration: none; transition: color 200ms ease; }
.rail a::after { content: ""; width: 9px; height: 8px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: rgba(255, 255, 255, 0.32); transition: background-color 200ms ease, transform 300ms var(--spring); }
.rail a.on { color: var(--bone); }
.rail a.on, .rail:hover a { padding: 5px 8px 5px 10px; margin-inline-end: -8px; border-radius: 999px; background: rgba(11, 14, 12, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.rail a.on::after { background: var(--gold); transform: scale(1.35); }
@media (hover: hover) and (pointer: fine) { .rail:hover a { color: var(--bone-3); } .rail a:hover { color: var(--bone); } }
html[dir="rtl"] .rail { right: auto; left: max(10px, calc(var(--gut) - 58px)); }
.rail.quiet:not(:hover) a.on { color: transparent; }
html[dir="rtl"] .rail a { flex-direction: row-reverse; }

#dust { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 6; pointer-events: none; }

/* ---------- pinned chapters ---------- */
.ch { position: relative; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.film-wrap { position: absolute; inset: 0; background: var(--midnight); }
.film, .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { object-fit: cover; transition: opacity 400ms ease; }
.film-wrap.live .poster { opacity: 0; }
.film-copy { position: absolute; z-index: 8; left: 0; top: calc(var(--bar-h) + 70px); max-width: 760px; }
.film-copy::before { content: ""; position: absolute; inset: -140px -200px -140px -60px; z-index: -1; background: radial-gradient(closest-side, rgba(7, 10, 8, 0.55), transparent); pointer-events: none; }
.film-copy.glass-col::before { display: none; }
[data-show] { transition: opacity 500ms var(--ease), transform 700ms var(--ease); }
[data-show].off { opacity: 0; transform: translateY(14px); pointer-events: none; }

/* 1 · hero: the film behind a façade of glass units (drawn on the film canvas), the headline, the race-night pass */
.hero .film-wrap { background: var(--midnight); }
.hero-copy { position: absolute; z-index: 8; left: 0; bottom: clamp(36px, 7vh, 80px); max-width: min(980px, 60vw); }
.hero-copy::before { content: ""; position: absolute; inset: -160px -260px -120px -80px; z-index: -1; background: radial-gradient(closest-side, rgba(7, 10, 8, 0.55), transparent); pointer-events: none; opacity: var(--scrim, 0.4); }
.hero-copy h1.display { font-size: clamp(34px, 4.2vw, 76px); }
.hero-copy .lede { max-width: 30em; }
.cue { position: absolute; z-index: 8; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font: 600 11px/1 var(--f-ui); font-stretch: 118%; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone); transition: opacity 400ms ease; }
.cue span { padding: 7px 12px; border-radius: 999px; background: rgba(11, 14, 12, 0.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cue i { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: drip 2.4s var(--ease-io) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.cue.off { opacity: 0; }

/* 2 · five bloodlines: a horizontal journey */
.hz .pin { display: flex; flex-direction: column; justify-content: center; }
.hz-track { display: flex; align-items: stretch; height: 100%; will-change: transform; }
.hz-panel { flex: none; height: 100%; position: relative; }
.hz-intro { width: min(46vw, 760px); display: flex; flex-direction: column; justify-content: center; padding: calc(var(--bar-h) + 40px) var(--gut) 60px; }
.hz-hint { margin-top: 40px; font: 600 11.5px/1 var(--f-ui); font-stretch: 118%; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bone-3); display: flex; gap: 10px; align-items: center; }
.hz-hint i { display: inline-flex; color: var(--gold); animation: nudge 2s var(--ease-io) infinite; }
@keyframes nudge { 50% { transform: translateX(8px); } }
.strain { width: 72vw; margin-right: 2px; overflow: hidden; }
.strain-img { position: absolute; inset: 0; overflow: hidden; }
.strain-img > img, .strain-img > picture { position: absolute; inset: 0 -9%; width: 118%; height: 100%; max-width: none; object-fit: cover; transform: translate3d(var(--px, 0), 0, 0); }
.strain-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 10, 8, 0.45) 0%, transparent 26%, transparent 60%, rgba(7, 10, 8, 0.55) 100%); }
.strain-copy { position: absolute; left: clamp(24px, 3.4vw, 56px); bottom: clamp(36px, 7vh, 72px); width: min(440px, 80%); padding: 24px 26px; border-radius: 26px;
  background: var(--sheen), var(--tint); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); border: 1px solid; border-color: var(--rim); box-shadow: var(--lift); }
.strain-ar { font: 600 clamp(48px, 5vw, 84px)/1 var(--f-ar); color: var(--gold-text); margin-bottom: 10px; }
.strain h3 { font: 600 clamp(24px, 2vw, 34px)/1 var(--f-display); font-stretch: 125%; text-transform: uppercase; }
.strain-copy > p:last-child { margin-top: 10px; color: var(--bone-2); font-size: 15.5px; }
.hz-meter { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 999px; font: 600 12px/1 var(--f-ui); letter-spacing: 0.18em; color: var(--bone-2); z-index: 3; background: rgba(11, 14, 12, 0.4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hz-meter i { width: 120px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); position: relative; overflow: hidden; }
.hz-meter b { position: absolute; inset: 0; background: var(--gold); transform-origin: 0 50%; transform: scaleX(var(--hp, 0)); }

/* 3 · before the dawn: one pinned story. The picture on the left wipes up to the next ritual as the scroll moves the
   gold line down the steps on the right; the step in play opens to its line of text. */
.ritual { padding: clamp(110px, 16vh, 180px) 0 0; }
.ritual-head { margin-bottom: 6vh; max-width: 940px; }
.rite { position: relative; height: 480vh; }
.rite-pin { position: sticky; top: calc(var(--bar-h) + 26px); height: calc(100vh - var(--bar-h) - 116px); height: calc(100svh - var(--bar-h) - 116px);
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4.5vw, 80px); align-items: center; }
.rite-stage { position: relative; height: 100%; border-radius: 32px; overflow: hidden; border: 1px solid; border-color: var(--rim); box-shadow: var(--lift); background: var(--midnight); }
.rm { position: absolute; inset: 0; margin: 0; z-index: 1;
  -webkit-mask-image: linear-gradient(to top, #000 44%, transparent 56%); mask-image: linear-gradient(to top, #000 44%, transparent 56%);
  -webkit-mask-size: 100% 300%; mask-size: 100% 300%; -webkit-mask-position: 0 0; mask-position: 0 0;
  transition: -webkit-mask-position 1400ms var(--ease-io), mask-position 1400ms var(--ease-io); }
.rm.was { -webkit-mask-position: 0 100%; mask-position: 0 100%; z-index: 0; }
.rm.on { -webkit-mask-position: 0 100%; mask-position: 0 100%; z-index: 2; }
.rm img, .rm video, .rm picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); transform: scale(1.1); transition: transform 2200ms var(--ease); }
.rm.on img, .rm.on video, .rm.on picture { transform: scale(1); }
.rite-steps { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; display: grid; gap: 4px; align-content: center; }
.rite-steps::before, .rite-steps::after { content: ""; position: absolute; left: 0; top: 8px; width: 1px; }
.rite-steps::before { bottom: 8px; background: rgba(255, 255, 255, 0.14); }
.rite-steps::after { height: calc((100% - 16px) * var(--rp, 0)); background: var(--gold); }
.rite-steps li { padding: 14px 0; }
.rs-ar { font: 600 16px/1 var(--f-ar); color: var(--gold-text); opacity: 0.72; margin-bottom: 8px; transition: opacity 400ms ease; }
.rite-steps h3 { font: 600 clamp(26px, 2.5vw, 42px)/1.04 var(--f-display); font-stretch: 125%; text-transform: uppercase; color: var(--bone); opacity: 0.6; transition: opacity 400ms ease; }
.rite-steps li.on h3, .rite-steps li.on .rs-ar { opacity: 1; }
.rs-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 650ms var(--ease); }
.rs-more > p { overflow: hidden; color: var(--bone-2); max-width: 30em; }
.rite-steps li.on .rs-more { grid-template-rows: 1fr; }
.rite-steps li.on .rs-more > p { padding-top: 12px; }
html[lang="ar"] .rite-steps h3 { text-transform: none; line-height: 1.25; }
html[dir="rtl"] .rite-steps { padding: 0 30px 0 0; }
html[dir="rtl"] .rite-steps::before, html[dir="rtl"] .rite-steps::after { left: auto; right: 0; }

/* 4 · gallop: the words travel; a glass telemetry panel reads the stride */
.drift { position: absolute; z-index: 8; left: 0; right: 0; top: calc(var(--bar-h) + 9vh); display: flex; gap: 22vw; white-space: nowrap; padding-left: 100vw; transform: translate3d(var(--dx, 0), 0, 0); will-change: transform; pointer-events: none; }
.drift-line { flex: none; white-space: nowrap; font: 560 clamp(26px, 3vw, 52px)/1.1 var(--f-display); font-stretch: 118%; letter-spacing: -0.01em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45); }
/* the sunrise sky is bright: the travelling lines are set in ink there */
/* each line rides a pane of pale glass, so the ink holds wherever it crosses the frame (the dark rider included) */
.gallop .drift-line { color: rgba(30, 22, 10, 0.94); text-shadow: none; padding: 10px 24px 12px; border-radius: 999px; border: 1px solid; border-color: rgba(255, 255, 255, 0.75) rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.55);
  background: rgba(255, 249, 238, 0.58); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); }
.hud { position: absolute; z-index: 8; right: var(--gut); bottom: clamp(28px, 6vh, 60px); display: grid; grid-template-columns: repeat(4, auto); gap: 6px; margin: 0; padding: 6px; border-radius: 24px; }
.hud div { padding: 14px 18px; min-width: 112px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); }
.hud dt { font: 600 11px/1 var(--f-ui); font-stretch: 118%; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-3); }
html[lang="ar"] .hud dt { letter-spacing: 0; font-size: 12.5px; }
.hud dd { margin: 8px 0 0; font: 500 28px/1 var(--f-ui); font-stretch: 112%; }
.hud small { font-size: 12px; color: var(--bone-3); font-weight: 500; }

/* the rider redrawn above the travelling words, so they pass behind him */
.occluder { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }

/* the falcon in flight that carries the gallop into the falcon's chapter (its film fades in beneath it) */
/* it waits off-screen to the right until the crossing; the script flies it and fades it */
.flyby { position: absolute; z-index: 9; left: 0; top: 0; width: min(62vw, 1040px); height: auto; pointer-events: none; transform: translate3d(120vw, 40vh, 0); transform-origin: 50% 50%; will-change: transform, opacity;
  filter: drop-shadow(0 40px 46px rgba(0, 0, 0, 0.32)); }
.flyby .flyby { position: static; width: 100%; height: auto; opacity: 1; filter: none; will-change: auto; }

/* 5 · falcon: a frosted pane in the clear sky, clear of the falconer */
.glass-col { left: auto; right: var(--gut); top: calc(var(--bar-h) + 40px); max-width: 470px; padding: 30px 32px; border-radius: 30px; --tint: var(--tint-strong); }
.glass-col h2.display { font-size: clamp(32px, 3vw, 54px); }
.glass-col .lede { font-size: 16px; }
html[dir="rtl"] .glass-col { right: auto; left: var(--gut); }

/* 6 · lights: the evening's order of play */
.schedule { position: absolute; z-index: 8; left: var(--gut); bottom: clamp(28px, 7vh, 70px); list-style: none; margin: 0; padding: 6px; border-radius: 26px; min-width: min(440px, 86vw); display: grid; gap: 4px; }
.schedule li { display: flex; align-items: center; gap: 20px; padding: 13px 18px; border-radius: 20px; font-size: 15px; }
.schedule li:nth-child(odd) { background: rgba(255, 255, 255, 0.05); }
.schedule .num { color: var(--gold-text); min-width: 52px; font-weight: 600; font-stretch: 112%; }

/* 7 · race */
/* while the photo-finish frame is carried away, the race behind it steps back */
.race .pin > .film-wrap, .race .pin > [data-show]:not(.off) { opacity: calc(1 - var(--cap, 0)); }
.race-tag { position: absolute; z-index: 8; left: var(--gut); top: calc(var(--bar-h) + 40px); padding: 12px 18px; border-radius: 999px; font-size: 13.5px; display: flex; gap: 14px; }
.race-tag .num { color: var(--gold-text); }
.race-call { position: absolute; z-index: 8; left: var(--gut); top: calc(var(--bar-h) + 7vh); font-size: clamp(56px, 8vw, 148px); font-weight: 700; text-shadow: 0 4px 50px rgba(0, 0, 0, 0.55); }
html[dir="rtl"] .race-call { left: auto; right: var(--gut); }

/* the photo finish: a flash, then the race's last frame carried down into its place as the photograph below */
.capture { position: fixed; left: 0; top: 0; z-index: 7; display: none; overflow: hidden; pointer-events: none; border-radius: var(--cr, 0px); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7); will-change: transform; }
.capture img { width: 100%; height: 100%; object-fit: cover; }
.capture::after { content: ""; position: absolute; inset: 0; background: #FFF8EA; opacity: var(--flash, 0); }

.finish { padding-block: clamp(90px, 14vh, 160px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.finish-frame { position: relative; border-radius: 28px; overflow: hidden; cursor: ew-resize; touch-action: pan-y; user-select: none; }
.finish-frame img { width: 100%; height: auto; filter: grayscale(0.65) contrast(1.12) brightness(0.95); transition: filter 600ms ease; }
.finish-frame.hit img { filter: none; }
.finish-line { position: absolute; top: 0; bottom: 0; left: var(--fx, 40%); width: 2px; margin-left: -1px; background: #F7DCA0; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.finish-time { position: absolute; top: 14px; left: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(11, 14, 12, 0.78); font-size: 13px; color: #F7DCA0; white-space: nowrap; }
.finish-result { position: absolute; left: 16px; bottom: 16px; padding: 12px 18px; border-radius: 18px; font-size: 15px; opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease), transform 500ms var(--ease); }
.finish-frame.hit .finish-result { opacity: 1; transform: none; }
.finish-result strong { color: var(--gold-text); font: 600 18px/1 var(--f-display); font-stretch: 118%; margin-right: 6px; }

/* 8 · cup: the trophy unmarked at the centre, under a floodlight; its specification sits on the rim */
.cup-stage { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1400px; padding-top: var(--bar-h); }
.cup-tilt { position: relative; width: min(58vw, 92vh, 900px); aspect-ratio: 1340 / 1080; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform 600ms var(--ease);
  /* the film and its light sweep fade out well inside the box, so no edge ever shows */
  -webkit-mask-image: radial-gradient(48% 56% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(48% 56% at 50% 50%, #000 62%, transparent 100%); }
/* shot on black: the key (#cup-key in the page) makes the black transparent, so the gold and its plinth stand in the sky */
.cup-film { position: absolute; inset: 0; background: transparent; filter: url(#cup-key) contrast(1.06); }
.cup-film .poster { object-fit: cover; }
.cup-copy { position: absolute; z-index: 8; left: 0; top: calc(var(--bar-h) + 56px); max-width: min(560px, 40vw); }
.cup-copy h2.display { font-size: clamp(32px, 3.3vw, 62px); }
.spec { position: absolute; inset: 0; margin: 0; z-index: 8; pointer-events: none; }
.spec div { position: absolute; display: grid; gap: 6px; padding: 14px 18px; border-radius: 20px; max-width: 250px; pointer-events: auto;
  background: var(--sheen), var(--tint); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border: 1px solid; border-color: var(--rim); box-shadow: var(--lift); }
.spec div::after { content: ""; position: absolute; top: 50%; width: 46px; height: 1px; background: linear-gradient(90deg, rgba(231, 198, 140, 0.7), rgba(231, 198, 140, 0)); }
/* the trophy fills the middle fifth either side of centre; the labels stand just outside it */
.spec { --half: calc(min(58vw, 92vh, 900px) * 0.25); }
.spec div:nth-child(1) { right: calc(50% + var(--half)); top: 40%; }
.spec div:nth-child(2) { left: calc(50% + var(--half)); top: 30%; }
.spec div:nth-child(3) { left: calc(50% + var(--half)); top: 60%; }
.spec div:nth-child(4) { right: calc(50% + var(--half)); top: 70%; }
.spec div:nth-child(1)::after, .spec div:nth-child(4)::after { left: 100%; }
.spec div:nth-child(2)::after, .spec div:nth-child(3)::after { right: 100%; transform: scaleX(-1); }
.spec dt { font: 600 11px/1 var(--f-ui); font-stretch: 118%; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); }
html[lang="ar"] .spec dt { letter-spacing: 0; font-size: 12.5px; }
.spec dd { margin: 0; font-size: 15px; line-height: 1.4; }

/* 9 · majlis bento */
.majlis { padding-block: clamp(100px, 16vh, 180px) clamp(70px, 10vh, 120px); }
.sec-head { max-width: 940px; margin-bottom: clamp(36px, 6vh, 64px); }
.bento { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 19vw, 300px);
  grid-template-areas: "majlis majlis falcon style" "majlis majlis chef style" "ayyala ayyala paddock saluki" "ayyala ayyala gahwa gahwa"; }
.tile { position: relative; overflow: hidden; border-radius: 28px; border: 1px solid; border-color: var(--rim); background: var(--night-2); text-decoration: none; box-shadow: var(--lift); transition: transform 300ms var(--ease); }
.tile > img, .tile > picture, .tile > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease), opacity 600ms ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7, 10, 8, 0.45)); pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { transform: translateY(-2px); }
  .tile:hover > img, .tile:hover > picture, .tile:hover > video { transform: scale(1.03); }
}
/* each tile's words sit on a small pane of glass, so the photograph keeps its full light */
.tile-copy { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; border-radius: 18px;
  background: var(--sheen), rgba(13, 18, 15, 0.46); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%); border: 1px solid; border-color: var(--rim); }
.tile-copy h3 { font: 600 clamp(17px, 1.3vw, 22px)/1.15 var(--f-display); font-stretch: 112%; letter-spacing: -0.01em; }
.tile-copy p { margin-top: 4px; font-size: 13.5px; color: var(--bone-2); }
.t-majlis { grid-area: majlis; } .t-style { grid-area: style; } .t-chef { grid-area: chef; }
.t-ayyala { grid-area: ayyala; } .t-paddock { grid-area: paddock; } .t-saluki { grid-area: saluki; } .t-falcon { grid-area: falcon; } .t-gahwa { grid-area: gahwa; }
/* race-day style: both photographs stay lit; the first lies on top and fades away to show the second */
.t-style picture:nth-of-type(1), .t-style > img:nth-of-type(1) { z-index: 1; }
.t-style.alt picture:nth-of-type(1), .t-style.alt > img:nth-of-type(1) { opacity: 0; }

/* 11 · reserve */
.reserve .pin { display: flex; align-items: center; }
.reserve-bg, .reserve .pin > picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reserve .pin > picture img { width: 100%; height: 100%; object-fit: cover; }
.wrap-card { margin-left: var(--gut); padding: 40px; padding: clamp(28px, 3.4vw, 52px); border-radius: 32px; max-width: 600px; z-index: 8; --tint: var(--tint-strong); }
.wrap-card h2.display { font-size: clamp(32px, 3.6vw, 64px); }
.price { margin-top: 22px; font-size: 15px; color: var(--bone-2); }
.price strong { font: 600 22px/1 var(--f-ui); font-stretch: 112%; color: var(--bone); margin: 0 4px; }
html[dir="rtl"] .wrap-card { margin-left: 0; margin-right: var(--gut); }

/* reveals: native view timelines, else a class set by an observer */
.reveal { transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(24px); }
@supports (animation-timeline: view()) {
  .js .reveal, .js .reveal:not(.in) { opacity: 1; transform: none; transition: none; animation: rise linear both; animation-timeline: view(); animation-range: entry 5% cover 28%; }
  @keyframes rise { from { opacity: 0; transform: translateY(30px); } }
}

/* ---------- footer: the Al Sadu weave, then the night ---------- */
.foot { position: relative; z-index: 9; padding-bottom: 40px; background: linear-gradient(180deg, rgba(8, 11, 10, 0.4), rgba(8, 11, 10, 0.92) 40%); }
.sadu { height: 34px; background: url(/img/t1-1600.webp) center 18% / auto 240px repeat-x; border-block: 1px solid rgba(231, 198, 140, 0.3); }
.foot-in { padding-top: 64px; display: grid; gap: 48px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.foot-cols h3 { font: 600 11.5px/1 var(--f-ui); font-stretch: 118%; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 16px; }
html[lang="ar"] .foot-cols h3 { letter-spacing: 0; font-size: 13.5px; }
.foot-cols a, .foot-cols p { display: block; padding: 4px 0; color: var(--bone-2); font-size: 14.5px; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot-cols a:hover { color: var(--bone); } }
.legal { font-size: 12.5px; color: var(--bone-3); border-top: 1px solid var(--line); padding-top: 20px; }

/* ---------- RTL ---------- */
html[dir="rtl"] .hero-copy, html[dir="rtl"] .film-copy, html[dir="rtl"] .cup-copy { left: auto; right: 0; }
html[dir="rtl"] .schedule, html[dir="rtl"] .race-tag { left: auto; right: var(--gut); }
html[dir="rtl"] .hud { right: auto; left: var(--gut); }
html[dir="rtl"] .strain-copy { left: auto; right: clamp(24px, 3.4vw, 56px); }
html[dir="rtl"] .hz-hint i { transform: scaleX(-1); }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .rail { display: none; } .nav { display: none; }
  .hero-copy { max-width: 56vw; }
}
@media (max-width: 900px) {
  .rite { height: 440vh; }
  .rite-pin { grid-template-columns: 1fr; grid-template-rows: 44% 1fr; gap: 18px; align-items: start; top: calc(var(--bar-h) + 18px); height: calc(100svh - var(--bar-h) - 104px); }
  .rite-steps { align-content: start; }
  .rite-steps li { padding: 7px 0; }
  .rite-steps h3 { font-size: clamp(19px, 5.4vw, 26px); }
  .rs-ar { display: none; }
  .rs-more > p { font-size: 15px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 220px;
    grid-template-areas: "majlis majlis" "majlis majlis" "falcon style" "chef style" "ayyala ayyala" "paddock saluki" "gahwa gahwa"; }
  .finish { grid-template-columns: 1fr; }
  .cup-stage { padding: calc(var(--bar-h) + 120px) 0 0; place-items: start center; }
  .cup-tilt { width: min(100vw, 70vh); }
  .cup-copy { max-width: none; right: 0; }
  .spec { position: absolute; inset: auto var(--gut) clamp(20px, 4vh, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .spec div { position: static; max-width: none; padding: 12px 14px; }
  .spec div::after { display: none; }
  .hud { left: var(--gut); right: var(--gut); grid-template-columns: repeat(2, 1fr); }
  /* the word stands high, as it first did; the headline sits under it, just above the pass */
  .hero-copy { max-width: none; right: 0; top: auto; bottom: clamp(28px, 6vh, 60px); }
  .hero-copy::before { inset: -50px 0 -30px; opacity: 1; background: linear-gradient(180deg, transparent, rgba(7, 10, 8, 0.72) 24%, rgba(7, 10, 8, 0.72) 82%, transparent); }
}
@media (max-width: 767px) {
  :root { --bar-h: 52px; }
  .bar { top: 10px; left: 12px; right: 12px; padding: 0 6px 0 14px; }
  .bar .brand .word-ar, .bar .brand-rule { display: none; }
  /* the bloodlines become a native swipe row */
  .hz { height: auto !important; }
  .hz .pin { position: relative; height: auto; overflow: visible; padding: calc(var(--bar-h) + 50px) 0 40px; }
  .hz-track { height: auto; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 0 20px 10px; transform: none !important; scrollbar-width: none; }
  .hz-intro { width: 84vw; height: 68svh; padding: 8px 4px; justify-content: flex-end; scroll-snap-align: center; }
  .hz-hint { margin-top: 24px; }
  .strain { width: 84vw; height: 68svh; scroll-snap-align: center; border-radius: 28px; margin: 0; }
  .strain-copy { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px 18px; border-radius: 22px; }
  html[dir="rtl"] .strain-copy { left: 12px; right: 12px; }
  .hz-meter { display: none; }
  .hz-mobile-head { display: block; }
  .cue { display: none; }
  .hero-copy h1.display { font-size: clamp(30px, 9vw, 46px); }
  .hero-copy .lede { font-size: 15.5px; margin-top: 14px; }
  .hud dd { font-size: 21px; }
  .hud div { padding: 12px 14px; min-width: 0; }
  .drift { bottom: 32vh; }
  .film-copy { top: calc(var(--bar-h) + 34px); }
  .glass-col { left: 12px; right: 12px; max-width: none; padding: 22px; }
  .race-call { bottom: 22vh; }
  .cup-stage { padding-top: calc(var(--bar-h) + 150px); }
  .cup-tilt { width: min(100vw, 52vh); }
  /* clear of the phone action bar */
  .spec { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .spec dd { font-size: 13.5px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: 240px; grid-template-areas: "majlis" "majlis" "style" "style" "falcon" "chef" "ayyala" "paddock" "saluki" "gahwa"; }
  .foot-cols { grid-template-columns: 1fr; }
  .wrap-card { margin: 0 12px; }
  .reserve .pin { align-items: flex-end; padding-bottom: 5vh; }
}
.hz-mobile-head { display: none; }

@media (prefers-reduced-motion: reduce) {
  .rm, .rm img, .rm video, .rm picture, .rs-more { transition: none; }
  .capture { display: none !important; }
  .cue i, .hz-hint i { animation: none; }
  .reveal, .js .reveal:not(.in) { opacity: 1; transform: none; animation: none !important; }
  .sky::before, .sky::after { animation: none; }
}
