/* Old Guard Games web pages, Night Arcade look (design C, t431). */
:root {
  --bg: #0B1020;
  --panel: #141B34;
  --field: #0E1428;
  --line: #2C3763;
  --text: #E8ECF8;
  --muted: #A9B2CF;
  --accent: #35D6C6;
  --on-accent: #06121A;
  --err: #FF8A8A;
  --radius: 14px;
  --head: "Rajdhani", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); }
a { color: var(--accent); }
a:hover, a:focus-visible { color: var(--text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--panel); padding: 8px 12px; border-radius: var(--radius); }

.site-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 20px 5%; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand .tick { stroke: var(--accent); }
.brand span { font-family: var(--head); font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--text); }

main.signup { flex: 1; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; justify-content: center; padding: 56px 5%; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
h1 { margin: 0; font-family: var(--head); font-size: 52px; line-height: 1.05; font-weight: 700; }
h2 { margin: 0; font-family: var(--head); font-size: 30px; line-height: 1.1; font-weight: 700; }
.lead { margin: 0; font-size: 19px; color: var(--muted); max-width: 30rem; }
.small { margin: 0; font-size: 15px; color: var(--muted); }
.art-list { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.art { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.art img, .art video { width: 100%; height: 300px; object-fit: cover; display: block; background: var(--field); }
.art figcaption { padding: 12px 16px; font-family: var(--head); font-size: 20px; font-weight: 700; }

.panel { flex: 1 1 420px; max-width: 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel form, .panel .view { display: flex; flex-direction: column; gap: 18px; margin: 0; }
fieldset.games { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
fieldset.games legend { font-size: 14px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.game-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.game-card { flex: 1 1 180px; display: flex; flex-direction: column; border: 3px solid var(--line); border-radius: var(--radius); background: var(--field); overflow: hidden; cursor: pointer; min-width: 0; }
.game-card:has(input:checked) { border-color: var(--accent); }
.game-card:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 2px; }
.game-card img, .game-card video { width: 100%; height: 120px; object-fit: cover; display: block; background: var(--field); }
/* t434: light 3D tilt on hover, only for a fine pointer and when motion is allowed. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .game-cards { perspective: 900px; }
  .game-card { transition: transform 0.25s ease, box-shadow 0.25s ease; transform-style: preserve-3d; }
  .game-card:hover { transform: rotateX(4deg) rotateY(-5deg) translateZ(6px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45); }
}
.game-card .row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; }
.game-card input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.game-card .name { display: block; font-family: var(--head); font-size: 18px; font-weight: 700; color: var(--text); }
.game-card .kind { display: block; font-size: 13px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field input { height: 46px; width: 100%; padding: 0 14px; font: inherit; font-size: 16px; color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.btn { height: 50px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; padding: 0 16px; }
.btn.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn:disabled { opacity: 0.5; cursor: default; }
.center { text-align: center; }
.status { min-height: 24px; margin: 0; font-size: 15px; }
.status.err { color: var(--err); }
.status.ok { color: var(--accent); }
.notice { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.notice svg { width: 28px; height: 28px; flex: none; stroke: var(--accent); }

.site-foot { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding: 20px 5%; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* Single-column pages: action handler and legal texts. */
main.narrow { flex: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
main.narrow .banner { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius); display: block; }
main.narrow .panel { max-width: none; flex: none; padding: 24px 20px; }
main.legal { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 40px 5%; }
main.legal h1 { font-size: 40px; margin-bottom: 16px; }
main.legal h2 { font-size: 26px; margin: 32px 0 10px; }
main.legal p, main.legal li { color: var(--text); }
main.legal code { font-size: 14px; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
main.legal table { border-collapse: collapse; width: 100%; font-size: 15px; }
main.legal th, main.legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
main.legal th { background: var(--panel); font-weight: 600; }
.soon { padding: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

@media (max-width: 600px) {
  main.signup { padding: 28px 16px; gap: 28px; }
  h1 { font-size: 36px; }
  .lead { font-size: 17px; }
  .art-list { display: none; }
  .panel { padding: 20px 16px; }
  .site-head, .site-foot { padding: 16px; }
  .site-nav { gap: 16px; }
  main.legal h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
/* Skyblade: the swordsman stands at the right edge of the art; keep him in view (user 2026-11-05). */
video[data-game="sky"] { object-position: 85% 40%; }
/* Layout (user 2026-11-05): the two game pictures side by side in one row, the sign-up form centred below. */
main.signup { flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 36px; max-width: 1240px; }
main.signup .hero { flex: none; width: 100%; align-items: center; text-align: center; }
main.signup .art-list { flex-direction: row; flex-wrap: wrap; width: 100%; gap: 22px; }
main.signup .art { flex: 1 1 380px; min-width: 0; text-align: left; }
main.signup .art img, main.signup .art video { height: clamp(200px, 26vw, 340px); }
main.signup .panel { flex: none; width: 100%; max-width: 560px; }
/* One set of pictures only: the big cards choose the game; the form keeps a compact text choice. */
.game-card img, .game-card video { display: none; }
main.signup .art { cursor: pointer; border-width: 3px; transition: border-color .15s; }
main.signup .art.picked { border-color: var(--accent); }
main.signup .art:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
/* 3D ember field (js/particles.js): fixed behind everything, never takes clicks. */
.bg-particles { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
body { position: relative; isolation: isolate; }
/* Depth glow behind the ember field: teal from the top, gold from below. */
html { background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(53,214,198,.10), transparent 70%), radial-gradient(ellipse 70% 50% at 50% 100%, rgba(217,174,82,.08), transparent 70%), var(--bg); background-attachment: fixed; }
body { background: transparent; }
/* Game world behind the embers (user 2026-11-05): the picked game's own scene, blurred and dark. */
.world { position: fixed; inset: -20px; z-index: -2; pointer-events: none; background: center / cover no-repeat url("../assets/bg-ran.jpg"); opacity: .9; transition: opacity .6s ease; }
.world::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 75% 65% at 50% 45%, rgba(11,16,32,.2), rgba(11,16,32,.7)); }
/* The big pictures are the game choice; the radio list stays only as the form value. */
fieldset.games { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main.signup .art video[data-game="sky"] { object-position: 82% 30%; }
/* Skyblade still: slow 3D push toward the swordsman and a small turn, until its Flow clip returns (user 2026-11-05). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes sky-push { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-1.5%, 0.8%); } }
  main.signup .art video[data-game="sky"] { transform-origin: 82% 30%; animation: sky-push 16s ease-in-out infinite alternate; will-change: transform; }
}
/* Keep the moving Skyblade picture inside its frame; the name bar stays on top (user screenshot 2026-11-05). */
main.signup .art figcaption { position: relative; z-index: 1; background: var(--panel); }
/* One background per game (user 2026-11-05), same look; a slow cross-fade so the page never feels like a new site. */
.world::before { content: ""; position: absolute; inset: 0; background: center / cover no-repeat url("../assets/bg-sky.jpg"); opacity: 0; transition: opacity .9s ease; }
.world.sky::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .world::before { transition: none; } }
/* The game that is not picked fades back a little (user 2026-11-05). */
main.signup .art { transition: border-color .15s, opacity .3s ease; }
main.signup .art:not(.picked) { opacity: .6; }
main.signup .art:not(.picked):hover, main.signup .art:not(.picked):focus-visible { opacity: .85; }
/* User phone screenshots 2026-11-05: (1) tall screens left a gap above the title -> start at the top;
   (2) narrow screens hid the game pictures, the only game choice -> show both side by side, smaller. */
main.signup { justify-content: flex-start; }
@media (max-width: 600px) {
  main.signup .art-list { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; }
  main.signup .art { flex: 1 1 0; border-width: 2px; }
  main.signup .art img, main.signup .art video { height: 112px; }
  main.signup .art figcaption { padding: 8px 10px; font-size: 14px; line-height: 1.25; }
}
/* Tall portrait screens wider than a phone (desktop mode on a phone, user 2026-11-05): bigger pictures and the
   content centred, so the space is shared above and below instead of all at the bottom. */
@media (orientation: portrait) and (min-width: 601px) {
  main.signup { justify-content: center; }
  main.signup .art-list { flex-direction: row; }
  main.signup .art img, main.signup .art video { height: clamp(220px, 15vh, 380px); }
  /* Desktop mode on a phone: the page is shown scaled down, so the form gets wider and larger text. */
  main.signup .panel { max-width: 100%; font-size: 1.3em; padding: 36px 40px; }
  main.signup .panel input, main.signup .panel .btn { font-size: 1em; padding: 16px 18px; }
  main.signup .panel .small, main.signup .panel .hint { font-size: .9em; }
  main.signup .panel .field label, main.signup .panel .check label { font-size: 1em; }
}
/* The form names the picked game. */
.form-game { margin: 0 0 18px; font-family: var(--head); font-size: 1.5em; line-height: 1.2; color: var(--accent); }
