/* Landing page. The sections' styles are in /css/sections.css; this is the page around them (header, footer)
   and the landing-only sections (demo lobby, plans). Colours come from the theme in the admin's Landing page
   builder (set on <html> by the server); these are the defaults (black & gold). */
:root[data-theme="dark"] {
  --bg: #0a0907; --surface: #15120c; --border: #352c1b;
  --text: #f6f0e1; --muted: #b0a68c;
  --gold: #d4af37; --gold-light: #f6dc83; --gold-dark: #9c7419; --on-gold: #0a0907;
}

body {
  background:
    radial-gradient(900px 520px at 85% -120px, color-mix(in srgb, var(--gold) 22%, transparent), transparent),
    radial-gradient(700px 420px at -5% 25%, color-mix(in srgb, var(--gold-dark) 16%, transparent), transparent),
    var(--bg);
  min-height: 100vh;
}
a { color: inherit; }
::selection { background: var(--gold); color: var(--on-gold); }

.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 14px 32px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.logo { font-weight: 900; font-size: 1.2rem; text-decoration: none; display: flex; align-items: center; gap: 8px; letter-spacing: 0.02em; }
.logo-mark { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.foot-logo { width: 160px; height: auto; flex-basis: 100%; max-width: 160px; margin-bottom: 6px; }
.nav-links { display: flex; gap: 18px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; }
.nav-links a:hover { color: var(--gold-light); }

/* ---------- game lobby ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 22px; }
.chips button { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.chips button:hover { border-color: var(--gold-line); color: var(--gold-light); }
.chips button[aria-pressed="true"] { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; }
/* One grid of square tiles; the featured game is a square spanning 1, 2 or 3 tiles each way (page builder setting),
   the other games fill in around it. */
.lobby-body { grid-auto-flow: row dense; }
.lobby-body .featured { grid-column: span var(--fs, 2); grid-row: span var(--fs, 2); aspect-ratio: 1; min-height: 0; }
.feat-1 { --fs: 1; } .feat-2 { --fs: 2; } .feat-3 { --fs: 3; }
.feat-1 .featured { padding: 12px; border-radius: 16px; }
.feat-1 .featured .label, .feat-1 .featured .btn { display: none; }
.feat-1 .featured h3 { margin: 0; font-size: 0.98rem; }
.feat-1 .featured .ribbon { top: 10px; left: -44px; font-size: 0.6rem; }
.feat-2 .featured h3 { font-size: 1.5rem; }
.featured { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 420px; padding: 26px; border-radius: 22px; overflow: hidden; color: #fff; text-decoration: none;
  background: var(--bgimg) center / cover no-repeat, var(--hero-bg); border: 2px solid var(--gold); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.featured::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--hero-bg) 95%, transparent)); }
.featured { transition: transform 0.25s, box-shadow 0.25s; }
.featured:hover { transform: translateY(-4px); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 40px color-mix(in srgb, var(--gold) 25%, transparent); }
.featured > * { position: relative; }
.featured .ribbon { position: absolute; top: 18px; left: -36px; width: 150px; padding: 5px 0; text-align: center; transform: rotate(-45deg); background: var(--gold-grad); color: var(--on-gold); font-weight: 900; font-size: 0.72rem; letter-spacing: 0.1em; }
.featured .label { color: var(--gold-light); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.featured h3 { margin: 4px 0 10px; font-size: 2rem; text-shadow: 0 3px 14px #000; }
.featured .btn { align-self: flex-start; }
.game-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); align-content: start; }
.game { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1; padding: 12px; border-radius: 16px; overflow: hidden; color: #fff; text-decoration: none;
  background: var(--bgimg) center / cover no-repeat, var(--hero-bg); border: 1px solid color-mix(in srgb, var(--gp) 50%, var(--gold-line)); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.game::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.88)); }
.game > * { position: relative; }
.game:hover, .game:focus-visible { transform: translateY(-4px) scale(1.02); border-color: var(--gold); box-shadow: 0 16px 36px color-mix(in srgb, var(--gold) 24%, transparent); }
.game h4 { margin: 0; font-size: 0.98rem; text-shadow: 0 2px 6px #000; }
.game .tpl { align-self: flex-start; margin-top: 4px; padding: 1px 8px; border-radius: 99px; font-size: 0.68rem; font-weight: 800; background: rgba(0, 0, 0, 0.6); color: var(--gold-light); border: 1px solid var(--gold-line); }
.game .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.2s; }
.game .play span { padding: 9px 18px; border-radius: 99px; background: var(--gold-grad); color: var(--on-gold); font-weight: 900; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.game:hover .play, .game:focus-visible .play { opacity: 1; }

/* plans */
.price-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.price-card:hover { transform: translateY(-3px); border-color: var(--gold-line); }
.price-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.price-card[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 18px 44px color-mix(in srgb, var(--gold) 22%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface)); }
.price-card h3 { margin: 0; font-size: 1.15rem; }
.price-card .badge-row { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.price-card .pill { padding: 2px 9px; border-radius: 99px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; background: var(--surface-2); color: var(--muted); }
.price-card .pill.gold { background: var(--gold-grad); color: var(--on-gold); }
.price-card .amount { font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; margin-top: 8px; }
.price-card .amount small { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.price-card .monthly { color: var(--gold-light); font-weight: 700; font-size: 0.9rem; }
.price-card .desc { color: var(--muted); margin: 6px 0 4px; font-size: 0.92rem; }
.price-card ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 5px; font-size: 0.92rem; }
.price-card li { display: flex; align-items: baseline; gap: 8px; }
.price-card li.no { color: color-mix(in srgb, var(--muted) 75%, transparent); }

.plan-pitch { margin-top: 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 22px 26px; border-radius: 18px;
  border: 1px solid var(--gold-line); background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 14%, var(--surface)), var(--surface) 70%); }
.plan-pitch .pitch-icon { font-size: 2.2rem; }
.plan-pitch p { margin: 0; font-size: 1.08rem; line-height: 1.55; }
.plan-pitch strong { color: var(--gold-light); }
.plan-pitch .fine { display: block; margin-top: 4px; color: var(--muted); font-size: 0.88rem; }

.foot { max-width: 1200px; margin: 0 auto; padding: 30px 32px 50px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); }

@media (max-width: 860px) { .feat-3 { --fs: 2; } } /* two games a row: at most 2 × 2 */
@media (max-width: 860px) {
  .nav { padding: 12px 16px; gap: 10px; }
  .nav-links { display: none; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-pitch { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 520px) {
  .nav .btn.ghost { display: none; }
  .logo { font-size: 1.05rem; }
}

/* paused demo games + small notice */
.game.unavailable, .featured.unavailable { cursor: not-allowed; filter: grayscale(0.8); }
.game.unavailable:hover, .featured.unavailable:hover { transform: none; box-shadow: none; }
.unavail-tag { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.75); color: var(--gold-light); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; }
.notice { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--gold-line); color: var(--text); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); font-weight: 600; }

.featured.empty { justify-content: center; align-items: center; min-height: 200px; }
