@font-face { font-family: Alexandria; src: url(fonts/alexandria-arabic.woff2) format('woff2'); font-weight: 300 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: Alexandria; src: url(fonts/alexandria-latin.woff2) format('woff2'); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Outfit; src: url(fonts/outfit-latin.woff2) format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(fonts/instrument-serif-italic-latin.woff2) format('woff2'); font-style: italic; font-display: swap; }

:root {
  --ink: #0A0A0A;
  --paper: #FAF8F4;
  --red: #EF4444;
  --red-soft: #FF6B6B;
  --muted: rgba(250, 248, 244, 0.68);
  --line: rgba(250, 248, 244, 0.16);
  --gutter: clamp(16px, 4vw, 72px);
  --sans: Alexandria, Outfit, system-ui, sans-serif;
  color-scheme: dark;
}
html[lang="en"] { --sans: Outfit, Alexandria, system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--paper); overflow: hidden; }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; touch-action: none; }
button { font: inherit; color: inherit; }

#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.shade { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55)); }

.top { position: fixed; inset-inline: var(--gutter); top: clamp(14px, 3vh, 40px); display: flex;
  justify-content: space-between; align-items: center; z-index: 3; }
.mark { font-family: Outfit, sans-serif; font-weight: 700; font-size: clamp(18px, 1.5vw, 28px); letter-spacing: -0.04em; direction: ltr; }
.mark b, .wordmark b { color: var(--red); font-weight: 700; }
.lang { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; cursor: pointer;
  font-size: clamp(13px, 0.9vw, 16px); }
.lang:hover, .arrow:hover { border-color: var(--paper); }
.lang:focus-visible, .arrow:focus-visible, .progress button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* The words. JS moves each .line in by the presentation's own clock. */
.words { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.card { position: absolute; inset-inline-start: var(--gutter); bottom: 16vh; width: min(40vw, 760px); }
.line { opacity: 0; will-change: transform, opacity; }
/* A shade behind the words, so they read over any part of the world. */
.card::before { content: ''; position: absolute; z-index: -1; inset: -30vh calc(-1 * var(--gutter)) -20vh -20vw; pointer-events: none;
  background: radial-gradient(closest-side, rgba(10, 10, 10, 0.78), rgba(10, 10, 10, 0.5) 60%, transparent); }
[dir="ltr"] .card::before { inset: -30vh -20vw -20vh calc(-1 * var(--gutter)); }
.columns::before { content: ''; position: absolute; z-index: -1; inset: -12vh calc(-1 * var(--gutter)) -14vh; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 50%, transparent); }
.kicker { display: flex; gap: 10px; align-items: center; color: var(--red-soft); font-weight: 500;
  font-size: clamp(13px, 1vw, 20px); letter-spacing: 0.04em; margin: 0 0 1.1em; }
html[lang="en"] .kicker { text-transform: uppercase; letter-spacing: 0.14em; }
.kicker::before { content: ''; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--red); box-shadow: 0 0 14px var(--red); }
.title { font-weight: 600; font-size: clamp(28px, 3.3vw, 66px); line-height: 1.18; margin: 0 0 0.5em; letter-spacing: -0.01em; }
html[lang="en"] .title { letter-spacing: -0.03em; line-height: 1.08; }
.body { font-weight: 300; font-size: clamp(16px, 1.35vw, 27px); line-height: 1.7; color: var(--muted); margin: 0; max-width: 34em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; direction: ltr; justify-content: flex-end; }
html[lang="en"] .chips { justify-content: flex-start; }
.chip { border: 1px solid rgba(239, 68, 68, 0.6); color: var(--paper); border-radius: 999px; padding: 0.4em 1em;
  font-family: Outfit, sans-serif; font-size: clamp(13px, 1vw, 19px); background: rgba(239, 68, 68, 0.12); }
.points { list-style: none; padding: 0; margin: 0.4em 0 0; display: grid; gap: 0.7em; font-size: clamp(16px, 1.3vw, 26px); font-weight: 300; }
.points li { display: flex; gap: 0.8em; align-items: baseline; }
.points li::before { content: ''; flex: none; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--red); transform: translateY(-0.1em); }

.example { width: min(42vw, 780px); }
.table { margin-top: 1.2em; border: 1px solid var(--line); border-radius: 20px; padding: 0.4em 1.4em;
  background: rgba(10, 10, 10, 0.6); backdrop-filter: blur(8px); font-size: clamp(14px, 1.2vw, 23px); }
.row { display: flex; justify-content: space-between; gap: 1em; padding: 0.62em 0; border-bottom: 1px solid var(--line); }
.row span:last-child { font-family: Outfit, sans-serif; font-weight: 500; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.row.total { border-bottom: 0; font-weight: 600; font-size: 1.15em; color: var(--paper); }
.row.total span:last-child { color: var(--red-soft); }

.brand { position: absolute; inset-inline: 0; top: 60vh; text-align: center; }
.brand p { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85); }
.wordmark { font-family: Outfit, sans-serif; font-weight: 700; font-size: clamp(40px, 4.6vw, 92px); letter-spacing: -0.04em; margin: 0; direction: ltr; }
.tagline { font-family: 'Instrument Serif', serif; font-style: italic; font-size: clamp(22px, 2.2vw, 44px); margin: 0.2em 0 0; color: var(--paper); }
html[lang="ar"] .tagline { font-family: var(--sans); font-style: normal; font-weight: 300; }
.contact { margin-top: 1.4em; font-family: Outfit, sans-serif; letter-spacing: 0.06em; color: var(--muted); font-size: clamp(15px, 1.2vw, 24px); }

.columns { position: absolute; inset-inline: var(--gutter); bottom: 14vh; display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; }
.columns h2 { font-size: clamp(24px, 2.4vw, 48px); font-weight: 600; margin: 0 0 0.6em; }
.columns .kicker { grid-column: 1 / -1; margin: 0; }
.steps ol { counter-reset: step; }
.steps ol li { counter-increment: step; }
.steps ol li::before { content: counter(step); width: 1.7em; height: 1.7em; border-radius: 50%; display: grid; place-items: center;
  background: rgba(239, 68, 68, 0.18); border: 1px solid rgba(239, 68, 68, 0.7); color: var(--paper); font-family: Outfit, sans-serif;
  font-size: 0.75em; font-weight: 600; transform: none; }

.progress { position: fixed; bottom: clamp(16px, 4vh, 44px); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; direction: inherit; }
.progress button { background: none; border: 0; padding: 10px 6px; cursor: pointer; display: grid; justify-items: center; gap: 8px; }
.progress i { display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--line); transition: background 0.3s, width 0.3s; }
.progress button[aria-current="step"] i { background: var(--red); width: 44px; }
.progress span { font-size: 12px; color: var(--muted); opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.progress button[aria-current="step"] span, .progress button:hover span { opacity: 1; }
.arrows { position: fixed; bottom: clamp(16px, 4vh, 44px); inset-inline-end: var(--gutter); display: flex; gap: 10px; z-index: 3; }
.arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(10, 10, 10, 0.5); cursor: pointer; font-size: 26px; line-height: 1; }
.hint { position: fixed; top: clamp(56px, 9vh, 100px); inset-inline: var(--gutter); margin: 0; font-size: 13px; color: var(--muted); z-index: 3; transition: opacity 1s; }
.hint.gone { opacity: 0; }
.concept { position: fixed; bottom: clamp(18px, 4.4vh, 48px); inset-inline-start: var(--gutter); margin: 0; font-size: 11px; color: rgba(250, 248, 244, 0.4); max-width: 22vw; z-index: 3; }
.blackout { position: fixed; inset: 0; background: #000; z-index: 10; }
.noscript, .nogl { position: fixed; inset: 40% var(--gutter) auto; text-align: center; line-height: 1.8; }

/* The film (tools/record.mjs) has no buttons or hints. */
.recording .arrows, .recording .hint, .recording .lang, .recording .concept { display: none; }

@media (max-aspect-ratio: 1/1) {
  .card, .example { inset-inline: var(--gutter); width: auto; bottom: 15vh; }
  .card::before { content: ''; position: absolute; inset: -40px calc(-1 * var(--gutter)) -20vh; z-index: -1;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.92) 55%, transparent); }
  .title { font-size: clamp(24px, 7vw, 40px); }
  .body { font-size: clamp(15px, 4vw, 19px); }
  .columns { grid-template-columns: 1fr; gap: 6vw; bottom: 15vh; }
  .brand { top: 62vh; }
  .progress span, .concept, .hint { display: none; }
  .progress { gap: 2px; }
  .progress i { width: 16px; }
  .progress button[aria-current="step"] i { width: 28px; }
  .arrows { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .progress i, .progress span, .hint { transition: none; }
}
