/* Whirlee Panda Studios home page. Colours and fonts from the brand kit (C:\dev\whirleepanda-brand). */
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Fredoka-600.ttf") format("truetype"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Fredoka-700.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("/assets/fonts/Nunito-400.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Nunito-700.ttf") format("truetype"); }

:root {
  --mint: #24D3A0;
  --ink: #1C1B33;
  --white: #FFFFFF;
  --deep: #0B8F6C;
  --coral: #FF6B5E;
  --sun: #FFC845;
  --mist: #F2F4FA;
  --slate: #6B6F86;

  --bg: var(--white);
  --surface: var(--white);
  --text: var(--ink);
  --muted: var(--slate);
  --link: var(--deep);
  --line: #E3E6F0;
  --hero-pattern: url("/assets/swirl-mist.svg");
  --shadow: 0 10px 30px rgba(28, 27, 51, .10), 0 2px 6px rgba(28, 27, 51, .06);
  --radius: 16px;
  --display: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15142A;
    --surface: #222140;
    --text: #F2F4FA;
    --muted: #B4B7CB;
    --link: var(--mint);
    --line: #34335A;
    --hero-pattern: url("/assets/swirl-ink.svg");
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0; }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse 60% 70% at 50% 45%, var(--bg) 45%, transparent 100%),
    var(--hero-pattern) 0 0 / 220px repeat;
  text-align: center;
  padding: 56px 0 72px;
  position: relative;
  border-bottom: 6px solid var(--mint);
}
.hero .logo { width: min(560px, 100%); margin: 0 auto; }
.tagline { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 4vw, 2rem); margin: 20px 0 8px; }
.tagline::after { content: ""; display: block; width: 56px; height: 6px; border-radius: 3px; background: var(--coral); margin: 14px auto 0; }
.intro { max-width: 34em; margin: 16px auto 28px; color: var(--muted); font-size: 1.05rem; }
.scroll-link {
  display: inline-block; font-family: var(--display); font-weight: 600; text-decoration: none;
  color: var(--ink); background: var(--mint); padding: 12px 26px; border-radius: 999px; box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.scroll-link:hover { transform: translateY(-2px); }

/* Games */
#games { padding: 64px 16px 72px; }
#games > h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); text-align: center; margin-bottom: 36px; }
.games { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.game {
  background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.game:hover { transform: translateY(-4px); }
.feature { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.game-body { padding: 0 24px 24px; position: relative; display: flex; flex-direction: column; flex: 1; }
.icon {
  width: 88px; height: 88px; border-radius: 22px; margin-top: -44px; margin-bottom: 14px;
  border: 4px solid var(--surface); box-shadow: var(--shadow); background: var(--surface);
}
.game h3 { font-size: 1.4rem; }
.game p { color: var(--muted); margin: 8px 0 20px; }
.actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.play-btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--ink); color: var(--white); padding: 8px 18px 8px 14px; border-radius: 12px;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.1;
  transition: background .15s ease, transform .15s ease;
}
.play-btn svg { width: 26px; height: 26px; fill: var(--mint); flex: none; }
.play-btn small { display: block; font-family: var(--body); font-weight: 400; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.play-btn:hover { transform: translateY(-2px); }
@media (prefers-color-scheme: dark) { .play-btn { background: var(--mint); color: var(--ink); } .play-btn svg { fill: var(--ink); } }
.small-link { font-size: .95rem; font-weight: 700; }

/* Contact */
.contact { background: var(--mist); text-align: center; padding: 64px 0; }
@media (prefers-color-scheme: dark) { .contact { background: var(--surface); } }
.contact .mark { width: 96px; margin: 0 auto 12px; }
.contact h2 { font-size: 2rem; }
.contact p { color: var(--muted); margin: 8px 0 16px; }
.mail { font-family: var(--display); font-weight: 600; font-size: 1.2rem; overflow-wrap: anywhere; }
.follow-title { font-size: 1.3rem; margin-top: 36px; }
.social { list-style: none; padding: 0; margin: 14px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.social a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px 9px 14px; font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1;
  box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
.social a:hover { transform: translateY(-2px); border-color: var(--mint); }
.social svg { width: 22px; height: 22px; flex: none; color: var(--deep); }
@media (prefers-color-scheme: dark) { .social svg { color: var(--mint); } }
.contact .handle { font-size: .9rem; margin: 12px 0 0; }

/* Footer */
footer { background: var(--ink); color: #C9CBDA; text-align: center; padding: 28px 0; font-size: .95rem; }
footer p { margin: 4px 0; }
footer .legal a { color: var(--mint); font-weight: 700; text-decoration: none; }
footer .legal a:hover { text-decoration: underline; }
footer .fine { font-size: .8rem; opacity: .75; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .hero { padding: 40px 0 56px; }
  .game-body { padding: 0 18px 20px; }
  .actions { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
