:root {
  color-scheme: dark;
  --bg: #0b1227;
  --navy: #101a31;
  --ink: #172b3b;
  --paper: #f0e9d7;
  --cream: #f8efdc;
  --gold: #ffc56b;
  --mint: #8dd5c3;
  --muted: #c6d4d3;
  --display: Impact, "Arial Black", sans-serif;
  --gutter: 7%;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--cream); font: 1rem/1.6 "Courier New", monospace; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin-top: 0; }
.shell { width: min(100% - 32px, 1500px); margin: auto; }
.skip { position: absolute; z-index: 2; padding: .6rem 1rem; background: var(--gold); color: var(--ink); transform: translateY(-110%); }
.skip:focus { transform: none; }
.topbar { min-height: 76px; padding: 16px var(--gutter); display: flex; justify-content: space-between; gap: 18px 28px; align-items: center; background: var(--navy); border-bottom: 2px solid #41546a; }
.brand { color: var(--gold); letter-spacing: .12em; font-weight: bold; text-decoration: none; }
.topbar nav, footer div { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.topbar nav a { padding-block: 6px; color: var(--cream); text-decoration: none; font-size: .875rem; font-weight: bold; }
.topbar nav a:hover, footer a:hover { color: var(--gold); }
.topbar .languages { flex-wrap: nowrap; gap: 5px; }
.languages a { padding-inline: 9px; border: 1px solid #526b7a; }
.languages a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr); align-items: center; gap: 6%; padding: 90px var(--gutter) 110px; background: radial-gradient(ellipse at 72% 50%, #244c66 0%, #152c47 36%, var(--navy) 76%); }
.studio-hero { min-height: 620px; }
.eyebrow { color: var(--mint); font-size: .875rem; font-weight: bold; letter-spacing: .13em; margin-bottom: 16px; }
.intro :is(h1,h2) { font: 400 clamp(3rem,7.15vw,6.75rem)/.93 var(--display); letter-spacing: .015em; margin: 0; text-shadow: 4px 4px #0a1221; }
.studio-hero h1 { font-size: clamp(2.2rem,5.9vw,6.2rem); }
.intro h1 span { color: var(--gold); }
.lead { font-size: clamp(1.25rem,2vw,1.55rem); font-weight: bold; line-height: 1.35; margin: 26px 0 14px; }
.summary { color: var(--muted); max-width: 48ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button, .lightbox button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 16px; border: 2px solid #8aa8ad; background: #1b3446; color: var(--cream); font: bold .875rem/1.3 "Courier New", monospace; text-decoration: none; box-shadow: 4px 4px #070f1e; }
.button:hover, .lightbox button:hover { transform: translate(2px,2px); box-shadow: 2px 2px #070f1e; }
.button.primary { background: var(--gold); border-color: #ffe0a8; color: #182234; }
.hero-art { min-width: 0; position: relative; margin-right: 8px; }
.tycoon-art .hero-art { padding-bottom: 33px; }
.screen { margin: 0; border: 5px solid #c7d7c4; background: #10243a; box-shadow: 9px 9px #081322; transform: rotate(1deg); }
.screen-bar, .screen-foot { display: flex; justify-content: space-between; gap: 8px; padding: 7px 11px; font-size: .75rem; letter-spacing: .08em; font-weight: bold; background: #c7d7c4; color: var(--ink); }
.screen-foot { background: #132d3f; color: #b2dbca; }
.screen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tycoon-art img { image-rendering: pixelated; }
.game-badge { position: absolute; width: clamp(75px,12vw,170px); bottom: -18px; right: -23px; border: 3px solid var(--gold); box-shadow: 5px 5px #081322; }

.features, .gallery { padding: 76px var(--gutter); }
.features { background: var(--paper); color: var(--ink); color-scheme: light; }
.section-heading { max-width: 68ch; margin-bottom: 32px; }
.section-heading h2, .end-card h2, .policy h1 { font: 400 clamp(2.3rem,4.3vw,3.65rem)/1.08 var(--display); letter-spacing: .015em; margin-bottom: 14px; }
.section-heading > p:last-child { margin-bottom: 0; }
.features .eyebrow { color: #28645c; }
.features :is(p, time):not(.eyebrow) { color: #435968; }
.features a:focus-visible { outline-color: #28645c; }
.game-grid, .feature-grid, .studio-details { display: grid; gap: 22px; }
.game-grid, .studio-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
.game-card, .feature-grid article, .news { border: 2px solid #a8bbb2; background: #f9f4e7; box-shadow: 5px 5px #b8c6b6; }
.game-card { display: flex; flex-direction: column; }
.game-card img { width: 100%; aspect-ratio: 2.3; object-fit: cover; border-bottom: 2px solid #a8bbb2; }
.game-card > div, .feature-grid article, .news { padding: 22px; }
.game-card h3, .news h2 { font: 400 1.9rem/1.1 var(--display); margin-bottom: 10px; }
.feature-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.feature-grid h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-grid p { margin-bottom: 0; }
.news-list { padding: 0; margin: 0; list-style: none; }
.news-list li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid #c5d1c8; }
.news-list li:last-child { border: 0; }
.news-list time { font-size: .875rem; }
#contact { margin-top: 52px; }
.gallery { background: var(--navy); }
.gallery-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.gallery-grid.steam-gallery { grid-template-columns: repeat(3,minmax(0,1fr)); }
.gallery figure { display: grid; grid-template-rows: 1fr auto; min-width: 0; margin: 0; border: 2px solid #5d7b86; background: #17263a; }
.gallery-wide { grid-row: span 2; }
.gallery-link { display: block; min-width: 0; }
.gallery-link:hover { outline: 2px solid var(--mint); outline-offset: -2px; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #112234; }
.gallery figcaption { padding: 8px 12px; font-size: .875rem; }
.end-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 var(--gutter) 72px; padding: 28px; background: #234b55; border: 2px solid #80b4a2; box-shadow: 6px 6px #080f1d; }
.end-card p { margin: 0; }
.policy { width: min(100%, 960px); min-height: 64vh; margin: auto; padding: 65px var(--gutter) 90px; }
.policy h2 { font-size: 1.2rem; color: var(--gold); margin: 34px 0 8px; }
.policy p, .policy li { color: var(--muted); }
.policy a { color: var(--mint); overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 22px var(--gutter); background: var(--navy); color: #b4c5c8; border-top: 2px solid #41546a; font-size: .875rem; }
footer a { text-decoration: none; }
.lightbox { max-width: min(1100px, 94vw); max-height: 94vh; background: var(--navy); color: var(--cream); padding: 14px; border: 2px solid var(--mint); }
.lightbox::backdrop { background: rgb(4 8 16 / .88); }
.lightbox img { max-height: 76vh; object-fit: contain; }
.lightbox form { display: flex; justify-content: flex-end; margin-bottom: 10px; }
@media (max-width: 920px) {
  .hero { padding-block: 62px 84px; }
  .topbar { flex-wrap: wrap; }
  .feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  :root { --gutter: 6%; }
  .shell { width: 100%; }
  .topbar > nav:first-of-type { order: 1; flex-basis: 100%; }
  .hero { grid-template-columns: minmax(0,1fr); gap: 34px; }
  .studio-hero { min-height: 0; }
  .studio-hero h1 { font-size: clamp(2.2rem,10vw,4.6rem); }
  .intro :is(h1,h2):not(.studio-hero h1) { font-size: clamp(3.1rem,12vw,5.5rem); }
  .game-badge { right: -10px; }
  .features, .gallery { padding-block: 52px; }
  .studio-details { grid-template-columns: 1fr; gap: 38px; }
  .gallery-grid, .gallery-grid.steam-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gallery-wide { grid-area: auto / span 2; }
}
@media (max-width: 470px) {
  .game-grid, .feature-grid, .gallery-grid.steam-gallery { grid-template-columns: 1fr; }
  .end-card { align-items: flex-start; flex-direction: column; padding: 18px; }
  .end-card .button { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.missing-page, .login-page { min-height: min(75vh, 760px); }
.missing-page .screen img { height: auto; aspect-ratio: auto; }
.missing-page .summary { margin-top: 24px; }
.login-page { display: grid; place-items: center; padding: 48px var(--gutter); background: radial-gradient(ellipse at center, #244c66, var(--navy) 75%); }
.login-window { width: min(100%, 28rem); border: 4px solid #c7d7c4; background: var(--navy); box-shadow: 9px 9px #081322; }
.login-window h1 { margin: 0; font-size: 1.25rem; }
.login-window form { padding: clamp(18px, 4vw, 36px); display: grid; gap: 8px; }
.login-window input { width: 100%; min-height: 46px; margin-bottom: 10px; border: 2px solid #8aa8ad; background: var(--bg); color: var(--cream); font: inherit; padding: 7px 10px; }
.login-window input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.login-window small { color: var(--muted); }
.login-window [role="alert"] { margin: 0; color: var(--gold); }
.login-window button { justify-self: start; cursor: pointer; }


@media (min-width: 1000px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
