/* games.jacksparrot.com — shared stylesheet. Plain CSS, no JS, no external fonts.
   CSP on the server is `style-src 'self'`: no inline <style> or style="" anywhere. */

:root {
  --bg: #0F1420;
  --bg-2: #161D2C;
  --panel: #1C2436;
  --line: #2E3850;
  --text: #E9E4D8;
  --muted: #A9B0C0;
  --gold: #D99A31;
  --gold-hi: #F1BE5E;
  --parchment: #FFF9EE;
  --ink: #18202D;
  --ink-muted: #4F5866;
  --ink-link: #8A5A00;
  --radius: 10px;
  --wrap: 1080px;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 1rem/1.6 var(--sans);
  color: var(--text);
  background: var(--bg) radial-gradient(ellipse at 50% -10%, #26304A 0%, var(--bg) 60%) no-repeat;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-hi); text-underline-offset: 2px; }
a:hover { color: #FFD891; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: #F6EEDC; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--gold); color: var(--ink); padding: 6px 12px; border-radius: 6px; }

/* ---------- header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: rgba(10, 14, 22, 0.75); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: 0.02em; }
.brand:hover { color: var(--gold-hi); }
.brand::before { content: "\25C6"; color: var(--gold); margin-right: 8px; font-size: 0.8em; }
.site-nav { display: flex; align-items: center; gap: 14px; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--gold-hi); }
.lang {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-hi) !important;
}
.lang:hover { background: var(--gold); color: var(--ink) !important; }

/* ---------- footer ---------- */

.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: #0A0E16; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { padding-top: 26px; padding-bottom: 30px; display: grid; gap: 18px; }
.site-footer h2 { font-size: 1rem; margin: 0 0 6px; color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 3px 0; }
.site-footer a { color: var(--gold-hi); }
.site-footer .copy { margin: 0; font-size: 0.85rem; }
@media (min-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .copy { grid-column: 1 / -1; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--gold);
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
}
.btn:hover { color: var(--ink); background: var(--gold-hi); }
.btn-ghost { background: transparent; color: var(--gold-hi); }
.btn-ghost:hover { background: rgba(217, 154, 49, 0.15); color: #FFD891; }
.btn-soon { cursor: default; background: #232C40; color: var(--gold-hi); border-style: dashed; }
.btn-soon:hover { background: #232C40; color: var(--gold-hi); }
.btn-soon small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- portal ---------- */

.intro { padding: 44px 0 20px; text-align: center; }
.intro h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); margin: 0 0 10px; }
.intro p { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }
.intro .rule { width: 90px; height: 2px; margin: 18px auto 0; background: var(--gold); border: 0; }

.section-title { font-size: 1.4rem; margin: 32px 0 16px; }

.games { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); padding: 0; margin: 0; list-style: none; }

.game-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.game-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.game-card > img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.game-card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card h3 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.game-card h3 img { width: 40px; height: 40px; border-radius: 9px; }
.game-card h3 a { color: inherit; text-decoration: none; }
.game-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.game-card { position: relative; }
.game-card p { margin: 0; color: var(--muted); }
.game-card .status { margin-top: auto; padding-top: 8px; font-size: 0.85rem; color: var(--gold-hi); letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- game page ---------- */

.hero { position: relative; background: #0A0E16; border-bottom: 1px solid var(--line); }
.hero > img { width: 100%; max-height: 560px; aspect-ratio: 2 / 1; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 32, 0) 45%, var(--bg) 100%);
  pointer-events: none;
}

.game-head { position: relative; z-index: 1; margin-top: -48px; text-align: center; }
.game-head .logo { width: min(440px, 80%); margin: 0 auto; }
.game-head h1 { margin: 6px 0 4px; font-size: clamp(2rem, 7vw, 3rem); letter-spacing: 0.04em; }
.game-head .tagline { margin: 0 auto 22px; max-width: 560px; font-size: 1.12rem; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 14px;
  margin: 0;
  list-style: none;
}
.gallery li { scroll-snap-align: start; }
.gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
@media (min-width: 640px) { .gallery { grid-auto-columns: 30%; } }
@media (min-width: 960px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; }
}

.about { max-width: 760px; }
.about h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.about h3 { font-size: 1.15rem; margin: 26px 0 6px; color: var(--gold-hi); }
.about p { margin: 0 0 12px; }
.about ul { margin: 0 0 12px; padding-left: 1.2em; }
.about li { margin: 3px 0; }
.about li::marker { color: var(--gold); }
.about .lead { font-size: 1.08rem; }

.links-panel {
  margin-top: 36px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.links-panel h2 { margin: 0 0 8px; font-size: 1.2rem; }
.links-panel ul { margin: 0; padding-left: 1.2em; }

/* ---------- legal pages: parchment, plain and readable ---------- */

.legal-page { background: #E9E1CF; }
.legal-page .site-header, .legal-page .site-footer { background: #0F1420; }
.legal {
  max-width: 800px;
  margin: 24px auto 0;
  padding: 26px 20px 40px;
  background: var(--parchment);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  font-size: 1.02rem;
  line-height: 1.65;
}
@media (min-width: 720px) { .legal { padding: 36px 48px 48px; margin-top: 36px; } }
.legal h1, .legal h2 { color: var(--ink); }
.legal h1 { font-size: 1.8rem; margin: 0 0 0.3em; }
.legal h2 { font-size: 1.2rem; margin-top: 1.8em; border-bottom: 1px solid var(--gold); padding-bottom: 4px; }
.legal a { color: var(--ink-link); }
.legal a:hover { color: #5E3D00; }
.legal code { font-size: 0.92em; background: #F2E8D5; padding: 1px 4px; border-radius: 3px; }
.legal .meta { color: var(--ink-muted); font-size: 0.95em; }
.legal .summary { background: #fff; border-left: 4px solid var(--gold); padding: 12px 16px; margin: 20px 0; }
.legal .legal-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; font-size: 0.95em; }
.legal-page .back { max-width: 800px; margin: 16px auto 0; padding: 0 4px; }
.legal-page .back a { color: #5E3D00; font-weight: 600; }

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: 70px 0 30px; }
.notfound .code { font-family: var(--serif); font-size: 5rem; line-height: 1; color: var(--gold); margin: 0; }
.notfound h1 { margin: 8px 0 10px; }
.notfound p { color: var(--muted); margin: 0 0 24px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
