/* The studio home page. Its own file, so Merge Defenders' styles.css stays as approved. No script at all.
   The look is what the games share: cream paper, navy ink, thick outlines with a solid lip. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #1e1b3a;
  --cream: #fff6e6;
  --paper: #fffdf7;
  --gold: #ffd15c;
  --orange: #ffa94d;
  --display: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
}

* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.55;
  color: var(--ink); background: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.05; }
ul { list-style: none; margin: 0; padding: 0; }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

/* HERO */
.hero {
  background: radial-gradient(90% 80% at 50% 0%, #fffdf7 0%, var(--cream) 62%);
  padding: clamp(56px, 11vh, 120px) var(--gutter) 0;
  text-align: center; overflow: hidden;
}
.hero h1 { font-size: clamp(3.4rem, 15vw, 7rem); letter-spacing: -.01em; }
.hero-copy p { margin: 12px auto 0; max-width: 26ch; font-size: clamp(1.2rem, 3.6vw, 1.6rem); line-height: 1.3; }
.cast {
  display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(2px, 1.4vw, 18px); margin-top: clamp(26px, 5vh, 48px);
}
.cast img {
  width: clamp(62px, 17vw, 150px); min-width: 0;
  filter: drop-shadow(0 6px 0 rgba(30, 27, 58, .16));
  transform-origin: 50% 100%;
  animation: bob 2.8s ease-in-out calc(var(--i) * -.4s) infinite;
}
.cast img.lead { width: clamp(78px, 21vw, 186px); }
.cast .wide-only { display: none; }
@media (min-width: 900px) { .cast .wide-only { display: block; } }
@keyframes bob {
  0%, 100% { translate: 0 0; scale: 1 1; }
  50%      { translate: 0 -6px; scale: 1.02 .98; }
}

/* GAMES */
.games { background: var(--ink); padding: clamp(40px, 7vw, 72px) var(--gutter) clamp(56px, 9vw, 96px); }
.games h2 { color: var(--cream); text-align: center; font-size: clamp(1.9rem, 5vw, 2.8rem); }
.game-list {
  /* Flex rather than grid so an uneven last row centres instead of hanging left. */
  display: flex; flex-wrap: wrap; justify-content: center; gap: 28px;
  margin: 30px auto 0; max-width: 1200px;
}
.game { flex: 1 1 300px; max-width: 400px; display: flex; }
.game a {
  display: flex; flex-direction: column; width: 100%; overflow: hidden; color: var(--ink); text-decoration: none;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: 0 0 0 3px var(--cream);
  transition: transform .15s ease, box-shadow .15s ease;
}
.game a:hover { transform: translateY(-3px); }
.game a:active { transform: translateY(4px); }
.game-band {
  display: grid; place-items: center; padding: 26px 0;
  background: var(--tint) var(--art, none) center 40% / cover no-repeat;
  border-bottom: 3px solid var(--ink);
}
.game-icon {
  width: 128px; aspect-ratio: 1; border-radius: 24%;
  border: 4px solid #fff; box-shadow: 0 0 0 3px var(--ink);
}
.game-text { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 22px; text-align: center; }
.game-text h3 { font-size: 1.7rem; }
.game-text p { margin: 8px 0 16px; }
.game-go {
  margin: auto auto 0; padding: 7px 20px; border-radius: 999px;
  background: var(--orange); border: 2.5px solid var(--ink);
  font-family: var(--display); font-size: 1.05rem;
}

/* FOOTER */
.footer {
  background: var(--ink); color: #d9d6ee; text-align: center;
  padding: 8px 16px 40px; display: grid; gap: 8px; justify-items: center;
  border-top: 2px solid rgba(255, 246, 230, .16);
}
.footer p { margin: 0; }
.foot-brand { margin-top: 24px !important; font-family: var(--display); font-size: 1.4rem; color: #fff; }
.foot-mail { color: var(--gold); font-weight: 700; word-break: break-word; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.footer nav a { color: var(--gold); font-weight: 700; text-decoration: none; padding: 6px 0; }
.footer nav a:hover { text-decoration: underline; }
.fine { font-size: .85rem; }
.fine a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
