/* Summer. A seasonal layer over /style.css, which stays untouched.
   It only applies while /core/season.js sets <html data-season="summer">; see docs/SEASONS.md. */
:root[data-season="summer"] {
  --paper:#fdf6e6; --ink:#13324a; --muted:#52687a; --line:#ecdcbd; --surface:#fffbf1; --surface-hover:#f5e8cd; --card-art:#f4e5c6; --card-shadow:#ead3a6; --button-hover:#1f4d6c; --focus:#0b7285; --accent-ink:#13324a; --lime:#ff7f5e; --coral:#ff7f5e; --mango:#ffc23d; --lagoon:#33b1c1; --shell:#fffaf0; --sun:#ffcf4d; --sun-core:#ffe08a; --sun-glow:#ffcf4d40; --sky:#d3edf2; --sea:#5fc3cc; --foam:#b9e8e6; --frond:#2e8b6b; --gull:#13324a; --lens:#ff7f5e; --lens-glint:#ffc23d;
  &[data-theme="dark"] { --paper:#0d1c2b; --ink:#fbf0de; --muted:#a6bccb; --line:#23394d; --surface:#13283a; --surface-hover:#1c3549; --card-art:#183044; --card-shadow:#050d16; --button-hover:#f5d9b8; --focus:#ffb067; --lime:#ff8466; --sun:#ff8f5a; --sun-core:#ffc56e; --sun-glow:#ff7f5e2e; --sky:#36284f; --sea:#1b5c6e; --foam:#2f8796; --frond:#58b894; --gull:#fbf0de; }

  & body { background:radial-gradient(1400px 520px at 50% -140px,var(--sky),transparent 75%) no-repeat,var(--paper); }
  & .button.lime:hover { background:#ff9b80; }
  & dialog::backdrop { background:#0b1e2c99; }

  /* Palm fronds lean in from the top corners, behind everything, and scroll away with the page. */
  & body::before,& body::after { content:''; position:absolute; top:0; z-index:-1; width:clamp(110px,16vw,210px); aspect-ratio:1; background:var(--frond); opacity:.2; pointer-events:none; -webkit-mask:url(palm.svg) no-repeat 0 0/100%; mask:url(palm.svg) no-repeat 0 0/100%; }
  & body::before { left:0; }
  & body::after { right:0; transform:scaleX(-1); width:clamp(80px,11vw,150px); }

  /* Sunglasses pushed up on the logo, with warm mirrored lenses. */
  & .wordmark { position:relative; }
  & .wordmark::before { content:''; position:absolute; left:-2px; top:-2px; width:32px; height:12px; transform:rotate(-8deg); background:linear-gradient(var(--ink) 0 30%,var(--lens) 30% 62%,var(--lens-glint)); -webkit-mask:url(shades.svg) no-repeat center/contain; mask:url(shades.svg) no-repeat center/contain; pointer-events:none; }

  /* The home hero: a big sun (a low sunset after dark), a few gulls drifting and the sea lapping along the bottom. */
  & .hero { position:relative; background:radial-gradient(circle 128px at calc(100% - 140px) 40%,var(--sun-core),var(--sun) 70% 98%,transparent 100%),radial-gradient(circle 220px at calc(100% - 140px) 40%,var(--sun-glow),transparent 100%); }
  & .hero::before { content:''; position:absolute; right:clamp(190px,22vw,330px); top:18px; width:clamp(140px,16vw,220px); aspect-ratio:2.4; background:var(--gull); opacity:.75; -webkit-mask:url(gulls.svg) no-repeat center/contain; mask:url(gulls.svg) no-repeat center/contain; pointer-events:none; animation:summer-glide 9s ease-in-out infinite; }
  & .hero::after { content:''; position:absolute; left:0; right:0; bottom:8px; height:26px; background:linear-gradient(var(--foam),var(--sea) 70%); opacity:.85; -webkit-mask:url(waves.svg) repeat-x 0 0/120px 100%,linear-gradient(90deg,transparent,#000 12% 88%,transparent); -webkit-mask-composite:source-in; mask:url(waves.svg) repeat-x 0 0/120px 100%,linear-gradient(90deg,transparent,#000 12% 88%,transparent); mask-composite:intersect; pointer-events:none; animation:summer-lap 6s linear infinite; }
  &[data-theme="dark"] .highlight { box-shadow:0 0 28px #ff846655; }

  /* The stamp becomes a beach ball, its cream cap keeping the sticker text easy to read. */
  & .hero-stamp { --cap:46%; position:relative; width:180px; height:180px; font-size:11px; line-height:1.3; gap:2px; background:radial-gradient(circle 13px at 38% 15%,#fffb,#fff0),radial-gradient(circle closest-side,var(--shell) 0 var(--cap),var(--accent-ink) calc(var(--cap) + .5%) calc(var(--cap) + 2.5%),transparent calc(var(--cap) + 3%) 76%,#13324a2e),conic-gradient(from -30deg,var(--coral) 0 60deg,var(--shell) 0 120deg,var(--mango) 0 180deg,var(--shell) 0 240deg,var(--lagoon) 0 300deg,var(--shell) 0); animation:summer-bob 4.5s ease-in-out infinite; }
  & .hero-stamp span { width:20px; height:20px; font-size:0; background:var(--coral); -webkit-mask:url(sun.svg) no-repeat center/contain; mask:url(sun.svg) no-repeat center/contain; }

  /* Game cards catch a little sunshine. */
  & .game-card:hover { box-shadow:0 8px 0 var(--card-shadow),0 10px 30px #ff7f5e26; }

  /* The player frame trades its green for a deep lagoon blue; the games inside keep their own art. */
  & .player { --focus:#ffb067; background:#0e2230; border-color:#21445a; }
  & .player:fullscreen,& .player.is-expanded { background:#0e2230; }
  & .player-toolbar { background:#163246; }
  & .player-category { border-color:#2f6a80; }
  & .player-actions .button { border-color:#2c5870; background:#1a3b51; }
  & .player-actions .button:hover { background:#244e68; }

  @media (prefers-reduced-motion:reduce) { & .hero::before,& .hero::after,& .hero-stamp { animation:none; } }
  @media (max-width:700px) {
    & .hero { background:radial-gradient(circle 66px at calc(100% - 68px) 42%,var(--sun-core),var(--sun) 70% 98%,transparent 100%),radial-gradient(circle 112px at calc(100% - 68px) 42%,var(--sun-glow),transparent 100%); }
    & .hero::before { right:136px; top:2px; width:104px; }
    & .hero::after { bottom:4px; height:18px; -webkit-mask-size:84px 100%,100%; mask-size:84px 100%,100%; animation-name:summer-lap-small; }
    & .hero-stamp { --cap:52%; width:104px; height:104px; font-size:8.5px; gap:1px; }
    & .hero-stamp span { width:12px; height:12px; }
    & .wordmark::before { left:-2px; top:0; width:27px; height:10px; }
  }
  @media (max-width:500px) {
    & .hero { background:none; }
    & .hero::before { right:3%; top:4px; width:84px; }
  }
}

@keyframes summer-glide { 0%,100% { transform:translate(0,0) rotate(0); } 35% { transform:translate(-16px,-6px) rotate(-2deg); } 70% { transform:translate(10px,4px) rotate(1.5deg); } }
@keyframes summer-lap { to { -webkit-mask-position:120px 0,0 0; mask-position:120px 0,0 0; } }
@keyframes summer-lap-small { to { -webkit-mask-position:84px 0,0 0; mask-position:84px 0,0 0; } }
@keyframes summer-bob { 0%,100% { transform:rotate(12deg) translateY(0); } 50% { transform:rotate(4deg) translateY(-6px); } }
