/* ============================================================
   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 shuffling card-fan behind the wordmark, dealt out
              on load, plus suit glyphs that drift like a shuffled deck.
   ============================================================ */

: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;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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; }

/* subtle film-grain overlay for depth */
.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 ============ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(11, 11, 13, 0.55);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--gold);
}
.brand img { height: 28px; }

/* ============ 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--big { padding: 16px 34px; font-size: 16px; }
.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: 110px 20px 60px;
  background:
    radial-gradient(60% 50% at 80% 15%, rgba(244,193,15,0.14), 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: "🎁 "; }

.store-badges { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.store-badge {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
}

/* ---- hero visual: card fan ---- */
.hero-visual {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-fan {
  position: relative;
  width: 220px;
  height: 300px;
}
.pcard {
  position: absolute;
  top: 0; left: 0;
  width: 150px;
  height: 210px;
  border-radius: 14px;
  background: linear-gradient(160deg, #fffaf0, var(--cream));
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  transform-origin: bottom center;
  opacity: 0;
  animation: dealCard 0.7s cubic-bezier(.2,.9,.25,1) forwards, floatCard 5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.12s), calc(0.9s + var(--i) * 0.12s);
}
.pcard.red { color: var(--red-suit); }
.pcard.black { color: var(--ink); }
@keyframes dealCard {
  from { opacity: 0; transform: translateY(60px) rotate(0deg) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--r)) scale(1); }
}
@keyframes floatCard {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}

.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 ============ */
.games { background: linear-gradient(180deg, var(--bg), var(--bg-soft)); }
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  background: var(--surface-2);
}
.game-icon {
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: linear-gradient(160deg, rgba(244,193,15,0.18), rgba(244,193,15,0.04));
  border: 1px solid var(--border);
}
.game-card.red-suit .game-icon { color: var(--red-suit); }
.game-card.black-suit .game-icon { color: var(--gold); }
.game-card img.game-thumb {
  width: 100%; height: 120px; object-fit: cover;
  border-radius: 10px; margin-bottom: 14px;
}
.game-card h3 { font-size: 17px; color: var(--cream); font-weight: 600; }
.game-card .tag { font-size: 12px; color: var(--muted); margin-top: 6px; display: block; }

/* ============ WHY / STATS ============ */
.why { background: var(--bg-soft); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat {
  text-align: center;
  padding: 28px 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%);
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  color: var(--gold);
}
.stat .label { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ============ FINAL CTA ============ */
.cta-final { padding-top: 40px; padding-bottom: 110px; }
.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
}
.cta-suits {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 40px;
  font-size: 120px;
  color: var(--gold);
  opacity: 0.05;
  letter-spacing: 30px;
  pointer-events: none;
}
.cta-card h2 { font-size: clamp(26px, 4vw, 36px); position: relative; }
.cta-card p { margin-top: 10px; color: var(--muted); position: relative; }
.cta-card .btn { margin-top: 28px; 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;
}

/* ============ 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; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-card { padding: 18px 12px; }
  .stats-grid { gap: 12px; }
}

/* ============ 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;
}
