/* ==========================================================================
   Site pages (homepage, /games/, /store/, /om/) — built on design-system.css.

   Layout: a centred content column (--shell-width) with Copenhagen art on
   either side. The art fades into --panel, which is also the page colour, so
   there is no visible panel edge. Games have their own full-page layouts and
   don't use this file.
   ========================================================================== */

body.site-page {
  background: var(--panel);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell-width);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
}

.site-shell > main { flex: 1; }

/* ── Backdrop art (built by assets/js/backdrop.js) ──
   Two fixed sides, each with three layers that drift at different speeds
   as you scroll. Only shown when there is room beside the column. */
.backdrop {
  --ext: 30vh;        /* extra layer height = room for the parallax drift (keep in sync with backdrop.js) */
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.backdrop.is-ready { opacity: 1; }

@media (min-width: 1440px) {
  .backdrop { display: block; }
}

.backdrop-side {
  --fade: min(140px, 60%);
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc((100% - var(--shell-width)) / 2);
  overflow: hidden;
}

.backdrop-left {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
}

.backdrop-right {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - var(--fade)), transparent 100%);
          mask-image: linear-gradient(to left, #000 calc(100% - var(--fade)), transparent 100%);
}

.backdrop-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh + var(--ext));
  object-fit: cover;
  will-change: transform;
  user-select: none;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin-bottom: 14px;
}

.hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

.page-hero {
  text-align: center;
  padding: 40px 0 8px;
}

.page-hero h1 {
  font-size: clamp(28px, 5vw, 44px);
}

.page-hero p {
  color: var(--muted);
  max-width: 480px;
  margin: 10px auto 0;
}

/* ── Sections ── */
.section {
  padding: 28px 0 8px;
}

/* Site section headings use DM Serif Display's real (regular) weight —
   the font has no bold, so the default h2 bold is a blurry fake. */
.site-page h2 { font-weight: 400; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 24px;
}

.section-header a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* "Dagens spil" — today's highlighted game, centred */
.daily {
  text-align: center;
  padding: 44px 0 76px;
}

.daily h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 22px;
}

.daily .game-grid {
  grid-template-columns: minmax(240px, 286px);
  justify-content: center;
  text-align: left;
}

/* Full-width terracotta divider (runs edge to edge of the column) */
.rule-accent {
  height: 10px;
  margin: 22px -40px 0;
  background: var(--accent);
}

.rule-accent + .section { padding-top: 52px; }

/* ── Game cards ── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.game-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.2s;
}

a.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(26,35,64,0.14);
}

.game-card .emoji {
  font-size: 30px;
}

.game-card h3 {
  font-size: 18px;
}

.game-card p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}

.game-card.coming-soon {
  opacity: 0.6;
}

.game-card .cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

/* ── Footer ── */
.site-shell .site-footer {
  padding: 76px 0 44px;
}

/* ── Small screens: no art, tighter padding ── */
@media (max-width: 720px) {
  .site-shell { padding: 0 20px; }
  .rule-accent { margin-left: -20px; margin-right: -20px; }
  .daily { padding-bottom: 36px; }
  .daily .game-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 10px; }
  .site-nav .nav-right { gap: 14px; }
  .site-nav ul { gap: 14px; }
}
