/* PlayToEnjoy Titans - site styles.
   Colours come from the logo: deep space navy, electric blue, molten gold, silver.
   Dark is the default (it matches the logo); visitors whose device asks for light get a light version.
   Every text colour below keeps at least 7:1 contrast against the background it sits on. */

:root {
  --bg: #050914;          /* logo's space black-navy */
  --surface: #0d1530;     /* cards and panels */
  --surface-2: #142047;
  --text: #f4f6fb;        /* silver-white */
  --muted: #cfd6e6;
  --gold: #ffbe55;        /* logo's molten gold: headings, accents */
  --blue: #7fd6ff;        /* logo's electric blue: links */
  --blue-strong: #3d8bff; /* borders and glows only */
  --focus: #ffe08a;
  --border: #2c4a8f;
  --ok-bg: #0f3a24;
  --ok-text: #c9f7d9;
  --soon-bg: #3a2a07;
  --soon-text: #ffe2a6;
  --shadow: 0 0 0 1px var(--border), 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f1f4fb;
    --surface-2: #e4eaf7;
    --text: #0b1020;
    --muted: #2f3850;
    --gold: #683600;
    --blue: #0846a6;
    --blue-strong: #1f6fe0;
    --focus: #0b1020;
    --border: #7d93c4;
    --ok-bg: #dff5e7;
    --ok-text: #0b4a25;
    --soon-bg: #fff0cc;
    --soon-text: #5a3600;
    --shadow: 0 0 0 1px var(--border), 0 6px 18px rgba(10, 20, 50, .12);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .16em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

/* Skip link: hidden until it gets keyboard focus */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  background: var(--gold);
  color: #050914;
  font-weight: 700;
  padding: .75rem 1rem;
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  border-bottom: 2px solid var(--blue-strong);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 18px rgba(61, 139, 255, .55);
}
.brand-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15;
}
.brand-name .titans { color: var(--gold); }

/* Main menu */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.main-nav a {
  display: inline-block;
  padding: .5rem .8rem;
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
}
.main-nav a:hover { border-color: var(--blue-strong); }
.main-nav a[aria-current="page"] {
  border-color: var(--gold);
  color: var(--gold);
}

/* Main content */
main { padding: 2rem 0 3rem; }
main:focus { outline: none; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); color: var(--gold); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 1.95rem); margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.3rem; margin: 1.5rem 0 .5rem; color: var(--gold); }

.lead { font-size: 1.3rem; color: var(--muted); max-width: 46rem; }
.prose { max-width: 46rem; }

/* Home page welcome */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}
.hero-logo {
  width: 100%;
  max-width: 340px;
  border-radius: 18px;
  box-shadow: 0 0 0 2px var(--gold), 0 0 40px rgba(61, 139, 255, .45);
}
@media (min-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .hero-logo { justify-self: end; }
}

/* Game gallery: a static grid, nothing moves */
.game-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* In the page the name comes first (so a screen reader hears it first); visually the picture sits on top. */
.game-card img { order: -1; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.game-card h3, .game-card h4 { margin: 1rem 1rem .25rem; font-size: 1.35rem; }
.game-card h3 a, .game-card h4 a { color: var(--text); }
.game-card .tagline { margin: 0 1rem .75rem; color: var(--muted); }
.game-card .status { margin: auto 1rem 1rem; }

/* Status label: always written as words, colour is extra */
.status {
  display: inline-block;
  align-self: flex-start;
  font-weight: 700;
  font-size: 1rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  border: 2px solid currentColor;
}
.status-available { background: var(--ok-bg); color: var(--ok-text); }
.status-soon { background: var(--soon-bg); color: var(--soon-text); }

/* Games page list */
.game-list { list-style: none; padding: 0; margin: 1rem 0 0; max-width: 46rem; }
.game-list li {
  padding: 1rem 1.1rem;
  margin-bottom: .85rem;
  background: var(--surface);
  border-left: 5px solid var(--gold);
  border-radius: 6px;
}
.game-list a { font-size: 1.3rem; font-weight: 700; }
.game-list p { margin: .25rem 0 0; color: var(--muted); }

/* Game page */
.game-hero img {
  width: 100%;
  max-width: 64rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.device-note {
  max-width: 46rem;
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--surface-2);
  border: 2px solid var(--gold);
  border-radius: 10px;
}
.updated { font-weight: 600; color: var(--muted); }

.downloads { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.downloads li { display: flex; flex-direction: column; gap: .25rem; }
.download {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1.1rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface-2);
  border: 2px solid var(--blue-strong);
  border-radius: 8px;
}
.download:hover { border-color: var(--gold); text-decoration: underline; }
.download svg { width: 1.6rem; height: 1.6rem; flex: none; fill: currentColor; }
.file-note { font-size: .95rem; color: var(--muted); }

.panel {
  max-width: 46rem;
  background: var(--surface);
  border-radius: 10px;
  padding: .25rem 1.2rem 1rem;
  box-shadow: var(--shadow);
}

.big-link { font-size: 1.35rem; font-weight: 700; }
.email-written { font-size: 1.25rem; font-weight: 600; word-break: break-all; }

/* Controls tables: scroll sideways inside their own box on narrow screens, never the whole page */
.table-wrap { max-width: 100%; overflow-x: auto; margin: .5rem 0 1rem; border-radius: 8px; }
table { border-collapse: collapse; min-width: 34rem; width: 100%; max-width: 64rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: .6rem .8rem; border: 1px solid var(--border); }
thead th { background: var(--surface-2); color: var(--gold); }
tbody th { font-weight: 600; }

/* Trailers and demo videos: never play on their own */
.game-video { display: block; width: 100%; max-width: 64rem; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; }

/* News */
.news-list { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.news-list article { border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.news-list h2 { margin-top: .5rem; }
.news-list time { color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer {
  border-top: 2px solid var(--blue-strong);
  background: var(--surface);
  padding: 1.5rem 0 2rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer p { margin: .25rem 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }
  .brand img { width: 60px; height: 60px; }
  .brand-name { font-size: 1.25rem; }
  .main-nav a { padding: .45rem .6rem; }
}
