/* The game's presentation pages: readable without JavaScript, for search engines and their readers. */

@font-face { font-family: 'Bangers'; src: url('/fonts/bangers-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; src: url('/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Lalezar'; src: url('/fonts/lalezar-arabic-400-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Cairo'; font-weight: 500; src: url('/fonts/cairo-arabic-500-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Cairo'; font-weight: 700; src: url('/fonts/cairo-arabic-700-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --night: #07031a;
  --panel: #150b38;
  --line: #3a2a8a;
  --text: #f1ecff;
  --muted: #b7acd9;
  --flame: #ff8a1c;
  --flame-deep: #e2560c;
  --gold: #ffd23f;
  --hit: #5be38f;
  --font-display: 'Bangers', 'Lalezar', Impact, sans-serif;
  --font-body: 'Barlow Condensed', 'Cairo', 'Arial Narrow', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--night) url('/assets/space.webp') center top / cover fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.5;
}

a { color: var(--gold); }
a:focus-visible, .cta:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.page {
  max-width: 54rem;
  margin: 0 auto;
  padding: 1.5rem max(16px, env(safe-area-inset-right)) 3rem max(16px, env(safe-area-inset-left));
  display: grid;
  gap: 2.5rem;
}

.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand {
  font-family: 'Bangers', Impact, sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  color: var(--flame);
  text-decoration: none;
  text-shadow: 0 3px 0 var(--flame-deep), 0 0 18px rgb(255 138 28 / 0.35);
}
.switch { font-size: 1rem; color: var(--muted); }

.hero { display: grid; gap: 1.2rem; }
h1, h2 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 3.6rem); line-height: 1.05; letter-spacing: 0.02em; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); line-height: 1.1; letter-spacing: 0.02em; color: var(--gold); }
.lead { margin: 0; font-size: 1.35rem; color: var(--text); max-width: 40rem; }
.hero img { width: 100%; height: auto; border-radius: 14px; border: 2px solid var(--line); }

.cta {
  justify-self: start;
  display: inline-block;
  padding: 0.7rem 2.2rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  color: #2a0d00;
  background: linear-gradient(180deg, var(--gold), var(--flame));
  border-radius: 12px;
  box-shadow: 0 5px 0 var(--flame-deep);
  text-decoration: none;
  transition: transform 120ms ease;
}
.cta:hover { transform: translateY(-2px); }
.cta:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--flame-deep); }
.note { margin: 0; color: var(--muted); font-size: 1.05rem; }

section { display: grid; gap: 1rem; }
section p { margin: 0; max-width: 42rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); counter-reset: step; }
.steps li { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-family: 'Bangers', Impact, sans-serif; font-size: 2rem; color: var(--flame); line-height: 1; margin-block-end: 0.3rem; }
.steps strong { display: block; font-size: 1.3rem; }

.modes { margin: 0; display: grid; gap: 0.9rem; }
.modes div { border-inline-start: 4px solid var(--flame); padding-inline-start: 0.9rem; }
.modes dt { font-weight: 700; font-size: 1.3rem; }
.modes dd { margin: 0; color: var(--muted); }

.themes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.themes li { padding: 0.25rem 0.8rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }

.faq { display: grid; gap: 0.6rem; }
.faq details { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.25rem; }
.faq details p { margin-block-start: 0.5rem; color: var(--muted); }

footer { color: var(--muted); font-size: 1rem; display: grid; gap: 0.4rem; border-block-start: 1px solid var(--line); padding-block-start: 1.2rem; }

/* Arabic: cursive letters are never spaced apart, and their dots need room. */
:lang(ar) h1, :lang(ar) h2, :lang(ar) .cta { letter-spacing: 0; line-height: 1.35; }
:lang(ar) body { line-height: 1.75; }
[lang='en'] { direction: ltr; unicode-bidi: isolate; }

@media (prefers-reduced-motion: reduce) { .cta { transition: none; } }

/* Vocabulary pages: the word lists. */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 1rem; color: var(--muted); }
/* The browser mirrors › in Arabic, so it points the way the eye reads in both directions. */
.crumbs li + li::before { content: '›'; margin-inline-end: 0.4rem; }
.crumbs a { color: var(--muted); }
.words { overflow-x: auto; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); }
.words table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.words th { text-align: start; font-weight: 700; color: var(--gold); padding: 0.55rem 1rem; border-block-end: 2px solid var(--line); }
.words td { padding: 0.45rem 1rem; border-block-end: 1px solid rgb(58 42 138 / 0.5); }
.words tr:last-child td { border-block-end: 0; }
.words td[lang='en'] { font-weight: 700; text-align: start; }
:lang(ar) .words td[lang='en'] { text-align: right; }
.theme-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.theme-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 0.7rem 1rem; }
.theme-list a { font-weight: 700; font-size: 1.25rem; }
.theme-list span { color: var(--muted); white-space: nowrap; }
.themes a { color: var(--text); text-decoration: none; }
.themes a:hover { color: var(--gold); }
