@font-face {
  font-family: "Changa";
  src: url("/assets/fonts/changa-bold.ttf") format("truetype");
  font-display: swap;
  font-weight: 700;
}

@font-face {
  font-family: "Noto Naskh Arabic UI";
  src: url("/assets/fonts/noto-naskh-arabic-ui-bold.ttf") format("truetype");
  font-display: swap;
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --ink: #071b24;
  --night: #031218;
  --teal: #0e5960;
  --brass: #c5a365;
  --sun: #f2c766;
  --coral: #f05b47;
  --red: #ce1126;
  --pearl: #f4efe4;
  --mist: #a9bbc0;
  --mint: #72d5b2;
  --line: rgb(197 163 101 / 32%);
  --shadow: 0 20px 60px rgb(0 0 0 / 34%);
  font-family: "Noto Naskh Arabic UI", Georgia, serif;
  background: var(--ink);
  color: var(--pearl);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(circle at 80% 10%, rgb(14 89 96 / 42%), transparent 34rem),
    linear-gradient(145deg, var(--ink), var(--night) 64%);
  color: var(--pearl);
  font-size: 19px;
  line-height: 1.65;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -80px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--pearl);
  color: var(--night);
  border-radius: 8px;
}

.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgb(3 18 24 / 88%);
  backdrop-filter: blur(18px);
}

.nav-shell,
.shell {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-inline-end: auto;
  color: var(--pearl);
  font-family: "Changa", sans-serif;
  font-size: 24px;
  text-decoration: none;
}

.brand img { width: 42px; height: 42px; border-radius: 10px; }

nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a,
.language-link {
  color: var(--mist);
  font-family: "Changa", sans-serif;
  font-size: 15px;
  text-decoration: none;
}

nav a:hover,
.language-link:hover { color: var(--sun); }

.nav-play,
.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 0;
  border-radius: 16px;
  background: var(--coral);
  box-shadow: 0 8px 24px rgb(240 91 71 / 20%);
  color: var(--pearl);
  font-family: "Changa", sans-serif;
  font-size: 17px;
  text-decoration: none;
}

.button.secondary { background: var(--teal); }

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
  padding-block: 82px 68px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sun);
  font-family: "Changa", sans-serif;
  font-size: 15px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  font-family: "Changa", sans-serif;
  line-height: 1.2;
}

h1 { max-width: 760px; margin-bottom: 22px; font-size: clamp(46px, 7.5vw, 86px); }
h2 { margin-bottom: 20px; font-size: clamp(31px, 4vw, 47px); }
h3 { margin-bottom: 10px; color: var(--sun); font-size: 23px; }

.lead { max-width: 700px; margin: 0 0 30px; color: var(--mist); font-size: clamp(21px, 2.4vw, 27px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.table-window {
  position: relative;
  padding: 12px;
  border: 1px solid rgb(197 163 101 / 48%);
  border-radius: 36px;
  background: rgb(3 18 24 / 70%);
  box-shadow: var(--shadow);
}

.table-window::before {
  content: "";
  position: absolute;
  inset: -1px 18% auto;
  height: 4px;
  background: var(--red);
}

.table-window img { width: 100%; border-radius: 25px; }
.table-window figcaption { padding: 10px 8px 2px; color: var(--mist); font-size: 14px; }

.section { padding-block: 82px; border-top: 1px solid var(--line); }
.section-intro { max-width: 760px; color: var(--mist); font-size: 21px; }

.answer-grid,
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.answer-card,
.mode-card,
.fact-panel,
.article-section {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgb(3 18 24 / 78%);
  box-shadow: 0 12px 32px rgb(0 0 0 / 18%);
}

.answer-card,
.mode-card { padding: 28px; }
.answer-card p,
.mode-card p { margin: 0; color: var(--mist); }

.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.screens figure { margin: 0; }
.screens img { aspect-ratio: 1100 / 618; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }
.screens figcaption { padding-top: 12px; color: var(--mist); font-size: 15px; }

.fact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  padding: 36px;
}

.fact-panel p { margin-top: 0; color: var(--mist); }

.page-hero { max-width: 920px; padding-block: 96px 64px; }
.page-hero h1 { font-size: clamp(42px, 6vw, 72px); }
.provenance { color: var(--mist); font-size: 15px; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 42px;
  align-items: start;
  padding-bottom: 96px;
}

.article { min-width: 0; }
.article-section { margin-bottom: 20px; padding: clamp(25px, 4vw, 42px); }
.article-section p:last-child,
.article-section ul:last-child,
.article-section ol:last-child { margin-bottom: 0; }
.article-section p,
.article-section li { color: #d5dadd; }
.article-section strong { color: var(--pearl); }

.toc {
  position: sticky;
  top: 100px;
  padding: 24px;
  border-inline-start: 1px solid var(--line);
}

.toc strong { font-family: "Changa", sans-serif; }
.toc ol { margin: 14px 0 0; padding-inline-start: 20px; }
.toc a { color: var(--mist); font-size: 15px; text-decoration: none; }
.toc a:hover { color: var(--sun); }

table { width: 100%; border-collapse: collapse; margin-block: 22px; }
th, td { padding: 13px 15px; border: 1px solid var(--line); text-align: start; vertical-align: top; }
th { color: var(--sun); font-family: "Changa", sans-serif; background: rgb(14 89 96 / 24%); }

.term { color: var(--sun); font-family: "Changa", sans-serif; }

.site-footer { padding-block: 42px; border-top: 1px solid var(--line); color: var(--mist); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; }
.footer-grid p { margin: 0; margin-inline-end: auto; }
.footer-grid a { color: var(--mist); }

@media (max-width: 860px) {
  .nav-shell { min-height: 68px; gap: 16px; }
  nav ul { gap: 12px; }
  nav li:not(:last-child) { display: none; }
  .hero { min-height: 0; grid-template-columns: 1fr; padding-block: 64px; }
  .hero-copy { order: 1; }
  .table-window { order: 2; }
  .answer-grid, .mode-grid { grid-template-columns: 1fr 1fr; }
  .screens { grid-template-columns: 1fr; }
  .fact-panel { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; border-inline-start: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav-shell, .shell { width: min(100% - 28px, 1160px); }
  .brand span { display: none; }
  .answer-grid, .mode-grid { grid-template-columns: 1fr; }
  .section { padding-block: 60px; }
  .article-section { border-radius: 18px; }
  .nav-play { min-height: 46px; padding-inline: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
