/* =====================================================================
   MOVE Forum, main stylesheet
   Brand: navy, ribbon blue, teal and green from the MOVE identity (move.pdf).
   Look: Liquid Glass. Translucent layers float over a slowly moving colour field;
   controls are capsules with concentric corners; motion uses springs.

   Rules
   - Logical properties everywhere, so one stylesheet serves Arabic (RTL) and English (LTR).
     The only physical left/right values are where JavaScript measures in physical pixels
     (the segmented-control indicator, the progress fill origin); those are marked.
   - No element that CONTAINS glass may get opacity < 1, filter, mask or clip-path at rest:
     that would cut the glass off from what is behind it ("backdrop root").
     Animate the glass element itself instead.
   - Animate transform and opacity. Respect reduced motion and reduced transparency.
   ===================================================================== */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  /* Brand palette, sampled from the PDF. Re-check against the designer's files. */
  --navy: #1b4d7a;
  --navy-deep: #112c4a;
  --navy-night: #0b1f35;
  --blue: #3f8ee0;
  --blue-ink: #2a6cb0;
  --teal: #2b809a;
  --sea: #63aa98;
  --green: #a8dc8c;

  --grad-forum: linear-gradient(90deg, var(--teal), var(--green));
  --grad-forum-v: linear-gradient(180deg, var(--green), var(--teal));
  --grad-forum-light: linear-gradient(90deg, var(--sea), var(--green));
  --grad-ribbon: linear-gradient(135deg, var(--navy) 0%, var(--blue) 55%, var(--green) 100%);
  /* Every stop keeps white text at 4.5:1 or better. */
  --grad-action: linear-gradient(135deg, var(--navy) 0%, var(--blue-ink) 55%, var(--teal) 100%);

  /* Monogram gradient stops (retuned in dark mode) */
  --mono-navy: var(--navy);
  --mono-ink: var(--blue-ink);

  /* Text and surfaces: Apple's light system colours, with the brand navy as the darkest ink
     and the brand action blue as the tint (links, selection, prominent buttons). */
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --ink: #1b2531;
  --ink-soft: #64707c;
  --title: #0b1f35;
  --teal-ink: #1f6578;
  --brand-ink: var(--navy);
  --accent: var(--blue-ink);
  --line: rgb(60 60 67 / 0.14);
  --line-strong: rgb(60 60 67 / 0.26);
  --link: var(--blue-ink);
  --focus: #2a6cb0;
  --on-dark: #f4f8fb;
  --on-dark-soft: rgb(244 248 251 / 0.8);
  /* Apple's grey fills: secondary controls, chips, fields, segmented-control tracks */
  --fill: rgb(118 118 128 / 0.12);
  --fill-2: rgb(118 118 128 / 0.08);
  --tint: var(--fill-2);
  --shadow-soft: 0 0.5px 1px rgb(0 0 0 / 0.05), 0 6px 24px -6px rgb(0 0 0 / 0.1);

  /* The colour field behind the glass: soft enough to keep the page white,
     enough for the clear glass to show something bending through it. */
  --aurora-1: rgb(63 142 224 / 0.1);
  --aurora-2: rgb(168 220 140 / 0.14);
  --aurora-3: rgb(43 128 154 / 0.06);
  --aurora-4: rgb(27 77 122 / 0.04);
  --pattern-opacity: 0;

  /* Liquid Glass material: Apple's clear variant. Almost no fill and a light frost; the glass shows
     through its rim of light, its inner glow and its shadow, and (in Chromium) by bending what is behind. */
  --glass-blur: 12px;
  --glass-sat: 180%;
  --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.3), rgb(255 255 255 / 0.12));
  --glass-fill-strong: linear-gradient(180deg, rgb(255 255 255 / 0.62), rgb(255 255 255 / 0.46));
  --glass-fill-clear: linear-gradient(180deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.02));
  --glass-fill-dark: linear-gradient(180deg, rgb(11 31 53 / 0.42), rgb(11 31 53 / 0.3));
  --glass-solid: rgb(250 250 252 / 0.97);
  --glass-solid-dark: rgb(11 31 53 / 0.96);
  /* The rim: a bright specular edge at the top and the far corner, a faint dark edge in between,
     which is what shows where clear glass ends on a white page. */
  --glass-rim: linear-gradient(160deg, rgb(255 255 255 / 1), rgb(255 255 255 / 0.4) 22%, rgb(0 0 0 / 0.07) 50%, rgb(0 0 0 / 0.05) 70%, rgb(255 255 255 / 0.9));
  --glass-rim-dark: linear-gradient(155deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.12) 30%, rgb(255 255 255 / 0.04) 60%, rgb(255 255 255 / 0.28));
  --glass-shadow: inset 0 1px 0.5px rgb(255 255 255 / 0.95), inset 0 0 14px -4px rgb(255 255 255 / 0.9), inset 0 -0.5px 0.5px rgb(0 0 0 / 0.05), 0 0.5px 1px rgb(0 0 0 / 0.05), 0 10px 30px -10px rgb(0 0 0 / 0.14);
  --glass-shadow-dark: inset 0 1px 0 rgb(255 255 255 / 0.22), inset 0 -1px 0 rgb(0 0 0 / 0.2), 0 12px 30px -12px rgb(0 0 0 / 0.55);
  --glass-spec: 0.6;
  --glass-ink: var(--ink);
  /* Floating bars stay clear; the scroll-edge fade under them (see the header) keeps them legible. */
  --bar-fill: linear-gradient(180deg, rgb(255 255 255 / 0.52), rgb(255 255 255 / 0.38));

  /* Segmented-control thumb: Apple's white thumb on a grey track */
  --ind-bg: #fff;
  --ind-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.04), 0 3px 8px rgb(0 0 0 / 0.12), 0 3px 1px rgb(0 0 0 / 0.04);
  /* The selection in the floating bars: a soft grey capsule, the label in the tint */
  --nav-ind: rgb(118 118 128 / 0.14);
  --nav-on: var(--accent);

  /* Type */
  --font-latin: 'Montserrat', 'Tajawal', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'Tajawal', 'Montserrat', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.2rem;
  --fs-lg: 1.55rem;
  --fs-xl: clamp(1.9rem, 1.35rem + 2.2vw, 3rem);
  --fs-2xl: clamp(2.3rem, 1.4rem + 3.6vw, 4.2rem);
  --lh-tight: 1.1;
  --track-wide: 0.09em;
  --track-tight: -0.022em;
  /* Apple's titles are bold rather than black */
  --fw-title: 700;

  /* Shape: nested corners stay concentric (inner radius = outer radius - padding).
     Where the browser can draw them, corners are continuous (squircle), as on Apple's devices;
     a squircle corner reads smaller, so the radii grow with it (see "Continuous corners"). */
  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* Layout */
  --container: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-space: clamp(3.5rem, 7vw, 6rem);
  --header-h: 64px;
  --header-top: 10px;

  /* Motion. linear() springs replace these where supported (see below). */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.34, 1.8, 0.64, 1);
  --dur-1: 160ms;
  --dur-2: 320ms;
  --dur-3: 600ms;
  --dur-spring: 700ms;
}

/* Damped springs sampled into linear(): "spring" overshoots 8%, "bounce" 23%. */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-spring: linear(0, 0.044, 0.15, 0.292, 0.442, 0.591, 0.723, 0.834, 0.925, 0.991, 1.038, 1.066, 1.08, 1.083, 1.078, 1.069, 1.057, 1.044, 1.032, 1.022, 1.013, 1.005, 1, 0.997, 0.994, 0.993, 0.993, 0.994, 0.994, 0.995, 0.996, 0.997, 0.998, 0.999, 1, 1, 1);
    --ease-bounce: linear(0, 0.078, 0.266, 0.504, 0.743, 0.946, 1.099, 1.193, 1.231, 1.225, 1.188, 1.135, 1.079, 1.027, 0.988, 0.961, 0.948, 0.946, 0.953, 0.964, 0.977, 0.99, 1, 1.007, 1.011, 1.013, 1.012, 1.009, 1.006, 1.003, 1.001, 0.999, 0.998, 0.997, 0.997, 0.998, 0.998, 0.999, 1, 1, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root.theme-auto {
    color-scheme: dark;
    --bg: #06182a;
    --ink: #e6eff7;
    --ink-soft: #a9bed1;
    --title: #ffffff;
    --teal-ink: #93d6b4;
    --brand-ink: #e6eff7;
    --line: rgb(255 255 255 / 0.12);
    --line-strong: rgb(255 255 255 / 0.26);
    --link: #8cc8ff;
    --focus: #8cc8ff;
    --tint: rgb(255 255 255 / 0.07);
    --mono-navy: #5d9bdc;
    --mono-ink: #4f93e0;
    --bg-2: #0b2136;
    --accent: #8cc8ff;
    --fill: rgb(118 118 128 / 0.24);
    --fill-2: rgb(118 118 128 / 0.18);
    --shadow-soft: 0 10px 30px -10px rgb(0 0 0 / 0.6);
    --nav-ind: rgb(255 255 255 / 0.14);
    --nav-on: #fff;

    --aurora-1: rgb(63 142 224 / 0.3);
    --aurora-2: rgb(168 220 140 / 0.15);
    --aurora-3: rgb(43 128 154 / 0.32);
    --aurora-4: rgb(27 77 122 / 0.45);
    --pattern-opacity: 0.05;

    --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.03));
    --glass-fill-strong: linear-gradient(180deg, rgb(20 46 74 / 0.66), rgb(11 31 53 / 0.52));
    --glass-fill-clear: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.01));
    --glass-solid: rgb(12 32 54 / 0.97);
    --glass-rim: linear-gradient(155deg, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.1) 30%, rgb(255 255 255 / 0.03) 55%, rgb(255 255 255 / 0.25));
    --glass-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 16px 40px -14px rgb(0 0 0 / 0.65), 0 2px 8px -2px rgb(0 0 0 / 0.35);
    --glass-spec: 0.2;
    --bar-fill: linear-gradient(180deg, rgb(24 52 82 / 0.46), rgb(11 31 53 / 0.34));

    --ind-bg: linear-gradient(180deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0.11));
    --ind-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 8px 18px -8px rgb(0 0 0 / 0.6);
  }
}

/* Continuous corners: Apple's squircle where the browser can draw it (Chromium today; others keep
   ordinary rounded corners). A squircle corner of the same radius looks tighter, so the radii grow. */
@supports (corner-shape: squircle) {
  :root {
    --r-xl: 40px;
    --r-lg: 32px;
    --r-md: 22px;
    --r-sm: 16px;
  }
  /* Capsules are continuous too (as Apple draws them); true circles stay round. */
  *,
  *::before,
  *::after {
    corner-shape: squircle;
  }
  .btn--icon,
  .media-controls__btn,
  .carousel-controls__btn,
  .announcement__close,
  .lightbox__btn,
  .checklist .icon,
  .form-done .icon,
  .aurora__blob,
  .btn--icon::before,
  .btn--icon::after {
    corner-shape: round;
  }
}

/* Arabic: no letter-spacing (it breaks the joins), roomier lines. */
:lang(ar) {
  --track-wide: 0;
  --track-tight: 0;
  --lh-tight: 1.35;
}
:lang(en) {
  --track-wide: 0.09em;
  --track-tight: -0.015em;
  --lh-tight: 1.1;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-top) + var(--header-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: var(--fs-base);
  font-weight: 450;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

[lang|='ar'] {
  font-family: var(--font-arabic);
}
[lang|='en'] {
  font-family: var(--font-latin);
}
:root:lang(ar) body {
  font-size: calc(var(--fs-base) * 1.06);
  line-height: 1.8;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul[role='list'],
ol[role='list'] {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .f {
  fill: currentColor;
  stroke: none;
}
.icon--dir:dir(rtl) {
  transform: scaleX(-1);
}

/* ---------- The colour field behind the glass ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora__blob {
  position: absolute;
  width: 72vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  animation: aurora-drift 44s var(--ease-in-out) infinite alternate;
  will-change: transform;
}
.aurora__blob--1 {
  --c: var(--aurora-1);
  inset-block-start: -32vmax;
  inset-inline-start: -24vmax;
}
.aurora__blob--2 {
  --c: var(--aurora-2);
  inset-block-start: 4vh;
  inset-inline-end: -32vmax;
  animation-duration: 52s;
  animation-delay: -16s;
}
.aurora__blob--3 {
  --c: var(--aurora-3);
  inset-block-end: -38vmax;
  inset-inline-start: 8vw;
  animation-duration: 60s;
  animation-delay: -8s;
}
.aurora__blob--4 {
  --c: var(--aurora-4);
  inset-block-end: -24vmax;
  inset-inline-end: -14vmax;
  animation-duration: 66s;
  animation-delay: -30s;
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(6vw, 5vh, 0) scale(1.12);
  }
  100% {
    transform: translate3d(-5vw, 9vh, 0) scale(0.94);
  }
}

.aurora__pattern {
  position: absolute;
  inset: 0;
  background: var(--grad-ribbon);
  opacity: var(--pattern-opacity);
  -webkit-mask: url(../brand/pattern-diamond.svg) 0 0 / 120px 120px repeat;
  mask: url(../brand/pattern-diamond.svg) 0 0 / 120px 120px repeat;
}

/* ---------- Liquid Glass material ----------
   Layers, bottom to top: tinted fill + backdrop blur (the element itself),
   ::before a rim of light drawn as a 1px gradient border,
   ::after a soft specular highlight that follows the pointer (--mx/--my set by main.js).
   Both pseudo-elements sit at z-index -1 inside the isolated element: above its fill,
   below its content. */

.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--glass-shadow);
  color: var(--glass-ink);
}

.glass::before,
.glass::after,
.btn--prominent::before,
.btn--prominent::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.glass::before,
.btn--prominent::before {
  padding: 1px;
  background: var(--rim, var(--glass-rim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.glass::after,
.btn--prominent::after {
  background: radial-gradient(var(--spec-size, 240px) circle at var(--mx, 30%) var(--my, -60%), rgb(255 255 255 / var(--glass-spec)), transparent 72%);
  opacity: 0.75;
  transition: opacity var(--dur-2) var(--ease-out);
}

.glass.is-lit::after,
.btn--prominent.is-lit::after {
  opacity: 1;
}

.glass--strong {
  background: var(--glass-fill-strong);
}

.glass--clear {
  background: var(--glass-fill-clear);
  --glass-spec: 0.4;
}

.glass--dark {
  --glass-ink: var(--on-dark);
  --rim: var(--glass-rim-dark);
  --glass-spec: 0.26;
  background: var(--glass-fill-dark);
  box-shadow: var(--glass-shadow-dark);
  color: var(--on-dark);
}

/* Refraction at the edges (Chromium only). main.js builds an SVG displacement map per
   element, sets --lens and adds .is-lensed. Other browsers keep the frosted blur. */
.is-lensed {
  -webkit-backdrop-filter: var(--lens) blur(var(--lens-blur, 4px)) saturate(170%) brightness(1.04);
  backdrop-filter: var(--lens) blur(var(--lens-blur, 4px)) saturate(170%) brightness(1.04);
}
.event-card.is-lensed {
  --lens-blur: 14px;
}
.cta-band__panel.is-lensed {
  --lens-blur: 10px;
}

/* Glass over the teaser video adapts the way Apple's does over dark media: clear with a navy tint,
   its content light. That is the video frame's own controls, and the header while it passes over the
   frame (main.js adds .is-over-media; the scroll-edge fade under it turns dark there too). */
.hero__stage,
.site-header.is-over-media .site-header__bar {
  --ink: #eef4f9;
  --ink-soft: #d3e0eb;
  --title: #ffffff;
  --teal-ink: #93d6b4;
  --brand-ink: #eef4f9;
  --link: #8cc8ff;
  --focus: #8cc8ff;
  --line: rgb(255 255 255 / 0.16);
  --line-strong: rgb(255 255 255 / 0.3);
  --tint: rgb(255 255 255 / 0.1);
  --fill: rgb(255 255 255 / 0.14);
  --fill-2: rgb(255 255 255 / 0.1);
  --mono-navy: #5d9bdc;
  --mono-ink: #4f93e0;
  --glass-ink: var(--on-dark);
  --glass-fill: linear-gradient(180deg, rgb(11 31 53 / 0.36), rgb(11 31 53 / 0.24));
  --glass-fill-strong: linear-gradient(180deg, rgb(11 31 53 / 0.64), rgb(11 31 53 / 0.52));
  --bar-fill: linear-gradient(180deg, rgb(11 31 53 / 0.5), rgb(11 31 53 / 0.38));
  --glass-solid: var(--glass-solid-dark);
  --glass-rim: var(--glass-rim-dark);
  --glass-shadow: var(--glass-shadow-dark);
  --glass-spec: 0.22;
  --ind-bg: linear-gradient(180deg, rgb(255 255 255 / 0.3), rgb(255 255 255 / 0.18));
  --ind-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 8px 18px -8px rgb(0 0 0 / 0.6);
  --nav-ind: rgb(255 255 255 / 0.18);
  --nav-on: #fff;
}

/* ---------- Logo ---------- */

.monogram {
  display: block;
  height: var(--mark-h, 40px);
  width: auto;
  aspect-ratio: 250 / 170;
  overflow: visible;
}
.monogram .st-navy {
  stop-color: var(--mono-navy);
}
.monogram .st-ink {
  stop-color: var(--mono-ink);
}

.monogram--white path,
.monogram--white rect,
.lockup--white .monogram path,
.lockup--white .monogram rect {
  fill: #fff;
}
.monogram--black path,
.monogram--black rect,
.lockup--black .monogram path,
.lockup--black .monogram rect {
  fill: #0a0a0a;
}
.monogram--grey {
  filter: grayscale(1) contrast(1.15);
}

.lockup {
  --mark-h: 40px;
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: calc(var(--mark-h) * 0.24);
  width: max-content;
  direction: ltr;
  color: var(--brand-ink);
  transition: grid-template-columns var(--dur-3) var(--ease-out), column-gap var(--dur-3) var(--ease-out);
}

.lockup__mark {
  position: relative;
  display: block;
}

.lockup__text {
  display: grid;
  justify-items: left; /* physical on purpose: the lines hug the monogram, as in the brand PDF */
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  transition: opacity var(--dur-2) var(--ease-out);
}

.lockup__line {
  display: block;
  width: fit-content;
  font-size: calc(var(--mark-h) * 0.27);
  font-weight: 450;
  line-height: calc(var(--mark-h) / 3);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.lockup--ar .lockup__line {
  font-size: calc(var(--mark-h) * 0.3);
  font-weight: 400;
  letter-spacing: 0;
}

.lockup__line--strong {
  font-weight: 800;
  background: var(--grad-forum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.lockup--white {
  --brand-ink: #fff;
}
.lockup--black {
  --brand-ink: #0a0a0a;
}
.lockup--white .lockup__line--strong,
.lockup--black .lockup__line--strong {
  background: none;
  color: var(--brand-ink);
  -webkit-text-fill-color: var(--brand-ink);
}

.lockup--xl {
  --mark-h: clamp(44px, 4.4vw, 62px);
}

/* ---------- Buttons ---------- */

.btn {
  --btn-h: 46px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: var(--btn-h);
  padding-inline: 1.3em;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-spring) var(--ease-bounce), box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2), filter var(--dur-2);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active,
.btn.is-pressed {
  transform: scale(0.95);
  transition-duration: 140ms;
  transition-timing-function: var(--ease-out);
}
.btn .icon {
  width: 1.2em;
  height: 1.2em;
}

/* Press: the light gathers at the point of contact. */
.btn.is-pressed::after {
  --spec-size: 150px;
  --glass-spec: 0.9;
  opacity: 1;
}

/* Apple's filled button: the tint, flat, with only a breath of light on its upper edge. */
.btn--prominent {
  color: #fff;
  background: linear-gradient(180deg, #3277bd, var(--blue-ink));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 18px -8px rgb(42 108 176 / 0.55);
  --rim: linear-gradient(160deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.08) 35%, rgb(255 255 255 / 0) 65%, rgb(255 255 255 / 0.25));
  --glass-spec: 0.35;
}
.btn--prominent:hover {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.32), 0 1px 2px rgb(0 0 0 / 0.08), 0 12px 24px -10px rgb(42 108 176 / 0.65);
}

.btn--glass {
  color: var(--glass-ink);
}

/* Apple's text link: the tint and a chevron ("Learn more ›") */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}
.link-more:hover {
  text-decoration: underline;
}
.link-more .icon {
  width: 1.05em;
  height: 1.05em;
  stroke-width: 2.2;
}

.btn--sm {
  --btn-h: 38px;
  padding-inline: 1.05em;
  font-size: 0.84rem;
}
.btn--lg {
  --btn-h: 56px;
  padding-inline: 1.7em;
  font-size: 1rem;
}
.btn--icon {
  width: var(--btn-h);
  padding: 0;
}
.btn--icon .icon {
  width: 22px;
  height: 22px;
}

/* ---------- Segmented controls ----------
   One component for the header nav, the tab bar, tabs and small toggles. main.js moves the
   indicator to the active item and stretches it like a drop of liquid on the way. */

.seg {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px;
  border-radius: var(--r-pill);
}

.seg__list {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seg__item {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding-inline: 1rem;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-2) var(--ease-out), transform var(--dur-spring) var(--ease-spring);
}
.seg__item:hover {
  color: var(--title);
}
.seg__item[aria-current],
.seg__item[aria-selected='true'],
.seg__item[aria-pressed='true'] {
  color: var(--title);
}

/* Apple's segmented control: a grey track with a white thumb (tabs, toggles, the language switch). */
.seg--tabs,
.seg--mini,
.seg--toc {
  padding: 3px;
  background: var(--fill);
}
.seg--tabs .seg__indicator,
.seg--mini .seg__indicator,
.seg--toc .seg__indicator {
  inset-block: 3px;
}

/* In the floating bars the selection is a soft grey capsule and the label takes the tint,
   the way iOS marks the current tab. */
.seg--nav,
.seg--tabbar {
  --ind-bg: var(--nav-ind);
  --ind-shadow: none;
}
.seg--nav .seg__item[aria-current],
.seg--tabbar .seg__item[aria-current] {
  color: var(--nav-on);
}
.seg__item .icon {
  width: 18px;
  height: 18px;
}

.seg__indicator {
  position: absolute;
  z-index: 0;
  inset-block: 4px;
  left: 0; /* physical on purpose: main.js measures from the left edge in both directions */
  width: var(--iw, 0px);
  transform: translateX(var(--ix, 0px));
  border-radius: var(--r-pill);
  background: var(--ind-bg);
  box-shadow: var(--ind-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out);
}
.seg.has-indicator .seg__indicator {
  opacity: 1;
}

/* Lifted while dragged: bigger, clearer, magnifying what is under it. */
.seg.is-dragging .seg__indicator {
  transform: translateX(var(--ix, 0px)) scale(1.16);
  background: rgb(255 255 255 / 0.32);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.85), 0 12px 30px -8px rgb(11 31 53 / 0.45);
  transition: background-color var(--dur-2), box-shadow var(--dur-2);
}
.seg__item.is-under {
  transform: scale(1.14);
  color: var(--nav-on);
}

.seg--mini .seg__item {
  min-width: 40px;
  min-height: 30px;
  padding-inline: 0.7rem;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.seg--mini .seg__item[lang='ar'] {
  font-size: 0.95rem;
}

.seg--tabs .seg__item {
  min-height: 42px;
  padding-inline: 1.15rem;
}

.seg--toc {
  max-width: 100%;
}
.seg--toc .seg__item {
  min-height: 40px;
}

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

.site-header {
  position: fixed;
  inset-block-start: var(--header-top);
  inset-inline: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding-inline: 10px;
  pointer-events: none;
}

/* The scroll-edge effect (iOS 26): once the page scrolls, content passing under the floating bar
   softens and fades to white, so the clear glass stays legible over anything. Over the video it fades
   to dark instead. */
.site-header::before {
  content: '';
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: -1;
  height: calc(var(--header-top) + var(--header-h) + 34px);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.62) 55%, rgb(255 255 255 / 0));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-3) var(--ease-out), background var(--dur-3) var(--ease-out);
}
.site-header.is-compact::before {
  opacity: 1;
}
.site-header.is-over-media::before {
  background: linear-gradient(180deg, rgb(4 14 26 / 0.55), rgb(4 14 26 / 0.3) 55%, rgb(4 14 26 / 0));
}

.site-header__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 80rem);
  min-height: var(--header-h);
  padding-block: 8px;
  padding-inline: 20px 8px;
  border-radius: var(--r-pill);
  background: var(--bar-fill);
  view-transition-name: site-header;
  transition: min-height var(--dur-3) var(--ease-spring), padding var(--dur-3) var(--ease-spring);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-sm);
}
.brand__logo {
  display: block;
  inline-size: auto;
  block-size: 44px;
}
.site-header.is-over-media .brand {
  padding: 2px 6px;
  background: #fff;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.seg--nav .seg__item {
  min-height: 40px;
  padding-inline: 0.95rem;
}

.site-header__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.site-header.is-compact .site-header__bar {
  min-height: 54px;
  padding-block: 4px;
}
@media (max-width: 1100px) {
  .seg--nav .seg__item {
    padding-inline: 0.7rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 959.98px) {
  :root {
    --header-h: 56px;
  }
  .site-nav,
  .site-header__cta {
    display: none;
  }
  .site-header__bar {
    justify-content: space-between;
    padding-inline: 14px 6px;
  }
  .brand__logo {
    block-size: 36px;
  }
}

/* ---------- Bottom tab bar (phones and small tablets) ---------- */

.tabbar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: max(12px, env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-inline: 12px;
  pointer-events: none;
}

@media (max-width: 959.98px) {
  .tabbar {
    display: flex;
  }
  /* Room for the tab bar, inside the footer's grey band so it runs to the bottom of the page */
  .site-footer {
    padding-block-end: calc(1.75rem + 92px + env(safe-area-inset-bottom));
  }
}

/* The same scroll-edge fade under the tab bar */
.tabbar::before {
  content: '';
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: -1;
  height: calc(96px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgb(255 255 255 / 0.88), rgb(255 255 255 / 0.55) 55%, rgb(255 255 255 / 0));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(0deg, #000 50%, transparent);
  mask-image: linear-gradient(0deg, #000 50%, transparent);
  pointer-events: none;
}

.tabbar__bar {
  pointer-events: auto;
  flex: 1 1 auto;
  max-width: 30rem;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--bar-fill);
  transform-origin: 50% 100%;
  view-transition-name: tabbar;
  transition: transform var(--dur-spring) var(--ease-spring);
}

.seg--tabbar {
  display: flex;
  width: 100%;
  padding: 0;
  touch-action: none;
}
.seg--tabbar .seg__list {
  display: grid;
  flex: 1;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 0;
}
.seg--tabbar .seg__indicator {
  inset-block: 0;
}

.tabbar__item {
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  padding-inline: 2px;
  font-size: 0.66rem;
  font-weight: 600;
}
.tabbar__item .tabbar__icon {
  width: 25px;
  height: 25px;
  transition: transform var(--dur-spring) var(--ease-spring);
}
/* The current tab shows the filled symbol, as on iOS. */
.tabbar__icon--fill,
.tabbar__item[aria-current] .tabbar__icon--line:has(+ .tabbar__icon--fill) {
  display: none;
}
.tabbar__item[aria-current] .tabbar__icon--fill {
  display: block;
}
.tabbar__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-spring) var(--ease-spring);
}
:lang(ar) .tabbar__item {
  font-size: 0.74rem;
}

.tabbar__action {
  --btn-h: 64px;
  pointer-events: auto;
  flex: none;
  transition: transform var(--dur-spring) var(--ease-spring);
}

.tabbar.is-min .tabbar__bar {
  transform: scale(0.86) translateY(6px);
}
.tabbar.is-min .tabbar__label {
  opacity: 0;
  transform: translateY(6px);
}
.tabbar.is-min .tabbar__icon {
  transform: translateY(8px);
}
.tabbar.is-min .tabbar__action {
  transform: scale(0.82) translateY(6px);
}

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

/* The head of the page sits on white, Apple-style: the title, and the next event on a clear glass card
   with a soft wash of the brand colours behind it for the glass to bend. The teaser video follows in a
   large rounded frame. */
.hero {
  --card-w: min(26rem, 42%);
  position: relative;
  display: grid;
  gap: clamp(2rem, 4.5vw, 3.75rem);
  padding-block-start: calc(var(--header-top) + var(--header-h) + clamp(1.25rem, 3.5vw, 2.75rem));
  /* The colour wash may reach past the screen's edge; phones would otherwise widen the page for it. */
  overflow-x: clip;
}

.hero--featured [hidden]:is(.hero__head, .hero__stage),
.featured-event[hidden] {
  display: none;
}
.hero--featured .hero__stage {
  height: clamp(18rem, 34vw, 27rem);
}
.featured-event__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  min-block-size: clamp(29rem, 41vw, 40rem);
  gap: clamp(1rem, 3vw, 2.25rem);
  padding: clamp(1rem, 2.6vw, 2.25rem);
  border: 1px solid var(--fill-2);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse at 12% 100%, rgb(168 220 140 / 0.22), transparent 56%),
    radial-gradient(ellipse at 86% 0%, rgb(63 142 224 / 0.16), transparent 52%),
    var(--bg-2);
}
.featured-event__copy {
  align-self: center;
  display: grid;
  justify-items: start;
  gap: clamp(0.9rem, 1.7vw, 1.4rem);
  padding: clamp(0.4rem, 2vw, 1.45rem);
}
.featured-event__lede {
  max-inline-size: 42ch;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 0.8rem + 0.68vw, 1.35rem);
}
.featured-event__photo {
  position: relative;
  min-inline-size: 0;
  min-block-size: 16rem;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.featured-event__photo .cover__img,
.featured-event__photo .cover-ph {
  position: absolute;
  inset: 0;
  block-size: 100%;
  inline-size: 100%;
}
@media (max-width: 760px) {
  .featured-event__panel {
    grid-template-columns: minmax(0, 1fr);
    min-block-size: 0;
  }
  .featured-event__photo {
    min-block-size: clamp(11rem, 50vw, 19rem);
  }
}

.hero__head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--card-w);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.hero__head::before {
  content: '';
  position: absolute;
  inset-block: -12% -18%;
  inset-inline: 46% -6%;
  z-index: -1;
  background:
    radial-gradient(42% 46% at 38% 34%, rgb(63 142 224 / 0.24), transparent 72%),
    radial-gradient(38% 44% at 66% 70%, rgb(168 220 140 / 0.34), transparent 72%),
    radial-gradient(30% 36% at 30% 76%, rgb(43 128 154 / 0.16), transparent 72%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
}
.hero__head > .announcement {
  grid-column: 1 / -1;
  margin-block-end: -0.75rem;
}

.hero__stage {
  position: relative;
  z-index: 0;
  margin-inline: 8px;
  /* 16:9 of the frame's width, but never taller than most of the screen. (Set as a height: an
     aspect-ratio with a max-height would narrow the frame instead.) */
  height: min((100vw - 16px) * 0.5625, 82svh);
  min-height: 18rem;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-xl);
  /* What shows until the video's first frame arrives (or while motion is reduced): a soft mesh of the
     brand colours rather than a dark block. */
  background:
    radial-gradient(40% 60% at 18% 28%, rgb(63 142 224 / 0.55), transparent 70%),
    radial-gradient(38% 56% at 84% 22%, rgb(168 220 140 / 0.7), transparent 70%),
    radial-gradient(44% 60% at 70% 88%, rgb(43 128 154 / 0.5), transparent 70%),
    radial-gradient(36% 52% at 22% 86%, rgb(27 77 122 / 0.4), transparent 70%),
    #e9f1f7;
  color: var(--on-dark);
  box-shadow: var(--shadow-soft);
  touch-action: pan-y;
}

/* The teaser video, a photo, or brand artwork fills the frame. A light shade at the bottom keeps the
   glass controls legible over bright frames. */
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(4 14 26 / 0.42), rgb(4 14 26 / 0) 32%);
}
.hero__video,
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.art:dir(rtl) {
  transform: scaleX(-1);
}

/* Light trails on the road, pulses on the routes, drifting pattern */
.trail {
  stroke-dasharray: 90 260;
  animation: trail 2.6s linear infinite;
}
.trail--2 {
  animation-duration: 3.3s;
  animation-delay: -1.4s;
}
.pulse {
  stroke-dasharray: 28 1400;
  animation: pulse-run 6s linear infinite;
}
.pulse--2 {
  animation-delay: -1.2s;
  animation-duration: 7s;
}
.pulse--3 {
  animation-delay: -3s;
  animation-duration: 6.5s;
}
.pulse--4 {
  animation-delay: -2.2s;
  animation-duration: 4.5s;
}
.pulse--5 {
  animation-delay: -4s;
  animation-duration: 6s;
}
.node-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: ring 3s var(--ease-out) infinite;
}
.node-ring--2 {
  animation-delay: -1s;
}
.node-ring--3 {
  animation-delay: -2s;
}
.art__drift {
  animation: drift-tile 26s linear infinite;
}

.hero__text {
  max-width: 40rem;
}

.hero__kicker {
  color: var(--teal-ink);
  font-size: var(--fs-md);
  font-weight: 600;
  animation: rise 0.8s var(--ease-out) 0.15s both;
}

.hero__title {
  margin-block: 0.45rem 1rem;
  color: var(--title);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-title);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
  animation: rise 0.9s var(--ease-out) 0.25s both;
}

.hero__lede {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.55;
  animation: rise 0.9s var(--ease-out) 0.38s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-block-start: 1.75rem;
  animation: rise 0.9s var(--ease-spring) 0.5s both;
}

/* Pause and sound for the teaser video: a glass capsule in the corner of the frame. */
.media-controls {
  position: absolute;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-pill);
}
.media-controls[hidden] {
  display: none;
}
.media-controls__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--title);
  cursor: pointer;
  transition: background-color var(--dur-2), transform var(--dur-spring) var(--ease-bounce);
}
.media-controls__btn:hover {
  background: var(--tint);
}
.media-controls__btn:active {
  transform: scale(0.86);
  transition-duration: 120ms;
}
.media-controls__btn .icon {
  width: 20px;
  height: 20px;
}
.media-controls .icon--play,
.media-controls.is-paused .icon--pause,
.media-controls .icon--sound,
.media-controls.is-sound .icon--muted {
  display: none;
}
.media-controls.is-paused .icon--play,
.media-controls.is-sound .icon--sound {
  display: block;
}

.event-card[hidden] {
  display: none;
}

/* Carousel controls: a dark glass capsule centred at the bottom of the hero. */
.carousel-controls {
  position: absolute;
  inset-block-end: 28px;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  margin-inline: auto;
  padding: 4px;
  border-radius: var(--r-pill);
}
.carousel-controls--static {
  position: static;
  margin: 0;
}

.carousel-controls__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color var(--dur-2), transform var(--dur-spring) var(--ease-bounce);
}
.carousel-controls__btn:hover {
  background: rgb(255 255 255 / 0.14);
}
.carousel-controls__btn:active {
  transform: scale(0.86);
  transition-duration: 120ms;
}
.carousel-controls__btn .icon {
  width: 20px;
  height: 20px;
}
[data-carousel] .icon--play,
[data-carousel]:not(.is-playing) .icon--pause {
  display: none;
}
[data-carousel]:not(.is-playing) .icon--play {
  display: block;
}

.pager {
  display: flex;
  align-items: center;
  padding-inline: 4px;
}

.pager__dot {
  display: grid;
  align-items: center;
  width: 24px;
  height: 36px;
  padding-inline: 8px;
  border: 0;
  background: none;
  cursor: pointer;
  transition: width var(--dur-spring) var(--ease-spring);
}
.pager__dot::before,
.pager__fill {
  grid-area: 1 / 1;
  height: 8px;
  border-radius: 8px;
}
.pager__dot::before {
  content: '';
  background: rgb(255 255 255 / 0.45);
  transition: background-color var(--dur-2);
}
.pager__dot[aria-current='true'] {
  width: 56px;
}
.pager__dot[aria-current='true']::before {
  background: rgb(255 255 255 / 0.28);
}
.pager__fill {
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center; /* physical: the fill grows with the reading direction */
}
.pager__fill:dir(rtl) {
  transform-origin: right center;
}
.pager__dot[aria-current='true'] .pager__fill {
  transform: scaleX(1);
}
.is-playing .pager__dot[aria-current='true'] .pager__fill {
  animation: pager-fill var(--interval, 7s) linear both;
}
.is-hold .pager__fill {
  animation-play-state: paused !important;
}

/* Announcement: a glass capsule at the head of the page, above the title. */
.announcement {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-block: 5px;
  padding-inline: 5px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  animation: drop-in 0.9s var(--ease-spring) 0.4s both;
}
.announcement[hidden],
.announcement-dismissed .announcement[data-announcement-bar] {
  display: none;
}
.announcement--static {
  position: relative;
  inset: auto;
  width: auto;
  max-width: 100%;
  margin: 0;
  animation: none;
}
.announcement.is-leaving {
  animation: lift-out 0.45s var(--ease-out) forwards;
}

.announcement__tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--grad-forum-light);
  color: var(--navy-night);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.announcement__tag .icon {
  width: 14px;
  height: 14px;
}
.announcement__text {
  color: var(--ink);
  font-weight: 500;
}
.announcement__link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.15rem;
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.announcement__link:hover {
  text-decoration: underline;
}
.announcement__link .icon {
  width: 16px;
  height: 16px;
}
.announcement__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--fill);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color var(--dur-2), transform var(--dur-spring) var(--ease-bounce);
}
.announcement__close:hover {
  background: rgb(118 118 128 / 0.2);
}
.announcement__close:active {
  transform: scale(0.86);
}
.announcement__close .icon {
  width: 16px;
  height: 16px;
}

/* Event card: the next event, on clear glass beside the title */
.event-card {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.2vw, 24px);
  border-radius: var(--r-xl);
}

.event-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.event-card__mark {
  inline-size: auto;
  block-size: 28px;
}
.event-card__eyebrow {
  color: var(--teal-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.event-card__title {
  color: var(--title);
  font-size: clamp(1.4rem, 1.05rem + 1.1vw, 1.9rem);
  font-weight: var(--fw-title);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
.event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 2px;
}
.event-card__actions .btn {
  flex: 1 1 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--fill-2);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.chip .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.countdown__caption {
  margin-block-end: 8px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.countdown__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.countdown__tiles[hidden],
.countdown__caption[hidden],
.countdown__message[hidden] {
  display: none;
}
.countdown__message {
  color: var(--title);
  font-weight: 750;
}

/* Countdown tiles: big tabular digits on a grey fill, like the timers in Apple's Clock */
.tile {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 1px;
  overflow: hidden;
  padding-block: 12px 10px;
  padding-inline: 4px;
  border-radius: var(--r-md);
  background: var(--fill-2);
  color: var(--title);
}
.tile__num {
  position: relative;
  display: block;
  height: 1.25em;
  overflow: hidden;
  font-size: clamp(1.45rem, 1.1rem + 1.1vw, 2.05rem);
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--track-tight);
}
.tile__val {
  display: block;
}
.tile__val.is-in {
  animation: roll-in 0.55s var(--ease-spring) both;
}
.tile__val.is-out {
  position: absolute;
  inset: 0;
  animation: roll-out 0.45s var(--ease-out) forwards;
}
.tile__label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
}
:lang(ar) .tile__label {
  font-size: 0.8rem;
}

@media (max-width: 959.98px) {
  .hero__head {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__head::before {
    inset-block: 30% -6%;
    inset-inline: -4%;
  }
  .hero__title {
    font-size: clamp(2.1rem, 1.2rem + 4.4vw, 3rem);
  }
  .hero__lede {
    font-size: var(--fs-base);
  }
  .event-card {
    width: min(100%, 34rem);
  }
  .hero__stage {
    height: min((100vw - 16px) * 0.75, 82svh);
  }
}
@media (max-width: 640px) {
  .hero__stage {
    margin-inline: 6px;
    height: min(100vw - 12px, 76svh);
  }
}

@media (max-width: 640px) {
  .announcement {
    width: calc(100% - 24px);
    gap: 0.5rem;
  }
  .announcement__text {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .announcement__link {
    display: none;
  }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding-block: var(--section-space);
}

.section-head {
  max-width: 48rem;
  margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center .eyebrow {
  justify-content: center;
}

/* Apple's section lead-in: a short line in the tint above a bold title */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--teal-ink);
  font-size: var(--fs-md);
  font-weight: 600;
}
.eyebrow--on-dark {
  color: var(--green);
}

.section-title {
  margin-block: 0.3rem 0.9rem;
  color: var(--title);
  font-size: var(--fs-xl);
  font-weight: var(--fw-title);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
.section-title--xl {
  font-size: var(--fs-2xl);
}
.section-title--on-dark {
  color: #fff;
}

.prose {
  max-width: 42rem;
  color: var(--ink-soft);
}
.prose + .prose {
  margin-block-start: 1rem;
}
.prose--lede {
  font-size: var(--fs-md);
}

/* Overview */
.overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

/* Facts: an inset grouped list, as in Apple's Settings. One glass platter, rows divided by hairlines
   that start after the icon, each icon on a solid rounded tile in its own colour. */
.facts {
  display: grid;
  padding-block: 6px;
  border-radius: var(--r-lg);
}

.fact {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}
.fact + .fact::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 66px 0;
  height: 1px;
  background: var(--line);
}
.fact__icon {
  --tile: var(--blue-ink);
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tile), #fff 14%), var(--tile));
  color: #fff;
}
.fact:nth-child(4n + 2) .fact__icon {
  --tile: var(--teal);
}
.fact:nth-child(4n + 3) .fact__icon {
  --tile: var(--navy);
}
.fact:nth-child(4n + 4) .fact__icon {
  --tile: #3a8a77;
}
.fact__icon .icon {
  width: 20px;
  height: 20px;
}
.fact__body {
  display: grid;
}
.fact__label {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.fact__value {
  color: var(--title);
  font-weight: 600;
}

@media (max-width: 860px) {
  .overview__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tabs */
.tabs {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
}
.tabs__list {
  display: none;
}
.js .tabs__list {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs__panels {
  display: grid;
  gap: 1rem;
  width: 100%;
}
.js .tabs__panels {
  display: block;
}

.tab-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  border-radius: var(--r-xl);
}
.tab-panel[hidden] {
  display: none;
}
.tab-panel.is-entering {
  animation: panel-in var(--dur-spring) var(--ease-spring) both;
}
.tab-panel__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: linear-gradient(180deg, #3a80c6, var(--blue-ink));
  color: #fff;
}
.tab-panel__icon .icon {
  width: 30px;
  height: 30px;
}
.tab-panel__title {
  margin-block-end: 0.5rem;
  color: var(--title);
  font-size: var(--fs-lg);
  font-weight: var(--fw-title);
  line-height: var(--lh-tight);
}
.tab-panel__body > p {
  max-width: 46rem;
  color: var(--ink-soft);
}

.checklist {
  display: grid;
  gap: 0.6rem;
  margin-block: 1.1rem 1.6rem;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 600;
}
.checklist .icon {
  width: 22px;
  height: 22px;
  margin-block-start: 0.12em;
  padding: 4px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  stroke-width: 2.6;
}

@media (max-width: 640px) {
  .seg--tabs .seg__item {
    padding-inline: 0.8rem;
  }
  .seg--tabs .seg__item .icon {
    display: none;
  }
  .tab-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .tab-panel__icon {
    width: 56px;
    height: 56px;
    border-radius: 17px;
  }
}

/* Explore: an inset list of upcoming pages, one row per navigation target */
.explore__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.explore__intro {
  position: sticky;
  inset-block-start: calc(var(--header-top) + var(--header-h) + 40px);
}

.list-group {
  padding: 6px;
  border-radius: var(--r-xl);
}

.list-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: calc(var(--r-xl) - 6px);
  transition: background-color var(--dur-3) var(--ease-out);
}
.list-row + .list-row::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 76px 16px;
  height: 1px;
  background: var(--line);
}
.list-row:target {
  animation: target-flash 1.8s var(--ease-out);
}

.list-row__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, #3a80c6, var(--blue-ink));
  color: #fff;
}
.list-row__icon .icon {
  width: 22px;
  height: 22px;
}
.list-row__body {
  display: grid;
  gap: 2px;
}
.list-row__title {
  color: var(--title);
  font-weight: 600;
}
.list-row__text {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}

.status-chip {
  padding: 0.3em 0.85em;
  border-radius: var(--r-pill);
  background: rgb(43 128 154 / 0.13);
  color: var(--teal-ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .explore__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .explore__intro {
    position: static;
  }
}
@media (max-width: 560px) {
  .list-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .list-row > .status-chip,
  .list-row > .list-row__action {
    grid-column: 2;
    justify-self: start;
  }
}

/* Registration band: glass over the drifting ribbon pattern */
.cta-band {
  padding-inline: 8px;
}
.cta-band__stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-radius: var(--r-xl);
  /* A soft mesh of the brand colours, like an Apple wallpaper, for the clear glass to float over */
  background:
    radial-gradient(38% 55% at 14% 22%, rgb(63 142 224 / 0.5), transparent 70%),
    radial-gradient(36% 52% at 86% 18%, rgb(168 220 140 / 0.7), transparent 70%),
    radial-gradient(40% 58% at 76% 92%, rgb(43 128 154 / 0.42), transparent 70%),
    radial-gradient(34% 50% at 18% 90%, rgb(99 170 152 / 0.45), transparent 70%),
    radial-gradient(30% 40% at 50% 50%, rgb(255 255 255 / 0.7), transparent 75%),
    #eef4f9;
}
.cta-band__panel {
  --glass-blur: 26px;
  --glass-fill: linear-gradient(180deg, rgb(255 255 255 / 0.38), rgb(255 255 255 / 0.2));
  --ink-soft: #3b4856;
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 5vw, 3.1rem);
  border-radius: var(--r-xl);
  text-align: center;
}
.cta-band__panel .eyebrow {
  justify-content: center;
}
.cta-band__text {
  max-width: 34rem;
  margin-inline: auto;
  color: var(--ink-soft);
  font-size: var(--fs-md);
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-block-start: 1.8rem;
}
.cta-band--mini {
  padding: 0;
}
.cta-band--mini .cta-band__stage {
  padding: 3rem 1.25rem;
}
.cta-band--mini .cta-band__panel {
  max-width: 28rem;
  padding: 1.6rem;
}

/* Partners strip */
.partners .section-head {
  margin-block-end: 1.5rem;
}
.marquee {
  overflow: hidden;
  padding-block: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
}
.marquee:not(.is-ready) .marquee__track {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 16px;
  width: auto;
  padding-inline: var(--gutter);
}
.marquee.is-ready .marquee__track {
  animation: marquee var(--marquee-dur, 40s) linear infinite;
}
.marquee.is-ready .marquee__track:dir(rtl) {
  animation-name: marquee-rtl;
}
.marquee.is-ready:hover .marquee__track,
.marquee.is-ready:focus-within .marquee__track {
  animation-play-state: paused;
}

.logo-slot {
  display: grid;
  flex: none;
  place-items: center;
  width: 210px;
  height: 104px;
  margin-inline-end: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  text-align: center;
}
.logo-slot img {
  max-height: 56px;
  width: auto;
}
.logo-slot__name {
  color: var(--title);
  font-weight: 700;
  line-height: 1.3;
}
.logo-slot--empty {
  color: var(--ink-soft);
}
.logo-slot__ph {
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 500;
}
.logo-slot__ph .icon {
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
}

/* Events: cards in a grid, on the home page, the event pages and the edition pages */
.event-grid,
.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: clamp(14px, 2vw, 22px);
}
.event-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--r-xl);
  transition: transform var(--dur-spring) var(--ease-spring), box-shadow var(--dur-2) var(--ease-out);
}
.event-tile:hover {
  transform: translateY(-3px);
}
.event-tile__media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 8px;
  overflow: hidden;
  border-radius: calc(var(--r-xl) - 8px);
}
.event-tile__media .cover__img,
.event-tile__media .cover-ph {
  position: absolute;
  inset: 0;
}
/* The date as a little calendar tile, the way Apple's Calendar icon shows it: the month in the tint,
   the day large beneath it. */
.event-tile__date {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  display: grid;
  justify-items: center;
  min-width: 62px;
  padding: 7px 10px 6px;
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.94);
  color: var(--title);
  line-height: 1.1;
  box-shadow: 0 0.5px 1px rgb(0 0 0 / 0.08), 0 6px 16px -8px rgb(0 0 0 / 0.3);
}
.event-tile__day {
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: var(--track-tight);
}
.event-tile__month {
  order: -1;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}
.event-tile__body {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 6px 20px 20px;
}
.event-tile__body > .status-chip {
  justify-self: start;
}
.event-tile__title {
  margin-block: 4px 2px;
  color: var(--title);
  font-size: var(--fs-md);
  font-weight: var(--fw-title);
  line-height: 1.3;
  text-wrap: balance;
}
/* The title link covers the whole card. */
.event-tile__link {
  color: inherit;
  text-decoration: none;
}
.event-tile__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--r-xl);
}
.event-tile__link:focus-visible {
  outline: none;
}
.event-tile:has(.event-tile__link:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.event-tile__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.event-tile__meta .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.event-tile__summary {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.event-tile__more {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-block-start: 6px;
  color: var(--link);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: gap var(--dur-spring) var(--ease-spring);
}
.event-tile:hover .event-tile__more {
  gap: 5px;
}
.event-tile__more .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.3;
}

/* Brand artwork in place of a photo, labelled with the city or the year */
.cover__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--grad-ribbon);
  color: #fff;
}
.cover-ph--1 {
  background: var(--grad-action);
}
.cover-ph--2 {
  background: linear-gradient(135deg, var(--teal), var(--sea) 55%, var(--green));
}
/* Until a photo is added: the brand gradient with a soft sheen of light, like a wallpaper */
.cover-ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 0%, rgb(255 255 255 / 0.32), transparent 70%),
    radial-gradient(50% 70% at 100% 100%, rgb(255 255 255 / 0.14), transparent 70%);
}
.cover-ph__label {
  position: relative;
  padding-inline: 1rem;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem);
  font-weight: var(--fw-title);
  letter-spacing: var(--track-tight);
  text-align: center;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.16);
}

/* Event status, kept current by main.js */
.status-chip--upcoming {
  background: rgb(42 108 176 / 0.12);
  color: #215a94;
}
.status-chip--live {
  background: rgb(168 220 140 / 0.38);
  color: #1d5c34;
}
.status-chip--past {
  background: rgb(15 39 64 / 0.07);
  color: var(--ink-soft);
}

.section-more {
  display: flex;
  justify-content: center;
  margin-block-start: clamp(1.5rem, 3vw, 2.25rem);
}
.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

/* Inner pages: event, edition, archive */
.page-hero {
  padding-block: calc(var(--header-top) + var(--header-h) + 36px) clamp(1rem, 2vw, 1.5rem);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-block-end: 1.25rem;
  color: var(--link);
  font-size: var(--fs-base);
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover {
  text-decoration: underline;
}
.back-link .icon {
  width: 18px;
  height: 18px;
}
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.page-hero__text {
  display: grid;
  justify-items: start;
  gap: 0.8rem;
}
.page-hero__text .eyebrow a {
  color: inherit;
}
.page-title {
  color: var(--title);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-title);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 0.4rem;
}
.page-hero__media {
  position: relative;
  margin-block-start: clamp(1.5rem, 3vw, 2.25rem);
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--glass-shadow);
}
.page-hero__media--archive {
  aspect-ratio: 16 / 9;
}
/* Until a photo is added, the artwork is a slim band rather than a large empty picture. */
.page-hero__media:has(> .cover-ph) {
  aspect-ratio: 21 / 5;
}
.page-hero__media .cover__img,
.page-hero__media .cover-ph {
  position: absolute;
  inset: 0;
}
.countdown-card {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 2vw, 22px);
  border-radius: var(--r-xl);
}
.countdown-card > .status-chip {
  justify-self: start;
}

.page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 5vw, 4rem);
}
.page-body--single {
  grid-template-columns: minmax(0, 1fr);
}
.page-body__main {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  min-width: 0;
}
.page-body__side {
  position: sticky;
  inset-block-start: calc(var(--header-top) + var(--header-h) + 20px);
}
.block-title {
  margin-block-end: 1rem;
  color: var(--title);
  font-size: var(--fs-lg);
  font-weight: var(--fw-title);
  line-height: var(--lh-tight);
}

/* Long texts typed in the control panel */
.rich {
  max-width: 46rem;
  color: var(--ink);
}
.rich > * + * {
  margin-block-start: 1rem;
}
.rich h3 {
  margin-block-start: 1.75rem;
  color: var(--title);
  font-size: var(--fs-md);
  font-weight: var(--fw-title);
}
.rich h4 {
  color: var(--title);
  font-weight: var(--fw-title);
}
.rich ul,
.rich ol {
  padding-inline-start: 1.4em;
}
.rich li + li {
  margin-block-start: 0.35rem;
}
.rich a {
  font-weight: 650;
}
.rich__img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
}

/* Agenda: time on one side, the session on the other */
.agenda__item {
  display: grid;
  grid-template-columns: minmax(8rem, auto) minmax(0, 1fr);
  gap: 4px 20px;
  padding-block: 14px;
  border-block-start: 1px solid var(--line);
}
.agenda__item:first-child {
  border-block-start: 0;
}
.agenda__time {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.agenda__title {
  color: var(--title);
  font-size: var(--fs-base);
  font-weight: 600;
}
.agenda__speaker {
  color: var(--teal-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.agenda__details {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}

/* Practical information beside the description */
.info-card {
  padding: clamp(18px, 2vw, 24px);
  border-radius: var(--r-xl);
}
.info-list {
  display: grid;
  gap: 16px;
  margin: 0;
}
.info-list__row {
  display: grid;
  gap: 3px;
}
.info-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.info-list dt .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.info-list dd {
  margin: 0;
  color: var(--title);
  font-weight: 600;
}
.info-list__link {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-block-start: 6px;
  font-size: var(--fs-sm);
}
.info-list__link .icon {
  width: 16px;
  height: 16px;
}

/* Organizer lockup, speaker portraits and sponsors on event invitations. */
.event-logos--organizers {
  margin-block: 0.25rem clamp(1.5rem, 4vw, 2.75rem);
}
.event-logos__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.event-logos--organizers .event-logos__list {
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.15rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.event-logos__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 0;
  inline-size: clamp(5rem, 21vw, 10rem);
  block-size: clamp(3.5rem, 9vw, 5.25rem);
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--title);
  text-align: center;
}
.event-logos--organizers .event-logos__item {
  inline-size: min(28%, 12rem);
  background: transparent;
}
.event-logos__item img {
  inline-size: min(80%, 8.5rem);
  block-size: 72%;
  object-fit: contain;
}
.event-logos--organizers img {
  inline-size: 88%;
  block-size: 100%;
}
.event-speakers {
  padding-block-end: clamp(2rem, 5vw, 4rem);
}
.event-speakers__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.5rem);
}
.event-speaker {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.event-speaker__image {
  display: block;
  inline-size: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center top;
}
.event-speaker__text {
  display: grid;
  gap: 0.3rem;
  padding: clamp(0.85rem, 2vw, 1.15rem);
}
.event-speaker__name {
  color: var(--title);
  font-size: var(--fs-md);
  line-height: var(--lh-tight);
  overflow-wrap: anywhere;
}
.event-speaker__role {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.event-speaker__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-block-start: 0.3rem;
}
.event-speaker__badges .status-chip {
  background: var(--tint);
  color: var(--accent);
}
.event-credits {
  padding-block-end: clamp(1.5rem, 3vw, 2.5rem);
}
.event-credits__details {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-start: 1rem;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}

/* First-edition projects and participating organizations. */
.edition-archive {
  gap: clamp(2rem, 5vw, 4rem);
}
.chip--venue {
  white-space: normal;
}
.edition-archive__nav {
  margin-block-start: 1.25rem;
}
.edition-archive__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 12px;
}
.archive-grid--organizations {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.archive-tile {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: clamp(0.9rem, 2vw, 1.2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.archive-tile h3 {
  color: var(--title);
  line-height: var(--lh-tight);
}
.archive-tile p {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.archive-tile .archive-tile__result {
  color: var(--link);
  font-weight: 650;
}
.archive-tile--organization {
  justify-items: center;
  text-align: center;
}
.archive-tile--organization img {
  inline-size: min(100%, 9rem);
  block-size: 4rem;
  object-fit: contain;
  margin-block-end: 0.25rem;
}
@media (min-width: 861px) {
  .edition-archive .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .event-speakers__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .event-speakers .event-speakers__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 10px;
}
.photo-grid__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-md);
}
.photo-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.photo-grid__item:hover img {
  transform: scale(1.04);
}
.photo-grid__caption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding: 18px 10px 8px;
  background: linear-gradient(0deg, rgb(4 14 26 / 0.6), transparent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 650;
}

/* Participants */
.logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.logo-grid .logo-slot {
  margin: 0;
}

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.fact__value {
  color: var(--title);
  font-weight: 750;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.fact__value:hover {
  text-decoration: underline;
}
.fact__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.fact__link .icon {
  width: 16px;
  height: 16px;
}
.fact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-weight: 700;
}

.btn--static,
.btn--static:hover {
  cursor: default;
  transform: none;
}

@media (max-width: 860px) {
  .page-hero__grid,
  .page-body,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* On a phone the practical details come first: guests open the invitation link to find the time and place. */
  .page-body__side {
    position: static;
    order: -1;
  }
  .page-hero__media {
    aspect-ratio: 16 / 9;
    border-radius: 24px;
  }
}
@media (max-width: 560px) {
  .agenda__item {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Something still to come: a quiet grey platter */
.empty-note {
  padding: 1.6rem;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  color: var(--ink-soft);
  text-align: center;
}

/* The gallery: one tab per album, the count beside its name */
.tabs__count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  margin-inline-start: 4px;
  padding-inline: 6px;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
}
.tab-panel--photos {
  display: block;
  padding: 0;
}
.photo-grid--home {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}

/* Lightbox (main.js): the photo large on a dark field, previous and next at the sides */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(4 14 26 / 0.98);
  color: #fff;
}
.lightbox[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
}
.lightbox::backdrop {
  background: rgb(4 14 26 / 0.6);
}
.lightbox__figure {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 64px 84px 8px;
}
.lightbox__img {
  max-width: min(100%, 1600px);
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: var(--r-md);
  touch-action: pan-y;
  user-select: none;
}
.lightbox__caption {
  max-width: 60ch;
  font-weight: 600;
  text-align: center;
}
.lightbox__caption[hidden] {
  display: none;
}
.lightbox__count {
  padding-block: 8px 20px;
  color: rgb(255 255 255 / 0.75);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--dur-2);
}
.lightbox__btn:hover {
  background: rgb(255 255 255 / 0.26);
}
.lightbox__btn[hidden] {
  display: none;
}
.lightbox__btn .icon {
  width: 24px;
  height: 24px;
}
.lightbox__btn--close {
  inset-block-start: 14px;
  inset-inline-end: 14px;
}
.lightbox__btn--prev,
.lightbox__btn--next {
  inset-block-start: calc(50% - 24px);
}
.lightbox__btn--prev {
  inset-inline-start: 16px;
}
.lightbox__btn--next {
  inset-inline-end: 16px;
}
@media (max-width: 640px) {
  .lightbox__figure {
    padding: 64px 12px 8px;
  }
  .lightbox__btn--prev,
  .lightbox__btn--next {
    inset-block-start: auto;
    inset-block-end: 12px;
  }
}

/* Shown or hidden by date (the hackathon window); hidden must win over each element's own display */
[data-when][hidden] {
  display: none !important;
}

/* Forms on the site: the hackathon application and the contact form */
.site-form {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 32px);
  border-radius: var(--r-xl);
}
.form-field {
  display: grid;
  gap: 6px;
}
.form-field__label {
  color: var(--title);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.form-field__req {
  margin-inline-start: 4px;
  color: #b42318;
}
.form-field__help {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
/* Fields as iOS draws them: a grey fill and no border; focus turns the field white with a tinted ring. */
.form-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: rgb(118 118 128 / 0.1);
  color: var(--ink);
  font: inherit;
  transition: background-color var(--dur-2), border-color var(--dur-2), box-shadow var(--dur-2);
}
.form-input:hover {
  background: rgb(118 118 128 / 0.14);
}
.form-input:focus,
.form-input:focus-visible {
  border-color: var(--accent);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 4px rgb(42 108 176 / 0.18);
}
textarea.form-input {
  min-height: 150px;
  resize: vertical;
}
.form-input--file {
  padding: 9px;
}
.form-input[aria-invalid='true'],
.form-check[aria-invalid='true'] {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgb(180 35 24 / 0.12);
}
.form-field--check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 10px;
}
.form-field--check .form-field__label {
  font-weight: 650;
}
.form-field--check .form-field__help,
.form-field--check .form-field__error {
  grid-column: 2;
}
.form-check {
  width: 22px;
  height: 22px;
  margin-block-start: 3px;
  accent-color: var(--blue-ink);
}
.form-field__error {
  color: #b42318;
  font-size: var(--fs-sm);
  font-weight: 650;
}
.form-field__error[hidden],
.form-status[hidden],
.form-done[hidden],
.site-form[hidden] {
  display: none;
}
.form-status {
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: rgb(180 35 24 / 0.08);
  color: #b42318;
  font-weight: 650;
}
.site-form > .btn {
  justify-self: start;
}
.form-done {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--r-xl);
  color: var(--title);
  font-weight: 600;
}
.form-done .icon {
  width: 38px;
  height: 38px;
  flex: none;
  padding: 8px;
  border-radius: 50%;
  background: #2f9e57;
  color: #fff;
  stroke-width: 2.6;
}
/* The field only bots fill in */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.page--apply .site-form,
.page--apply .form-done {
  max-width: 46rem;
}
.contact__form {
  display: grid;
  gap: 12px;
}

/* Team applications share the form controls and group the roster and its review. */
.js [data-team-application]:not(.team-application--ready) :is([data-team-fields], .form-actions),
[data-team-application] :is([data-team-fields], [data-team-member], [data-team-review], [data-team-edit])[hidden],
[data-form-receipt]:empty {
  display: none;
}
.team-application__fields,
.team-application__review {
  display: grid;
  gap: 18px;
  min-inline-size: 0;
}
.team-application__group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 16px;
  min-inline-size: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.team-application__group legend {
  padding-inline: 6px;
}
.team-application__group :is(.form-field--check, .form-field:has(textarea), .team-application__privacy) {
  grid-column: 1 / -1;
}
.team-application__group .form-field {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.team-application__privacy {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--fill);
}
.team-application__privacy summary {
  color: var(--title);
  font-weight: 600;
  cursor: pointer;
}
.team-application__privacy .rich {
  margin-block-start: 12px;
}
.team-application__review section + section {
  margin-block-start: 24px;
}
.team-application__review h3 {
  color: var(--title);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.team-application__review dl {
  margin-block: 8px 0;
}
.team-application__review dl > div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 4px 16px;
  padding-block: 8px;
  border-block-start: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.team-application__review dt {
  color: var(--ink-soft);
  font-weight: 600;
}
.team-application__review dd {
  margin: 0;
  white-space: pre-wrap;
}
[data-team-application] .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
[data-form-receipt] {
  margin-block-start: 4px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
@media (max-width: 35rem) {
  .team-application__group {
    padding-inline: 12px;
  }
  .team-application__review dl > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The hackathon page */
.hackathon-eligibility,
.hackathon-admissions {
  scroll-margin-block-start: calc(var(--header-top) + var(--header-h) + 1.25rem);
  padding: clamp(1rem, 3vw, 2.25rem);
  border-radius: var(--r-xl);
  background: var(--bg-2);
}
.hackathon-eligibility > h3,
.hackathon-admissions > .hackathon-weights {
  margin-block-start: 1.4rem;
}
.hackathon-universities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.2rem), 1fr));
  gap: 0.75rem;
  margin-block: 0.8rem 1.5rem;
}
.hackathon-universities li {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: var(--r-md);
  background: var(--bg);
}
.hackathon-universities h4 {
  color: var(--title);
  font-size: var(--fs-base);
  line-height: 1.35;
}
.hackathon-university__icon {
  display: grid;
  place-items: center;
  inline-size: 3.2rem;
  block-size: 3.2rem;
  border-radius: var(--r-sm);
  color: var(--accent);
  background: rgb(63 142 224 / 0.13);
}
.hackathon-universities li:nth-child(even) .hackathon-university__icon {
  background: rgb(99 170 152 / 0.18);
}
.hackathon-universities .hackathon-university__icon--logo {
  inline-size: 4.5rem;
  block-size: 4.5rem;
  background: var(--bg);
}
.hackathon-university__icon img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}
.hackathon-university__icon .icon {
  width: 1.65rem;
  height: 1.65rem;
}
.hackathon-weights {
  display: grid;
  gap: 0.45rem;
  margin-block-start: 0.65rem;
}
.hackathon-weights li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: var(--r-sm);
  background: var(--bg);
  padding: 0.65rem 0.8rem;
}
.hackathon-weights strong {
  color: var(--accent);
  white-space: nowrap;
}
.hackathon-note {
  margin-block-start: 1rem;
  color: var(--ink-soft);
}

.hack-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
}
.file-list {
  display: grid;
  gap: 10px;
}
.file-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  color: var(--title);
  font-weight: 600;
  text-decoration: none;
}
.file-link .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.file-link__name {
  flex: 1;
}
.file-link__type {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 700;
}

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

/* Apple's footer: a light grey band, small grey type, quiet link columns, a hairline above the legal line */
.site-footer {
  margin-block-start: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem) 1.75rem;
  background: var(--bg-2);
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.site-footer__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  padding-block-end: 1.75rem;
}
.site-footer__logo {
  display: block;
  inline-size: min(100%, 10.5rem);
  block-size: auto;
}
.site-footer__blurb {
  max-width: 30rem;
  margin-block-start: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.site-footer__title {
  margin-block-end: 0.7rem;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}
.site-footer__title--gap {
  margin-block-start: 1.5rem;
}
.site-footer__list {
  display: grid;
  gap: 0.5rem;
}
.site-footer__list a {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-footer__list a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block-start: 1.1rem;
  border-block-start: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.site-footer__photo-credits {
  margin-block-start: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.site-footer__photo-credits summary {
  cursor: pointer;
  inline-size: fit-content;
}
.site-footer__photo-credits .site-footer__list {
  margin-block-start: 0.5rem;
}
.site-footer__photo-credits a {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .site-footer__panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 480px) {
  .site-footer__panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Styleguide ---------- */

.sg-intro {
  padding-block: calc(var(--header-top) + var(--header-h) + 72px) 1rem;
}
.sg-toc {
  margin-block-start: 2rem;
  margin-inline: -4px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sg-section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.sg-grid {
  display: grid;
  gap: 16px;
}
.sg-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 27rem), 1fr));
}
.sg-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.sg-gap-top {
  margin-block-start: 16px;
}
.sg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.sg-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: var(--r-xl);
}
.sg-card > .btn {
  justify-self: start;
}
.sg-card figcaption {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.sg-card--night {
  background: radial-gradient(120% 120% at 80% 0%, var(--navy) 0%, var(--navy-night) 65%);
  color: #fff;
  box-shadow: 0 16px 36px -18px rgb(11 31 53 / 0.7);
}
.sg-card--night figcaption {
  color: var(--on-dark-soft);
}
.sg-card--paper {
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06), 0 12px 30px -16px rgb(11 31 53 / 0.35);
}
.sg-card--paper figcaption {
  color: #555;
}

.sg-logo-stage,
.sg-mark-stage {
  display: grid;
  place-items: center;
  min-height: 150px;
}
.sg-move-logo {
  inline-size: min(75%, 18rem);
  block-size: auto;
}
.sg-mark-stage .monogram {
  height: 84px;
}

.sg-favicon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 700;
}
.sg-favicon img {
  border-radius: 12px;
}

.sg-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 48rem;
  margin-block-start: 16px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: rgb(63 142 224 / 0.09);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.sg-note .icon {
  margin-block-start: 0.15em;
  color: var(--blue-ink);
}

.sg-label {
  min-width: 7rem;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.sg-label--on-dark {
  color: var(--on-dark-soft);
}

.sg-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: 12px;
}
.swatch,
.gradient-bar {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: var(--r-lg);
}
.swatch__chip,
.gradient-bar__fill {
  height: 84px;
  margin-block-end: 8px;
  border-radius: calc(var(--r-lg) - 10px);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}
.gradient-bar__fill {
  height: 64px;
}
.swatch__name {
  color: var(--title);
  font-weight: 800;
}
.swatch__hex {
  color: var(--ink-soft);
  font: 600 var(--fs-xs) / 1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.swatch__usage {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}
.swatch--navy {
  background: var(--navy);
}
.swatch--navy-deep {
  background: var(--navy-deep);
}
.swatch--navy-night {
  background: var(--navy-night);
}
.swatch--blue {
  background: var(--blue);
}
.swatch--blue-ink {
  background: var(--blue-ink);
}
.swatch--teal {
  background: var(--teal);
}
.swatch--sea {
  background: var(--sea);
}
.swatch--green {
  background: var(--green);
}
.sg-gradients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 12px;
  margin-block-start: 12px;
}
.grad--forum {
  background: var(--grad-forum);
}
.grad--ribbon {
  background: var(--grad-ribbon);
}
.grad--action {
  background: var(--grad-action);
}

.sg-specimen__name {
  color: var(--title);
  font-weight: 800;
}
.sg-specimen__glyphs {
  color: var(--title);
  font-size: clamp(2.5rem, 1.9rem + 2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.3;
}
.sg-specimen__weights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--ink-soft);
}
.w-300 {
  font-weight: 300;
}
.w-400 {
  font-weight: 400;
}
.w-500 {
  font-weight: 500;
}
.w-600 {
  font-weight: 600;
}
.w-800 {
  font-weight: 800;
}

.sg-scale {
  margin-block-start: 16px;
  padding: 8px 22px;
  border-radius: var(--r-xl);
}
.sg-scale__row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding-block: 14px;
}
.sg-scale__row + .sg-scale__row {
  border-block-start: 1px solid var(--line);
}
.sg-scale__name {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}
.t-display {
  color: var(--title);
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
}
.t-title {
  color: var(--title);
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: var(--lh-tight);
}
.t-heading {
  color: var(--title);
  font-size: var(--fs-lg);
  font-weight: 750;
  line-height: 1.3;
}
.t-body {
  color: var(--ink);
}
.t-caption {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
}
@media (max-width: 560px) {
  .sg-scale__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
}

/* A colourful stage so the glass has something to bend and blur */
.sg-backdrop {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(18px, 4vw, 40px);
  border-radius: 32px;
  background: radial-gradient(circle at 12% 18%, var(--blue) 0, transparent 40%), radial-gradient(circle at 88% 26%, var(--green) 0, transparent 38%),
    radial-gradient(circle at 60% 92%, var(--teal) 0, transparent 46%), var(--navy-night);
}
.sg-backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad-forum);
  opacity: 0.55;
  -webkit-mask: url(../brand/pattern-o.svg) 0 0 / 72px 72px repeat;
  mask: url(../brand/pattern-o.svg) 0 0 / 72px 72px repeat;
}
.sg-backdrop__word {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 4%;
  z-index: -1;
  color: rgb(255 255 255 / 0.92);
  font-family: var(--font-latin);
  font-size: clamp(6rem, 22vw, 15rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  pointer-events: none;
  transform: translateY(-50%);
}
.sg-backdrop__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 16px;
}
.sg-glass {
  display: grid;
  align-content: end;
  gap: 4px;
  min-height: 160px;
  padding: 18px;
  border-radius: var(--r-lg);
}
.sg-glass__name {
  font-size: var(--fs-md);
  font-weight: 800;
}
.sg-glass__text {
  font-size: var(--fs-sm);
}

.sg-buttons {
  gap: 18px;
}
.sg-buttons__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.sg-dark-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-block-start: 16px;
  padding: 22px;
  border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--navy-night), var(--navy) 55%, var(--teal));
}

.pattern-box {
  height: 220px;
  background: var(--grad-forum-v);
  -webkit-mask: url(../brand/pattern-diamond.svg) 0 0 / 96px 96px repeat;
  mask: url(../brand/pattern-diamond.svg) 0 0 / 96px 96px repeat;
}
.pattern-box--o {
  background: var(--grad-ribbon);
  -webkit-mask-image: url(../brand/pattern-o.svg);
  mask-image: url(../brand/pattern-o.svg);
}

.motion-demo {
  gap: 18px;
}
.motion-demo__track {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}
.motion-demo__rail {
  position: relative;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--tint);
}
.motion-demo__knob {
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 4px;
  width: 36px;
  border-radius: 50%;
  background: var(--grad-action);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), 0 6px 14px -6px rgb(27 77 122 / 0.8);
  transition: transform 900ms var(--ease-spring);
}
.motion-demo__knob--ease {
  transition: transform 600ms var(--ease-out);
}
.motion-demo.is-on .motion-demo__knob {
  transform: translateX(var(--travel, 200px));
}
.motion-demo .btn {
  justify-self: start;
}

/* ---------- Motion ---------- */

@keyframes kenburns {
  from {
    transform: scale(1.09);
  }
  to {
    transform: scale(1);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
}
@keyframes lift-out {
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
}
@keyframes pager-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes roll-in {
  from {
    opacity: 0;
    transform: translateY(85%);
  }
}
@keyframes roll-out {
  to {
    opacity: 0;
    transform: translateY(-85%);
  }
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(calc(var(--from, 1) * 32px)) scale(0.985);
  }
}
@keyframes target-flash {
  0%,
  40% {
    background-color: rgb(63 142 224 / 0.16);
  }
}
@keyframes trail {
  to {
    stroke-dashoffset: -350;
  }
}
@keyframes pulse-run {
  to {
    stroke-dashoffset: -1428;
  }
}
@keyframes ring {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(4);
  }
}
@keyframes drift-tile {
  to {
    transform: translate(160px, 160px);
  }
}
@keyframes drift-tile-96 {
  to {
    transform: translate(96px, 96px);
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
@keyframes marquee-rtl {
  to {
    transform: translateX(50%);
  }
}
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes part-in {
  from {
    opacity: 0;
    transform: var(--from, none);
  }
}

/* The monogram assembles itself: each ribbon slides in from its own side. */
@media (prefers-reduced-motion: no-preference) {
  .monogram--intro .m-part {
    transform-box: fill-box;
    transform-origin: center;
    animation: part-in 1s var(--ease-spring) both;
  }
  .monogram--intro .m-a {
    --from: translate(-18px, -14px) rotate(6deg);
    animation-delay: 0.1s;
  }
  .monogram--intro .m-e {
    --from: translate(-18px, 14px) rotate(-6deg);
    animation-delay: 0.15s;
  }
  .monogram--intro .m-b {
    --from: translate(8px, -18px);
    animation-delay: 0.2s;
  }
  .monogram--intro .m-f {
    --from: translate(10px, 18px);
    animation-delay: 0.25s;
  }
  .monogram--intro .m-c {
    --from: translate(-10px, -16px);
    animation-delay: 0.3s;
  }
  .monogram--intro .m-o {
    --from: scale(0.4);
    animation-delay: 0.35s;
  }
  .monogram--intro .m-v {
    --from: scale(0.4) rotate(-40deg);
    animation-delay: 0.45s;
  }
  .monogram--intro .m-bar {
    --from: scaleX(0);
    animation-delay: 0.55s;
  }
  .monogram--intro .m-tail {
    --from: translate(22px, 0);
    animation-delay: 0.6s;
  }

  /* Sections rise in as they enter the viewport. Pure CSS where scroll timelines exist;
     main.js adds .has-reveal and an IntersectionObserver elsewhere. */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 55%;
    }
  }

  /* Pages cross-fade when moving between them (and between Arabic and English). */
  @view-transition {
    navigation: auto;
  }
}

.has-reveal .reveal {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-spring);
}
.has-reveal .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(28px);
}

/* ---------- Preferences and fallbacks ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* No backdrop-filter at all: near-opaque surfaces keep text readable. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-solid);
  }
  .glass--dark {
    background: var(--glass-solid-dark);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass,
  .is-lensed {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--glass-solid);
  }
  .glass--dark {
    background: var(--glass-solid-dark);
  }
  .aurora {
    opacity: 0.5;
  }
  /* The scroll-edge fades become plain solid bands. */
  .site-header::before,
  .tabbar::before {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .site-header::before {
    height: calc(var(--header-top) + var(--header-h) + 10px);
    background: var(--bg);
  }
  .site-header.is-over-media::before {
    background: var(--navy-night);
  }
  .tabbar::before {
    height: calc(80px + env(safe-area-inset-bottom));
    background: var(--bg);
  }
}

@media (forced-colors: active) {
  .glass,
  .btn,
  .tile,
  .chip,
  .seg__indicator,
  .status-chip {
    border: 1px solid CanvasText;
  }
  .glass::before,
  .glass::after,
  .btn--prominent::before,
  .btn--prominent::after,
  .aurora,
  .brand .lockup__mark::after {
    display: none;
  }
  .lockup__line--strong {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
  .seg__indicator {
    background: Highlight;
  }
}
