@font-face {
  font-family: "Luckiest Guy";
  src: url("fonts/LuckiestGuy-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Bold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #fff6ec;
  --ink: #3a2547;
  --ink-soft: #6b5878;
  --road: #4d4560;
  --coral: #ff5d7d;
  --coral-dark: #d93a5c;
  --sun: #ffc93c;
  --mint: #7fd8b4;
  --sky: #8cc8ff;
  --lilac: #c9a4ff;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font: 400 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, .play {
  font-family: "Luckiest Guy", "Arial Black", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- top ---------- */

.top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 24px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 24px;
  align-items: center;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(56px, 9vw, 112px);
  line-height: 0.9;
  color: var(--coral);
  text-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-3deg);
  transform-origin: left bottom;
}

.lead {
  font-size: 22px;
  max-width: 30ch;
  margin: 24px 0 28px;
}

.play {
  display: inline-block;
  padding: 18px 44px 12px;
  font-size: 34px;
  color: #fff;
  text-decoration: none;
  background: var(--coral);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.play:hover { background: var(--coral-dark); }
.play:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.play:focus-visible { outline: 4px solid var(--sun); outline-offset: 4px; }

.fine {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 42ch;
}

.touch-warning {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffe1e7;
  font-size: 16px;
  max-width: 42ch;
}

.top-cast {
  position: relative;
  height: 460px;
}
.top-cast img {
  position: absolute;
  width: 54%;
  mix-blend-mode: multiply; /* the white backgrounds melt into the paper */
}
.top-cast .c1 { left: 0;    top: 30px;  z-index: 3; }
.top-cast .c2 { right: 0;   top: 0;     z-index: 2; width: 48%; }
.top-cast .c3 { left: 22%;  bottom: -20px; z-index: 4; width: 46%; }
.top-cast .c4 { right: -4%; bottom: 0;  z-index: 1; width: 44%; }

/* ---------- main screenshot ---------- */

.shot-main {
  max-width: 1180px;
  margin: 8px auto 0;
  padding: 0 24px;
}
.shot-main img,
.gallery img {
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 10px 0 rgba(58, 37, 71, 0.15);
}

/* ---------- sections ---------- */

section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

h2 {
  margin: 0 0 6px;
  font-size: 46px;
  color: var(--ink);
}

.section-intro { margin: 0 0 28px; color: var(--ink-soft); }

/* ---------- pilots ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 10px 18px 20px;
}
.card img { margin: 0 auto; width: 88%; }
.card h3 {
  margin: 0;
  font: 600 26px/1.1 "Fredoka", system-ui, sans-serif;
}
.card .species {
  display: inline-block;
  margin: 4px 0 10px;
  padding: 1px 10px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  background: var(--tint);
}
.card p { margin: 0 0 14px; font-size: 16px; line-height: 1.45; }

.stats { margin: 0; display: grid; gap: 6px; }
.stats div { display: grid; grid-template-columns: 7.2em 1fr; align-items: center; gap: 8px; }
.stats dt { font-size: 13px; color: var(--ink-soft); }
.stats dd { margin: 0; height: 10px; background: #efe6f3; border-radius: 99px; overflow: hidden; }
.stats dd span { display: block; height: 100%; background: var(--bar); border-radius: 99px; }

/* ---------- controls ---------- */

.howto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 24px;
}

.keys { margin: 0; display: grid; gap: 10px; }
.keys div { display: grid; grid-template-columns: 11em 1fr; gap: 12px; align-items: baseline; }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; }

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 8px 3px;
  font: 600 15px/1.4 "Fredoka", system-ui, sans-serif;
  text-align: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--ink);
}

kbd.arrow { font: 700 17px/1.3 system-ui, "Segoe UI Symbol", sans-serif; }

.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.tips li {
  padding: 14px 18px;
  background: #fff;
  border-left: 6px solid var(--sun);
  border-radius: 6px 14px 14px 6px;
}

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.last { text-align: center; padding-top: 64px; }

footer {
  margin-top: 80px;
  padding: 28px 24px 36px;
  text-align: center;
  font-size: 15px;
  color: var(--paper);
  background: var(--road);
}
footer p { margin: 0; }
footer .made { margin-top: 4px; opacity: 0.7; }

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .top { grid-template-columns: 1fr; padding-top: 36px; }
  .top-cast { height: 300px; order: -1; }
  .cards { grid-template-columns: 1fr 1fr; }
  .howto-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .cards, .gallery { grid-template-columns: 1fr; }
  .keys div { grid-template-columns: 1fr; gap: 2px; }
  .top-cast { height: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  .play { transition: none; }
}
