/* Goal Fight public site — one stylesheet for every page (EN + AR). Mobile-first, no external fonts or CDNs. */
/* Display fonts from the game (OFL, licences beside the files): Lilita One (Latin), GF Kufi Arabic Bold (Arabic). */
@font-face { font-family: "Lilita One"; src: url("/assets/fonts/lilita-one.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "GF Kufi Arabic"; src: url("/assets/fonts/gf-kufi-arabic-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Palette = the game's UI kit tokens (Docs/Design/MenuScreens/UI-KIT.md §1, DESIGN-SYSTEM.md). */
:root {
  --navy-950: #040b22;
  --navy-900: #071338;
  --navy-800: #0b1d52;
  --navy-700: #12297a;
  --navy-600: #1a3a9e;
  --royal-500: #2d64f0;
  --royal-400: #4d8bff;
  --gold-300: #ffe38a;
  --gold: #ffcb3d;
  --gold-deep: #f7a70f;
  --gold-700: #a45a00;
  --blue: var(--royal-400);
  --cyan: #43d3ff;
  --green: #34d27b;
  --red: #ff5a6a;
  --text: #eef3ff;
  --sky: #bcd4ff;
  --muted: #8fa6dd;
  --line: rgba(120, 170, 255, 0.24);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --glow-cyan: 0 0 0 1px rgba(67, 211, 255, 0.35), 0 0 24px rgba(67, 211, 255, 0.25);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Noto Kufi Arabic", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Lilita One", "Arial Black", Impact, var(--font);
  --wrap: 1140px;
  color-scheme: dark;
}
html[lang="ar"] { --font-display: "GF Kufi Arabic", var(--font-ar); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.65 var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(77, 139, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(67, 211, 255, 0.12), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950) 70%);
  background-attachment: fixed;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #8cefff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--gold); color: var(--navy-900); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { inset-inline-start: 8px; }

/* Header / footer (hidden in embed mode) */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(5, 11, 36, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .lang-switch {
  color: var(--text); text-decoration: none; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: rgba(77, 139, 255, 0.18); color: #fff; }
.lang-switch { border: 1px solid var(--line); }
.lang-switch:hover { border-color: var(--cyan); color: #fff; }
@media (max-width: 640px) {
  .nav { order: 3; width: 100%; margin-inline-start: 0; padding-bottom: 2px; }
  .lang-switch { margin-inline-start: auto; }
}

.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: rgba(5, 11, 36, 0.6); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

/* Embed mode: in-app browser (?embed=1). No chrome, tighter spacing. */
html.embed .site-header, html.embed .site-footer, html.embed .embed-hide { display: none !important; }
html.embed body { background-attachment: scroll; }
html.embed main { padding-top: 8px; }
html.embed .page-hero { padding-top: 20px; }

/* Typography */
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 400; font-family: var(--font-display); letter-spacing: 0.01em; }
html[lang="ar"] h1 { font-weight: 700; }
h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 800; margin-top: 1.8em; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; }
html[lang="ar"] .display { font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.4em; }
html[lang="en"] .display { font-style: italic; text-transform: uppercase; }  /* the kit's synthetic slant */
.accent { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

/* Sections and cards */
.section { padding-top: 40px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: linear-gradient(180deg, rgba(28, 53, 128, 0.55), rgba(12, 26, 71, 0.75));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card .icon { font-size: 1.6rem; margin-bottom: 6px; }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
figure { margin: 0; }

/* Long-form legal pages */
.page-hero { padding: 36px 0 8px; }
.page-hero p { color: var(--muted); }
.doc { max-width: 780px; }
.doc h2 { padding-top: 12px; border-top: 1px solid var(--line); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.93rem; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--gold); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 560px; }
.toc { background: rgba(12, 26, 71, 0.6); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0; }
.toc ol { margin: 0; padding-inline-start: 1.3em; columns: 2 220px; }
.callout { border-inline-start: 4px solid var(--gold); background: rgba(255, 194, 26, 0.08); padding: 12px 16px; border-radius: 8px; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border: 0; border-radius: 14px;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  color: var(--navy-900); background: linear-gradient(180deg, #ffe07a, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 6px 0 #b86e00, 0 10px 24px rgba(255, 194, 26, 0.25);
}
.btn:hover { color: var(--navy-900); filter: brightness(1.05); }
.btn:active { transform: translateY(2px); box-shadow: 0 4px 0 #b86e00; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { color: #fff; border-color: var(--cyan); }
form { display: grid; gap: 14px; }
label { font-weight: 600; display: grid; gap: 6px; }
label .hint { font-weight: 400; color: var(--muted); font-size: 0.86rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(5, 11, 36, 0.7); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--gold); }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.status { border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid; }
.status[hidden] { display: none; }
.status.ok { border-color: rgba(52, 210, 123, 0.6); background: rgba(52, 210, 123, 0.12); }
.status.err { border-color: rgba(255, 90, 106, 0.6); background: rgba(255, 90, 106, 0.12); }
.status.busy { border-color: var(--line); background: rgba(61, 139, 255, 0.1); }
.request-id { font-family: ui-monospace, Menlo, Consolas, monospace; background: rgba(0, 0, 0, 0.35); padding: 2px 8px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Steps list */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 44px; min-height: 30px; padding-top: 2px; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: var(--blue); color: #fff; box-shadow: 0 0 14px rgba(61, 139, 255, 0.6);
}

/* Advertise: slot map */
.slot-map { position: relative; }
.slot-map img { width: 100%; }
.slot {
  position: absolute; border: 2px solid var(--cyan); border-radius: 6px;
  background: rgba(53, 224, 255, 0.14); box-shadow: 0 0 16px rgba(53, 224, 255, 0.55);
  text-decoration: none;
}
.slot.board { border-color: var(--gold); background: rgba(255, 194, 26, 0.14); box-shadow: 0 0 14px rgba(255, 194, 26, 0.5); }
.slot b {
  position: absolute; top: -9px; left: -9px; white-space: nowrap;
  font-size: clamp(0.6rem, 1.6vw, 0.85rem); line-height: 1; padding: 3px 6px; border-radius: 999px;
  background: var(--navy-900); color: #fff; border: 1px solid currentColor;
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -2px; }
.legend .l-banner { border: 2px solid var(--cyan); }
.legend .l-board { border: 2px solid var(--gold); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.88em; background: rgba(0, 0, 0, 0.3); padding: 1px 6px; border-radius: 5px; direction: ltr; unicode-bidi: isolate; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.mt-0 { margin-top: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Slot positions measured on the 1920x1080 arena capture (assets/img/arena.webp); physical left even in RTL. */
.s-banner-01 { left: 7.55%; top: 15.93%; width: 6.1%; height: 15.56%; }
.s-banner-02 { left: 42.97%; top: 24.26%; width: 14.17%; height: 19.26%; }
.s-banner-03 { left: 86.3%; top: 15.93%; width: 6.2%; height: 15.56%; }
.s-board-01, .s-board-02, .s-board-03, .s-board-04, .s-board-05, .s-board-06, .s-board-07 { top: 46.76%; height: 6.2%; width: 14.06%; }
.s-board-01 { left: 0; width: 13.8%; }
.s-board-02 { left: 14.17%; }
.s-board-03 { left: 28.54%; }
.s-board-04 { left: 42.97%; }
.s-board-05 { left: 57.34%; }
.s-board-06 { left: 71.77%; }
.s-board-07 { left: 86.2%; width: 13.8%; }
.s-lobby { left: 6.5%; top: 62.5%; width: 31.6%; height: 14%; } /* LobbyAdLayout: under EVENTS, above the dock (LTR capture) */
