/* ============================================================
   77CK — DESIGN TOKENS
   Color:  bg #0B0B0D · surface #17151C · gold #F4C10F
           gold-deep #C99204 · cream #F5F0E6 · red-suit #E6483F
   Type:   Display = Clash Display (headlines, logo)
           Body    = General Sans (everything else)
   Signature: a 3D card-stack in the hero (deck depth), a
              two-row infinite marquee of game art, and a
              persistent gold glow-line that separates the
              glass header / bottom bar from the page body.
   ============================================================ */

:root {
  --bg: #0b0b0d;
  --bg-soft: #131217;
  --surface: #17151c;
  --surface-2: #1e1b24;
  --gold: #f4c10f;
  --gold-deep: #c99204;
  --gold-soft: #ffe08a;
  --cream: #f5f0e6;
  --ink: #0e0d10;
  --red-suit: #e6483f;
  --muted: #9c96a5;
  --border: rgba(244, 193, 15, 0.14);

  --font-display: "Clash Display", "General Sans", sans-serif;
  --font-body: "General Sans", "Segoe UI", sans-serif;

  --container: 1120px;
  --radius: 18px;
  --radius-sm: 10px;

  --header-h: 64px;
  --bar-h: 58px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  width: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(var(--bar-h) + 18px); /* keep footer clear of the fixed bottom bar */
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ TOPBAR — glass + gold glow-line ============ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: linear-gradient(180deg, rgba(19,18,23,0.82), rgba(19,18,23,0.62));
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 0 rgba(244,193,15,0.35), 0 12px 30px -18px rgba(0,0,0,0.6);
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--gold);
}
/* fixed-height box so ANY uploaded logo auto-fits and resizes consistently */
.brand img {
  height: 38px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* ============ BUTTONS ============ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}
.btn--ghost {
  border: 1px solid var(--border);
  color: var(--gold-soft);
}
.btn--ghost:hover { border-color: var(--gold); background: rgba(244,193,15,0.08); }

.btn--primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  color: var(--ink);
  box-shadow: 0 8px 24px -8px rgba(244, 193, 15, 0.55);
}
.btn--primary:active { transform: scale(0.97); }
.btn-icon { font-size: 14px; }

.btn-shine {
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine {
  0% { left: -60%; }
  35% { left: 130%; }
  100% { left: 130%; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 30px 20px 60px;
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(244,193,15,0.16), transparent 60%),
    radial-gradient(60% 50% at 80% 15%, rgba(244,193,15,0.10), transparent 60%),
    radial-gradient(50% 40% at 10% 90%, rgba(230,72,63,0.10), transparent 60%),
    var(--bg);
  overflow: hidden;
}

.hero-suits { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.suit {
  position: absolute;
  font-size: 64px;
  color: var(--gold);
  opacity: 0.08;
  animation: drift 12s ease-in-out infinite;
}
.suit:nth-child(odd) { color: var(--red-suit); }
.s1 { top: 10%;  left: 6%;  font-size: 90px; animation-delay: 0s; }
.s2 { top: 65%;  left: 12%; font-size: 54px; animation-delay: 1.5s; }
.s3 { top: 20%;  left: 45%; font-size: 40px; animation-delay: 3s; }
.s4 { top: 78%;  left: 55%; font-size: 70px; animation-delay: 2s; }
.s5 { top: 8%;   left: 88%; font-size: 60px; animation-delay: 4s; }
.s6 { top: 55%;  left: 92%; font-size: 46px; animation-delay: 0.8s; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(8deg); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow, .section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.eyebrow::before { content: "♣ "; color: var(--red-suit); }

.logo-hero {
  font-size: clamp(52px, 9vw, 96px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(244,193,15,0.25));
  opacity: 0;
  transform: translateY(16px);
  animation: dealIn 0.8s cubic-bezier(.2,.9,.25,1) 0.15s forwards;
}
@keyframes dealIn {
  to { opacity: 1; transform: translateY(0); }
}

.tagline {
  margin-top: 14px;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 600;
  color: var(--cream);
}
.subtagline {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.bonus-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-soft);
  border: 1px dashed var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(244,193,15,0.06);
}
.bonus-chip::before { content: "🎁 "; }

/* ---- hero visual: spotlight stage ---- */
.hero-visual {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* darkens the corners so the beam + card read as the only lit subject */
  box-shadow: inset 0 0 110px 40px rgba(0,0,0,0.5);
}
/* the light beam falling from above, narrowing toward the card */
.hero-visual::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 320px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255,228,150,0.38) 0%, rgba(255,220,140,0.14) 45%, transparent 82%);
  clip-path: polygon(45% 0%, 55% 0%, 82% 100%, 18% 100%);
  mix-blend-mode: screen;
  animation: beamSway 7s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}
/* the pool of light where the beam hits the stage floor */
.hero-visual::after {
  content: "";
  position: absolute;
  bottom: 22px;
  left: 50%;
  width: 240px;
  height: 34px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(244,193,15,0.4) 0%, rgba(244,193,15,0.12) 55%, transparent 78%);
  filter: blur(1px);
  z-index: 0;
  pointer-events: none;
}
@keyframes beamSway {
  0%, 100% { transform: translateX(-50%) rotate(-1.5deg); }
  50%      { transform: translateX(-50%) rotate(1.5deg); }
}
.card-stack {
  position: relative;
  width: 210px;
  height: 280px;
  z-index: 1;
  /* faint mirrored reflection on the "stage floor" below the deck */
  -webkit-box-reflect: below 4px linear-gradient(to bottom, transparent 55%, rgba(0,0,0,0.28) 100%);
}
.stack-card {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  box-shadow: 0 24px 50px -16px rgba(0,0,0,0.65);
  transition: transform 0.6s cubic-bezier(.2,.9,.25,1), opacity 0.6s ease, filter 0.6s ease, box-shadow 0.6s ease;
  will-change: transform, opacity;
}
.stack-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.stack-card.pos-0 {
  z-index: 5; opacity: 1; transform: translate(0px, 0px) scale(1) rotate(0deg);
  filter: brightness(1.05);
  border: 1.5px solid rgba(255,224,138,0.6);
  box-shadow: 0 30px 60px -14px rgba(0,0,0,0.75), 0 0 0 4px rgba(244,193,15,0.08), 0 0 40px rgba(255,213,110,0.3);
}
.stack-card.pos-1 { z-index: 4; opacity: 0.8; transform: translate(16px, 12px) scale(0.94) rotate(4deg); filter: brightness(0.7); }
.stack-card.pos-2 { z-index: 3; opacity: 0.5; transform: translate(28px, 22px) scale(0.88) rotate(7deg); filter: brightness(0.55); }
.stack-card.pos-hidden { z-index: 1; opacity: 0; transform: translate(38px, 30px) scale(0.82) rotate(9deg); }

/* idle floating breathe for the front (active) card — animated on the inner
   image/placeholder so it never fights the outer card's slide transition */
.stack-card.pos-0 img,
.stack-card.pos-0 .stack-placeholder {
  animation: cardFloat 4.5s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px) scale(1.015); }
}

/* diagonal shine sweep across the front card */
.stack-card.pos-0::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%);
  background-size: 220% 220%;
  background-position: 130% 130%;
  animation: cardShine 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardShine {
  0%, 60%, 100% { background-position: 130% 130%; }
  80% { background-position: -30% -30%; }
}

/* CSS-drawn placeholder look if an image fails / is missing */
.stack-card .stack-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 54px;
  background: linear-gradient(160deg, #fffaf0, var(--cream));
}
.stack-placeholder.red { color: var(--red-suit); }
.stack-placeholder.black { color: var(--ink); }

.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-cue span {
  display: block;
  width: 22px; height: 36px;
  border: 2px solid var(--border);
  border-radius: 20px;
  position: relative;
}
.scroll-cue span::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 6px; opacity: 1; }
  70% { top: 20px; opacity: 0; }
  100% { top: 6px; opacity: 0; }
}

/* ============ SECTIONS (shared) ============ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 90px 20px;
}
.section-head { text-align: center; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); color: var(--cream); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ GAMES — infinite marquee (2 rows, opposite directions) ============ */
/* ---------- winner ticker ---------- */
.winner-ticker-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: var(--header-h);
  background: linear-gradient(90deg, var(--bg-soft), var(--surface), var(--bg-soft));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.winner-ticker {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: scrollLeft 35s linear infinite;
}
.winner-ticker-wrap:hover .winner-ticker,
.winner-ticker-wrap:active .winner-ticker {
  animation-play-state: paused;
}
.winner-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 14px;
  white-space: nowrap;
  color: var(--cream);
}
.winner-icon { font-size: 15px; }
.winner-name { font-weight: 600; color: var(--gold-soft); }
.winner-text { color: var(--muted); }
.winner-points { font-weight: 700; color: var(--gold); }

.games { background: linear-gradient(180deg, var(--bg), var(--bg-soft)); padding-left: 0; padding-right: 0; overflow-x: hidden; }
.games .section-head { padding: 0 20px; }

.marquee-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-row {
  display: flex;
  gap: 14px;
  width: max-content;
}
.marquee-row img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,0.6);
  flex-shrink: 0;
}
.marquee-left  { animation: scrollLeft 40s linear infinite; }
.marquee-right { animation: scrollRight 40s linear infinite; }
.marquee-wrap:hover .marquee-row,
.marquee-wrap:active .marquee-row {
  animation-play-state: paused;
}
@keyframes scrollLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scrollRight {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ============ WHY / STATS ============ */
.why { background: var(--bg-soft); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 30px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: radial-gradient(120% 100% at 50% 0%, rgba(244,193,15,0.06), transparent 60%);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.stat.glow-pulse {
  animation: statGlow 1.4s ease-out;
}
@keyframes statGlow {
  0%   { box-shadow: 0 0 0 0 rgba(244,193,15,0); border-color: var(--border); }
  35%  { box-shadow: 0 0 26px 2px rgba(244,193,15,0.35); border-color: var(--gold); }
  100% { box-shadow: 0 0 0 0 rgba(244,193,15,0); border-color: var(--border); }
}
.stat-suit {
  position: absolute;
  bottom: -14px; right: -10px;
  font-size: 76px;
  opacity: 0.06;
  color: var(--gold);
  pointer-events: none;
  line-height: 1;
}
.stat-icon {
  font-size: 22px;
  margin-bottom: 8px;
  filter: grayscale(0) drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  color: var(--gold);
  position: relative;
}
.stat .label { margin-top: 6px; font-size: 13px; color: var(--muted); position: relative; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 34px 20px 40px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { font-family: var(--font-display); color: var(--gold); font-weight: 600; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-social a:hover { color: var(--gold); border-color: var(--gold); }
.footer-note {
  max-width: var(--container);
  margin: 20px auto 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ============ BOTTOM STICKY BAR — glass + gold glow-line, thinner than header ============ */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 18px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: linear-gradient(0deg, rgba(19,18,23,0.88), rgba(19,18,23,0.68));
  box-shadow: 0 -1px 0 0 rgba(244,193,15,0.35), 0 -12px 30px -18px rgba(0,0,0,0.6);
}
.btn--bar {
  padding: 9px 22px;
  font-size: 14px;
  flex-shrink: 0;
}
.bottom-bonus {
  font-size: 11px;
  color: var(--gold-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .hero-visual { order: 0; height: 300px; }
  .hero-actions { justify-content: center; }
  .subtagline { margin-left: auto; margin-right: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid { gap: 12px; }
  .marquee-row img { width: 78px; height: 78px; border-radius: 12px; }
  .bottom-bonus { display: none; } /* keep the bar slim on very small screens */
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============ FOCUS VISIBILITY ============ */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
