/* Spring. A seasonal layer over /style.css, which stays untouched.
   It only applies while /core/season.js sets <html data-season="spring">; see docs/SEASONS.md. */
:root[data-season="spring"] {
  --paper:#fbf6ee; --ink:#2a2230; --muted:#6e6271; --line:#ecdfd8; --surface:#fffbf6; --surface-hover:#f7e9e6; --card-art:#f6e7e4; --card-shadow:#eed8d6; --button-hover:#4a3b52; --focus:#3f7a26; --accent-ink:#2a2230; --lime:#ff9cc4; --blossom:#f290b9; --bark:#8d6370; --leaf:#5e9a35; --sun:#ffe27a; --sun-ring:#f2b13a; --sun-disc:#fff0c2; --glow:#fff0c200; --haze:#fbe2e8; --flutter:#9a7fd3; --branch-fade:.85;
  &[data-theme="dark"] { --paper:#1c1920; --ink:#f6eef1; --muted:#b8acbb; --line:#3b3343; --surface:#26222c; --surface-hover:#322b39; --card-art:#2c2733; --card-shadow:#0e0c12; --button-hover:#e8dbe1; --focus:#a6d672; --blossom:#e58db4; --bark:#7b5d6c; --leaf:#8cc65a; --sun-disc:#2a2731; --glow:#ffd9ea14; --haze:#1f2c24; --flutter:#c4b0f2; --branch-fade:.7; }

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

  /* Blossom branches reach in from the top corners, bark near the edge and pink at the tips. */
  & body::before,& body::after { content:''; position:absolute; top:0; z-index:-1; width:clamp(130px,18vw,250px); aspect-ratio:3/2; background:radial-gradient(circle at 0 0,var(--bark) 0 20%,var(--blossom) 42%); opacity:var(--branch-fade); pointer-events:none; -webkit-mask:url(branch.svg) no-repeat 0 0/100%; mask:url(branch.svg) no-repeat 0 0/100%; }
  & body::before { left:0; }
  & body::after { right:0; transform:scaleX(-1); width:clamp(100px,13vw,180px); }
  & body:has(.game-page)::before { width:clamp(110px,12vw,170px); }

  /* A sprout pushing up out of the logo. */
  & .wordmark { position:relative; }
  & .wordmark::before { content:''; position:absolute; left:1px; top:-14px; width:19px; height:19px; background:var(--leaf); -webkit-mask:url(sprout.svg) no-repeat center/contain; mask:url(sprout.svg) no-repeat center/contain; transform-origin:45% 100%; pointer-events:none; animation:spring-sway 4s ease-in-out infinite; }

  /* The home hero: a warm sun behind the flower, petals on the breeze and a butterfly passing by. */
  & .hero { position:relative; background:radial-gradient(circle 124px at calc(100% - 140px) 46%,var(--sun-disc) 0 97%,transparent 100%),radial-gradient(circle 200px at calc(100% - 140px) 46%,var(--glow),transparent 100%); }
  & .hero::before { content:''; position:absolute; right:clamp(210px,23vw,340px); top:20px; width:clamp(160px,19vw,260px); aspect-ratio:5/2; background:var(--blossom); -webkit-mask:url(petals.svg) no-repeat center/contain; mask:url(petals.svg) no-repeat center/contain; pointer-events:none; animation:spring-drift 9s ease-in-out infinite; }
  & .hero::after { content:''; position:absolute; top:12px; left:clamp(300px,46%,640px); width:34px; height:29px; background:var(--flutter); -webkit-mask:url(butterfly.svg) no-repeat center/contain; mask:url(butterfly.svg) no-repeat center/contain; pointer-events:none; animation:spring-flit 8s ease-in-out infinite; }
  &[data-theme="dark"] .highlight { box-shadow:0 0 28px #ff9cc44d; }

  /* The stamp blooms into a daisy: an outlined, shadowed petal ring round a sunny disc that holds the text. */
  & .hero-stamp { position:relative; width:190px; height:190px; border:0; border-radius:50%; background:none; box-shadow:none; transform:rotate(12deg); gap:2px; }
  & .hero-stamp::before,& .hero-stamp::after { content:''; position:absolute; inset:0; z-index:-1; -webkit-mask:url(daisy-line.svg) no-repeat center/100%; mask:url(daisy-line.svg) no-repeat center/100%; }
  & .hero-stamp::before { background:var(--ink); }
  & .hero-stamp::after { background:radial-gradient(circle closest-side,#fff3b8,var(--sun) 40%,var(--sun) 56.5%,var(--sun-ring) 57%,var(--ink) 57.6% 59.4%,var(--lime) 60%); -webkit-mask-image:url(daisy.svg); mask-image:url(daisy.svg); }
  & .hero-stamp span { width:22px; height:22px; margin-top:2px; font-size:0; background:var(--leaf); -webkit-mask:url(sprout.svg) no-repeat center/contain; mask:url(sprout.svg) no-repeat center/contain; }

  /* Game cards pick up a blush of pink. */
  & .game-card:hover { box-shadow:0 8px 0 var(--card-shadow),0 10px 30px #f290b92e; }

  /* The player frame trades its green for a dusky plum; the games inside keep their own art. */
  & .player { --focus:#ffb3d1; background:#1b1620; border-color:#3e3248; }
  & .player:fullscreen,& .player.is-expanded { background:#1b1620; }
  & .player-toolbar { background:#2a2131; }
  & .player-category { border-color:#7d5873; }
  & .player-actions .button { border-color:#56445f; background:#33293b; }
  & .player-actions .button:hover { background:#45374f; }

  @media (prefers-reduced-motion:reduce) { & .wordmark::before,& .hero::before,& .hero::after { animation:none; } }
  @media (max-width:700px) {
    & .hero { background:radial-gradient(circle 66px at calc(100% - 66px) 46%,var(--sun-disc) 0 97%,transparent 100%),radial-gradient(circle 108px at calc(100% - 66px) 46%,var(--glow),transparent 100%); }
    & .hero::before { right:118px; top:4px; width:130px; }
    & .hero::after { left:auto; right:34%; top:6px; width:26px; height:22px; }
    & .hero-stamp { width:110px; height:110px; font-size:8px; line-height:1.3; gap:0; }
    & .hero-stamp span { width:13px; height:13px; margin-top:1px; }
    & .wordmark::before { left:1px; top:-12px; width:16px; height:16px; }
  }
  @media (max-width:500px) {
    & .hero { background:none; }
    & .hero::before { right:4%; top:6px; width:110px; }
    & .hero::after { right:42%; }
  }
}

@keyframes spring-sway { 0%,100% { transform:rotate(-6deg); } 50% { transform:rotate(6deg); } }
@keyframes spring-drift { 0%,100% { transform:translate(0,0) rotate(0); } 35% { transform:translate(-16px,7px) rotate(-4deg); } 70% { transform:translate(10px,-4px) rotate(3deg); } }
@keyframes spring-flit { 0%,100% { transform:translate(0,0) scaleX(1); } 6% { transform:translate(7px,-2px) scaleX(.3); } 12% { transform:translate(14px,-4px) scaleX(1); } 18% { transform:translate(18px,-2px) scaleX(.3); } 25%,50% { transform:translate(22px,1px) scaleX(1); } 31% { transform:translate(26px,4px) scaleX(.3); } 37% { transform:translate(30px,6px) scaleX(1); } 43% { transform:translate(26px,8px) scaleX(.3); } 56% { transform:translate(16px,10px) scaleX(.3); } 62% { transform:translate(12px,10px) scaleX(1); } 75% { transform:translate(3px,6px) scaleX(1); } 81% { transform:translate(-2px,4px) scaleX(.3); } 87% { transform:translate(-6px,3px) scaleX(1); } 93% { transform:translate(-3px,1px) scaleX(.3); } }
