:root {
  --ocean-deep: #0b3954;
  --ocean: #0e7490;
  --ocean-bright: #06b6d4;
  --foam: #ecfeff;
  --sand: #fff7e6;
  --sand-deep: #fde9c4;
  --coral: #ff6b5e;
  --coral-deep: #e8493b;
  --ink: #123047;
  --ink-soft: #48657c;
  --card: #ffffff;
  --live: #16a34a;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(11, 57, 84, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
}

h1, h2, .wordmark {
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  line-height: 1.1;
}

a { color: var(--ocean); }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 5vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 247, 230, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(11, 57, 84, 0.08);
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ocean-deep);
  text-decoration: none;
}
.wordmark .bang { color: var(--coral); }

.topbar nav { display: flex; align-items: center; gap: 1.25rem; }
.topbar nav a { font-weight: 700; text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 73, 59, 0.35);
}
.btn-primary:hover { background: var(--coral-deep); }

.btn-ghost {
  background: #fff;
  color: var(--ocean);
  border: 2px solid var(--ocean-bright);
}

.btn-small {
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  background: var(--ocean);
  color: #fff !important;
}

/* Rising-tide hover: a slowly spinning rounded square rises from below the
   button, its off-round corners reading as a wobbling waterline. */
.btn-wave {
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: transform 0.12s ease, color 0.3s ease, box-shadow 0.12s ease;
}
.btn-wave::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 140%;
  width: 260%;
  aspect-ratio: 1;
  background: var(--ocean-bright);
  border-radius: 45%;
  animation: whirl 5s linear infinite;
  transition: top 0.5s ease;
}
.btn-wave:hover::after { top: -300%; }
.btn-ghost.btn-wave:hover { color: #fff; }
@keyframes whirl {
  to { transform: translateX(-50%) rotate(360deg); }
}
.btn-wave::after { transform: translateX(-50%) rotate(0deg); }

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem 1.5rem;
  max-width: 62rem;
  margin: 0 auto;
}

.hero-kicker {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--ocean);
}
.hero-kicker a {
  color: inherit;
  text-decoration: none;
}
.hero-kicker a:hover { text-decoration: underline; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 800;
  color: var(--ocean-deep);
  margin: 0.35rem 0 0.75rem;
}

.tide {
  color: var(--ocean-bright);
  white-space: nowrap;
  padding: 0 0.06em;
  background: linear-gradient(transparent 64%, var(--sand-deep) 64%, var(--sand-deep) 90%, transparent 90%);
  border-radius: 6px;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 0;
}

/* ---------- KPI row ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: 3rem;
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

.kpi {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.1rem 1rem 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kpi-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.kpi-value {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  color: var(--ocean-deep);
}

.kpi-live .kpi-value { color: var(--live); }

.counting { font-variant-numeric: tabular-nums; }

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.freshness {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- wave divider ---------- */
.wave { color: var(--foam); line-height: 0; margin-bottom: -1px; }
.wave svg { width: 100%; height: clamp(40px, 7vw, 90px); display: block; }

/* ---------- games ---------- */
.games {
  background: var(--foam);
  padding: 0.5rem clamp(1rem, 5vw, 3rem) 4.5rem;
}

.games h2 {
  text-align: center;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  color: var(--ocean-deep);
}

.section-sub {
  text-align: center;
  color: var(--ink-soft);
  margin: 0.25rem 0 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.4rem;
  max-width: 72rem;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11, 57, 84, 0.18);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--sand-deep);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge-playing {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--live);
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(11, 57, 84, 0.18);
}
.badge-playing .live-dot { width: 7px; height: 7px; }

.card-body {
  padding: 0.95rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}

.card-stats {
  margin-top: auto;
  display: flex;
  gap: 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.card-stats span { display: inline-flex; align-items: center; gap: 0.3rem; }

.card-play {
  align-self: stretch;
  text-align: center;
  background: var(--ocean-bright);
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  padding: 0.55rem;
}
.card:hover .card-play { background: var(--ocean); }

/* ---------- footer ---------- */
footer {
  background: var(--ocean-deep);
  color: #cbe8f2;
  text-align: center;
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
footer a { color: #7dd3fc; font-weight: 700; }

.socials {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.09);
  color: #cbe8f2;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.socials a:hover {
  background: var(--ocean-bright);
  color: #fff;
  transform: translateY(-3px);
}
footer .fine { font-size: 0.75rem; opacity: 0.6; margin-top: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot { animation: none; }
  .btn, .card { transition: none; }
  .btn-wave::after { animation: none; transition: none; }
}
