:root {
  color-scheme: dark;
  --background: #080e18;
  --surface: #0e1726;
  --field: #0a111e;
  --line: #253751;
  --text: #f4f7fe;
  --muted: #abbad0;
  --blue: #56d8ff;
  --ink: #071420;
  --radius: 12px;
  font: 100%/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.09; }
h2 { font-size: clamp(1.9rem, 4vw, 2.65rem); letter-spacing: -.045em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 1.5rem; }
.shell { width: min(100% - 5.5rem, 1232px); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; padding: .6rem 1rem; transform: translateY(-160%); z-index: 5; background: var(--blue); color: var(--ink); }
.skip:focus { transform: none; }
.header { background: #090f1b; border-bottom: 1px solid #25324a; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 760; letter-spacing: -.02em; }
.brand img { border: 1px solid #223b58; border-radius: 8px; background: #081524; }
.topbar nav { display: flex; align-items: center; gap: clamp(.65rem, 3vw, 2rem); color: #dce7f7; font-size: .92rem; font-weight: 650; }
.topbar nav a { padding: .45rem .2rem; }
.topbar nav a:hover, .email-link:hover, .media-fallback:hover { color: var(--blue); }
.topbar nav .nav-contact { border: 1px solid #34516d; padding: .42rem .95rem; border-radius: 7px; }
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 75% 47%, #0d3264 0%, #0b1a31 42%, #09111e 76%);
  border-bottom: 1px solid #1d3550;
}
.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .29;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 62px, #487cac48 63px 64px),
              repeating-linear-gradient(0deg, transparent 0 62px, #487cac48 63px 64px);
  mask-image: linear-gradient(90deg, transparent, #000);
}
.hero-inner { position: relative; display: grid; grid-template-columns: .88fr 1.28fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(4.5rem, 7.5vw, 7.25rem); }
.hero h1 { color: #f6f9ff; font-size: clamp(2.75rem, 4.6vw, 4.35rem); line-height: 1.02; font-weight: 850; letter-spacing: -.062em; }
.hero h1 .accent { color: var(--blue); }
.hero p { color: #becde1; max-width: 36ch; margin: 1.2rem 0 1.65rem; font-size: 1.1rem; }
.hero-art { background: #061320; border: 1px solid #3c73a2; border-radius: 13px; overflow: hidden; box-shadow: 0 0 50px #258eff27, 0 20px 60px #030a14aa; }
.hero-art img { width: 100%; height: auto; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: .58rem 1rem; border: 1px solid transparent; border-radius: 8px; font-size: .91rem; line-height: 1.25; font-weight: 730; text-align: center; transition: background .15s, border .15s; }
.primary { background: var(--blue); color: var(--ink); }
.primary:hover:not(:disabled) { background: #9ceaff; }
.secondary { border-color: #39536f; background: #142136; color: var(--text); }
.secondary:hover:not(:disabled) { background: #213653; border-color: #6689af; }
.button:disabled { opacity: .48; }
.catalog { padding-block: clamp(3rem, 6vw, 5rem); }
.section-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.35rem; border-bottom: 1px solid var(--line); }
.game-count { color: var(--muted); font-size: .91rem; white-space: nowrap; }
#catalog-status { color: var(--muted); }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.2vw, 1.65rem); }
.game-card { overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.game-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #142640; border-bottom: 1px solid var(--line); }
.game-placeholder { display: grid; place-items: center; background: radial-gradient(at 40% 20%, #274f79, #101b30 60%, #101c32); padding: 1rem; color: #c4d8f7; font-size: clamp(1.2rem, 2.8vw, 2rem); font-weight: 800; text-align: center; }
.game-body { padding: 1.15rem; display: flex; flex: 1; flex-direction: column; gap: .6rem; }
.game-body h3 { font-size: 1.4rem; letter-spacing: -.035em; }
.game-category, .eyebrow { font-size: .83rem; font-weight: 800; color: var(--blue); }
.game-description { flex: 1; color: var(--muted); font-size: .97rem; }
.game-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .4rem; }
.game-controls .button { padding-inline: .7rem; }
.media-pending { margin-top: .4rem; font-size: .9rem; color: var(--muted); }
.license-link { align-self: flex-start; color: var(--blue); padding: .3rem 0; margin-top: auto; font-size: .9rem; font-weight: 700; }
.license-link:hover { text-decoration: underline; }
.contact-section { padding-block: clamp(3.25rem, 7vw, 6rem); border-block: 1px solid #233752; background: radial-gradient(ellipse at 12% 5%, #112b49, #0b1423 56%); }
.contact-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(2rem, 6vw, 7rem); align-items: start; }
.contact-copy { padding-top: 1.25rem; }
.contact-copy .eyebrow { margin-bottom: .5rem; }
.contact-copy h2 { margin-bottom: .9rem; }
.contact-copy p:not(.eyebrow) { max-width: 40ch; color: var(--muted); }
.email-link { display: inline-block; margin-top: 1.3rem; text-decoration: underline; overflow-wrap: anywhere; }
.contact-form { background: #101b2c; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 4vw, 2rem); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.full-width { grid-column: 1 / -1; }
label { display: block; min-width: 0; color: #e7effb; font-size: .9rem; font-weight: 645; }
.optional { font-weight: 400; color: var(--muted); }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; min-height: 43px; margin-top: .35rem; border: 1px solid #354866; border-radius: 7px; padding: .58rem .68rem; background: var(--field); color: var(--text); font-size: 1rem; font-weight: 400; }
select { padding-right: 2rem; appearance: none; background: linear-gradient(45deg, transparent 50%, #99bad8 50%) right 15px center / 6px 6px no-repeat, linear-gradient(135deg, #99bad8 50%, transparent 50%) right 9px center / 6px 6px no-repeat, var(--field); }
textarea { resize: vertical; }
::placeholder { color: #8e9eb5; opacity: 1; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { color: var(--muted); min-height: 1.55em; font-size: .875rem; margin: .8rem 0 .55rem; }
.form-status:empty { min-height: 0; margin: .9rem 0 0; }
.form-status[data-state="error"] { color: #ffb5bc; }
.form-status[data-state="success"] { color: #96e6ba; }
.footer { background: #080f1b; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; min-height: 74px; padding-block: 1rem; color: var(--muted); font-size: .9rem; }
.preview-note { padding: .6rem 1rem; text-align: center; background: #2b3651; color: var(--text); }
dialog { width: min(960px, 100% - 1.5rem); max-height: calc(100% - 1.5rem); padding: 1rem; color: var(--text); background: #0e1827; border: 1px solid #527ba5; border-radius: var(--radius); }
dialog::backdrop { background: #020611e0; }
.media-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.media-header h2 { font-size: 1.35rem; }
#media-stage { display: flex; justify-content: center; }
#media-stage iframe { display: block; width: min(100%, var(--frame-width)); aspect-ratio: var(--frame-ratio); background: #04070b; border: 0; }
.media-fallback { display: inline-block; text-decoration: underline; margin-top: .6rem; }
body:has(dialog[open]) { overflow: hidden; }
@media (max-width: 940px) {
  .shell { width: min(100% - 3rem, 1232px); }
  .hero-inner { gap: 1.7rem; }
  .game-body { padding: .9rem; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 2rem); }
  .hero-inner, .contact-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-block: 2.65rem; }
  .hero-art { grid-row: 1; }
  .hero h1 { font-size: clamp(2.6rem, 9vw, 3.6rem); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-copy { padding-top: 0; }
}
@media (max-width: 450px) {
  .topbar { min-height: 62px; gap: .45rem; }
  .brand { font-size: .85rem; gap: .35rem; }
  .brand img { width: 30px; height: 30px; }
  .topbar nav { gap: .45rem; font-size: .83rem; }
  .topbar nav .nav-contact { padding-inline: .55rem; }
  .game-grid, .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
