/* Xenobastion: one committed dark world. Night-sky steel, the game's cyan shield glow,
   and the four faction colors used only where a faction is named.
   Layout: full-bleed key art hero, then a 70rem column of tight bands. */
:root {
  --void: #070b12;
  --hull: #0e1520;
  --plate: #152031;
  --line: #22324a;
  --text: #e6edf6;
  --dim: #93a3b8;
  --shield: #3fe0ff;
  --shield-deep: #0aa6c9;
  --insect: #8fe03c;
  --bio: #b063f0;
  --mech: #c9d4e2;
  --litho: #ff8a2a;
  --todo-bg: #4a3d00;
  --todo-fg: #ffe680;
  --f-brand: "Aldrich", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--void); color: var(--text); font: 400 1rem/1.65 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--shield); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--shield); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 70rem; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.draft { background: var(--todo-bg); color: var(--todo-fg); font: 500 .85rem/1.4 var(--f-body); text-align: center; padding-block: .55rem; }
.todo { background: var(--todo-bg); color: var(--todo-fg); padding: 0 .3em; border-radius: 3px; }

.topbar { position: absolute; inset: 0 0 auto; z-index: 3; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1rem; flex-wrap: wrap; }
.studio { font: 600 .78rem/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text); text-decoration: none; opacity: .85; }
.studio:hover { opacity: 1; }
.langs { display: flex; gap: .2rem; font: 500 .78rem/1 var(--f-mono); letter-spacing: .08em; }
.langs a { color: var(--dim); text-decoration: none; padding: .45rem .6rem; border-radius: 6px; }
.langs a[aria-current="true"] { color: var(--void); background: var(--shield); }

.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero > img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7,11,18,.55) 0%, rgba(7,11,18,.35) 35%, rgba(7,11,18,.75) 72%, var(--void) 100%); }
.hero > .wrap { padding-block: clamp(6rem, 16vw, 11rem) clamp(2.5rem, 6vw, 4rem); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.1rem; }
.hero h1 { margin: 0; width: min(100%, 44rem); }
.hero h1 img { width: 100%; filter: drop-shadow(0 0 22px rgba(63,224,255,.35)); }
.tagline { font: 400 clamp(1.25rem, 3.2vw, 1.9rem)/1.2 var(--f-brand); letter-spacing: .04em; margin: 0; text-wrap: balance; }
.sub { color: var(--dim); max-width: 46ch; margin: 0; font-size: 1.05rem; }
.ctas { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .85rem 1.3rem; border-radius: 10px; font: 600 .95rem/1 var(--f-body); text-decoration: none; border: 1px solid var(--line); color: var(--text); background: rgba(14,21,32,.7); }
.btn.store { border-color: var(--shield-deep); }
.btn.store[aria-disabled="true"] { cursor: default; }
.btn.store small { display: block; font: 500 .68rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--shield); }
.btn:hover:not([aria-disabled="true"]) { border-color: var(--shield); }
.btn svg { width: 22px; height: 22px; flex: none; }

section.band { padding-block: clamp(3rem, 7vw, 5rem); }
section.band + section.band { border-top: 1px solid var(--line); }
.kicker { font: 500 .74rem/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--shield); margin: 0 0 .9rem; }
h2 { font: 400 clamp(1.6rem, 3.6vw, 2.3rem)/1.15 var(--f-brand); letter-spacing: .02em; margin: 0 0 1rem; text-wrap: balance; }
.lede { color: var(--dim); font-size: 1.08rem; max-width: 62ch; margin: 0; }

.brief { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.brief figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 2rem; }
.features div { background: var(--hull); padding: 1.4rem 1.4rem 1.6rem; min-width: 0; }
.features h3 { font: 400 1.08rem/1.25 var(--f-brand); letter-spacing: .02em; margin: 0 0 .5rem; color: var(--text); }
.features p { margin: 0; color: var(--dim); font-size: .95rem; }

.factions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.faction { background: var(--hull); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; padding: 1.2rem; min-width: 0; }
.faction h3 { font: 400 1.15rem/1.2 var(--f-brand); margin: 0 0 .5rem; color: var(--c); }
.faction p { margin: 0 0 1rem; color: var(--dim); font-size: .93rem; }
.faction dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem .8rem; font-size: .88rem; }
.faction dt { font: 500 .7rem/1.9 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.faction dd { margin: 0; }
.f-insect { --c: var(--insect); } .f-bio { --c: var(--bio); } .f-mech { --c: var(--mech); } .f-litho { --c: var(--litho); }
.note { color: var(--dim); font-size: .9rem; margin: 1.2rem 0 0; }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.shots figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--hull); }
.shots img { aspect-ratio: 20 / 9; object-fit: cover; width: 100%; }
.shots figcaption { padding: .7rem 1rem; color: var(--dim); font-size: .88rem; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; }
.facts div { border-left: 2px solid var(--shield-deep); padding-left: 1rem; min-width: 0; }
.facts dt { font: 500 .7rem/1.6 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.facts dd { margin: .2rem 0 0; }

footer.site { border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.6rem 2.4rem; }
footer.site nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
footer.site a { color: var(--dim); }

@media (max-width: 900px) {
  .factions, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .brief, .shots, .features, .factions { grid-template-columns: minmax(0, 1fr); }
  .topbar .wrap { flex-wrap: nowrap; }
  .studio { font-size: .7rem; letter-spacing: .14em; }
}

/* Tester questionnaire */
.fb-wrap { max-width: 44rem; padding-block: 1.2rem 4rem; }
.fb-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2.5rem; }
.fb-title { font: 400 clamp(1.7rem, 4.5vw, 2.4rem)/1.15 var(--f-brand); margin: 0 0 .8rem; text-wrap: balance; }
.fb-anon { color: var(--dim); font-size: .9rem; border-left: 2px solid var(--shield-deep); padding-left: .9rem; margin: 1.2rem 0 2rem; }
#fb { display: flex; flex-direction: column; gap: 1.1rem; }
.q { border: 1px solid var(--line); border-radius: 10px; background: var(--hull); padding: 1rem 1.1rem 1.15rem; margin: 0; min-width: 0; }
.q-label { display: block; font-weight: 600; padding: 0; margin-bottom: .35rem; }
.q-hint { color: var(--dim); font-size: .88rem; margin: 0 0 .6rem; }
.q-sub { display: block; color: var(--dim); font-size: .88rem; margin: .8rem 0 .35rem; }
.q input[type=text], .q textarea { width: 100%; background: var(--void); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .75rem; font: 400 1rem/1.4 var(--f-body); }
.q textarea { resize: vertical; min-height: 4.5rem; }
.q input[type=text]:focus, .q textarea:focus { outline: 2px solid var(--shield); outline-offset: 1px; border-color: transparent; }
.choices, .scale { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.choices label, .scale label { position: relative; cursor: pointer; }
.choices input, .scale input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choices span, .scale span { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .9rem; color: var(--text); background: var(--void); }
.scale span { min-width: 2.75rem; min-height: 2.75rem; line-height: 1.6; text-align: center; padding: .55rem .3rem; font-variant-numeric: tabular-nums; }
.choices input:checked + span, .scale input:checked + span { background: var(--shield); color: var(--void); border-color: var(--shield); font-weight: 600; }
.choices input:focus-visible + span, .scale input:focus-visible + span { outline: 2px solid var(--shield); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; color: var(--dim); font-size: .8rem; margin-top: .4rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#fb .btn { align-self: flex-start; cursor: pointer; font-size: 1rem; padding: .95rem 1.5rem; }
#fb .btn:disabled { opacity: .6; cursor: default; }
.fb-status { min-height: 1.5rem; margin: 1rem 0 0; }
.fb-status.ok { color: var(--insect); font-size: 1.1rem; }
.fb-status.err { color: var(--litho); }
.fb-status.warn { color: var(--todo-fg); }
fieldset.q > legend.q-label { float: left; width: 100%; }
fieldset.q > legend.q-label + * { clear: both; }
.draft a { color: inherit; }
.studio { opacity: 1; line-height: 0; }
.studio img { height: 44px; width: auto; }
@media (max-width: 620px) { .studio img { height: 36px; } }
.fb-head .studio img { height: 28px; }
