:root {
  --bg: #0d0a1a;
  --bg2: #171230;
  --card: #1d1738;
  --line: #2f2758;
  --text: #ece8ff;
  --muted: #a69fcc;
  --gold: #ffc54a;
  --fire: #ff7a2f;
  --violet: #9b5cff;
  --radius: 16px;
  --max: 1080px;
}

@font-face {
  font-family: "Cairo";
  src: url("../fonts/Cairo-Bold.ttf") format("truetype");
  font-weight: 700 900;
  font-display: swap;
}

* { box-sizing: border-box; }
h1, h2, h3, header.top .brand, .btn, figcaption, [lang="ar"] body { font-family: "Cairo", system-ui, sans-serif; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(155, 92, 255, .18), transparent 55%),
    radial-gradient(ellipse at 90% 20%, rgba(255, 122, 47, .12), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* game header (below the studio bar) */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 10, 26, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
header.top .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .5px; }
header.top .brand img { width: 36px; height: 36px; border-radius: 9px; }
header.top nav { margin-inline-start: auto; display: flex; gap: 18px; align-items: center; }
header.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
header.top nav a:hover { color: var(--text); }

/* hero */
.hero { padding-block: 64px 40px; text-align: center; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(38px, 7vw, 68px); line-height: 1.05; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff3c9, var(--gold) 55%, var(--fire));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.tag { margin: 0 auto 28px; max-width: 620px; color: var(--muted); font-size: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--gold), var(--fire));
  color: #241200; font-weight: 800; text-decoration: none;
  padding: 13px 26px; border-radius: 999px;
  box-shadow: 0 6px 24px rgba(255, 140, 40, .35);
}
.btn.soon { filter: saturate(.6); cursor: default; }
.shot {
  margin: 40px auto 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); max-width: 900px;
}

section { padding: 48px 0; }
h2 { font-size: 30px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 28px; }

/* features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; color: var(--gold); }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* heroes */
.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.heroes figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.heroes .pic { position: relative; }
.heroes img { aspect-ratio: 360 / 491; object-fit: cover; width: 100%; }
.heroes figcaption { padding: 8px 10px; font-weight: 700; font-size: 14px; text-align: center; }
.heroes .soon img { filter: grayscale(.6) brightness(.45); }
.heroes .soon figcaption { color: var(--muted); }
.soon-tag {
  position: absolute; inset-inline: 8px; bottom: 10px; text-align: center;
  font-family: "Cairo", system-ui, sans-serif; font-weight: 800; font-size: 13px; color: #241200;
  background: linear-gradient(180deg, var(--gold), var(--fire)); border-radius: 999px; padding: 2px 6px;
}

/* skills */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 18px 10px; }
.skills figure { margin: 0; text-align: center; }
.skills img { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 197, 74, .6), 0 0 16px rgba(255, 150, 50, .25); }

/* screenshots */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: auto; aspect-ratio: 20 / 9; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 10px 12px; font-size: 14px; color: var(--muted); text-align: center; }
.skills figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.3; }

/* legal pages */
.doc { max-width: 780px; padding: 48px 16px 64px; }
.doc[lang="en"] { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.doc h1 { font-size: 36px; margin: 0 0 4px; }
.doc .updated { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 22px; margin: 36px 0 8px; color: var(--gold); }
.doc h3 { font-size: 17px; margin: 20px 0 6px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; vertical-align: top; }
.doc th { background: var(--bg2); }
.table-scroll { overflow-x: auto; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.box ol { margin: 8px 0 0; padding-inline-start: 22px; }
.ar { direction: rtl; text-align: right; }
.doc-jump { max-width: 780px; padding-top: 20px; margin-bottom: -28px; }

/* language toggle */
[lang="ar"] .en, [lang="en"] .ar-only { display: none; }

@media (max-width: 560px) {
  header.top .wrap { gap: 4px 8px; height: auto; min-height: 60px; flex-wrap: wrap; padding-block: 6px; }
  header.top nav { gap: 4px 12px; flex-wrap: wrap; justify-content: flex-end; }
  header.top nav a.hide-sm { display: none; }
  .hero { padding-block-start: 40px; }
  .hero p.tag { font-size: 16px; }
}

/* shared studio top bar and footer (same on every page of sahmgames.com) */
.site-top{display:flex;align-items:center;gap:12px 18px;flex-wrap:wrap;padding:10px 16px;background:#0b0a12;border-bottom:1px solid #2a2638;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
[lang="ar"] .site-top{font-family:"Cairo",system-ui,sans-serif}
.site-top .brand{display:flex;align-items:center;gap:8px;color:#f4f1ea;font-weight:700;font-size:18px;text-decoration:none}
.site-top nav{display:flex;gap:4px 14px;flex-wrap:wrap;margin-inline-start:auto}
.site-top nav a{color:#cfc9dc;text-decoration:none;padding:10px 4px;font-size:15px}
.site-top nav a:hover,.site-top nav a[aria-current="page"]{color:#ffb43a}
.site-top .lang{min-height:40px;padding:6px 14px;border-radius:20px;border:1px solid #3a3550;background:#16131f;color:#f4f1ea;font:inherit;cursor:pointer}
.site-foot{padding:24px 16px;text-align:center;color:#8f88a3;font-size:14px;border-top:1px solid #2a2638;background:#0b0a12}
.site-foot a{color:#cfc9dc}

/* the game's legal links inside the shared footer */
.site-foot .foot-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0 0 10px; }
