:root {
  --dark-green: #17331C;
  --ink: #23402E;
  --gold: #F4B73E;
  --gold-light: #ffc94f;
  --gold-dark: #bb7d05;
  --parchment: #c9b813;
  --bright-green: #2bbe59;
  --display: Fredoka, system-ui, sans-serif;
  --body: Nunito, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--parchment);
  background: var(--dark-green) url("../background.jpg") center / cover no-repeat fixed;
  padding: 22px clamp(16px, 4vw, 56px) 40px;
}

/* A fixed background stutters on touch devices, and eats memory on small ones. */
@media (max-width: 900px), (hover: none) {
  body { background-attachment: scroll; }
}

/* ---------- top bar: menu link and language switch, both on the right ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar nav { margin-left: 0; }

.menu-link {
  font: 600 0.82rem/1 var(--body);
  letter-spacing: 0.04em;
  color: #C9D3C8;
  background: rgba(23, 51, 28, 0.88);
  border-radius: 999px;
  padding: 13px 18px;
  text-decoration: none;
}

.menu-link:hover { color: #fff; }

.menu-link sup {
  margin-left: 6px;
  font-size: 0.75em;
  color: var(--bright-green);
}

/* ---------- changelog page ---------- */

.log {
  max-width: 760px;
  margin: clamp(24px, 5vh, 50px) auto 0;
}

.log-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
  color: var(--gold);
}

.log-list { display: flex; flex-direction: column; gap: 28px; }

.log section { display: flex; flex-direction: column; gap: 8px; }

.log h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--gold);
}

.log h2 span {
  margin-left: 10px;
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--bright-green);
}

.log h3 {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--parchment);
}

.log ul { margin: 0; padding-left: 1.2em; }

.log li,
.log p { margin: 0; font-size: 1rem; line-height: 1.6; color: #E4E9DF; }

/* ---------- language switch ---------- */

nav {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  margin-left: auto;
  width: fit-content;
  background: rgba(23, 51, 28, 0.88);
  border-radius: 999px;
  padding: 5px 7px;
}

nav button {
  font: 600 0.82rem/1 var(--body);
  letter-spacing: 0.04em;
  color: #C9D3C8;
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  cursor: pointer;
}

nav button:hover { color: #fff; }

nav button[aria-current="true"] {
  background: var(--gold);
  color: var(--dark-green);
}

nav button:focus-visible,
.cta:focus-visible,
.thumb:focus-visible,
.lb-btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

/* ---------- hero: portrait and title ---------- */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 46px);
  flex-wrap: wrap;
  margin: clamp(10px, 3vh, 30px) 0 clamp(24px, 5vh, 50px);
}

.portrait {
  position: relative;
  flex: none;
  width: clamp(130px, 15vw, 230px);
  aspect-ratio: 1;
}

/* The colour ring lives on a pseudo-element so it can turn without taking the
   photograph with it. */
.portrait::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #F4B73E, #ffc94f, #8ED96B, #3FBFD8, #7B7FE0, #F07A4B, #F4B73E
  );
  animation: turn 22s linear infinite;
}

/* A soft gold halo, breathing rather than blinking. */
.portrait::after {
  content: "";
  position: absolute;
  inset: -26px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 79, 0.45) 40%, rgba(255, 201, 79, 0) 72%);
  animation: glow 7s ease-in-out infinite;
  pointer-events: none;
}

.portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 5px solid var(--dark-green);
}

/* Each sparkle is a weightless hub pinned to the centre; the dot rides on its
   ::before at arm.s length, so rotating the hub carries the dot around the ring.
   Negative delays spread them out along one slow orbit. */
.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  animation: orbit 52s linear infinite;
}

.spark::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  margin: calc(12px / -2) 0 0 calc(12px / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--gold-light) 42%, rgba(255, 201, 79, 0) 72%);
  left: clamp(78px, 8.6vw, 132px);
  top: 0;
  animation: twinkle 4.2s ease-in-out infinite;
}

/* No two lap times divide into each other, and three of the six ease rather than
   run flat — so they bunch up, chase, and drift apart again without ever repeating.
   Slightly different radii keep them off a single wire. */

.spark { animation-timing-function: ease-in-out; }

.s1 { animation-name: orbit-a; animation-duration: 47s; animation-delay:  -3s; }
.s2 { animation-name: orbit-b; animation-duration: 58s; animation-delay: -19s; }
.s3 { animation-name: orbit-c; animation-duration: 52s; animation-delay: -31s; }
.s4 { animation-name: orbit-a; animation-duration: 64s; animation-delay:  -8s; }
.s5 { animation-name: orbit-b; animation-duration: 43s; animation-delay: -26s; }
.s6 { animation-name: orbit-c; animation-duration: 55s; animation-delay: -41s; }

.s1::before { left: clamp(76px, 8.4vw, 128px); animation-delay: 0s;   }
.s2::before { left: clamp(83px, 9.1vw, 139px); animation-delay: 0.7s; }
.s3::before { left: clamp(72px, 8.0vw, 122px); animation-delay: 1.4s; }
.s4::before { left: clamp(86px, 9.4vw, 143px); animation-delay: 2.1s; }
.s5::before { left: clamp(78px, 8.6vw, 132px); animation-delay: 2.8s; }
.s6::before { left: clamp(80px, 8.8vw, 135px); animation-delay: 3.5s; }

/* ---------- sparkles around the title ---------- */

.title-wrap { position: relative; display: inline-block; }

/* Three nested jobs: the span squashes the circle into an ellipse that fits a wide
   headline, the <i> turns, and the dot un-squashes itself so it stays round. */
.tspark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: scaleY(0.32);
  pointer-events: none;
}

.tspark i {
  display: block;
  position: absolute;
  width: 0;
  height: 0;
  animation: orbit 34s linear infinite;
}

.tspark i::before {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  margin: calc(11px / -2) 0 0 calc(11px / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--gold-light) 42%, rgba(255, 201, 79, 0) 72%);
  left: clamp(170px, 26vw, 520px);
  top: 0;
  transform: scaleY(3.125);
  animation: twinkle 5s ease-in-out infinite;
}

/* Each one rides its own rail: a different flatten, a different radius and a
   different period, so they drift apart instead of marching in formation. */

.t1 { transform: scaleY(0.3); }
.t1 i { animation-duration: 68s; animation-delay: 0s; }
.t1 i::before { left: clamp(160px, 24vw, 480px); transform: scaleY(3.333); animation-delay: 0s; }

.t2 { transform: scaleY(0.38); }
.t2 i { animation-duration: 74s; animation-delay: -15s; }
.t2 i::before { left: clamp(185px, 28vw, 545px); transform: scaleY(2.632); animation-delay: 1.1s; }

.t3 { transform: scaleY(0.25); }
.t3 i { animation-duration: 62s; animation-delay: -28s; }
.t3 i::before { left: clamp(148px, 22vw, 440px); transform: scaleY(4.000); animation-delay: 2.3s; }

.t4 { transform: scaleY(0.34); }
.t4 i { animation-duration: 81s; animation-delay: -44s; }
.t4 i::before { left: clamp(200px, 30vw, 585px); transform: scaleY(2.941); animation-delay: 3.4s; }

.t5 { transform: scaleY(0.43); }
.t5 i { animation-duration: 70s; animation-delay: -57s; }
.t5 i::before { left: clamp(172px, 26vw, 505px); transform: scaleY(2.326); animation-delay: 4.2s; }

@keyframes orbit { to { transform: rotate(360deg); } }

@keyframes orbit-a {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(100deg); }
  38%  { transform: rotate(130deg); }
  60%  { transform: rotate(245deg); }
  78%  { transform: rotate(272deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbit-b {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(42deg); }
  33%  { transform: rotate(155deg); }
  52%  { transform: rotate(186deg); }
  74%  { transform: rotate(300deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbit-c {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(115deg); }
  40%  { transform: rotate(141deg); }
  58%  { transform: rotate(203deg); }
  80%  { transform: rotate(320deg); }
  100% { transform: rotate(360deg); }
}


@keyframes turn { to { transform: rotate(360deg); } }
@keyframes glow {
  0%, 100% { opacity: 0.45; }
  50%     { opacity: 1; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0; }
  45%      { opacity: 1; }
}

/* ---------- banner ---------- */

.banner {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.8rem, 9vw, 7rem);
  line-height: 1;
  text-align: center;
  color: var(--gold);
  -webkit-text-stroke: 0.09em #fff;
  paint-order: stroke fill;
  text-wrap: balance;
}

/* ---------- composition ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 2.5vh, 28px) clamp(20px, 4vw, 60px);
  max-width: 1500px;
  margin: 0 auto;
}

.trailer { grid-column: 1; grid-row: 1; width: 100%; max-width: 620px; }

.cta-top { grid-column: 1; grid-row: 2; max-width: 620px; }

.news { grid-column: 1; grid-row: 3; align-self: start; justify-self: stretch; width: 100%; max-width: 620px; }

.card { grid-column: 1; grid-row: 4; max-width: 620px; }

/* Bottom-aligned with the main card. The grid row is as tall as the taller box, so
   align-self: end drops this one to sit on the same line. */
.dev {
  grid-column: 2;
  grid-row: 4;
  align-self: end;
  justify-self: end;
  max-width: 660px;
}

/* One column, in reading order, once the two cards stop fitting side by side. */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); row-gap: clamp(44px, 10vh, 88px); }
  .card { grid-column: 1; grid-row: auto; max-width: 720px; margin: 0 auto; }
  .dev { grid-column: 1; grid-row: auto; justify-self: center; max-width: 720px; margin-top: 0; }
  .news { grid-column: 1; grid-row: auto; width: 100%; max-width: 720px; margin: 0 auto; }
  .trailer { grid-row: auto; max-width: 720px; margin: 0 auto; }
  .cta-top { grid-row: auto; max-width: 720px; margin: 0 auto; }
  /* Same air under the title as the row-gap above, so the three blocks are evenly spaced. */
  .hero { margin-bottom: clamp(44px, 10vh, 88px); }
}

/* ---------- main card ---------- */

.card {
  background: rgba(23, 51, 28, 0.94);
  border: 3px solid var(--gold);
  border-radius: 18px;
  padding: 26px clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

@supports (backdrop-filter: blur(4px)) {
  .card { background: rgba(23, 51, 28, 0.88); backdrop-filter: blur(6px); }
}

/* The name in the game.s own face, inside the sentence. */
.game {
  font-family: var(--display);
  color: var(--gold);
}

/* The card.s heading now, so it carries a little more weight than a tagline did. */
.tag {
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.body {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  color: #E4E9DF;
}

/* ---------- action row ---------- */

.actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(14px, 2vw, 20px);
}

.cta-block { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

.cta {
  display: block;
  width: 100%;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  color: var(--dark-green);
  /* A shallow gradient rather than a flat fill, so the button reads as a plate of
     metal for the sheen to travel over. */
  background: linear-gradient(160deg, var(--gold-light) 0%, var(--gold) 55%, #e0a52c 100%);
  border-radius: 12px;
  padding: 20px 26px;
  text-decoration: none;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 0 #b9861f;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  filter: brightness(1.12) saturate(1.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #b9861f, 0 10px 22px rgba(0, 0, 0, 0.28);
}

.cta:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #b9861f;
}

/* The sun crossing the plate, once, when the pointer arrives. Nothing moves until
   then — a button that glints on its own is a button nobody looks at twice. */
.cta::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: 0;
  width: 42%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-115%) skewX(-16deg);
  pointer-events: none;
}

.cta:hover::after { animation: sheen 2.4s ease-out; }

@keyframes sheen {
  from { transform: translateX(-115%) skewX(-16deg); }
  to   { transform: translateX(330%) skewX(-16deg); }
}

.platforms {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  color: var(--parchment);
  text-align: center;
  margin: 0;
}

.thumbs { display: flex; gap: 8px; flex-wrap: nowrap; }

/* All five share the row and shrink together, so the strip is always full width. */
.thumb {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 2px solid rgba(244, 183, 62, 0.45);
  border-radius: 9px;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.thumb:hover { border-color: var(--gold); transform: translateY(-2px); }

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- small print ---------- */

hr {
  border: 0;
  border-top: 1px solid rgba(138, 154, 143, 0.3);
  margin: 4px 0;
  width: 100%;
}

.note { font-size: 0.88rem; line-height: 1.5; color: var(--bright-green); margin: 0; }

/* Same colour as the text around them, underline doing the work — a blue default
   is unreadable on the dark green. */
.note a { color: inherit; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--bright-green);
}

footer a { color: var(--bright-green); }

/* ---------- developer card ---------- */

.dev {
  display: flex;
  gap: clamp(14px, 2vw, 22px);
  align-items: center;
  background: #fff;
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}


.dev-photo {
  width: clamp(200px, 30%, 320px);
  height: auto;
  border-radius: 20px;
  display: block;
  flex: none;
}

.dev-text h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: #315c35;
  margin: 0 0 8px;
}

.dev-text p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #2A3B2C;
  margin: 0;
}

.dev-text a { color: var(--gold-dark); }

@media (max-width: 560px) {
  .dev { flex-direction: column; align-items: stretch; }
  .dev-photo { width: 100%; }
}

/* ---------- news banner ---------- */

/* Directly above the main card, in the same column and at the same width
   as the card, so the left column reads as one stack. */
.news {
  background: #fff;
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 15px clamp(20px, 3vw, 34px);
  font-size: 1rem;
  font-weight: 600;
  color: #2A3B2C;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  text-align: left;

  /* Label left, headline right. No centring this time: that was what pushed the
     wrapped line into the middle of the box. */
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.news-label { flex: none; white-space: nowrap; }

/* Takes whatever is left and wraps inside itself, so a second line starts under the
   first rather than under the label. */
.news-body { flex: 1 1 auto; min-width: 0; }

.news a { color: var(--gold-dark); }

/* The date rides on the headline rather than starting a second line. */
.news sup {
  margin-left: 7px;
  font-size: 0.68em;
  font-weight: 600;
  color: var(--bright-green);
}


/* ---------- byline ---------- */

.byline {
  width: fit-content;
  max-width: 100%;
  /* Same value as the layout row-gap, so every block is spaced alike. */
  margin: clamp(44px, 10vh, 88px) auto 0;
  background: rgba(23, 51, 28, 0.94);
  border: 3px solid var(--gold);
  border-radius: 12px;
  padding: 16px clamp(20px, 4vw, 48px);
  text-align: center;
  font-size: 1rem;
}

/* ---------- trailer ---------- */

.trailer {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--gold);
  background: #000;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- screenshot popup ---------- */

.lb {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 6vw;
  z-index: 10;
}

.lb[open] { display: flex; }

.lb img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  border: 3px solid var(--gold);
  display: block;
}

.lb-btn {
  position: absolute;
  font: 600 1.6rem/1 var(--body);
  color: var(--dark-green);
  background: var(--gold);
  border: 0;
  border-radius: 999px;
  width: 46px;
  height: 46px;
  cursor: pointer;
}

.lb-btn:hover { background: var(--gold-light); }

.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- developer links ---------- */

.dev-links {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.92rem;
}

.dev-links a {
  color: var(--gold-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.dev-links a:hover { color: #b8801a; }

.byline a { color: var(--gold); }
.byline img { display: block; margin: 0 auto; width: 250px; max-width: 70vw; height: auto; }
.byline p { margin: 8px 0 0; }

footer a { color: var(--bright-green); }

/* Five across stops being legible on a phone; three then two reads better. */
@media (max-width: 520px) {
  .thumbs { flex-wrap: wrap; }
  .thumb { flex: 0 0 calc(33.333% - 6px); }
}

/* ---------- how-to-learn-Dutch pages ---------- */

/* Their language switch is links, one page per language, not the landing
   page's buttons: each language has to be its own URL for search to find it. */
nav a {
  font: 600 0.82rem/1 var(--body);
  letter-spacing: 0.04em;
  color: #C9D3C8;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 11px;
}

nav a:hover { color: #fff; }

nav a[aria-current="page"] {
  background: var(--gold);
  color: var(--dark-green);
}

.learn .lede { font-size: 1.15rem; line-height: 1.55; }

.learn section { margin-top: 10px; }

.learn li + li { margin-top: 6px; }

.learn li strong { color: var(--gold-light); }

/* Questions read as questions, not as the changelog's small capitals. */
.learn h3 {
  margin: 10px 0 0;
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-light);
}

.learn .cta-block { margin-top: 10px; }

/* ---------- the logo on inner pages ---------- */

/* The landing page's portrait and title, smaller, and a link home: every page
   carries the logo, and the logo always leads back to the main page. */
.hero-small {
  text-decoration: none;
  margin: clamp(4px, 1.5vh, 14px) 0 clamp(14px, 3vh, 26px);
}

.hero-small .portrait { display: block; width: clamp(72px, 9vw, 112px); }

.hero-small .portrait::before { inset: -6px; }

.hero-small .portrait::after { inset: -16px; }

.hero-small .portrait img { border-width: 4px; }

.hero-small .banner { display: block; font-size: clamp(2.1rem, 6.5vw, 3.8rem); }

.hero-small:hover .banner { color: var(--gold-light); }


/* ---------- the foot of every page ---------- */

/* The Raccoonbox box, then one full-width line under it: YouTube, the
   download and privacy on the left, the game's version on the right. The same
   on every page; js/footer.js fills in the language and the version. */
/* Not the card footer above: block, and the box keeps the text it always had. */
footer.site-foot { display: block; font-size: 1rem; color: var(--parchment); }

.foot-links {
  max-width: 1500px;
  margin: 22px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--bright-green);
  /* Small text over the photo: a soft shadow keeps it readable on any patch. */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.foot-links a { color: var(--bright-green); }
.foot-links a:hover { color: #fff; }

/* Links inside the reading cards: gold, as on the dev card, never the
   browser's blue, which disappears on the dark green. */
.log p a, .log li a { color: var(--gold-light); }
