:root {
  color-scheme: light;
  --navy: #073b67;
  --blue: #0d6596;
  --gold: #f4b83c;
  --cream: #fff8e8;
  --ink: #142d3f;
  --muted: #567080;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(244, 184, 60, .2), transparent 27rem),
    linear-gradient(180deg, #eef9fc 0, var(--cream) 70%);
  font-family: ui-rounded, "Avenir Next", Avenir, system-ui, sans-serif;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  padding: 72px max(7vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background:
    linear-gradient(115deg, rgba(4, 40, 72, .98), rgba(8, 101, 144, .92)),
    url("games/treasure-hunt/assets/images/pirate-island-map.jpg") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 26px;
  background: linear-gradient(135deg, transparent 12px, var(--cream) 0) 0 0 / 24px 100%;
}

.hero-copy { position: relative; z-index: 1; max-width: 720px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .78rem;
}

h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 { max-width: 680px; font-size: clamp(2.7rem, 7vw, 5.3rem); letter-spacing: -.045em; }
.intro { max-width: 540px; margin: 20px 0 0; font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #d9f3fb; }

.compass {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  margin-left: 32px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255,255,255,.65);
  border-radius: 50%;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.1);
  transform: rotate(12deg);
}

.compass span { color: var(--gold); font-size: 6rem; line-height: 1; }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); color: var(--navy); }
.game-count { color: var(--muted); font-weight: 700; }

.game-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) 1fr;
  color: inherit;
  text-decoration: none;
  background: white;
  border: 1px solid rgba(7, 59, 103, .12);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(19, 67, 88, .14);
  transition: transform .2s ease, box-shadow .2s ease;
}

.game-card:hover, .game-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 65px rgba(19, 67, 88, .2);
  outline: none;
}

.card-art { position: relative; min-height: 330px; background: var(--navy); }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-badge { position: absolute; left: 22px; bottom: 22px; padding: 10px 16px; background: var(--gold); color: #342508; border-radius: 999px; font-weight: 900; }
.card-body { padding: clamp(28px, 5vw, 54px); display: flex; flex-direction: column; justify-content: center; }
.card-label { margin: 0 0 13px; color: var(--blue); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h3 { color: var(--navy); font-size: clamp(1.8rem, 3vw, 2.7rem); }
.card-body > p:not(.card-label) { margin: 18px 0 28px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.card-action { color: var(--blue); font-weight: 900; }
.card-action b { display: inline-block; margin-left: 7px; transition: transform .2s ease; }
.game-card:hover .card-action b { transform: translateX(5px); }

footer { padding: 24px; text-align: center; color: #6c7e86; font-size: .88rem; }

@media (max-width: 720px) {
  .hero { min-height: 300px; padding-top: 58px; padding-bottom: 64px; }
  .compass { display: none; }
  .game-card { grid-template-columns: 1fr; }
  .card-art { min-height: 220px; }
  .card-body { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
