@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 560 780;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin.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: "Nunito";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin.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: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/naskh-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}

:root {
  --ink: #3a2416;
  --ink-soft: #5c4030;
  --cream: #f6efe4;
  --cream-deep: #efe2d0;
  --paper: #fffaf3;
  --cheese: #f0b429;
  --cheese-deep: #c9841a;
  --wood: #6b4228;
  --wood-dark: #3e2618;
  --line: rgba(90, 52, 28, 0.14);
  --shadow: 0 16px 40px rgba(62, 38, 24, 0.12);
  --radius: 22px;
  --max: 1120px;
  --font: "Nunito", "Noto Naskh Arabic", "Segoe UI", sans-serif;
  --display: "Fraunces", "Noto Naskh Arabic", "Nunito", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% -10%, rgba(240, 180, 41, 0.45), transparent 42%),
    radial-gradient(ellipse at 100% 0%, rgba(201, 132, 26, 0.18), transparent 36%),
    var(--cream);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  min-height: 100vh;
}

html[dir="rtl"] body {
  font-family: "Noto Naskh Arabic", "Nunito", "Segoe UI", sans-serif;
  line-height: 1.85;
}

img { max-width: 100%; height: auto; }

a { color: var(--wood); }

a:hover { color: var(--wood-dark); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .logo-word {
  font-family: "Noto Naskh Arabic", "Fraunces", serif;
  letter-spacing: 0;
}

html[dir="rtl"] .logo-word {
  font-family: "Fraunces", "Nunito", serif;
  letter-spacing: -0.03em;
}

p { margin: 0; }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  background: var(--wood-dark);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 50;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 239, 228, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-inline-end: auto;
}

.brand svg { display: block; }

.logo-word {
  font-family: var(--display);
  font-weight: 760;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.site-nav a {
  text-decoration: none;
  font-weight: 800;
  color: var(--ink-soft);
  padding: 6px 2px;
}

.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--cheese); }

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.langs a {
  text-decoration: none;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 9px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.langs a[aria-current="true"] {
  background: var(--wood-dark);
  color: #fff8ec;
}

.langs a:hover { border-color: var(--line); }

main { padding: 28px 0 64px; }

.hero {
  display: grid;
  gap: 28px;
  align-items: center;
  margin-bottom: 48px;
}

.kicker {
  font-weight: 800;
  color: var(--cheese-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

html[dir="rtl"] .kicker { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }

.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); max-width: 14ch; }

.lead {
  margin-top: 14px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
}

.btn.primary { background: var(--cheese); color: var(--wood-dark); }
.btn.primary:hover { background: #ffc44d; color: var(--wood-dark); }
.btn.ghost { background: transparent; border-color: rgba(62, 38, 24, 0.25); color: var(--ink); }
.btn.ghost:hover { border-color: var(--wood); }
.btn.small { padding: 8px 12px; font-size: 0.92rem; }

.hero-frame {
  display: block;
  background: var(--wood);
  padding: 10px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(-1.1deg);
  text-decoration: none;
}

.hero-frame img {
  display: block;
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.shelf { margin-top: 18px; padding-top: 8px; }

.shelf-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  align-items: end;
  margin-bottom: 14px;
}

.shelf-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }

.shelf-head p { color: var(--ink-soft); max-width: 46ch; }

.shelf-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}

.shelf-jump a {
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

.cards { display: grid; gap: 16px; }

.game-card {
  display: grid;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.game-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--wood);
}

.game-card-body { padding: 16px 18px 18px; display: grid; gap: 8px; }

.game-card h3 { font-size: 1.6rem; }

.meta { color: var(--ink-soft); font-weight: 700; font-size: 0.95rem; }

.play-pill {
  justify-self: start;
  background: var(--cheese);
  color: var(--wood-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
}

.soon-card {
  border: 1.5px dashed rgba(107, 66, 40, 0.35);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(255, 250, 243, 0.55);
  max-width: 640px;
}

.badge {
  display: inline-block;
  background: var(--cream-deep);
  color: var(--wood);
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.page-intro { max-width: 68ch; display: grid; gap: 12px; margin-bottom: 22px; }

.page-intro h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

.prose { max-width: 68ch; display: grid; gap: 14px; }
.prose h2 { font-size: 1.55rem; margin-top: 12px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: 8px; }

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-weight: 800;
  margin-bottom: 14px;
}

.crumb a { text-decoration: none; }

.stage { margin: 8px 0 28px; }

.stage-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.frame-shell {
  height: min(78vh, 820px);
  min-height: 520px;
  background: #24160f;
  border-radius: 18px;
  overflow: hidden;
  border: 8px solid #6b4228;
  box-shadow: var(--shadow);
}

.frame-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #24160f;
}

.frame-shell:fullscreen,
.frame-shell:-webkit-full-screen {
  border: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.stats div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.stats b {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
}

.stats span { color: var(--ink-soft); font-weight: 700; font-size: 0.92rem; }

.shots {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.shots figure {
  margin: 0;
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.shots img { display: block; width: 100%; }

.shots figcaption { padding: 10px 14px 12px; color: var(--ink-soft); font-weight: 700; }

.more-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.email {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  background: var(--wood-dark);
  color: #f6e7d4;
  padding: 28px 0 36px;
}

.site-footer a { color: #ffe3a3; }

.foot {
  display: grid;
  gap: 16px;
}

.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }

.foot-links a { font-weight: 800; text-decoration: none; }

.kofi {
  justify-self: start;
  background: #ff5e5b;
  color: white !important;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 16px;
}

.fine { color: #e6cbb4; font-size: 0.92rem; }

.lang-pick {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.lang-pick a {
  display: flex;
  justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  font-weight: 800;
}

:focus-visible {
  outline: 3px solid var(--cheese-deep);
  outline-offset: 3px;
}

@media (min-width: 800px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
  .game-card.is-feature { grid-template-columns: 1.25fr 0.9fr; align-items: stretch; }
  .game-card.is-feature img { height: 100%; aspect-ratio: auto; min-height: 280px; }
  .shots { grid-template-columns: 1.4fr 0.7fr; align-items: start; }
  .foot { grid-template-columns: 1.4fr 1fr auto; align-items: center; }
}

@media (max-width: 700px) {
  .frame-shell {
    min-height: 70vh;
    height: 78vh;
    border-width: 4px;
    border-radius: 14px;
  }
  .stats { grid-template-columns: 1fr; }
  .hero-frame { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .game-card, .hero-frame { transform: none; }
}
