/* ==========================================================================
   MOSTLY GAMES — brand.css
   Design system: "Clean Modern Portal" (Poki / CrazyGames feel)
   Light, airy, rounded, friendly, 2026-fresh. Orange primary. NO BLUE.
   Single source of truth: games-mostly-brand-spec.md
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS (:root custom properties)
   ========================================================================== */
:root {
  /* ---- Color: brand ---- */
  --brand: #ff6310;      /* primary orange */
  --brand-dark: #e44e00; /* hover / active */
  --brand-tint: #fff1e8; /* soft orange surface */

  /* ---- Color: text ---- */
  --ink: #19191d;        /* headings / near-black (NOT navy) */
  --body: #4a4a52;       /* body text */
  --muted: #8a8a93;      /* meta text */

  /* ---- Color: surfaces / lines ---- */
  --line: #ececf0;       /* borders / dividers */
  --bg: #ffffff;
  --bg-soft: #f7f7fb;    /* alt section background */
  --card: #ffffff;
  --card-bg: #f7f7fb;       /* score/stat boxes on game pages */
  --primary-color: #ff6310; /* score values + win banners (brand orange) */

  /* ---- Color: category accents (NO blue) ---- */
  --c-orange: #ff6310;
  --c-coral: #ff5a47;
  --c-pink: #ff5da2;
  --c-purple: #7c5cff;
  --c-green: #1fbf75;
  --c-amber: #ffb020;
  --ok: #1fbf75;

  /* ---- Radii ---- */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* ---- Shadows (soft) ---- */
  --shadow-sm: 0 2px 8px rgba(20, 20, 40, .06);
  --shadow: 0 8px 24px rgba(20, 20, 40, .10);
  --shadow-lg: 0 16px 40px rgba(20, 20, 40, .14);

  /* ---- Spacing scale (px) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 48px;
  --sp-10: 64px;
  --sp-11: 80px;

  /* ---- Typography: families ---- */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* ---- Typography: responsive type scale ---- */
  --fs-display: clamp(2.2rem, 5vw, 3.5rem);  /* hero, 800 */
  --fs-h1: clamp(1.9rem, 4vw, 2.75rem);      /* 700 */
  --fs-h2: clamp(1.5rem, 3vw, 2rem);         /* 700 */
  --fs-h3: 1.25rem;                          /* 600 */
  --fs-lg: 1.125rem;
  --fs-base: 1.0625rem;                      /* ~17px comfortable body */
  --fs-sm: .875rem;
  --fs-xs: .75rem;

  /* ---- Motion ---- */
  --t-fast: .15s ease;
  --t: .25s ease;

  /* ---- Layout ---- */
  --container: 1180px;
  --gutter: 20px;
}

/* ==========================================================================
   2. BASE / RESET
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p {
  margin: 0 0 var(--sp-4);
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--brand-dark);
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: 1.25em;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ==========================================================================
   3. LAYOUT — .container
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   4. SECTIONS — .section / .section-head
   ========================================================================== */
.section {
  padding-block: var(--sp-9);
  background: var(--bg);
}

.section--soft,
.section.bg-soft,
.bg-soft {
  background: var(--bg-soft);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: var(--fs-h2);
}

.section-head .view-all,
.section-head .section-link,
.section-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--brand);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.section-head .view-all:hover,
.section-head .section-link:hover,
.section-link:hover {
  color: var(--brand-dark);
}

/* Arrow affordance after the "View all" link */
.section-link::after {
  content: "\2192"; /* → */
  font-weight: 700;
  transition: transform var(--t-fast);
}

.section-link:hover::after {
  transform: translateX(3px);
}

@media (min-width: 861px) {
  .section {
    padding-block: var(--sp-11);
  }
}

/* ==========================================================================
   5. BUTTONS — .btn / .btn-outline / .btn-ghost
   ========================================================================== */
.btn,
.btn-outline,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 12px 22px;
  font-family: var(--font-head);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast),
              box-shadow var(--t-fast);
}

/* Primary filled */
.btn {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand-tint);
  color: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-2px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--ink);
  transform: translateY(-2px);
}

/* Optional larger CTA */
.btn-lg {
  min-height: 52px;
  padding: 15px 30px;
  font-size: var(--fs-lg);
}

/* ==========================================================================
   6. PILLS — .pill + category color variants
   ========================================================================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 5px 12px;
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--body);
  white-space: nowrap;
}

/* Category variants: soft tint background + accent text.
   color-mix tints the accent against white for an airy surface. */
.pill--orange {
  background: color-mix(in srgb, var(--c-orange) 14%, #fff);
  color: var(--brand-dark);
}
.pill--coral {
  background: color-mix(in srgb, var(--c-coral) 14%, #fff);
  color: #d83a28;
}
.pill--pink {
  background: color-mix(in srgb, var(--c-pink) 14%, #fff);
  color: #d62f82;
}
.pill--purple {
  background: color-mix(in srgb, var(--c-purple) 14%, #fff);
  color: #5a3ce0;
}
.pill--green,
.pill--puzzle {
  background: color-mix(in srgb, var(--c-green) 14%, #fff);
  color: #169a5e;
}
.pill--amber {
  background: color-mix(in srgb, var(--c-amber) 18%, #fff);
  color: #b9760a;
}

/* Single-hyphen aliases (homepage markup uses .pill-purple etc.) */
.pill-orange { background: color-mix(in srgb, var(--c-orange) 14%, #fff); color: var(--brand-dark); }
.pill-coral  { background: color-mix(in srgb, var(--c-coral) 14%, #fff);  color: #d83a28; }
.pill-pink   { background: color-mix(in srgb, var(--c-pink) 14%, #fff);   color: #d62f82; }
.pill-purple { background: color-mix(in srgb, var(--c-purple) 14%, #fff); color: #5a3ce0; }
.pill-green  { background: color-mix(in srgb, var(--c-green) 14%, #fff);  color: #169a5e; }
.pill-amber  { background: color-mix(in srgb, var(--c-amber) 18%, #fff);  color: #b9760a; }

/* Semantic category aliases (map game categories to accent colors) */
.pill--arcade { background: color-mix(in srgb, var(--c-orange) 14%, #fff); color: var(--brand-dark); }
.pill--action { background: color-mix(in srgb, var(--c-coral) 14%, #fff); color: #d83a28; }
.pill--casual { background: color-mix(in srgb, var(--c-pink) 14%, #fff); color: #d62f82; }
.pill--strategy { background: color-mix(in srgb, var(--c-purple) 14%, #fff); color: #5a3ce0; }
.pill--slots { background: color-mix(in srgb, var(--c-amber) 18%, #fff); color: #b9760a; }
.pill--racing { background: color-mix(in srgb, var(--c-coral) 14%, #fff); color: #d83a28; }
.pill--sports { background: color-mix(in srgb, var(--c-green) 14%, #fff); color: #169a5e; }

/* ==========================================================================
   7. CARD (generic) — .card
   ========================================================================== */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   8. GAME CARD — .game-card
   Square, full-bleed image, name + category label, hover "Play" affordance.
   ========================================================================== */
.game-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  color: #fff;
  transition: transform var(--t), box-shadow var(--t);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: #fff;
}

.game-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t);
}

.game-card:hover .game-card-image {
  transform: scale(1.06);
}

/* Bottom gradient + label.
   Homepage markup puts name + pill + Play inside .game-card-overlay,
   anchored to the bottom with a gradient scrim. */
.game-card-label,
.game-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  padding: var(--sp-7) var(--sp-3) var(--sp-3);
  background: linear-gradient(to top, rgba(20, 20, 40, .82), rgba(20, 20, 40, 0));
  z-index: 2;
}

.game-card-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: #fff;
  line-height: 1.25;
}

.game-card-label .game-card-cat {
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, .82);
}

/* "Play" affordance: subtle by default, brightens + lifts on hover */
.game-card-play {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
  padding: 6px 14px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  transition: background var(--t-fast), transform var(--t-fast);
}

.game-card-play::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff;
}

.game-card:hover .game-card-play,
.game-card:focus-visible .game-card-play {
  background: #fff;
  color: var(--brand-dark);
  transform: translateY(-1px);
}

.game-card:hover .game-card-play::before,
.game-card:focus-visible .game-card-play::before {
  border-left-color: var(--brand-dark);
}

/* Legacy .play-btn (kept for any pages still using the centered overlay) */
.game-card-overlay .play-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  min-height: 44px;
  background: #fff;
  color: var(--brand-dark);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-base);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   9. ARTICLE CARD — .article-card (whole card is a clickable <a>)
   ========================================================================== */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  color: var(--body);          /* inherit-friendly: links keep body color */
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t);
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: var(--body);
}

.article-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-soft);
  transition: transform var(--t);
}

.article-card:hover .article-card-image {
  transform: scale(1.04);
}

.article-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  flex: 1;
}

.article-card-category,
.article-card-body > .pill {
  align-self: flex-start;
}

.article-card-title {
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.article-card:hover .article-card-title {
  color: var(--brand-dark);
}

.article-card-excerpt {
  font-size: var(--fs-sm);
  color: var(--body);
  margin: 0;
  /* clamp to keep cards even */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.article-card-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}

.article-card-author {
  font-weight: 600;
  color: var(--body);
}

/* Dot separator between author and date */
.article-card-author + .article-card-date::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: var(--sp-2);
  vertical-align: middle;
  border-radius: 50%;
  background: var(--muted);
}

.article-card-date {
  color: var(--muted);
}

/* ==========================================================================
   9b. PROMO BLOCK — .promo (layered on .card, whole block is a link)
   Used for the Slots teaser and the Reviews/Guides teaser cards.
   ========================================================================== */
.promo {
  display: block;
  position: relative;
  color: var(--body);
  text-decoration: none;
}

.promo:hover {
  color: var(--body);
}

.promo-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-8);
}

.promo-body > .pill {
  align-self: flex-start;
}

.promo-title {
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.promo:hover .promo-title {
  color: var(--brand-dark);
}

.promo-text {
  font-size: var(--fs-base);
  color: var(--body);
  max-width: 60ch;
  margin: 0;
}

/* Two-up grid for the Reviews + Guides teasers */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 700px) {
  .promo-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Slots teaser: warm orange-tint surface for emphasis */
.promo-slots {
  background: var(--brand-tint);
  border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
}

.promo-slots .promo-body {
  padding-block: var(--sp-9);
}

@media (min-width: 700px) {
  .promo-slots .promo-body {
    max-width: 60ch;
  }
}

/* ==========================================================================
   10. GRIDS — .games-grid / .articles-grid
   ========================================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
}

/* ==========================================================================
   11. SITE HEADER — .site-header (white sticky) + hamburger + drawer
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .header-inner,
.site-header .site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 68px;
}

/* Brand lockup: mascot + wordmark, left.
   Supports both .site-brand and homepage's .brand / .brand-mark / .brand-name. */
.site-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink);
  flex-shrink: 0;
}

.site-brand:hover,
.brand:hover {
  color: var(--ink);
}

.site-brand img,
.site-brand .brand-mascot,
.brand img,
.brand .brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.site-brand .brand-wordmark,
.brand .brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.site-brand .brand-wordmark .brand-accent {
  color: var(--brand);
}

/* Desktop nav, right */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-4);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--ink);
  border-radius: var(--r-pill);
  transition: background var(--t-fast), color var(--t-fast);
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.site-nav .btn,
.site-nav .btn-outline {
  margin-left: var(--sp-2);
}

/* Hamburger toggle (hidden on desktop).
   Supports both legacy .hamburger and homepage's <button class="menu-toggle">. */
.hamburger,
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
}

.hamburger span,
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t-fast);
}

/* Animate hamburger -> X when the menu is open (.active on the button) */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile drawer / slide-in menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(82vw, 340px);
  max-width: 100%;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-9) var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transform: translateX(100%);
  transition: transform var(--t);
  overflow-y: auto;
  visibility: hidden;
}

.mobile-menu.open,
.mobile-menu.active {
  transform: translateX(0);
  visibility: visible;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--sp-4);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--ink);
  border-radius: var(--r);
}

.mobile-menu a:hover,
.mobile-menu a.is-active {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.mobile-menu .menu-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  background: var(--bg-soft);
  border: 0;
  border-radius: var(--r-pill);
}

/* Backdrop behind the drawer */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(20, 20, 40, .4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t);
}

.menu-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Backdrop is shown when the JS adds .active to the body's menu wrapper.
   The homepage toggles .mobile-menu.active via the inline script. */
.menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   12. HERO — .hero (light, big headline + subcopy + CTA + mascot right)
   ========================================================================== */
.hero {
  background: var(--bg);
  padding-block: var(--sp-9);
  overflow: hidden;
}

.hero .hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--sp-8);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5);
}

.hero-eyebrow {
  display: inline-flex;
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-title .hero-accent {
  color: var(--brand);
}

.hero-subcopy,
.hero-sub {
  font-size: var(--fs-lg);
  color: var(--body);
  max-width: 52ch;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.hero-art {
  display: none;
  justify-self: center;
}

.hero-art img {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(var(--shadow));
}

@media (min-width: 861px) {
  .hero {
    padding-block: var(--sp-11);
  }
  .hero .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .hero-art {
    display: block;
  }
}

/* ==========================================================================
   13. SITE FOOTER — .site-footer (light, multi-column)
   ========================================================================== */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding-block: var(--sp-9) var(--sp-6);
  color: var(--body);
}

.site-footer .footer-grid,
.site-footer .site-footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}

.site-footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 32ch;
}

.site-footer .footer-brand .site-brand,
.site-footer .footer-brand .brand {
  margin-bottom: var(--sp-1);
}

.site-footer .footer-tagline {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.site-footer .footer-col h3 {
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}

.site-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.site-footer .footer-col a {
  font-size: var(--fs-sm);
  color: var(--body);
}

.site-footer .footer-col a:hover {
  color: var(--brand-dark);
}

.site-footer .footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.site-footer .footer-compliance {
  max-width: 90ch;
}

.site-footer .footer-copy {
  font-weight: 500;
}

@media (min-width: 600px) {
  .site-footer .footer-grid,
  .site-footer .site-footer-inner {
    grid-template-columns: 1.4fr repeat(4, 1fr);
  }
  .site-footer .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ==========================================================================
   14. RESPONSIVE — nav collapses to hamburger under ~860px
   ========================================================================== */
@media (max-width: 860px) {
  .site-nav {
    display: none;
  }
  .hamburger,
  .menu-toggle {
    display: flex;
  }
}

@media (min-width: 861px) {
  /* Drawer + backdrop never show on desktop */
  .mobile-menu,
  .menu-backdrop {
    display: none;
  }
}

/* ==========================================================================
   15. UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.no-scroll { overflow: hidden; }

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Inner pages: article + game page content (added for sitewide rollout)
   ============================================================ */
.article-page{max-width:840px;margin:0 auto;padding:40px 20px 64px}
.article-page.game-page{max-width:980px}
.back-link{margin-bottom:20px;font-size:var(--fs-sm)}
.back-link a{color:var(--muted);text-decoration:none;font-weight:600}
.back-link a:hover{color:var(--brand)}
.article-page h1{font-family:var(--font-head);font-size:var(--fs-h1);line-height:1.15;color:var(--ink);margin:0 0 12px}
.article-byline,.byline{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:var(--fs-sm);margin:0 0 28px;flex-wrap:wrap}
.article-byline .author,.byline .author{font-weight:600;color:var(--ink)}
.article-page h2{font-family:var(--font-head);font-size:var(--fs-h2);color:var(--ink);margin:36px 0 14px}
.article-page h3{font-family:var(--font-head);font-size:var(--fs-h3);color:var(--ink);margin:26px 0 10px}
.article-page p,.article-page li{font-size:var(--fs-base);line-height:1.7;color:var(--body)}
.article-page p{margin:0 0 18px}
.article-page ul,.article-page ol{margin:0 0 18px;padding-left:22px}
.article-page li{margin:0 0 8px}
.article-page a{color:var(--brand);font-weight:600}
/* Button-classed links inside content must keep their button colors, not the orange link color. */
.article-page a.btn,.article-page a.btn:hover{color:#fff}
.article-page a.btn-outline{color:var(--brand)}
.article-page a.btn-outline:hover{color:var(--brand-dark)}
.article-page a.btn-ghost{color:var(--ink)}
.article-page img{max-width:100%;height:auto;border-radius:var(--r-lg);margin:18px 0}
.article-page blockquote{border-left:4px solid var(--brand);background:var(--brand-tint);margin:18px 0;padding:14px 18px;border-radius:0 var(--r) var(--r) 0;color:var(--ink)}
/* game page */
.game-page-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.game-page-header h1{margin:0}
.game-category{display:inline-flex;align-items:center;background:var(--brand-tint);color:var(--brand-dark);font-weight:700;font-size:var(--fs-xs);text-transform:capitalize;padding:5px 12px;border-radius:var(--r-pill)}
.game-container{background:var(--bg-soft);border:1px solid var(--line);border-radius:var(--r-lg);padding:24px;display:flex;flex-direction:column;align-items:center;gap:14px;margin:0 0 28px}
.game-container canvas{max-width:100%;height:auto;border-radius:var(--r);background:#fff;box-shadow:var(--shadow-sm)}
.game-controls{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:20px 22px}
.game-controls h3{font-family:var(--font-head);color:var(--ink);margin:0 0 8px}
.game-controls p{color:var(--body);margin:0 0 8px;font-size:var(--fs-base)}
.more-games{margin-top:40px}

/* ============================================================
   Author byline component (sitewide rollout)
   Orange accents, no blue. Wraps on mobile.
   ============================================================ */
.byline{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 28px;color:var(--muted);font-size:var(--fs-sm)}
.byline-avatar{width:44px;height:44px;flex:0 0 44px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 2px #fff,0 0 0 4px var(--brand-tint)}
.byline-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.byline-author{font-weight:600;color:var(--ink);font-size:var(--fs-base)}
.byline-author a{color:inherit;text-decoration:none}
.byline-author a:hover{color:var(--brand)}
.byline-pub{color:var(--muted);font-size:var(--fs-sm)}
.byline-pub a{color:var(--muted);text-decoration:none;font-weight:600}
.byline-pub a:hover{color:var(--brand)}
.byline-date{color:var(--muted)}
.byline .pill{margin-left:auto}
@media (max-width:520px){
  .byline .pill{margin-left:0}
}

/* ============================================================
   Page hero banner (header with background image)
   ============================================================ */
.page-hero{position:relative;background:#1a1a1f center/cover no-repeat;padding:62px 0 56px;margin-bottom:30px;overflow:hidden;min-height:360px;display:flex;flex-direction:column;justify-content:center}
.page-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(18,18,24,.9),rgba(18,18,24,.6) 48%,rgba(18,18,24,.22));z-index:0}
.page-hero > .container{position:relative;z-index:1}
.page-hero h1{color:#fff;margin:6px 0 10px}
.page-hero .page-hero-intro{color:rgba(255,255,255,.92);max-width:680px;font-size:var(--fs-lg);margin:0}
.page-hero .back-link a{color:rgba(255,255,255,.82)}
.page-hero .back-link a:hover{color:#fff}
.page-hero .byline{margin-top:12px}
.page-hero .byline-author,.page-hero .byline-author a{color:#fff !important}
.page-hero .byline-pub,.page-hero .byline-pub a,.page-hero .byline-date{color:rgba(255,255,255,.8) !important}
.page-hero .byline-avatar{box-shadow:0 0 0 2px rgba(255,255,255,.5)}
@media(max-width:600px){.page-hero{padding:40px 0 34px;min-height:230px}}

/* ==========================================================================
   16. MOBILE REFINEMENTS + INTERACTIVITY (added 2026-06-16)
   Global, additive rules. No desktop layout or brand-color changes.
   Targets real small-screen problems: grid reflow / horizontal overflow,
   tap targets, content padding, and touch/keyboard feedback.
   ========================================================================== */

/* ---- Touch + keyboard feedback (all viewports) ----
   Press feedback on touch and a consistent focus ring on the interactive
   surfaces that previously had hover-only states. */
.game-card,
.article-card,
.promo,
.card {
  -webkit-tap-highlight-color: transparent;
}
.game-card:active,
.article-card:active,
.promo:active,
.card:active {
  transform: translateY(-1px) scale(.995);
}
.btn:active,
.btn-outline:active,
.btn-ghost:active {
  transform: translateY(1px);
}
.game-card:focus-visible,
.article-card:focus-visible,
.promo:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
/* Nav links get a quick press tint on touch */
.site-nav a:active,
.mobile-menu a:active {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

/* ---- Wide embedded content never overflows the reading column ---- */
.article-page table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}
.article-page iframe,
.article-page video,
.article-page pre {
  max-width: 100%;
}
.article-page pre {
  overflow-x: auto;
}

/* ==========================================================================
   Tablet / large phone: <= 720px
   ========================================================================== */
@media (max-width: 720px) {
  /* Article-card grid: 300px min can force horizontal scroll on narrow
     phones. Let cards shrink so the grid reflows to a single clean column. */
  .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--sp-5);
  }

  /* Section vertical rhythm tightened for smaller screens */
  .section {
    padding-block: var(--sp-8);
  }

  /* Section heads stack the heading and the "view all" link cleanly */
  .section-head {
    margin-bottom: var(--sp-5);
  }

  /* Hero CTAs are easier to hit when full-width and stacked */
  .hero-actions {
    width: 100%;
  }
  .hero-actions .btn,
  .hero-actions .btn-outline,
  .hero-actions .btn-ghost {
    flex: 1 1 100%;
  }
}

/* ==========================================================================
   Phone: <= 480px  (covers 360 / 390 / 414 widths)
   ========================================================================== */
@media (max-width: 480px) {
  /* Slightly tighter gutter buys real estate without touching desktop */
  :root {
    --gutter: 16px;
  }

  /* Game grid: 160px min would clamp to 2 columns but leaves little room
     for the play/label overlay text. Allow down to 140px for a comfortable
     2-up that never overflows. */
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--sp-3);
  }

  /* Single comfortable column for article cards on the smallest screens */
  .articles-grid {
    grid-template-columns: 1fr;
  }

  /* Comfortable reading: marginally more body padding, tighter heading rhythm */
  .article-page {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }
  .article-page h2 {
    margin-top: var(--sp-7);
  }

  /* Header lockup: keep wordmark from crowding the hamburger */
  .site-header .header-inner,
  .site-header .site-header-inner {
    gap: var(--sp-3);
    min-height: 60px;
  }
  .site-brand .brand-wordmark,
  .brand .brand-name {
    font-size: 1.1rem;
  }

  /* Footer link rows: give tap targets more height on touch */
  .site-footer .footer-col a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }

  /* "View all" / section links: comfortable touch height */
  .section-head .view-all,
  .section-head .section-link,
  .section-link {
    min-height: 36px;
  }

  /* Buttons span the width when they're the primary action on a small screen */
  .btn-lg {
    width: 100%;
  }
}

/* ==========================================================================
   PLAYFUL BACKGROUND MOTIF (added 2026-06-25)
   Tiled SVG game-shape texture on content sections. Default = Player Buttons;
   /games/ pages -> Arcade Icons, /slots/ pages -> Jackpot Symbols
   (set via data-bg on <body>). Sits behind opaque cards so text stays readable.
   ========================================================================== */
:root{ --bg-motif: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22150%22%20height%3D%22150%22%20viewBox%3D%220%200%20150%20150%22%3E%3Cg%20fill%3D%22none%22%20stroke-width%3D%225%22%20opacity%3D%220.21%22%3E%3Ccircle%20cx%3D%2234%22%20cy%3D%2240%22%20r%3D%2217%22%20stroke%3D%22%23ff5a47%22%2F%3E%3Cpath%20d%3D%22M118%2022%20l20%2034%20h-40%20z%22%20stroke%3D%22%231fbf75%22%2F%3E%3Cg%20stroke%3D%22%237c5cff%22%3E%3Cline%20x1%3D%2222%22%20y1%3D%22104%22%20x2%3D%2250%22%20y2%3D%22132%22%2F%3E%3Cline%20x1%3D%2250%22%20y1%3D%22104%22%20x2%3D%2222%22%20y2%3D%22132%22%2F%3E%3C%2Fg%3E%3Crect%20x%3D%22104%22%20y%3D%22100%22%20width%3D%2234%22%20height%3D%2234%22%20rx%3D%226%22%20stroke%3D%22%23ff5da2%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M86%2074%20l5%2013%2013%205%20-13%205%20-5%2013%20-5%20-13%20-13%20-5%2013%20-5z%22%20fill%3D%22%23ffb020%22%20opacity%3D%220.24%22%2F%3E%3C%2Fsvg%3E"); }
body[data-bg="games"]{ --bg-motif: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20opacity%3D%220.21%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%237c5cff%22%20stroke-width%3D%225%22%3E%3Cline%20x1%3D%2236%22%20y1%3D%2258%22%20x2%3D%2236%22%20y2%3D%2230%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2236%22%20cy%3D%2224%22%20r%3D%229%22%20fill%3D%22%237c5cff%22%20opacity%3D%220.5%22%2F%3E%3Cpath%20d%3D%22M18%2058%20q18%2013%2036%200%20v8%20q-18%2013%20-36%200z%22%20fill%3D%22%237c5cff%22%20opacity%3D%220.5%22%2F%3E%3Cpath%20d%3D%22M120%2028%20h16%20v16%20h16%20v16%20h-16%20v16%20h-16%20v-16%20h-16%20v-16%20h16z%22%20fill%3D%22none%22%20stroke%3D%22%23ff6310%22%20stroke-width%3D%225%22%2F%3E%3Crect%20x%3D%2230%22%20y%3D%22104%22%20width%3D%2244%22%20height%3D%2244%22%20rx%3D%229%22%20fill%3D%22none%22%20stroke%3D%22%231fbf75%22%20stroke-width%3D%225%22%2F%3E%3Cg%20fill%3D%22%231fbf75%22%20opacity%3D%220.55%22%3E%3Ccircle%20cx%3D%2244%22%20cy%3D%22118%22%20r%3D%223.6%22%2F%3E%3Ccircle%20cx%3D%2260%22%20cy%3D%22134%22%20r%3D%223.6%22%2F%3E%3Ccircle%20cx%3D%2252%22%20cy%3D%22126%22%20r%3D%223.6%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M126%20104%20l7%2015%2017%202%20-12%2011%203%2017%20-15%20-9%20-15%209%203%20-17%20-12%20-11%2017%20-2z%22%20fill%3D%22none%22%20stroke%3D%22%23ff5da2%22%20stroke-width%3D%225%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }
body[data-bg="slots"]{ --bg-motif: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22150%22%20height%3D%22150%22%20viewBox%3D%220%200%20150%20150%22%3E%3Cg%20opacity%3D%220.21%22%20font-family%3D%22Poppins%2C%20Arial%2C%20sans-serif%22%20font-weight%3D%22800%22%3E%3Ctext%20x%3D%2214%22%20y%3D%2246%22%20font-size%3D%2240%22%20fill%3D%22%23ff6310%22%3E7%3C%2Ftext%3E%3Ctext%20x%3D%2286%22%20y%3D%2240%22%20font-size%3D%2218%22%20fill%3D%22%237c5cff%22%3EBAR%3C%2Ftext%3E%3Cpath%20d%3D%22M40%2078%20l20%2022%20-20%2022%20-20%20-22z%22%20fill%3D%22%23ff5da2%22%2F%3E%3Cpath%20d%3D%22M112%2084%20c-15%200%20-18%2014%20-18%2026%20c0%207%20-5%208%20-5%2012%20h46%20c0%20-4%20-5%20-5%20-5%20-12%20c0%20-12%20-3%20-26%20-18%20-26z%22%20fill%3D%22%23ffb020%22%2F%3E%3Ccircle%20cx%3D%22112%22%20cy%3D%22126%22%20r%3D%224.5%22%20fill%3D%22%23ffb020%22%2F%3E%3Cg%3E%3Ccircle%20cx%3D%2226%22%20cy%3D%22122%22%20r%3D%2211%22%20fill%3D%22%23ff5a47%22%2F%3E%3Ccircle%20cx%3D%2246%22%20cy%3D%22130%22%20r%3D%2211%22%20fill%3D%22%23ff5a47%22%2F%3E%3Cpath%20d%3D%22M26%20111%20q11%20-20%2024%20-9%22%20fill%3D%22none%22%20stroke%3D%22%231fbf75%22%20stroke-width%3D%224%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }

.section, .hp-tiles{
  background-image: var(--bg-motif);
  background-repeat: repeat;
  background-position: center top;
}
/* keep the soft alternating bands tinted UNDER the motif */
.section.bg-soft, .section--soft{ background-color: var(--bg-soft); }
.section:not(.bg-soft){ background-color: var(--bg); }
@media (prefers-reduced-motion: no-preference){ .section, .hp-tiles{ background-attachment: fixed; } }

/* ==========================================================================
   17. GAME-PAGE GAP FILLERS (added 2026-07-07)
   The /games/<slug>/ pages reference classes that had no rules, so their
   "More games" strips and score UI rendered unstyled. These are additive,
   global, and match the existing design system (no new colors).
   ========================================================================== */

/* "More Arcade Games" related strip */
.related-section { margin-top: var(--sp-9); }
.related-section > h3 {
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  color: var(--ink);
  margin: 0 0 var(--sp-5);
}
.related-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-4);
}
@media (max-width: 480px) {
  .related-games { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-3); }
}

/* Category label inside related game-card overlays (matches .game-card-cat) */
.game-card-overlay .game-card-category {
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, .82);
}

/* "Play" pill on related game-card overlays (alias of .game-card-play).
   pointer-events:none lets the tap fall through to the wrapping <a>. */
.game-play-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
  padding: 6px 14px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 0;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.game-card:hover .game-play-btn,
.game-card:focus-visible .game-play-btn {
  background: #fff;
  color: var(--brand-dark);
}

/* Secondary button: quiet neutral companion to the primary orange .btn
   (used by the Jelly Jump "Reset" control). */
.btn-secondary {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover {
  background: #fff;
  color: var(--ink);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* Game-page About/Tips/FAQ content block (shared) */
.game-about{max-width:780px;margin:2.5rem auto 0;text-align:left}
.game-about h2{font-family:'Poppins',sans-serif;font-size:1.35rem;color:#19191d;margin:1.8rem 0 .7rem}
.game-about p{margin:0 0 1rem;line-height:1.75;color:#4a4a52}
.game-about ul{margin:0 0 1rem 1.25rem;padding:0;line-height:1.75;color:#4a4a52}
.game-about li{margin-bottom:.4rem}
.faq-item{border:1px solid #ececf0;border-radius:12px;margin:0 0 10px;background:#fff;overflow:hidden}
.faq-item summary{list-style:none;cursor:pointer;padding:14px 18px;font-family:'Poppins',sans-serif;font-weight:700;color:#19191d;font-size:1rem;display:flex;align-items:center;justify-content:space-between;gap:12px}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";font-size:1.4rem;color:#ff6310;font-weight:700;line-height:1;flex:0 0 auto}
.faq-item[open] summary::after{content:"\2013"}
.faq-item summary:hover{color:#ff6310}
.faq-item p{margin:0;padding:0 18px 16px;color:#4a4a52}
