/* Homepage — promo hub hero, category chips and bonus cards.
   Loaded after app.css; section rules are scoped to .home so the detail
   pages keep their own layout. */

/* ── top bar (shared with the detail page) ───────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(13, 23, 43, .9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(120, 165, 255, .12);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  max-width: 1440px; margin: 0 auto; padding: 11px 22px;
}

.brand { display: inline-flex; align-items: center; height: 38px; flex: 0 0 auto; }
.brand-logo { display: block; height: 34px; width: auto; max-width: 190px; object-fit: contain; }
.brand-name {
  font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: .6px;
  color: var(--ink); white-space: nowrap;
}
.brand:hover .brand-name { color: var(--brand); }
.brand:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(72, 216, 255, .45); border-radius: 8px; }

.topnav { display: flex; align-items: center; gap: 4px; }
.nav-item {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 10px;
  color: #c8d5ec; font-size: 13px; font-weight: 700;
  white-space: nowrap; transition: .18s;
}
.nav-item svg { width: 16px; height: 16px; }
.nav-item:hover { color: var(--ink); background: rgba(255, 255, 255, .045); }

body[data-view="bonus"] .nav-bonus,
body[data-view="loyalty"] .nav-loyalty,
body[data-view="help"] .nav-help { color: var(--brand); }
body[data-view="bonus"] .nav-bonus::after,
body[data-view="loyalty"] .nav-loyalty::after,
body[data-view="help"] .nav-help::after {
  content: ""; position: absolute; inset-inline: 13px; bottom: 2px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), #1d8cff);
  box-shadow: 0 0 10px rgba(72, 216, 255, .5);
}

/* ── page shell ──────────────────────────────────────────────────── */

.home {
  position: relative; z-index: 1;
  max-width: 1440px; margin: 0 auto; padding: 24px 22px 70px;
}

/* ── hero ────────────────────────────────────────────────────────── */

.home .hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center; gap: 30px;
  padding: 38px 44px;
  border-radius: 24px;
  border: 1px solid rgba(72, 216, 255, .18);
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(29, 140, 255, .28), transparent 58%),
    radial-gradient(90% 130% at 96% 100%, rgba(72, 216, 255, .18), transparent 62%),
    linear-gradient(135deg, #071022 0%, #0a1a37 52%, #081226 100%);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.home .hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .35; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 165, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 165, 255, .07) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 30% 40%, #000 18%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 18%, transparent 74%);
}
.home .hero.no-art { grid-template-columns: 1fr; }

.home .hero-bolts {
  position: absolute; inset-block-start: -8%; inset-inline-end: -2%;
  width: 58%; height: 120%; z-index: 0; opacity: .8; pointer-events: none;
}

.home .hero-copy { position: relative; z-index: 2; max-width: 620px; }

.home .hero-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid rgba(72, 216, 255, .32);
  background: rgba(72, 216, 255, .09);
  color: var(--brand); font-size: 12.5px; font-weight: 800;
}
.home .hero-star { font-size: 11px; }

.home .hero h1 {
  margin: 16px 0 0; color: #f3f7ff;
  font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; line-height: 1.35;
  letter-spacing: -.4px;
}
.home .hero h1 span {
  background: linear-gradient(100deg, #a9edff 0%, var(--brand) 45%, #1d8cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home .hero p {
  margin: 12px 0 0; max-width: 500px;
  color: var(--muted); font-size: 15px; line-height: 1.9;
}

.home .hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; padding: 12px 26px; border-radius: 999px;
  background: linear-gradient(260deg, #a9edff, var(--brand) 52%, #1d8cff);
  color: #04182e; font-size: 14px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(72, 216, 255, .3);
  transition: transform .2s, box-shadow .2s;
}
.home .hero-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(72, 216, 255, .42); }
.home .hero-btn span { transition: transform .2s; }
.home .hero-btn:hover span { transform: translateX(-4px); }

.home .hero-art {
  position: relative; z-index: 2; justify-self: center;
  width: 100%; max-width: 550px;
  animation: heroFloat 7s ease-in-out infinite;
}
.home .hero-art img {
  position: relative; z-index: 1; display: block;
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center;
  border-radius: 18px; border: 1px solid rgba(72, 216, 255, .38);
  background: #0a1224;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .04);
  animation: heroIn .55s ease-out both;
}
/* Shop items are 2:1 banners — show the whole artwork in the loyalty hero. */
body[data-view="loyalty"] .home .hero-art img {
  aspect-ratio: auto;
  height: auto;
  object-fit: initial;
}
@keyframes heroIn { from { opacity: 0; transform: scale(.985); } }
.home .hero-art-glow {
  position: absolute; inset: -14% -8%; pointer-events: none;
  background:
    radial-gradient(circle at 62% 42%, rgba(72, 216, 255, .32), transparent 58%),
    radial-gradient(circle at 30% 78%, rgba(72, 216, 255, .22), transparent 62%);
  filter: blur(26px);
}
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── category chips ──────────────────────────────────────────────── */

.home .chips {
  display: flex; align-items: center; gap: 9px;
  margin: 22px 0 0; padding: 4px 2px 8px;
  overflow-x: auto; scrollbar-width: none;
}
.home .chips::-webkit-scrollbar { display: none; }
.home .chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid rgba(120, 165, 255, .16);
  background: rgba(14, 24, 44, .72);
  color: #dbe6fa; font: 700 13px var(--font); white-space: nowrap;
  cursor: pointer; transition: .18s;
}
.home .chip-ico { font-size: 15px; line-height: 1; filter: saturate(1.15); }
.home .chip:hover { border-color: rgba(72, 216, 255, .45); color: var(--ink); transform: translateY(-1px); }
.home .chip.on {
  border-color: transparent;
  background: linear-gradient(260deg, #a9edff, var(--brand) 55%, #1d8cff);
  color: #04182e;
  box-shadow: 0 8px 24px rgba(72, 216, 255, .28);
}

/* ── section head ────────────────────────────────────────────────── */

.home .section { margin-top: 30px; scroll-margin-top: 76px; }
.home .section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.home .section-head h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0; font-size: 19px; font-weight: 800;
}
.home .section-head h2::before {
  content: ""; width: 4px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), #1d8cff);
  box-shadow: 0 0 14px rgba(72, 216, 255, .55);
}

/* ── card grid ───────────────────────────────────────────────────── */

.home .grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px; margin: 0; padding: 0; max-width: none;
}
.home .skeleton { height: 322px; border-radius: 16px; }

.home .card {
  position: relative; display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(120, 165, 255, .14);
  background: linear-gradient(180deg, rgba(17, 29, 52, .95), rgba(10, 18, 34, .96));
  backdrop-filter: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  transition: transform .26s cubic-bezier(.2, .8, .3, 1), border-color .26s, box-shadow .26s;
}
.home .card:hover, .home .card:focus-visible {
  transform: translateY(-5px); border-color: rgba(72, 216, 255, .42);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .55); outline: none;
}

.home .card-img {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: radial-gradient(circle at 75% 20%, rgba(29, 140, 255, .2), transparent 60%), #0b1424;
}
.home .card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2, .8, .3, 1);
}
.home .card:hover .card-img img { transform: scale(1.045); }
.home .card-img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(7, 12, 24, .82), transparent 48%);
}
.home .card-img.empty::before {
  content: "🎁"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 36px; opacity: .5;
}

/* Loyalty shop items are 2:1 banners: show the whole artwork instead of
   cropping it, and skip the dark gradient meant for photo cards. */
.home .card.shop .card-img { aspect-ratio: 2 / 1; background: #0b1424; }
.home .card.shop .card-img img { object-fit: contain; }
.home .card.shop:hover .card-img img { transform: none; filter: brightness(1.06); }
.home .card.shop .card-img::after { display: none; }

.home .card-badge {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(120deg, #3ee08d, #1fa463);
  color: #04160d; font-size: 11px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(31, 164, 99, .4);
}
.home .card-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #04160d; opacity: .65;
}

.home .card-body {
  display: flex; flex-direction: column; flex: 1;
  margin: 0; padding: 13px 14px 15px;
  position: relative; z-index: 2;
}
.home .card-title {
  margin: 0; min-height: 48px; text-shadow: none;
  font-size: 14.5px; font-weight: 800; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home .card-meta {
  display: block; margin: 6px 0 0;
  color: var(--brand); font-size: 12.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home .card-meta::before { content: "✦  "; font-size: 10px; opacity: .8; }

/* Small game-thumbnail strip: a touch-friendly preview of what a bonus covers. */
.home .card-strip {
  display: flex; align-items: center; gap: 5px;
  margin-top: 10px; min-height: 26px;
}
.home .card-strip img {
  width: 26px; height: 26px; border-radius: 7px; object-fit: cover;
  border: 1px solid var(--line); background: #0b1424;
  animation: pop .3s backwards;
}
.home .card-strip-more { margin-inline-start: 2px; font-size: 10.5px; font-weight: 700; color: var(--muted); }

.home .card-actions { margin-top: auto; padding-top: 13px; }
.home .card-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px 12px; border-radius: 10px;
  background: linear-gradient(260deg, #a9edff, var(--brand) 52%, #1d8cff);
  color: #04182e; font-size: 12.5px; font-weight: 800;
  transition: box-shadow .18s;
}
.home .card-btn span:last-child { transition: transform .2s; }
.home .card:hover .card-btn span:last-child { transform: translateX(-3px); }
.home .card-btn:hover { box-shadow: 0 8px 22px rgba(72, 216, 255, .32); }
.home .card-link {
  display: block; margin-top: 9px; text-align: center;
  color: var(--brand); font-size: 11.5px; font-weight: 700; opacity: .85;
}
.home .card-link:hover { opacity: 1; }

.home .empty { padding: 50px 20px; color: var(--muted); text-align: center; }

/* ── responsive ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .home .hero { grid-template-columns: 1fr; gap: 18px; padding: 26px 24px; }
  .home .hero.no-art { grid-template-columns: 1fr; }
  .home .hero-art { max-width: 520px; margin: 4px auto 0; }
  .home .hero-bolts { inset-inline-end: 0; width: 72%; opacity: .55; }
}

@media (max-width: 640px) {
  .topbar-inner { gap: 6px; row-gap: 4px; padding: 8px 12px; flex-wrap: wrap; justify-content: center; }
  .brand { height: 30px; }
  .brand-name { font-size: 17px; }
  .brand-logo { height: 28px; max-width: 150px; }
  .topnav { width: 100%; justify-content: center; gap: 2px; }
  .nav-item { padding: 6px 8px; gap: 5px; font-size: 12px; }
  .nav-item svg { width: 14px; height: 14px; }

  .home { padding: 14px 14px 44px; }
  .home .hero { padding: 22px 18px; border-radius: 18px; gap: 14px; }
  .home .hero h1 { font-size: clamp(26px, 7vw, 34px); }
  .home .hero p { font-size: 13px; line-height: 1.8; }
  .home .hero-btn { padding: 10px 22px; font-size: 13px; }
  .home .hero-art { max-width: 100%; }
  .home .hero-art img { border-radius: 14px; }

  .home .grid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 12px; }
  .home .skeleton { height: 250px; }
  .home .card { border-radius: 13px; }
  .home .card-body { padding: 10px 10px 12px; }
  .home .card-title { min-height: 44px; font-size: 12.5px; line-height: 1.6; }
  .home .card-meta { font-size: 11px; }
  .home .card-strip { gap: 4px; min-height: 22px; margin-top: 8px; }
  .home .card-strip img { width: 22px; height: 22px; border-radius: 6px; }
  .home .card-strip-more { font-size: 10px; }
  .home .card-btn { padding: 8px; font-size: 11.5px; }
  .home .card-badge { top: 8px; inset-inline-end: 8px; padding: 3px 8px; font-size: 10px; }
  .home .card-link { font-size: 10.5px; }
}
