@font-face { font-family: "Readex Pro"; font-weight: 300; src: url(assets/fonts/readex-pro-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Readex Pro"; font-weight: 400; src: url(assets/fonts/readex-pro-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Readex Pro"; font-weight: 500; src: url(assets/fonts/readex-pro-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Readex Pro"; font-weight: 600; src: url(assets/fonts/readex-pro-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Readex Pro"; font-weight: 700; src: url(assets/fonts/readex-pro-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Readex Pro"; font-weight: 300; src: url(assets/fonts/readex-pro-arabic-300-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 400; src: url(assets/fonts/readex-pro-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 500; src: url(assets/fonts/readex-pro-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 600; src: url(assets/fonts/readex-pro-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 700; src: url(assets/fonts/readex-pro-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Changa; font-weight: 800; src: url(assets/fonts/changa-arabic-800-normal.woff2) format("woff2"); }

:root {
  --navy: #0b1530; --blue: #1f5bff; --sky: #7fa2ff; --ice: #f2f5fa; --steel: #9aa3ba;
  --card: rgba(11, 21, 48, 0.72); --line: rgba(242, 245, 250, 0.12);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-snap-type: y mandatory; background: var(--navy); }
body { color: var(--ice); font-family: "Readex Pro", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
#world { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#track section { height: 100vh; scroll-snap-align: start; }

/* Header */
.top { position: fixed; top: 0; inset-inline: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 18px 28px;
  background: linear-gradient(180deg, rgba(11,21,48,.7), rgba(11,21,48,0)); }
.logo img { height: 40px; display: block; }
.menu { display: flex; gap: 6px; margin-inline-start: auto; }
.menu a { color: var(--ice); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px;
  background: rgba(242,245,250,.08); backdrop-filter: blur(8px); transition: background .2s; }
.menu a:hover { background: rgba(242,245,250,.18); }
.lang { color: var(--ice); text-decoration: none; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(242,245,250,.35); display: inline-flex; gap: 6px; align-items: center; }
.lang svg { width: 14px; height: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; text-decoration: none;
  padding: 11px 20px; border-radius: 999px; white-space: nowrap; transition: transform .25s cubic-bezier(.2,.8,.2,1), background .2s; }
.btn-solid { background: var(--blue); color: #fff; box-shadow: 0 8px 30px -8px rgba(31,91,255,.8); }
.btn-solid:hover { background: #3b70ff; }
.btn-ghost { color: var(--ice); box-shadow: inset 0 0 0 1.5px rgba(242,245,250,.4); }

/* Chapter card */
.card { position: fixed; inset-inline-start: 28px; bottom: 100px; z-index: 4; width: min(420px, calc(100vw - 32px));
  background: var(--card); backdrop-filter: blur(16px) saturate(1.2); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 24px 22px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.6); transition: opacity .35s ease, transform .35s ease; }
.card::before { content: ""; position: absolute; inset-inline-start: 24px; top: -1px; width: 56px; height: 3px; background: var(--blue); }
.card.swap { opacity: 0; transform: translateY(10px); }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--sky); letter-spacing: .1em; margin-bottom: 12px; }
.card h1 { font-size: 30px; line-height: 1.12; font-weight: 600; letter-spacing: -.02em; margin-bottom: 12px; }
.card h1 span { display: inline-block; opacity: 0; transform: translateY(8px); animation: word .5s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d); }
@keyframes word { to { opacity: 1; transform: none; } }
.card p { font-size: 15px; line-height: 1.6; color: #c3cad9; font-weight: 300; margin-bottom: 18px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
[lang=ar] .card h1 { font-family: Changa, "Readex Pro"; font-weight: 800; letter-spacing: 0; line-height: 1.35; font-size: 31px; }
[lang=ar] .card p { font-size: 16px; line-height: 1.8; }
[lang=ar] .eyebrow { letter-spacing: 0; }

/* Chapter nav */
.chapters { position: fixed; inset-inline: 28px; bottom: 28px; z-index: 4; display: flex; gap: 6px; }
.chapters button { flex: 1; max-width: 180px; text-align: start; cursor: pointer; border: 0; background: none; padding: 10px 0 0;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--steel); border-top: 3px solid rgba(242,245,250,.14); transition: color .3s, border-color .3s; }
.chapters button span { color: var(--sky); margin-inline-end: 6px; }
.chapters button.on { color: var(--ice); border-color: var(--blue); }
.chapters button:hover { color: var(--ice); }

/* Scroll hint */
.hint { position: fixed; inset-inline-end: 28px; bottom: 30px; z-index: 4; display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--steel); transition: opacity .4s; }
.hint.gone { opacity: 0; }
.mouse { width: 16px; height: 24px; border: 1.5px solid var(--steel); border-radius: 8px; position: relative; }
.mouse::after { content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 5px; margin-left: -1px; background: var(--blue); border-radius: 2px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(8px); } }

/* Loader */
.loader { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: var(--navy); transition: opacity .7s; }
.loader img { height: 84px; animation: pulse 1.2s ease-in-out infinite alternate; }
.loader.done { opacity: 0; pointer-events: none; }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }

.credits { position: fixed; inset-inline: 0; bottom: 6px; z-index: 3; text-align: center; font-size: 9.5px; color: rgba(242,245,250,.42); pointer-events: none; }

/* Phone */
@media (max-width: 760px) {
  .top { padding: 14px 16px; }
  .menu { display: none; }
  .lang { margin-inline-start: auto; }
  .logo img { height: 32px; }
  .card { inset-inline: 16px; bottom: 56px; width: auto; padding: 18px; }
  .card h1, [lang=ar] .card h1 { font-size: 22px; }
  .card p { font-size: 14px; margin-bottom: 14px; }
  .chapters { inset-inline: 16px; bottom: 22px; gap: 4px; }
  .chapters button { font-size: 0; padding-top: 0; }
  .chapters button span { display: none; }
  .hint { display: none; }
  .credits { font-size: 8px; bottom: 4px; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .chapters button { transition: none; }
  .mouse::after, .loader img { animation: none; }
  .card h1 span { animation: none; opacity: 1; transform: none; }
}

/* ?clean: no UI, for the share image */
.clean .card, .clean .chapters, .clean .hint, .clean .credits, .clean .menu, .clean .lang { display: none !important; }
