/* ==========================================================================
   أبو الجود في تكسبو 2026 — SAAE landing page
   Brand tokens are taken from aisyria.org (see README.md).
   ========================================================================== */

/* ---------- Fonts (self-hosted Cairo, SIL OFL) ---------- */
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../fonts/cairo-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("../fonts/cairo-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("../fonts/cairo-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url("../fonts/cairo-arabic-900-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../fonts/cairo-latin-400-normal.woff2") format("woff2");
  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: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("../fonts/cairo-latin-600-normal.woff2") format("woff2");
  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: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("../fonts/cairo-latin-700-normal.woff2") format("woff2");
  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: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url("../fonts/cairo-latin-900-normal.woff2") format("woff2");
  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;
}

/* ---------- Tokens ---------- */
:root {
  /* SAAE palette, light */
  --bg: #f3fafa;
  --bg-deep: #e5f4f5;
  --surface: #ffffff;
  --surface-2: #f7fcfc;
  --theme: #d5eef1;
  --teal: #04707e;
  --teal-2: #035e6a;
  --cyan: #0c7384;
  --cyan-2: #1493a2;
  --olive: #4d7828;
  --green: #2f7a34;
  --orange: #ef8d00;
  --orange-ink: #b85d00;
  --ink: #143238;
  --ink-2: #3d5c63;
  --muted: #5f7c83;
  --paper: #ffffff;
  --paper-ink: #143238;
  --line: rgba(4, 80, 92, 0.12);
  --line-2: rgba(4, 80, 92, 0.2);
  --glow: rgba(4, 112, 126, 0.22);

  --font: "Cairo", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --topbar-h: 68px;
  --gutter: clamp(16px, 4vw, 48px);
  --page: 1280px;
  --slot-w: clamp(230px, 24vw, 360px);
  --radius: 24px;

  /* Abu Al-Joud stays inside the section slot so he never covers the copy. */
  --guide-h: min(clamp(260px, 48vh, 500px), calc((var(--slot-w) - 16px) * 1.5));
  --guide-w: calc(var(--guide-h) * 2 / 3);
  --guide-bottom: max(12px, 2.5vh);
  --bubble-w: min(clamp(180px, 18vw, 260px), var(--slot-w));

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
  background: var(--bg);
}
html.is-smooth,
html.is-smooth body {
  scroll-behavior: auto;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* faint dotted grid across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(4, 112, 126, 0.16) 1px, transparent 1.4px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.35));
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.35));
}

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

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--teal); }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { line-height: 1.25; font-weight: 900; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); margin-block: 0 20px; }
p { text-wrap: pretty; }

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

::selection { background: var(--teal); color: #fff; }

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

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--paper-ink);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

html[lang="en"] body { font-size: 16.5px; line-height: 1.65; }
html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -0.015em; }

/* English visitors: hide the Arabic texts (not the page) until the English is in place */
.i18n-pending [data-i18n],
.i18n-pending [data-logo] { visibility: hidden; animation: i18n-reveal 0s 3s forwards; }
@keyframes i18n-reveal { to { visibility: visible; } }

.accent {
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 52ch;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.8;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
}
.kicker__num {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 26px;
  padding-inline: 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.kicker--orange { color: var(--orange-ink); }
.kicker--green { color: var(--green); }

/* ---------- Buttons, chips, pills ---------- */
.btn {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background-color 0.25s, color 0.25s;
}
.btn:hover { transform: translateY(-2px); color: var(--btn-ink); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--teal); --btn-ink: #fff; box-shadow: 0 10px 30px -12px rgba(4, 112, 126, 0.45); }
.btn--primary:hover { --btn-bg: #035e6a; }
.btn--accent { --btn-bg: var(--orange); --btn-ink: #2a1600; box-shadow: 0 12px 34px -12px rgba(249, 156, 0, 0.7); }
.btn--accent:hover { --btn-bg: #ffb02e; }
.btn--xl { min-height: 60px; padding: 12px 34px; font-size: 1.2rem; }
.btn--block { width: 100%; }
.btn__icon { width: 20px; height: 20px; fill: currentColor; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s, translate 0.2s var(--ease-out);
}
.chip:hover:not([disabled]) { border-color: var(--cyan); color: var(--teal); translate: 0 -2px; }
.chip[disabled] { opacity: 0.5; cursor: default; }
.chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.chip--filter[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 22px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s, translate 0.25s var(--ease-out), background-color 0.2s;
}
.pill:hover { border-color: var(--cyan); color: var(--teal); translate: 0 -3px; }
.pill b { color: var(--orange-ink); font-size: 1.15rem; }
.pill--accent { background: var(--orange); border-color: var(--orange); color: #2a1600; }
.pill--accent:hover { background: #ffb02e; color: #2a1600; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  background: linear-gradient(to bottom, rgba(243, 250, 250, 0.94), rgba(243, 250, 250, 0.78));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--page) + 80px, 100% - 2 * var(--gutter));
  height: 100%;
  margin-inline: auto;
}
.brand { display: block; flex: 0 0 auto; border-radius: 8px; }
.brand__logo { width: auto; height: 42px; }
.nav { display: flex; gap: 2px; min-width: 0; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}
.nav__link:hover { color: var(--ink); background: rgba(12, 115, 132, 0.08); }
.nav__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background-color 0.3s, box-shadow 0.3s; }
.nav__link.is-active { color: var(--teal); }
.nav__link.is-active .nav__dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(12, 115, 132, 0.16); }
.topbar__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.texpo-chip {
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--orange);
  color: #2a1600;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  rotate: -3deg;
}
.lang-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 4px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lang-toggle:hover { border-color: var(--cyan); color: var(--teal); }
.progress { position: absolute; inset: auto 0 -1px 0; height: 2px; overflow: hidden; }
.progress__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--cyan), var(--green));
  transform: scaleX(0);
  transform-origin: right center;
}
html[dir="ltr"] .progress__bar { transform-origin: left center; }

/* ---------- Scenes ---------- */
main { display: block; outline: none; }
.scene {
  position: relative;
  overflow-x: clip;   /* animated (not yet revealed) pieces must never widen the page */
  display: flex;
  align-items: center;
  min-height: auto;
  padding-block: calc(var(--topbar-h) + 72px) 96px;
  scroll-margin-top: var(--topbar-h);
}
.scene + .scene { border-top: 1px solid var(--line); }
.scene__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--slot-w);
  grid-template-areas: "content slot";
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
  width: min(var(--page), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.scene[data-side="start"] .scene__inner {
  grid-template-columns: var(--slot-w) minmax(0, 1fr);
  grid-template-areas: "slot content";
}
.scene__content { grid-area: content; min-width: 0; }
.scene__slot { grid-area: slot; align-self: end; display: flex; justify-content: center; min-height: 1px; }
.scene__mascot { width: 100%; max-width: 280px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45)); }
.js .scene__mascot { display: none; }

/* ---------- Hero ---------- */
.scene--hero {
  min-height: 100vh;
  min-height: 100svh;
  /* Cards end above the ribbon; the ribbon sits above Abu Al-Joud. */
  padding-bottom: calc(var(--guide-bottom) + var(--guide-h) + 168px);
  overflow: hidden;
  border-top: 0;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-bg__orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.85; }
.hero-bg__orb--a { width: 46vw; height: 46vw; inset-inline-end: -10vw; top: -14vw; background: radial-gradient(closest-side, rgba(12, 160, 176, 0.28), transparent); }
.hero-bg__orb--b { width: 34vw; height: 34vw; inset-inline-start: 20vw; bottom: -12vw; background: radial-gradient(closest-side, rgba(249, 156, 0, 0.2), transparent); }
.hero-bg__tree {
  position: absolute;
  inset-inline-end: -10vw;
  bottom: -14vh;
  height: 88%;
  width: auto;
  max-width: none;
  opacity: 0.07;
  pointer-events: none;
}

.hero__event { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 18px; }
.sticker {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 16px 8px;
  border-radius: 14px;
  background: var(--orange);
  color: #2a1600;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  rotate: -5deg;
  box-shadow: 0 10px 30px -10px rgba(249, 156, 0, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}
.sticker b { font-weight: 900; letter-spacing: 0.03em; }
.hero__meta { color: var(--ink-2); font-weight: 600; }

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.06em;
  margin-bottom: 28px;
  font-size: clamp(3rem, min(8vw, 12vh), 6.4rem);
  line-height: 1.18;
}
.hero__word { display: inline-block; transform-origin: 50% 100%; }
.hero__word--play { color: var(--orange-ink); }
.hero__word--ask { color: var(--cyan); }
.hero__word--build { color: var(--green); }
.hero__lead { max-width: 46ch; color: var(--ink-2); font-size: clamp(1.02rem, 1.25vw, 1.18rem); }

.actions3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; max-width: 820px; }
.action {
  --c: var(--cyan);
  position: relative;
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 18px 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  background: linear-gradient(160deg, #ffffff, #f4fbfb);
  box-shadow: 0 16px 40px -28px rgba(20, 60, 70, 0.35);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: translate 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.action::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 35%, transparent), transparent);
  transition: transform 0.4s var(--ease-out);
}
html[dir="rtl"] .action::after { inset: auto auto -60% -30%; }
.action:hover { translate: 0 -5px; border-color: var(--c); box-shadow: 0 24px 50px -28px var(--c); color: var(--ink); }
.action:hover::after { transform: scale(1.4); }
.action--play { --c: var(--orange); }
.action--play .action__icon { color: #2a1600; }
.action--ask { --c: var(--cyan); }
.action--build { --c: var(--green); }
.action__icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: var(--c);
  color: #fff;
}
.action__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.action__icon circle { fill: currentColor; stroke: none; }
.action__title { font-size: 1.12rem; font-weight: 900; line-height: 1.4; }
.action__text { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

.ribbon {
  position: absolute;
  inset-inline: -2%;
  bottom: calc(var(--guide-bottom) + var(--guide-h) + 28px);
  z-index: 2;
  padding: 10px 0;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  rotate: -1.6deg;
  overflow: hidden;
  direction: ltr;
  box-shadow: 0 10px 40px -12px rgba(119, 224, 232, 0.6);
}
.ribbon__track { display: flex; align-items: center; gap: 22px; width: max-content; white-space: nowrap; }
.js .ribbon__track { animation: ribbon 36s linear infinite; }
.ribbon__track i { font-style: normal; color: #ffe3a3; }
.ribbon__track span { direction: rtl; }
html[dir="ltr"] .ribbon__track span { direction: ltr; }
@keyframes ribbon { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 11px)); } }

/* ---------- Play ---------- */
.arcade {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.arcade__screen {
  position: relative;
  padding: clamp(24px, 3.5vw, 44px);
  border: 2px solid rgba(249, 156, 0, 0.55);
  border-radius: 32px;
  background:
    repeating-linear-gradient(to bottom, rgba(4, 80, 92, 0.045) 0 2px, transparent 2px 5px),
    radial-gradient(120% 90% at 85% 0%, rgba(249, 156, 0, 0.14), transparent 60%),
    linear-gradient(160deg, #fffdf8, #f7fbfb);
  box-shadow: 0 0 0 8px rgba(249, 156, 0, 0.08), 0 28px 60px -36px rgba(20, 60, 70, 0.28);
  overflow: hidden;
}
.arcade__title { display: flex; align-items: center; gap: 18px; margin-block: 6px 18px; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.25; }
.arcade__big {
  font-size: clamp(6rem, 13vw, 10.5rem);
  line-height: 0.85;
  color: var(--orange);
  text-shadow: 0 4px 0 rgba(163, 93, 0, 0.18);
}
.arcade__lines { display: grid; }
.arcade__facts { display: grid; gap: 8px; margin-bottom: 26px; }
.arcade__facts li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 600; }
.arcade__facts li::before {
  content: "";
  flex: 0 0 auto;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--orange);
  rotate: 45deg;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 230px;
  padding: 18px 18px 14px;
  border-radius: 24px;
  background: var(--paper);
  color: var(--paper-ink);
  rotate: 3deg;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(238, 251, 252, 0.08);
}
.qr-card__code { position: relative; width: 100%; aspect-ratio: 1; }
.qr-card__code svg { width: 100%; height: 100%; }
.qr-card__code .qr-bg { fill: #fff; }
.qr-card__code .qr-fg { fill: var(--paper-ink); }
.qr-card figcaption { font-size: 0.88rem; font-weight: 700; text-align: center; line-height: 1.4; }
.qr-card--small { width: 170px; rotate: -2deg; }

/* ---------- Ask (chat) ---------- */
.ask { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(20px, 3vw, 44px); }
.ask__intro h2 { font-size: clamp(2.4rem, 4.6vw, 4rem); }
.chat {
  display: flex;
  flex-direction: column;
  height: min(560px, 70vh);
  min-height: 430px;
  border: 1px solid rgba(119, 224, 232, 0.35);
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff, #f4fbfb);
  box-shadow: 0 28px 60px -36px rgba(20, 60, 70, 0.28), 0 0 0 8px rgba(12, 115, 132, 0.06);
  overflow: hidden;
}
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat__avatar { width: 46px; height: 46px; border-radius: 50%; background: rgba(238, 251, 252, 0.1); object-fit: cover; }
.chat__who { flex: 1; min-width: 0; line-height: 1.35; }
.chat__name { font-weight: 900; }
.chat__status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.82rem; }
.chat__dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.2); }
.chat__status[data-state="thinking"] .chat__dot,
.chat__status[data-state="typing"] .chat__dot { background: var(--cyan); animation: blink 1s infinite; }
.chat__status[data-state="offline"] .chat__dot { background: var(--orange); box-shadow: 0 0 0 3px rgba(249, 156, 0, 0.2); }
@keyframes blink { 50% { opacity: 0.3; } }
.chat__reset {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.chat__reset:hover { border-color: var(--cyan); color: var(--teal); }
.chat__reset svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background:
    radial-gradient(circle at 50% 55%, rgba(12, 115, 132, 0.06), transparent 55%),
    radial-gradient(rgba(12, 115, 132, 0.08) 1px, transparent 1.3px) 0 0 / 18px 18px;
}
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 0.97rem; line-height: 1.7; overflow-wrap: anywhere; }
.msg--bot { align-self: flex-start; background: #e7f6f7; color: var(--paper-ink); border: 1px solid var(--line); border-start-start-radius: 6px; }
.msg--user { align-self: flex-end; background: var(--teal); color: #fff; border-start-end-radius: 6px; }
.msg p + p, .msg p + ul, .msg ul + p { margin-top: 8px; }
.msg ul, .msg ol { padding-inline-start: 18px; list-style: disc; }
.msg ol { list-style: decimal; }
.msg a { color: var(--teal); font-weight: 700; }
.msg--user a { color: #fff; }
.msg__tag { display: block; margin-top: 6px; color: #8a5a00; font-size: 0.74rem; font-weight: 700; }
.msg--typing { padding: 14px 18px; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-5px); opacity: 1; } }
.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.chat__chips .chip { flex: 0 0 auto; }
.chat__form { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.chat__input::placeholder { color: var(--muted); }
.chat__input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(119, 224, 232, 0.2); }
.chat__send {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}
.chat__send:hover:not([disabled]) { transform: scale(1.06); }
.chat__send[disabled] { opacity: 0.5; cursor: default; }
.chat__send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .chat__send svg { transform: scaleX(-1); }
.chat__note { padding: 0 16px 12px; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }

/* ---------- Tasks ---------- */
.tasks__head h2 { max-width: 22ch; }
.tasks__samples {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 12px;
  border: 1px dashed rgba(249, 156, 0, 0.6);
  border-radius: 999px;
  color: var(--orange-ink);
  font-size: 0.82rem;
  font-weight: 700;
}
.tasks__samples[hidden] { display: none; }
.tasks__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 20px 18px; }
.tasks__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); align-items: start; gap: 28px; }
.quests { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.quest {
  --c: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(170deg, #ffffff, #f4fbfb);
  box-shadow: 0 14px 32px -26px rgba(20, 60, 70, 0.4);
  transition: border-color 0.3s, translate 0.3s var(--ease-out), box-shadow 0.3s;
}
.quest::before {
  content: "";
  position: absolute;
  inset: 0 16px auto;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--c);
  opacity: 0.8;
}
.quest:hover { translate: 0 -3px; border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.quest[data-community="data"], .quest[data-community="research"] { --c: var(--cyan); }
.quest[data-community="software"], .quest[data-community="trainers"] { --c: var(--orange); }
.quest[data-community="media"], .quest[data-community="economy"] { --c: var(--green); }
.quest[data-community="urban"], .quest[data-community="health"] { --c: #2f62c4; }
.quest.is-picked { border-color: var(--green); box-shadow: 0 20px 40px -26px var(--green); }
.quest__head { display: flex; align-items: center; gap: 8px; }
.quest__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.quest__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.quest__community { flex: 1; min-width: 0; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.quest__level { padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.quest__level[data-level="3"] { border-color: rgba(249, 156, 0, 0.6); color: var(--orange-ink); }
.quest__title { font-size: 1.06rem; font-weight: 900; line-height: 1.45; }
.quest__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.quest__reward { color: var(--green); }
.quest__skills { display: flex; flex-wrap: wrap; gap: 6px; }
.quest__skills li { padding: 1px 10px; border-radius: 8px; background: rgba(12, 115, 132, 0.08); color: var(--ink-2); font-size: 0.78rem; font-weight: 600; }
.quest__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.quest__add:hover { border-color: var(--cyan); }
.quest__add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.quest__add .i-check { display: none; }
.quest__add[aria-pressed="true"] { border-style: solid; border-color: var(--green); background: var(--green); color: #fff; }
.quest__add[aria-pressed="true"] .i-plus { display: none; }
.quest__add[aria-pressed="true"] .i-check { display: block; }

.cv { position: sticky; top: calc(var(--topbar-h) + 20px); display: grid; gap: 14px; }
.cv__paper {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 6px 6px 22px 6px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(4, 38, 44, 0.07) 31px 32px),
    #fbfdfc;
  color: var(--paper-ink);
  rotate: -1.2deg;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.4);
}
html[dir="ltr"] .cv__paper { rotate: 1.2deg; border-radius: 6px 6px 6px 22px; }
.cv__paper::before {
  content: "";
  position: absolute;
  top: -10px;
  inset-inline-start: 50%;
  width: 70px; height: 20px;
  translate: -50% 0;
  background: rgba(119, 224, 232, 0.55);
  border-radius: 3px;
  rotate: 3deg;
}
html[dir="rtl"] .cv__paper::before { translate: 50% 0; }
.cv__label { color: #3a6c76; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.cv__name { margin-bottom: 10px; font-size: 1.4rem; font-weight: 900; line-height: 1.3; }
.cv__section { margin-top: 8px; color: var(--teal); font-size: 0.8rem; font-weight: 900; border-bottom: 2px solid rgba(4, 128, 144, 0.25); }
.cv__lines { display: grid; gap: 4px; padding-block: 6px; }
.cv__lines li { position: relative; padding-inline-start: 18px; font-size: 0.88rem; line-height: 1.6; border-radius: 6px; }
.cv__lines li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--olive); font-weight: 900; }
.cv__lines li.cv__empty { padding-inline-start: 0; color: #5f7f84; font-style: italic; }
.cv__lines li.cv__empty::before { content: none; }
.cv__skills { display: flex; flex-wrap: wrap; gap: 5px; padding-block: 8px; min-height: 22px; }
.cv__skills li { padding: 0 9px; border-radius: 6px; background: rgba(4, 128, 144, 0.12); color: #045e69; font-size: 0.78rem; font-weight: 700; }
.cv__cert { margin-top: 8px; padding-top: 10px; border-top: 1px dashed rgba(4, 38, 44, 0.2); color: #3a6c76; font-size: 0.78rem; line-height: 1.6; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(20px, 3vw, 48px); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; max-width: 460px; }
.stats li { display: grid; padding: 14px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.stats b { display: flex; align-items: baseline; gap: 2px; color: var(--cyan); font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 900; line-height: 1.15; direction: ltr; justify-content: flex-start; font-variant-numeric: tabular-nums; }
html[dir="rtl"] .stats b { justify-content: flex-end; }
.stats b i { color: var(--green); font-style: normal; font-size: 0.65em; }
.stats li > span { color: var(--ink-2); font-weight: 700; }

.growth { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.growth__fruits { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.growth__fruits li {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(47, 122, 52, 0.1);
  border: 1px solid rgba(47, 122, 52, 0.35);
  color: var(--green);
  font-weight: 900;
  font-size: 0.92rem;
}
.growth__fruits li:nth-child(2), .growth__fruits li:nth-child(3) { translate: 0 -10px; }
.growth__fruits li.is-star { background: var(--orange); border-color: var(--orange); color: #2a1600; box-shadow: 0 10px 30px -10px rgba(249, 156, 0, 0.8); }
.growth__trunk { position: relative; width: min(100%, 300px); }
.growth__trunk img { width: 100%; filter: drop-shadow(0 8px 16px rgba(4, 112, 126, 0.18)); }
.growth__method {
  position: absolute;
  inset-inline: 0;
  bottom: 30%;
  width: max-content;
  margin-inline: auto;
  padding: 6px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--cyan);
  color: var(--teal);
  font-weight: 900;
  box-shadow: 0 0 30px -6px var(--glow);
}
.growth__roots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.growth__roots li {
  padding: 6px 8px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

/* ---------- Million ---------- */
.million { text-align: center; display: grid; justify-items: center; gap: 6px; }
.million .lead { margin-inline: auto; }
.million__num {
  font-size: clamp(3.4rem, 11vw, 9.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--orange), var(--orange-ink) 40%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(249, 156, 0, 0.25));
}
.million__ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }

/* ---------- Footer / visit ---------- */
.footer { position: relative; overflow-x: clip; border-top: 1px solid var(--line); background: linear-gradient(to bottom, #f7fcfc, var(--bg-deep)); padding-block: 56px 28px; }
.footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; width: min(var(--page), 100% - 2 * var(--gutter)); margin-inline: auto; }
.visit__title { font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 900; line-height: 1.2; }
.visit__sep { color: var(--orange); }
.visit__place { color: var(--ink-2); font-size: 1.1rem; font-weight: 700; margin-top: 4px; }
.visit__contact { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 14px; font-style: normal; }
.visit__contact a { display: inline-block; padding-block: 8px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.visit__contact a:hover { color: var(--cyan); }
.social { display: flex; gap: 10px; margin-top: 10px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink-2); transition: border-color 0.2s, color 0.2s; }
.social a:hover { border-color: var(--cyan); color: var(--cyan); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.social .social__ig { fill: none; stroke: currentColor; stroke-width: 1.8; }
.social .social__ig .dot { fill: currentColor; stroke: none; }

.partners { width: min(var(--page), 100% - 2 * var(--gutter)); margin: 40px auto 0; }
.partners__title { color: var(--muted); font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; }
.marquee { --gap: 12px; position: relative; overflow: hidden; direction: ltr; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; gap: var(--gap); width: max-content; }
.js .marquee__track { animation: marquee 70s linear infinite; }
.partners.is-paused .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
.no-js .marquee__track { flex-wrap: wrap; width: auto; }
.no-gsap .marquee { mask-image: none; -webkit-mask-image: none; }
.logo-card { display: grid; place-items: center; flex: 0 0 auto; width: 140px; height: 76px; padding: 10px 16px; border-radius: 14px; background: #f4fbfb; }
.logo-card img { max-height: 52px; width: auto; object-fit: contain; }
.logo-card--dark { background: #0c303a; box-shadow: inset 0 0 0 1px var(--line-2); }
.marquee-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 10px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.marquee-toggle:hover { border-color: var(--cyan); color: var(--teal); }
.marquee-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.marquee-toggle__play { display: none; }
.marquee-toggle.is-paused .marquee-toggle__pause { display: none; }
.marquee-toggle.is-paused .marquee-toggle__play { display: block; fill: currentColor; }
.no-js .marquee-toggle { display: none; }

.footer__copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; width: min(var(--page), 100% - 2 * var(--gutter)); margin: 30px auto 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.footer__copy a { display: inline-block; padding-block: 6px; color: var(--ink-2); font-weight: 700; }

/* ==========================================================================
   Abu Al-Joud — the travelling guide
   ========================================================================== */
.guide {
  position: fixed;
  left: 0;
  bottom: var(--guide-bottom);
  z-index: 40;
  width: var(--guide-w);
  height: var(--guide-h);
  pointer-events: none;
  will-change: transform;
}
.guide[hidden] { display: none; }

.guide__body {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 40% 40% 24px 24px;
  -webkit-tap-highlight-color: transparent;
}
.guide__body:focus-visible { outline-offset: -6px; }

.guide__glow {
  position: absolute;
  left: 50%;
  bottom: 1%;
  width: 62%;
  height: 7%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(119, 224, 232, 0.55), rgba(119, 224, 232, 0));
  filter: blur(2px);
  animation: glow 3.2s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { opacity: 0.75; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(0.86); }
}

.guide__walker,
.guide__figure {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
}
.guide__figure > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.45));
  transition: opacity 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.guide__figure > img.is-active { opacity: 1; }

/* Walking rig: shown only while he walks; each leg swings around its hip */
.guide__rig {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.guide__rig img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  -webkit-user-drag: none;
}
.guide__leg--l { transform-origin: 33.6% 61.5%; }
.guide__leg--r { transform-origin: 60.9% 61.5%; }
.guide__rig-body { transform-origin: 50% 61.5%; }
/* Wrist of the raised hand, and shoulder of the reaching arm (from make_walk_rig.py). */
.guide__arm--wave { transform-origin: 21.56% 23.75%; }
.guide__arm--reach { transform-origin: 64.38% 49.79%; }
/* Rig fades in over the standing pose, which disappears once covered; on arrival the
   new pose is shown at once underneath and the rig fades away over it. */
.guide.is-walking .guide__rig { opacity: 1; transition: opacity 0.15s ease; }
.guide.is-walking .guide__figure > img { opacity: 0; transition: opacity 0s linear 0.15s; }
.guide__figure.is-landing > img { transition: none; }

.guide__body:hover .guide__walker { filter: brightness(1.06); }

/* Speech bubble */
.guide__bubble {
  --shift: 0px;
  position: absolute;
  z-index: 1;
  left: calc(50% + var(--head-dx, 0px));
  bottom: calc(100% - 2%);
  width: max-content;
  max-width: min(var(--bubble-w), var(--slot-w));
  min-width: min(160px, 100%);
  padding: 12px 16px 12px;
  border-radius: 18px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(119, 224, 232, 0.5);
  transform: translateX(calc(-50% + var(--shift)));
  transform-origin: 50% 100%;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.3s ease, scale 0.3s var(--ease-out);
}
.guide__bubble::after {
  content: "";
  position: absolute;
  left: clamp(22px, calc(50% - var(--shift)), calc(100% - 22px));
  top: 100%;
  width: 18px; height: 12px;
  translate: -50% -1px;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.guide__bubble.is-hidden { opacity: 0; scale: 0.85; pointer-events: none; }
.guide__name {
  margin-bottom: 2px;
  color: #036b78;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.4;
}
.guide__text {
  min-height: 1.6em;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.7;
}
.guide__text .caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-inline-start: 2px;
  vertical-align: -0.12em;
  background: #036b78;
  animation: caret 0.8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.guide__hint {
  margin-top: 6px;
  color: #3a6c76;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
}
.guide__hint::before { content: "● "; color: #036b78; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1240px) {
  .nav__link { padding: 6px 9px; font-size: 0.88rem; }
  .tasks__layout { grid-template-columns: minmax(0, 1fr); }
  .cv { position: static; max-width: 460px; }
  .about { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1080px) {
  .nav__link span:not(.nav__dot) { display: none; }
  .nav__link { min-width: 36px; justify-content: center; }
  .nav__link:hover span:not(.nav__dot),
  .nav__link:focus-visible span:not(.nav__dot) {
    display: block;
    position: absolute;
    top: calc(100% - 4px);
    padding: 2px 10px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 0 0 1px var(--line-2);
  }
  .nav__link { position: relative; }
  .ask { grid-template-columns: minmax(0, 1fr); }
  .arcade { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .actions3 { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
  .action { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon title" "icon text"; column-gap: 14px; align-items: center; }
  .action__icon { grid-area: icon; margin: 0; }
  .action__title { grid-area: title; }
  .action__text { grid-area: text; }
}

@media (min-width: 861px) and (max-height: 820px) {
  .hero__title { font-size: clamp(2.6rem, min(7vw, 11vh), 6rem); }
  .actions3 { margin-top: 20px; }
}

/* Phones, small tablets and phones in landscape: Abu Al-Joud docks to a bottom corner */
@media (max-width: 860px), (max-height: 500px) {
  :root {
    --topbar-h: 60px;
    --guide-h: clamp(150px, 24vh, 200px);
    --guide-bottom: 6px;
    --bubble-w: min(62vw, 260px);
  }
  body { font-size: 16px; }
  .brand__logo { height: 34px; }
  .nav { display: none; }

  .scene { min-height: auto; padding-block: calc(var(--topbar-h) + 48px) 72px; }
  .scene--hero { min-height: 100vh; min-height: 100svh; padding-bottom: calc(var(--guide-h) + 120px); }
  .scene__inner,
  .scene[data-side="start"] .scene__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "content" "slot";
  }
  .js .scene__slot { display: none; }
  .scene__mascot { max-width: 170px; }

  .hero__title { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .actions3 { max-width: none; }
  .ribbon { bottom: calc(var(--guide-bottom) + var(--guide-h) + 8px); font-size: 0.92rem; }
  .arcade__title { gap: 12px; }
  .qr-card:not(.qr-card--small) { display: none; }   /* already on a phone: the button is enough */
  .chat { height: min(560px, 76vh); min-height: 420px; }
  .growth__roots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .qr-card--small { display: none; }

  .guide__bubble { min-width: 140px; padding: 8px 12px; border-radius: 14px; pointer-events: none; }
  .guide__body { pointer-events: none; }
  .guide__body::after {
    content: "";
    position: absolute;
    inset: 12% 25% 3%;
    border-radius: 40% 40% 16px 16px;
    pointer-events: auto;
  }
  .guide__name { font-size: 0.72rem; }
  .guide__text { font-size: 0.84rem; line-height: 1.6; }
  .guide__hint { display: none; }
}

@media (max-width: 420px) {
  .stats li { padding: 12px 14px; }
  .chip { font-size: 0.85rem; }
  .million__ways { flex-direction: column; align-items: stretch; width: 100%; }
}

/* Short desktop screens: a smaller guide so the bubble stays under the top bar */
@media (min-width: 861px) and (max-height: 760px) {
  :root { --guide-h: min(clamp(200px, 42vh, 360px), calc((var(--slot-w) - 16px) * 1.5)); --bubble-w: clamp(220px, 24vw, 300px); }
  .guide__hint { display: none; }
}

/* Phones in landscape */
@media (max-height: 500px) {
  :root { --guide-h: clamp(96px, 30vh, 130px); --bubble-w: min(40vw, 260px); }
  .hero__title { font-size: clamp(2rem, 11vh, 2.8rem); flex-direction: row; flex-wrap: wrap; gap: 0 12px; }
  .scene--hero { padding-top: calc(var(--topbar-h) + 20px); }
  .actions3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: none; padding: 12px; }
  .action__text, .action__icon { display: none; }
}

/* ==========================================================================
   Reduced motion: no travelling, no typing, no marquees
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .js .ribbon__track { animation: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; direction: inherit; }
  .marquee__track [aria-hidden="true"] { display: none; }
  .marquee-toggle { display: none; }
}
