:root {
  --dark: #056b28;
  --darkest: #034b1d;
  --mid: #1da013;
  --light: #72d216;
  --ink: #173a24;
  --cream: #f4faec;
  --white: #fff;
  --shadow: 0 14px 34px rgba(5, 79, 31, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "Nunito", system-ui, sans-serif; }
button, iframe { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 99; padding: 10px 16px; color: var(--darkest); background: white; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { position: relative; overflow: hidden; color: white; background: linear-gradient(135deg, var(--darkest), var(--dark) 58%, #0c7e31); }
.site-header::before, .site-header::after { content: ""; position: absolute; border-radius: 50%; background: rgba(114,210,22,.16); }
.site-header::before { width: 340px; height: 340px; top: -210px; right: 4%; }
.site-header::after { width: 190px; height: 190px; bottom: -120px; left: 3%; }
.header-inner { width: min(1180px, calc(100% - 40px)); min-height: 280px; margin: auto; display: flex; align-items: center; gap: 72px; padding: 42px 0 55px; position: relative; z-index: 1; }
.brand { width: 285px; height: auto; max-height: 120px; object-fit: contain; }
.header-copy { max-width: 660px; }
.eyebrow { display: block; margin-bottom: 7px; color: #baff6b; font-size: .78rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(2.1rem, 4vw, 3.65rem); line-height: 1.02; letter-spacing: -.035em; }
.header-copy p { max-width: 600px; margin-bottom: 0; color: rgba(255,255,255,.84); font-size: 1.08rem; line-height: 1.55; }
.forest-line { position: absolute; right: 0; bottom: -1px; left: 0; height: 24px; opacity: .5; background: radial-gradient(ellipse at 10% 100%, var(--light) 0 22px, transparent 23px), radial-gradient(ellipse at 22% 100%, var(--mid) 0 30px, transparent 31px), radial-gradient(ellipse at 43% 100%, var(--light) 0 25px, transparent 26px), radial-gradient(ellipse at 68% 100%, var(--mid) 0 32px, transparent 33px), radial-gradient(ellipse at 88% 100%, var(--light) 0 22px, transparent 23px); }

main { min-height: 55vh; }
.games-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 62px 0 74px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; color: var(--darkest); font-size: clamp(1.7rem, 3vw, 2.55rem); letter-spacing: -.025em; }
.section-heading p { max-width: 340px; margin-bottom: 3px; color: #587161; line-height: 1.5; }
.eyebrow.green { color: var(--mid); }
.game-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.game-card { grid-column: span 2; display: block; min-width: 0; padding: 0; overflow: hidden; color: var(--ink); text-align: left; background: white; border: 2px solid transparent; border-radius: 18px; box-shadow: 0 8px 24px rgba(5,79,31,.1); cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.game-card:nth-child(4) { grid-column: 2 / span 2; }
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.game-card:focus-visible { outline: 4px solid rgba(114,210,22,.42); outline-offset: 3px; }
.game-card.active { border-color: var(--light); box-shadow: 0 14px 38px rgba(5,107,40,.2); }
.thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #dff2ce; }
.thumb img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .thumb img { transform: scale(1.025); }
.card-body { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 18px 20px; }
.card-body small { display: block; margin-bottom: 3px; color: #64806d; font-weight: 700; }
.card-body strong { display: block; color: var(--darkest); font-size: 1.05rem; line-height: 1.18; }
.play-icon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; padding-left: 2px; color: var(--darkest); background: var(--light); border-radius: 50%; box-shadow: 0 3px 0 #3f8d12; font-size: .9rem; }

.player-section { padding: 0 20px 74px; }
.player-section[hidden] { display: none; }
.player-shell { width: min(1280px, 100%); margin: auto; overflow: hidden; background: var(--darkest); border-radius: 20px; box-shadow: 0 24px 60px rgba(2,50,18,.28); }
.player-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px 14px 26px; color: white; }
.now-playing { color: #a8eb63; font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.player-header h2 { margin: 2px 0 0; font-size: 1.35rem; }
.player-actions { display: flex; gap: 10px; }
.icon-button, .close-button { min-height: 42px; color: white; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; cursor: pointer; }
.icon-button { width: 44px; font-size: 1.4rem; }
.close-button { padding: 0 16px; font-weight: 800; }
.close-button span { margin-right: 5px; font-size: 1.4rem; vertical-align: -1px; }
.icon-button:hover, .close-button:hover { background: rgba(255,255,255,.18); }
.game-frame { position: relative; aspect-ratio: 16 / 9; background: #092810; }
.game-frame iframe { width: 100%; height: 100%; display: block; border: 0; opacity: 0; transition: opacity .3s; }
.game-frame iframe.loaded { opacity: 1; }
.loader { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; color: white; background: #092810; }
.loader span { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.25); border-top-color: var(--light); border-radius: 50%; animation: spin .75s linear infinite; }
.loader p { margin: 14px 0 0; color: rgba(255,255,255,.8); font-weight: 700; }
.loader.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px max(20px, calc((100% - 1180px)/2)); color: rgba(255,255,255,.78); background: var(--darkest); }
footer p { margin: 0; }
footer a { color: white; text-underline-offset: 3px; }
.credit { font-size: .86rem; }

@media (max-width: 900px) {
  .header-inner { gap: 38px; }
  .brand { width: 230px; }
  .game-card { grid-column: span 3; }
  .game-card:nth-child(4) { grid-column: span 3; }
  .game-card:last-child { grid-column: 2 / span 4; }
}
@media (max-width: 680px) {
  .header-inner { min-height: 0; flex-direction: column; align-items: flex-start; gap: 24px; padding: 26px 0 48px; }
  .brand { align-self: center; }
  .header-copy { text-align: center; }
  .header-copy p { font-size: .98rem; }
  .games-section { width: min(100% - 28px, 500px); padding: 42px 0 52px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 12px; }
  .game-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .game-card, .game-card:nth-child(4), .game-card:last-child { grid-column: 1; }
  .card-body { min-height: 82px; }
  .player-section { padding: 0 8px 50px; }
  .player-shell { border-radius: 14px; }
  .player-header { min-height: 74px; padding: 12px 12px 12px 16px; }
  .player-header h2 { max-width: 210px; font-size: 1rem; }
  .close-button { width: 42px; padding: 0; font-size: 0; }
  .close-button span { margin: 0; font-size: 1.5rem; }
  footer { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
