:root {
  --orange: #EC713E;
  --orange-deep: #C84E23;
  --orange-tint: #FDEEE5;
  --ink: #17181C;
  --grey: #6B6B6B;
  --grey-soft: #9A9189;
  --paper: #FCF8F4;
  --card: #FFFFFF;
  --border: #EBDDD3;
  --border-soft: #F1E8E0;
  --radius: 20px;
  --gutter: 20px;
  --shadow-sm: 0 1px 2px rgba(60, 35, 20, .04);
  --shadow-md: 0 14px 34px -12px rgba(60, 35, 20, .18);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(60% 520px at 50% 0%, rgba(236, 113, 62, .12), rgba(236, 113, 62, 0) 70%) no-repeat,
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; }

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-inner a { display: inline-flex; }
.logo { width: 160px; height: auto; display: block; }
.parent-brand img { width: 124px; height: auto; display: block; opacity: .95; transition: opacity .2s, transform .2s; }
.parent-brand:hover img { opacity: 1; transform: translateY(-2px); }

main {
  max-width: 1240px;
  padding: 0 32px;
  margin: 0 auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 72px 0 80px;
}



.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--grey);
}

h1 {
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.02;
  margin: 22px 0 20px;
  text-wrap: balance;
}

h1 span { color: var(--orange); }

.hero p {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
  color: var(--grey);
  margin: 0 auto;
  max-width: 520px;
}

.daily {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.daily .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(236, 113, 62, .18);
}

.hero small {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--grey-soft);
}

small { color: var(--grey); }

/* ---------- Collections ---------- */
.collection { margin-bottom: 72px; }

.collection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.collection h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
}

.collection-meta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--grey-soft);
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--gutter);
}

/* ---------- Cards ---------- */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.game-icon {
  --icon-bg: var(--card);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--orange-tint);
  color: var(--orange);
  flex: none;
}

.game-icon svg { display: block; width: 32px; height: 32px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  border-radius: 999px;
  white-space: nowrap;
}

.card-body { flex: 1; padding-top: 26px; }

.game-card h3 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 6px;
}

.game-card p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--grey);
  margin: 0;
}

/* Coming soon: muted, quiet */
.is-soon { background: rgba(255, 255, 255, .6); box-shadow: none; }
.is-soon .game-icon { --icon-bg: #F6F1EC; background: #F6F1EC; color: var(--grey-soft); }
.is-soon .pill { color: var(--grey-soft); background: transparent; border: 1px solid var(--border-soft); }
.is-soon h3 { color: #3a3a3e; }
.is-soon p { color: var(--grey-soft); }
.is-soon:hover { border-color: #E3D3C7; background: var(--card); transform: translateY(-2px); }

/* Live: the hero of the grid */
.is-live {
  --icon-bg: var(--orange);
  background: linear-gradient(165deg, #FFFFFF 40%, #FFF1E8 100%);
  border-color: #F3C4AA;
  box-shadow: 0 10px 28px -14px rgba(236, 113, 62, .45);
}

.is-live .game-icon { background: var(--orange); color: #fff; box-shadow: 0 8px 18px -8px rgba(236, 113, 62, .8); }
.is-live .pill { color: var(--orange-deep); background: var(--orange-tint); }
.is-live .pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.is-live:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--orange); }

/* ---------- Buttons & form controls ---------- */
button, select {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--card);
  color: var(--ink);
}

button { cursor: pointer; }

.play {
  margin-top: 20px;
  width: 100%;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s, border-color .2s;
}

.play span { transition: transform .2s; }
.play:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.play:hover span { transform: translateX(3px); }

button:focus-visible, select:focus-visible, .parent-brand:focus-visible, .chip:focus-visible, .search input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding: 44px 32px 56px;
  text-align: center;
}

.footer-inner { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--grey); }
.footer-inner strong { color: var(--ink); font-weight: 600; letter-spacing: .01em; }
.footer-inner span { color: var(--grey-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); --gutter: 14px; }
  main { padding: 0 18px; }
  .header-inner { padding: 14px 18px; }
  .logo { width: 140px; }
  .hero { padding: 48px 0 56px; }
  .collection { margin-bottom: 52px; }
  .game-card { min-height: 190px; padding: 18px; }
  .game-icon { width: 46px; height: 46px; border-radius: 13px; }
}

@media (max-width: 400px) {
  .logo { width: 120px; }
  .parent-brand img { width: 76px; }
  .pill { font-size: 10px; padding: 4px 8px; }
  #board { padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Search + category menu ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.library-tools { display: flex; justify-content: center; margin: 0 0 22px; }

.search {
  position: relative;
  width: min(100%, 440px);
  color: var(--grey-soft);
}

.search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }

.search input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 14px 20px 14px 46px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}

.search input::placeholder { color: var(--grey-soft); }
.search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(236, 113, 62, .14); }

.game-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  margin: 0 -32px 36px;
  padding: 12px 32px;
}

.game-nav::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background: rgba(252, 248, 244, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
  z-index: -1;
}

.nav-inner {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-inner::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  white-space: nowrap;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey);
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  transition: color .2s, background .2s, border-color .2s;
}

.chip .n { margin-left: 7px; font-weight: 500; opacity: .55; }
.chip:hover { color: var(--ink); border-color: var(--grey-soft); }
.chip.active { color: #fff; background: var(--ink); border-color: var(--ink); }

.collection { scroll-margin-top: 76px; }

.no-results { text-align: center; color: var(--grey); padding: 40px 0 80px; }
.no-results strong { color: var(--ink); }

.footer-logo { display: inline-flex; align-self: center; margin-bottom: 12px; }
.footer-logo img { width: 104px; height: auto; display: block; }

@media (max-width: 800px) {
  .game-nav { margin: 0 -18px 28px; padding: 10px 18px; }
  .nav-inner { justify-content: flex-start; }
  .parent-brand img { width: 88px; }
  .header-inner { padding: 16px 18px; }
  .collection { scroll-margin-top: 68px; }
}
