/* ══════════════════════════════════════════════════════════════════════════
   mygames.live — shared site styles.
   Palette + type mirror the classroom app (classroom/frontend/src/index.css).
   Every page loads this ONE file; add content pages by copying _template.html.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --navy:#1a2744; --navy-dark:#121d36; --navy-light:#253560;
  --amber:#d4920b; --amber-light:#e8a81a; --amber-bg:rgba(212,146,11,0.12); --amber-border:rgba(212,146,11,0.40);
  --on-dark:rgba(255,255,255,0.90); --on-dark-muted:rgba(255,255,255,0.55); --on-dark-border:rgba(255,255,255,0.12);
  --text:#4e4a5a; --text-h:#12101a; --bg:#ffffff; --bg-subtle:#f7f7f9; --border:#e3e2e7;
  --shadow: rgba(26,39,68,0.10) 0 8px 18px -4px, rgba(26,39,68,0.05) 0 2px 5px -1px;
  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text:#9ca3af; --text-h:#f3f4f6; --bg:#13151d; --bg-subtle:#1a1d28; --border:#2b2e3c;
    --shadow: rgba(0,0,0,0.45) 0 8px 18px -4px, rgba(0,0,0,0.25) 0 2px 5px -1px;
    --amber:#e0a012; --amber-light:#f0b828; --amber-bg:rgba(224,160,18,0.15); --amber-border:rgba(224,160,18,0.40);
    --navy:#111b33; --navy-dark:#0c1428; --navy-light:#1c2a4a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  margin: 0; font: 18px/150% var(--sans); letter-spacing: 0.18px;
  color: var(--text); background: var(--bg);
  display: flex; flex-direction: column; min-height: 100svh;
}
@media (max-width: 1024px) { body { font-size: 16px; } }
a { color: inherit; }
img { max-width: 100%; }

/* ── Shared layout ─────────────────────────────────────────────────────── */
main { flex: 1; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 32px); }
.wrap-narrow { max-width: 760px; }

/* ── Top bar (injected by site.js; matches classroom .course-topnav) ────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy); border-bottom: 1px solid var(--navy-dark);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(18px, 5vw, 44px); height: 60px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.topnav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 24px); }
.topnav a { color: var(--on-dark-muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .12s; }
.topnav a:hover, .topnav a.active { color: #fff; }
.topnav a.nav-login { color: var(--amber); }
.topnav a.nav-login:hover { color: var(--amber-light); }
@media (max-width: 620px) { .topnav a.hide-sm { display: none; } }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 16px; font-weight: 600; padding: 13px 24px; border-radius: 9px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s, color .12s, border-color .12s;
}
.btn svg { flex: none; }
.btn-primary { background: var(--amber); color: var(--navy-dark); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--amber-light); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text-h); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--amber-border); color: var(--amber); background: var(--amber-bg); }

/* ── Hero (home) ───────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: clamp(56px, 12vw, 112px) 0 clamp(40px, 8vw, 68px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 50%; transform: translateX(-50%);
  width: min(760px, 96vw); height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at center, var(--amber-bg), transparent 68%);
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-border);
  padding: 5px 13px; border-radius: 100px; margin-bottom: 26px;
}
h1 {
  font-family: var(--sans); font-weight: 500; color: var(--text-h);
  font-size: clamp(34px, 6.4vw, 60px); line-height: 1.03; letter-spacing: -1.6px;
  margin: 0 auto; max-width: 15ch;
}
.lede { margin: 24px auto 0; max-width: 56ch; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.5; color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 38px; }

/* ── Feature tiles (home) ──────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: clamp(40px, 8vw, 72px); }
@media (max-width: 720px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 14px; padding: 26px 24px; transition: transform .14s ease, box-shadow .14s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile .ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--amber-bg); color: var(--amber); margin-bottom: 16px; }
.tile h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--text-h); letter-spacing: -0.2px; }
.tile p { margin: 0; font-size: 15px; line-height: 1.5; }

/* ── Contact band (navy) ───────────────────────────────────────────────── */
.contact { background: var(--navy); color: var(--on-dark); border-top: 1px solid var(--navy-dark); }
.contact .wrap { padding-top: clamp(48px, 9vw, 76px); padding-bottom: clamp(48px, 9vw, 76px); text-align: center; }
.contact h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(24px, 4vw, 30px); color: #fff; letter-spacing: -0.4px; margin: 0 0 10px; }
.contact .who { color: var(--on-dark-muted); font-size: 16px; margin: 0 0 26px; }
.mail { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 16px; color: var(--navy-dark); background: var(--amber); padding: 12px 22px; border-radius: 9px; transition: background .12s, transform .12s; }
.mail:hover { background: var(--amber-light); transform: translateY(-2px); }

/* ── Content pages (any page built from _template.html) ────────────────── */
.page-hero { padding: clamp(44px, 8vw, 72px) 0 clamp(20px, 4vw, 32px); }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { margin: 0; text-align: left; max-width: 20ch; font-size: clamp(30px, 5vw, 46px); }
.page-hero .lede { margin: 18px 0 0; text-align: left; }

.section { padding: clamp(28px, 5vw, 44px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(22px, 3.4vw, 28px); color: var(--text-h); letter-spacing: -0.4px; margin: 0 0 14px; }

/* Readable prose column */
.prose { max-width: 66ch; }
.prose p { margin: 0 0 16px; line-height: 1.6; }
.prose ul { margin: 0 0 16px; padding-left: 20px; line-height: 1.6; }
.prose li { margin: 4px 0; }
.prose a { color: var(--amber); text-decoration: none; font-weight: 500; }
.prose a:hover { text-decoration: underline; }

/* Screenshots / figures */
figure { margin: 24px 0; }
figure img { display: block; width: 100%; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
figure figcaption { margin-top: 10px; font-size: 14px; color: var(--text); text-align: center; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.shots figure { margin: 0; }

/* Downloadable materials */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.dl {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .12s;
}
.dl:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--amber-border); }
.dl .ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--amber-bg); color: var(--amber); }
.dl .t { font-weight: 600; color: var(--text-h); font-size: 15.5px; }
.dl .m { font-size: 13px; color: var(--text); margin-top: 2px; }

/* ── Footer (injected by site.js) ──────────────────────────────────────── */
footer { background: var(--navy-dark); color: var(--on-dark-muted); font-size: 13.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
footer a { color: var(--on-dark-muted); text-decoration: none; }
footer a:hover { color: var(--amber); }
footer .foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
