/* VAASAL Games website. Colours come from the game's light theme. */

@font-face {
  font-family: "Fredoka Condensed";
  src: url("/assets/fonts/fredoka-condensed-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka Condensed";
  src: url("/assets/fonts/fredoka-condensed-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --board: #5e6e52;      /* the board, and the logo's background */
  --board-deep: #4f5d45;
  --side: #2f432a;       /* side panes */
  --dialog: #3f4b36;
  --cream: #f4ecd8;      /* the door frame */
  --paper: #fbf7ec;
  --note: #fff6d6;
  --gold: #ffc42e;
  --gold-soft: #d1c29a;
  --door: #e3262b;
  --ink: #26301d;
  --ink-soft: #55604a;
  --line: #e2d9c1;
  --head: "Fredoka Condensed", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
  --wide: 1080px;
  --narrow: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--board);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.07), transparent 60%),
    url("/assets/img/ghosts.svg");
  background-size: auto, 640px 640px;
  color: var(--note);
  font: 17px/1.6 var(--body);
}

a { color: inherit; }

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

.wrap { width: min(100% - 40px, var(--wide)); margin-inline: auto; }
.wrap.narrow { width: min(100% - 40px, var(--narrow)); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--note); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 50;
}
.skip:focus { left: 8px; }

/* --- header */

.site-head { padding: 18px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand .brand-games {
  font-family: var(--head); font-weight: 500; letter-spacing: 0.32em; font-size: 18px;
  color: var(--cream); padding-top: 3px;
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  font-family: var(--head); font-weight: 500; font-size: 18px; letter-spacing: 0.04em;
  text-decoration: none; padding: 6px 14px; border-radius: 999px; color: var(--cream);
}
.nav a:hover, .nav a:focus-visible { background: rgba(255, 255, 255, 0.12); }
.nav a[aria-current="page"] { background: var(--cream); color: var(--ink); }

/* --- type */

h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.1; letter-spacing: 0.01em; }
h1 { font-size: clamp(40px, 6vw, 64px); margin: 0 0 12px; }
h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 40px 0 10px; }
h3 { font-size: 22px; margin: 26px 0 6px; }
.lead { font-size: 20px; max-width: 34em; opacity: 0.95; }
.eyebrow {
  font-family: var(--head); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  font-size: 15px; color: var(--gold-soft); margin: 0 0 8px;
}

/* --- hero (home) */

.hero { padding: 40px 0 24px; }
.hero h1 { color: var(--note); max-width: 14em; }

/* --- game card */

.game-card {
  display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center;
  background: var(--side); border-radius: 28px; padding: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  margin: 24px 0 56px;
}
.game-card img.icon { width: 160px; height: 160px; border-radius: 34px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3); }
.game-card h2 { margin: 0 0 6px; }
.game-card p { margin: 0 0 14px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.badge {
  font-family: var(--head); font-weight: 500; font-size: 15px; letter-spacing: 0.06em;
  border: 1.5px solid rgba(255, 246, 214, 0.45); border-radius: 999px; padding: 3px 12px;
}

.button {
  display: inline-block; font-family: var(--head); font-weight: 600; font-size: 19px; letter-spacing: 0.06em;
  text-decoration: none; padding: 10px 24px; border-radius: 999px;
  background: #ffe8aa; color: #3e301a; box-shadow: 0 4px 0 #c9a85c;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #c9a85c; }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 #c9a85c; }
.button.ghost { background: transparent; color: var(--note); box-shadow: inset 0 0 0 2px rgba(255, 246, 214, 0.6); }

/* --- paper pages (support, privacy, terms) */

.paper {
  background: var(--paper); color: var(--ink);
  border-radius: 24px; padding: clamp(24px, 5vw, 56px);
  margin: 12px auto 56px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.paper h1 { color: var(--ink); font-size: clamp(36px, 5vw, 52px); }
.paper h2 { color: var(--side); border-top: 1px solid var(--line); padding-top: 28px; }
.paper h2:first-of-type { border-top: 0; padding-top: 0; }
.paper a { color: #2f6b2f; text-underline-offset: 2px; }
.paper .meta { color: var(--ink-soft); margin-top: 0; }
.paper ul { padding-left: 1.2em; }
.paper li { margin: 4px 0; }
.paper table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 16px; }
.paper th, .paper td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.paper th { font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: 0.02em; background: #f3ecd9; }
.summary {
  background: var(--note); border-left: 6px solid var(--gold); border-radius: 12px;
  padding: 16px 20px; margin: 18px 0 8px;
}
.summary p { margin: 6px 0; }
.mail {
  display: inline-block; font-family: var(--head); font-weight: 600; font-size: clamp(22px, 4vw, 30px);
  color: var(--side) !important; text-decoration: none; border-bottom: 3px solid var(--gold);
}

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary {
  cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 21px; color: var(--side);
  list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--ink-soft); }
details[open] summary::after { content: "–"; }
details p, details ul { margin: 10px 0 4px; }

/* --- Pip Frames page */

.game-hero { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; padding: 32px 0 12px; }
.game-hero img.icon { width: 200px; height: 200px; border-radius: 44px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3); }
.game-hero h1 { margin-bottom: 8px; }

.shots {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 20px 4px 24px; margin: 8px 0 8px;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}
.shots img {
  flex: 0 0 auto; width: 240px; border-radius: 18px; scroll-snap-align: start;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 16px 0 8px; }
.panel { background: var(--side); border-radius: var(--radius); padding: 22px 24px; }
.panel h3 { margin-top: 0; color: var(--note); }
.panel ul { margin: 0; padding-left: 1.1em; }
.panel li { margin: 5px 0; }

.free {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 16px 0 56px;
}
.free .panel { background: var(--dialog); }

/* --- footer */

.site-foot {
  margin-top: auto; background: var(--side); color: rgba(255, 246, 214, 0.85);
  padding: 28px 0 34px; font-size: 15px;
}
.site-foot .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; opacity: 0.8;
}
.site-foot button:hover { text-decoration: underline; opacity: 1; }

/* --- the splash (home page only) */

#splash {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: var(--board);
}
html.splash-on #splash { display: block; }
html.splash-on body { overflow: hidden; }
#splash canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#splash .enter {
  position: absolute; border: 0; padding: 0; margin: 0; background: transparent;
  cursor: pointer; border-radius: 12px;
}
#splash .enter:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
#splash .hint {
  position: absolute; left: 0; right: 0; text-align: center; margin: 0;
  font-family: var(--head); font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  font-size: clamp(14px, 1.8vw, 18px); color: var(--cream);
  opacity: 0; transition: opacity 0.8s ease; pointer-events: none;
}
#splash .hint.show { opacity: 0.85; animation: breathe 2.8s ease-in-out 0.8s infinite; }
#splash.leaving { opacity: 0; transition: opacity 0.45s ease; }
@keyframes breathe { 50% { opacity: 0.4; } }

@media (prefers-reduced-motion: reduce) {
  #splash .hint.show { animation: none; }
  .button { transition: none; }
}

/* --- small screens */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  .game-card { grid-template-columns: 1fr; text-align: left; padding: 22px; }
  .game-card img.icon { width: 112px; height: 112px; border-radius: 26px; }
  .game-hero { grid-template-columns: 1fr; gap: 16px; }
  .game-hero img.icon { width: 120px; height: 120px; border-radius: 28px; }
  .cols, .free { grid-template-columns: 1fr; }
  .shots img { width: 200px; }
  .brand img { height: 24px; }
  .brand .brand-games { font-size: 15px; }
  .nav a { font-size: 16px; padding: 5px 11px; }
  .paper th, .paper td { padding: 8px; }
}
