/* ── Homepage overrides (styles.css sets overflow:hidden + height:100vh) ── */
:root {
  --bg: #e8f5ea;
}

body {
  height: auto;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #e8f5ea;
  /* nav.css sets padding-top — keep it, just ensure scroll is allowed */
}

/* ── Background canvas ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Page wrapper ── */
.home-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px 48px;
  width: 100%;
  max-width: var(--max-w);
  min-height: 52vh;
}

/* Decorative suit icons */
.hero-suits {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-suits span {
  font-size: 1.1rem;
  line-height: 1;
  transition: opacity 0.3s;
}

.hero-suits span:nth-child(1),
.hero-suits span:nth-child(4) {
  color: var(--text);
  opacity: 0.18;
}

.hero-suits span:nth-child(2),
.hero-suits span:nth-child(3) {
  color: #dc2626;
  opacity: 0.22;
}

/* Eyebrow label */
.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: var(--muted);
  margin-bottom: 4px;
}

/* Big gradient title — "The Tally Lab" is wider than "Pip & Pad",
   so clamp is set tighter to stay on one line at 375 px */
.hero-title {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2.9rem, 11.5vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  background: linear-gradient(
    135deg,
    #c2410c 0%,
    #1d4ed8 45%,
    #166534 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 24px rgba(29, 78, 216, 0.12));
}

/* ── Board Sauce Monopoly-style logo ── */
.hero-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 20px;
  line-height: 1;
}

.hero-logo-board {
  display: block;
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(3.4rem, 13vw, 9rem);
  letter-spacing: 0.06em;
  color: #ffffff;
  background: #cc1a1a;
  padding: 6px 28px 10px;
  border-radius: 8px;
  line-height: 1;
  box-shadow:
    0 4px 0 #8b0e0e,
    0 6px 20px rgba(204, 26, 26, 0.35);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.hero-logo-sauce {
  display: block;
  font-family: 'Pacifico', cursive;
  font-size: clamp(2rem, 8vw, 5.5rem);
  color: #1a3d1a;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tagline */
.hero-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  color: var(--muted);
  letter-spacing: 0.04em;
  max-width: 260px;
  line-height: 1.55;
}

/* Pill badge under tagline */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid var(--border);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.2);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(22, 101, 52, 0.08); }
}

/* ─────────────────────────────────────────
   GAMES SECTION
───────────────────────────────────────── */
.games-section {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Divider row with label */
.games-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.games-header::before,
.games-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border));
}

.games-header::after {
  background: linear-gradient(to left, transparent, var(--border));
}

.games-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
  text-align: center;
  opacity: 0.75;
}

.games-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

/* ─────────────────────────────────────────
   GAME CARD
───────────────────────────────────────── */
.game-card {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  border-radius: 22px;
  background: linear-gradient(135deg, #16a34a 0%, #1d4ed8 100%);
  padding: 26px 22px 20px;
  width: 100%;
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
  box-shadow:
    0 8px 32px rgba(29, 78, 216, 0.22),
    0 2px 8px rgba(22, 163, 74, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Top glass highlight */
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.04) 45%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

/* Gradient noise texture overlay */
.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.game-card:hover {
  transform: translateY(-7px) scale(1.012);
  box-shadow:
    0 28px 70px rgba(29, 78, 216, 0.38),
    0 10px 28px rgba(22, 163, 74, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.game-card:focus-visible {
  outline: 3px solid var(--accent-blue);
  outline-offset: 4px;
}

/* Moving sheen on hover */
.card-sheen {
  position: absolute;
  top: 0;
  left: -65%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.13),
    transparent
  );
  transform: skewX(-12deg);
  pointer-events: none;
  z-index: 3;
  transition: none;
}

.game-card:hover .card-sheen {
  left: 135%;
  transition: left 0.7s ease;
}

/* ── Card inner layout ── */
.card-body {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.card-icon-wrap {
  flex-shrink: 0;
}

.card-icon {
  width: 46px;
  height: 62px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .card-icon {
  transform: rotate(-6deg) scale(1.08);
}

.card-text {
  flex: 1;
  min-width: 0;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 7px;
}

.card-name {
  font-family: 'Bebas Neue', cursive;
  font-size: 2.6rem;
  color: white;
  line-height: 0.9;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.card-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.45;
}

/* Arrow circle */
.card-arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .card-arrow {
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(4px);
}

/* Bottom metadata row */
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 2;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
}

.card-meta-item svg {
  opacity: 0.7;
}

.card-meta-divider {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
}

/* ─────────────────────────────────────────
   SUPPORT / BUY ME A COFFEE
───────────────────────────────────────── */
.support-section {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.support-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
}

.bmc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #431407;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 4px 18px rgba(245, 158, 11, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
}

.bmc-btn:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow:
    0 10px 32px rgba(245, 158, 11, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.bmc-btn:active { transform: scale(0.97); }

/* ── Yahtzee card: red → navy gradient ─────────────────────── */
.game-card--yah {
  background: linear-gradient(135deg, #b91c1c 0%, #1e3a8a 100%);
  box-shadow:
    0 8px 32px rgba(185, 28, 28, 0.22),
    0 2px 8px rgba(30, 58, 138, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.game-card--yah:hover {
  box-shadow:
    0 24px 64px rgba(185, 28, 28, 0.38),
    0 8px 24px rgba(30, 58, 138, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* ── Farkle card: hot orange → deep charcoal ── */
.game-card--fk {
  background: linear-gradient(135deg, #f97316 0%, #7c2d12 55%, #1c1917 100%);
  box-shadow:
    0 8px 32px rgba(249, 115, 22, 0.28),
    0 2px 8px rgba(124, 45, 18, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.game-card--fk:hover {
  box-shadow:
    0 24px 64px rgba(249, 115, 22, 0.45),
    0 8px 24px rgba(124, 45, 18, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* ─────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .game-card,
  .card-sheen,
  .card-arrow,
  .card-icon,
  .hero-badge-dot,
  .bmc-btn {
    transition: none;
    animation: none;
  }

  .game-card:hover {
    transform: none;
    box-shadow:
      0 8px 32px rgba(29, 78, 216, 0.22),
      0 2px 8px rgba(22, 163, 74, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .game-card:hover .card-icon {
    transform: none;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (min-width: 480px) {
  .games-label {
    white-space: nowrap;
  }

  .card-name {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 58vh;
    padding: 64px 32px 52px;
  }

  .games-section {
    padding: 0 32px 72px;
  }

  .game-card {
    padding: 32px 28px 24px;
  }

  .card-icon {
    width: 54px;
    height: 73px;
  }

  .card-name {
    font-size: 3.2rem;
  }
}
