/* Shared by every page the backend serves. Same look as the game's menus:
   palette from scripts/ui/palette.gd (ink, bone, one signal yellow, team
   red/blue only for teams), the game's own OFL fonts from /fonts — Anton for
   display, Barlow for text, Barlow Condensed for buttons and navigation —
   and the slanted action plates of the in-game buttons. */
@font-face { font-family: Anton; src: url("/fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: Barlow; src: url("/fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url("/fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Barlow; src: url("/fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-SemiBold.ttf") format("truetype");
             font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-Bold.ttf") format("truetype");
             font-weight: 700; font-display: swap; }

:root {
  --ink: #0C0E13; --deep: #07080B; --panel: #15181F; --rule: #262B36; --line: #323847;
  --bone: #F2F1EC; --muted: #8B909D; --signal: #FFD12E;
  --red: #FF4D5E; --blue: #3FA7FF; --mint: #3DDC97;
  --display: Anton, Impact, "Arial Narrow", sans-serif;
  --ui: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: Barlow, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--bone);
       font-family: var(--text); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--bone); text-decoration-color: var(--signal); text-underline-offset: 3px; }
a:hover { color: var(--signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

main { max-width: 1040px; margin: 0 auto; padding: 32px var(--gutter) 64px; }
main.narrow { max-width: 560px; }
main.prose { max-width: 740px; }

/* top bar: same idea as the in-game menu shell */
nav.top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 40px;
          font-family: var(--ui); font-weight: 600; font-size: 18px; }
nav.top .brand { font-family: var(--display); font-size: 26px; letter-spacing: 0.5px; line-height: 1;
                 color: var(--bone); text-decoration: none; margin-right: auto; }
nav.top .brand span { color: var(--signal); }
nav.top a:not(.brand) { color: var(--muted); text-decoration: none; }
nav.top a:not(.brand):hover { color: var(--bone); }
nav.top a.cta { color: var(--ink); background: var(--signal); padding: 6px 16px; transform: skewX(-10deg); }
nav.top a.cta span { display: inline-block; transform: skewX(10deg); }
nav.top a.cta:hover { color: var(--ink); background: #ffe066; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: 0.3px; margin: 0 0 14px; text-wrap: balance; }
h1 { font-size: clamp(48px, 9vw, 104px); }
h1.page { font-size: clamp(36px, 6vw, 56px); }
h2 { font-size: clamp(30px, 4.4vw, 46px); }
h3 { font-size: 26px; }
.prose h2 { font-size: 28px; margin: 36px 0 8px; }
.prose li { margin: 4px 0; }
p { margin: 0 0 14px; }
.lede { color: #c9c9c4; font-size: 20px; max-width: 34em; margin: 0 0 28px; }

/* panels */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 780px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--rule); padding: 26px; }
.card.primary { border-top: 4px solid var(--signal); }
.card + .card { margin-top: 20px; }
.grid > .card + .card { margin-top: 0; }
.card.danger { border-top: 4px solid var(--red); }

/* forms */
label { display: block; font-family: var(--ui); font-weight: 600; font-size: 16px; color: var(--muted); margin: 14px 0 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--text); font-weight: 400;
              font-size: 15px; color: var(--bone); margin-top: 18px; }
label.check input { width: auto; margin-top: 4px; accent-color: var(--signal); }
input, select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0;
                background: var(--deep); color: var(--bone); font: inherit; }
input:focus, select:focus { outline: none; border-color: var(--signal); box-shadow: inset 0 -2px 0 var(--signal); }

/* buttons: the game's slanted action plates */
button, .button { display: block; width: 100%; margin-top: 20px; padding: 13px 20px; border: 0; border-radius: 0;
                  background: var(--signal); color: var(--ink); text-align: center; cursor: pointer; text-decoration: none;
                  font-family: var(--ui); font-weight: 700; font-size: 22px; letter-spacing: 0.4px;
                  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
button:hover, .button:hover { background: #ffe066; color: var(--ink); }
button:disabled { opacity: 0.6; cursor: wait; }
button.secondary, .button.secondary { background: var(--rule); color: var(--bone); }
button.secondary:hover, .button.secondary:hover { background: var(--line); color: var(--bone); }
button.danger { background: var(--red); color: var(--bone); }
.button.inline { display: inline-block; width: auto; padding: 13px 34px; }

.msg { margin-top: 14px; min-height: 1.5em; font-weight: 500; }
.msg.err { color: var(--red); } .msg.ok { color: var(--mint); }
.fine { color: var(--muted); font-size: 14px; margin-top: 28px; }
.fine a { color: var(--muted); }
.stat { display: flex; gap: 28px; flex-wrap: wrap; color: var(--muted); font-family: var(--ui); font-weight: 600; }
.stat b { color: var(--bone); font-family: var(--display); font-weight: 400; font-size: 30px; display: block; }
.notice { border-left: 4px solid var(--signal); background: var(--panel); padding: 12px 16px; margin: 0 0 28px; }
footer { color: var(--muted); font-size: 14px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--rule);
         display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }
[hidden] { display: none !important; }

/* admin page */
.narrowcard { max-width: 560px; }
.fine.tight { margin-top: 0; }
.who { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.row input { flex: 1 1 220px; width: auto; }
.row select { width: auto; }
button.small { width: auto; margin-top: 0; padding: 8px 20px; font-size: 17px; }
.scroll { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-family: var(--ui); font-weight: 600; font-size: 15px;
     border-bottom: 1px solid var(--line); padding: 6px 8px; }
td { border-bottom: 1px solid var(--rule); padding: 6px 8px; vertical-align: top; word-break: break-word; }
td.bad { color: var(--red); }

/* ---------------- home page ---------------- */
body.home main { padding-top: 0; }
.hero { position: relative; min-height: min(92vh, 860px); display: flex; overflow: hidden; background: var(--deep); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
/* the render is dark on the left: the words sit there, the fighter stays clear on the right */
.hero::after { content: ""; position: absolute; inset: 0;
               background: linear-gradient(90deg, rgba(7,8,11,.88) 0%, rgba(7,8,11,.55) 42%, rgba(7,8,11,0) 68%),
                           linear-gradient(0deg, var(--ink) 0%, rgba(12,14,19,0) 22%); }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto;
              padding: 22px var(--gutter) 56px; display: flex; flex-direction: column; }
.hero nav.top { margin-bottom: 0; }
.hero-copy { margin-top: auto; max-width: 600px; padding-top: 80px; }
.hero h1 { font-size: clamp(56px, 10vw, 128px); line-height: .92; margin-bottom: 20px; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .button { margin-top: 0; }
.live { margin: 18px 0 0; color: #c9c9c4; font-size: 15px; }
.live b { color: var(--mint); font-weight: 600; }
@media (max-width: 700px) {
  .hero-art { object-position: 78% 50%; opacity: .55; }
  .hero::after { background: linear-gradient(0deg, var(--ink) 0%, rgba(12,14,19,.5) 60%, rgba(12,14,19,.2) 100%); }
  nav.top a:not(.brand):not(.cta) { display: none; }
}

.block { padding: 88px 0 0; }
.block-head { max-width: 640px; margin-bottom: 34px; }
.block-head p { color: #c9c9c4; font-size: 18px; }
.aside { color: var(--muted); font-size: 15px; margin-top: 18px; }

/* the fighters, packaged like the action figures they are: a yellow card
   backer with a hanger slot and a clear plastic window */
.roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .roster { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .roster { gap: 12px; } .pack { padding: 28px 10px 12px; }
  .pack h3 { font-size: 26px; margin-top: 10px; } .pack p { font-size: 13px; } }
.pack { position: relative; background: var(--signal); color: var(--ink); padding: 34px 16px 18px;
        border-radius: 16px 16px 4px 4px; box-shadow: 0 18px 30px -18px rgba(0,0,0,.7); }
.pack::before { /* hanger slot */
  content: ""; position: absolute; top: 11px; left: 50%; width: 46px; height: 11px; transform: translateX(-50%);
  border-radius: 6px; background: var(--ink); }
.window { position: relative; border-radius: 12px; overflow: hidden; background: #dfe7f2;
          box-shadow: inset 0 0 0 3px rgba(255,255,255,.75), 0 0 0 2px rgba(12,14,19,.18); }
.window img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; }
.window::after { /* the blister's shine */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.38) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 70%, rgba(255,255,255,.14) 100%); }
.pack h3 { font-size: 34px; margin: 14px 0 4px; color: var(--ink); }
.pack p { font-size: 15px; line-height: 1.4; margin: 0; color: #2a2a26; }

/* arenas: one big, two stacked */
.maps { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: auto auto auto; gap: 20px; }
.map { margin: 0; background: var(--panel); border: 1px solid var(--rule); }
.map.big { grid-row: span 3; display: flex; flex-direction: column; }
.map .tag { display: inline-block; margin-left: 10px; padding: 2px 8px; background: var(--signal); color: var(--ink); font-size: 13px; letter-spacing: .04em; vertical-align: middle; }
.map.big img { flex: 1; min-height: 0; aspect-ratio: auto; }
.map img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.map figcaption { padding: 16px 18px 6px; }
.map figcaption p { color: #c9c9c4; font-size: 15px; }
.map.big figcaption h3 { font-size: 34px; }
@media (max-width: 780px) { .maps { grid-template-columns: 1fr; } .map.big { grid-row: auto; } .map.big img { aspect-ratio: 16 / 9; } }

/* arsenal: slot key + weapon, in key order */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 0; } }
.arsenal { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.arsenal li { display: flex; gap: 18px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.arsenal h3 { font-size: 26px; margin: 0 0 2px; }
.arsenal p { margin: 0; color: #c9c9c4; font-size: 16px; }
kbd { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; margin-top: 2px;
      font-family: var(--ui); font-weight: 700; font-size: 22px; color: var(--bone);
      background: var(--panel); border: 1px solid var(--line); border-bottom-width: 4px; border-radius: 6px; }
.modes-title { margin-top: 40px; font-size: 30px; }
.modes { margin: 0; }
.modes dt { font-family: var(--ui); font-weight: 700; font-size: 21px; display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.modes dd { margin: 2px 0 0; color: #c9c9c4; }
.team { width: 12px; height: 12px; display: inline-block; transform: skewX(-12deg); }
.team.red { background: var(--red); } .team.blue { background: var(--blue); }
.team.ffa { background: var(--bone); }

/* join */
.join .card h3 { font-size: 30px; }
.steps { margin: 0; padding-left: 22px; color: #c9c9c4; }
.steps li { margin: 10px 0; }
.steps b { color: var(--bone); font-weight: 600; }

/* faq */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
               font-family: var(--ui); font-weight: 700; font-size: 22px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 30px; color: var(--signal); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: #c9c9c4; margin: -4px 0 18px; max-width: 62ch; }
