/* Gnome Horde: Garden Defense – press kit. Colours from the game (Ui.cs, Palette in Models.cs), sRGB. */

@font-face {
  font-family: "Wee Bairn";
  src: url("../fonts/wee-bairn.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Teen";
  src: url("../fonts/teen.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Teen";
  src: url("../fonts/teen-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #4d3626;          /* Ui.Ink */
  --ink-muted: #69503f;
  --paper: #fcf5e3;        /* Ui.Paper */
  --paper-deep: #f5e9cd;
  --wood: #785438;         /* Ui.Wood */
  --brown: #382417;        /* Ui.DarkBrown */
  --key: #f7e6c2;          /* Ui.KeyFace */
  --key-hover: #fcf1da;
  --key-side: #a88964;     /* Ui.Side(KeyFace) */
  --go: #a8d478;           /* Ui.KeyGo */
  --go-hover: #bde29a;
  --go-side: #777f40;      /* Ui.Side(KeyGo) */
  --hat: #db2b26;          /* Palette.Hat */
  --shard: #6bb3db;        /* Ui.ShardColor */
  --gold: #f2b838;         /* Ui.HatColor */
  --clover: #66b85c;       /* Ui.CloverColor */
  --lawn-a: #76aa57;
  --lawn-b: #6d9f50;       /* mown stripes around Palette.Grass */
  --sky: #a9d3f2;
  --radius: 18px;
  --shadow: 0 4px 0 rgba(56, 36, 23, 0.28), 0 14px 30px rgba(30, 20, 10, 0.18);
  --body: "Teen", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --title: "Wee Bairn", "Teen", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

/* Language: the page holds every text in English and German; html[data-lang] shows one of them. */
html[data-lang="en"] [data-l="de"],
html[data-lang="de"] [data-l="en"] {
  display: none !important;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--lawn-a);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.6px),
    repeating-linear-gradient(90deg, var(--lawn-a) 0 150px, var(--lawn-b) 150px 300px);
  background-size: 18px 18px, auto;
  overflow-x: hidden;
  /* sticky footer: on a short page (Impressum) the footer sits at the bottom of a tall window, not in the lawn */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

img, video, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--wood); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: #a51f1b; }  /* darker than Palette.Hat, 6:1 on paper */

:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
  border-radius: 6px;
}

.site-footer :focus-visible { outline-color: var(--paper); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--paper); color: var(--ink); font-weight: 700;
  padding: 10px 16px; border-radius: 12px; border: 3px solid var(--wood);
}
.skip:focus { top: 16px; }

.wrap {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

/* ------------------------------------------------------------------ keys (the game's toy buttons) */

.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  font: 700 1rem/1.2 var(--body);
  color: var(--ink);
  text-decoration: none;
  background: var(--key);
  border: 2px solid var(--key-side);
  border-bottom-width: 6px;
  border-radius: 12px;
  padding: 0.55em 1.05em 0.5em;
  box-shadow: 0 2px 3px rgba(40, 25, 13, 0.2);
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.key:hover { background: var(--key-hover); color: var(--ink); }
.key:active { transform: translateY(3px); border-bottom-width: 3px; margin-bottom: 3px; }
.key small { font-weight: 400; color: var(--ink-muted); white-space: nowrap; }
.key-go { background: var(--go); border-color: var(--go-side); }
.key-go:hover { background: var(--go-hover); }
.key-go small { color: var(--ink); }

/* ------------------------------------------------------------------ cards and signs */

.card {
  background: var(--paper);
  border: 3px solid var(--wood);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 32px);
}

.section { margin-block: clamp(40px, 6vw, 64px); }

.sign {
  position: relative; z-index: 2;
  display: inline-block;
  margin: 0 0 -16px 18px;
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--wood);
  border: 3px solid var(--brown);
  border-radius: 14px;
  padding: 0.32em 0.8em 0.42em;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 4px 0 rgba(56, 36, 23, 0.3);
  transform: rotate(-1.2deg);
}
.sign + .card { padding-top: calc(clamp(20px, 3vw, 32px) + 16px); }

h3 {
  font-family: var(--title);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  color: var(--ink);
}
.prose > :last-child { margin-bottom: 0; }
.prose h3:not(:first-child) { margin-top: 1.1em; }
.prose p { margin: 0 0 0.85em; }
.intro { margin: 0 0 1.2em; }
.after { margin: 1.4em 0 0; }

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

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; }

.topnav, .lang-switch {
  display: flex; gap: 4px;
  background: rgba(252, 245, 227, 0.94);
  border: 2px solid rgba(120, 84, 56, 0.55);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 3px 8px rgba(30, 20, 10, 0.18);
}
.lang-switch[hidden] { display: none; }
.topnav a, .lang-switch button {
  font: 700 0.95rem/1 var(--body);
  color: var(--ink);
  text-decoration: none;
  padding: 0.6em 0.95em;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.topnav a:hover, .lang-switch button:hover { background: var(--key); color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--go); }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: clamp(560px, 76vh, 720px);
  background: var(--sky);
  overflow: hidden;
  border-bottom: 4px solid var(--brown);
}
.hero-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 18% 35%;
}
.hero-content { position: relative; z-index: 1; padding: 104px 0 44px; }
.hero-title { margin: 0; line-height: 0; }
.hero-logo {
  width: clamp(300px, 34vw, 460px);
  filter: drop-shadow(0 8px 12px rgba(30, 20, 10, 0.3));
}
.hero-card { max-width: 540px; margin-top: 14px; padding: 18px 22px 20px; }
.tagline {
  font-family: var(--title);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
  line-height: 1.2;
  margin: 0 0 0.25em;
}
.hero-meta { margin: 0 0 14px; color: var(--ink-muted); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------ factsheet and about */

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 28px;
  align-items: start;
}
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 9px 22px;
  margin: 0;
}
.facts dt { font-weight: 700; color: var(--ink-muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ trailer and clips */

.video-frame, .clip-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 3px solid var(--wood);
  border-radius: 14px;
  overflow: hidden;
  background: #2a1d13;
}
.video-frame video, .clip-frame video {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.media-note { margin: 12px 0 0; color: var(--ink-muted); }
.media-note a { margin-left: 0.4em; font-weight: 700; }

.clips {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
}
.clip-lead { grid-column: 1 / -1; }
.clip figure, .shot figure { margin: 0; }
.clip figcaption { margin-top: 10px; line-height: 1.4; }
.clip-lead figcaption { font-size: 1.15rem; }

.clip-toggle {
  position: absolute; right: 10px; bottom: 10px;
  width: 44px; height: 44px;
  padding: 0;
  border-radius: 50%;
  border-bottom-width: 4px;
}
.clip-toggle:active { margin-bottom: 0; }
.clip-toggle .icon-play, .clip-toggle[data-state="playing"] .icon-pause { display: block; }
.clip-toggle .icon-pause, .clip-toggle[data-state="playing"] .icon-play,
.clip-toggle .lbl-pause, .clip-toggle[data-state="playing"] .lbl-play { display: none; }
.clip-toggle[data-state="playing"] .lbl-pause { display: inline; }

/* ------------------------------------------------------------------ features */

.features {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature {
  background: var(--paper-deep);
  border: 2px solid rgba(120, 84, 56, 0.35);
  border-top: 8px solid var(--accent, var(--wood));
  border-radius: 14px;
  padding: 16px 18px 18px;
}
.feature p { margin: 0; }
.f-red { --accent: var(--hat); }
.f-blue { --accent: var(--shard); }
.f-green { --accent: var(--clover); }
.f-gold { --accent: var(--gold); }
.f-purple { --accent: #7a4fb0; }
.f-teal { --accent: #2a9aa0; }
.currencies { display: flex; gap: 8px; margin-top: 12px !important; }
.currencies img { width: 40px; height: 40px; }

/* ------------------------------------------------------------------ screenshots */

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
}
.shot-lead { grid-column: 1 / -1; }  /* the first shot spans the row, uncropped; the other 16 fill four rows of four */
.shot-lead figcaption { font-size: 1.05rem; }
.shot-link {
  display: block;
  border: 3px solid var(--wood);
  border-radius: 12px;
  overflow: hidden;
  background: #d8c9a8;
  box-shadow: 0 3px 0 rgba(56, 36, 23, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.shot-link:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(56, 36, 23, 0.22); }
.shot-link img { display: block; width: 100%; aspect-ratio: 16 / 9; }
.shot figcaption { margin-top: 8px; font-size: 0.95rem; line-height: 1.35; }

/* ------------------------------------------------------------------ downloads */

.downloads {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.dl a {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: var(--ink);
  background: var(--paper-deep);
  border: 2px solid rgba(120, 84, 56, 0.4);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.12s ease;
}
.dl a:hover { transform: translateY(-2px); color: var(--ink); }
.dl-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #cfe6f7;
  border-bottom: 2px solid rgba(120, 84, 56, 0.3);
}
.dl-alpha .dl-preview {
  background-color: #eadfc4;
  background-image: conic-gradient(#f4ecd8 25%, transparent 0 50%, #f4ecd8 0 75%, transparent 0);
  background-size: 20px 20px;
}
.dl-preview img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; }
.dl-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
.dl-text strong { font-size: 1.02rem; }
.dl-text small { color: var(--ink-muted); font-size: 0.9rem; }
.dl-text small span { white-space: nowrap; }
.dl-text strong::after { content: " ↓"; color: var(--wood); }
.press-files { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.press-files p { margin: 0; flex: 1 1 320px; }

/* ------------------------------------------------------------------ the last row */

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
  align-items: stretch;
}
.trio .section { display: flex; flex-direction: column; }
.trio .sign { align-self: flex-start; }
.trio .card { flex: 1 1 auto; }
.contact-mail { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ footer with tabs */

.site-footer {
  margin-top: clamp(24px, 4vw, 40px);
  background: var(--brown);
  color: var(--paper);
  border-top: 4px solid var(--wood);
  padding: 0 0 32px;
}
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  transform: translateY(-4px);
}
.tab {
  display: inline-flex; align-items: baseline; gap: 0.45em;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--key);
  border: 2px solid var(--key-side);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 12px 18px 10px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}
.tab small { font-weight: 400; color: var(--ink-muted); }
.tab:hover { background: var(--key-hover); color: var(--ink); }
.tab:focus-visible { background: var(--key-hover); }
.tab[aria-current="page"] { background: var(--go); border-color: var(--go-side); padding-top: 18px; }
.tab[aria-current="page"] small { color: var(--ink); }
.fineprint { margin: 22px 0 0; font-size: 0.95rem; color: #eadfc8; }
.site-footer a:not(.tab) { color: var(--paper); }

/* ------------------------------------------------------------------ screenshot viewer */

.lightbox {
  width: min(1400px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 3px solid var(--wood);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox::backdrop { background: rgba(26, 17, 10, 0.86); }
.lb-inner { display: flex; flex-direction: column; }
.lb-img {
  display: block; width: 100%; height: auto;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  background: #2a1d13;
}
.lb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; }
.lb-caption { margin: 0; flex: 1 1 300px; font-weight: 700; }
.lb-buttons { display: flex; gap: 8px; }
.lb-buttons .key { padding: 0.45em 0.8em 0.4em; }
.lb-buttons .key:active { margin-bottom: 0; }

/* ------------------------------------------------------------------ legal pages */

.page-top { padding: 18px 0 0; }
.page-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-logo img { width: 150px; filter: drop-shadow(0 4px 6px rgba(30, 20, 10, 0.3)); }
.legal { width: min(860px, calc(100% - 32px)); margin: 28px auto 0; }
.legal h1 {
  font-family: var(--title); font-weight: 400;
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 0.2em;
}
.legal h2 {
  font-family: var(--body); font-weight: 700;
  font-size: 1.25rem; line-height: 1.25;
  margin: 1.6em 0 0.45em;
}
.legal h3 { font-family: var(--body); font-weight: 700; font-size: 1.1rem; margin-top: 0.2em; }
.legal p, .legal ul { margin: 0 0 0.85em; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 0.3em; }
.legal address { font-style: normal; margin: 0 0 0.85em; }
.legal a, .legal p, .legal li { overflow-wrap: anywhere; }  /* long link texts (store.steampowered.com/privacy_agreement) must not widen the page */
.lang-note { color: var(--ink-muted); margin: 0 0 1.4em; }
.box {
  background: var(--paper-deep);
  border: 2px solid rgba(120, 84, 56, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 1em;
}
.box > :last-child { margin-bottom: 0; }
.updated { color: var(--ink-muted); margin-top: 1.6em !important; }

/* ------------------------------------------------------------------ narrower screens */

@media (max-width: 1080px) {
  .pair { grid-template-columns: minmax(0, 1fr); }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .topnav { display: none; }
  .topbar-row { justify-content: flex-end; }
  .clips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 699px) {
  .topbar { position: static; }
  .topbar-row { padding: 10px 0; }
  .hero { display: block; min-height: 0; border-bottom: 0; background: none; overflow: visible; }
  .hero-art img { position: static; display: block; width: 100%; height: auto; }
  .hero-logo { display: none; }
  .hero-content { padding: 0; margin-top: -56px; }
  .hero-card { max-width: none; margin-top: 0; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .clips { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 10px; }
  .sign { margin-left: 10px; }
}

@media (max-width: 520px) {
  .gallery { gap: 16px 12px; }
  .downloads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dl-text { padding: 8px 10px 10px; }
  .dl-text strong { font-size: 0.95rem; }
  .dl-text small { font-size: 0.82rem; }
  .tabs { flex-wrap: nowrap; gap: 6px; }
  .tab { flex: 1 1 auto; justify-content: center; padding: 10px 6px 8px; font-size: 0.95rem; }
  .tab[aria-current="page"] { padding-top: 14px; }
  .tab small { display: none; }
  .shot figcaption { font-size: 0.9rem; }
  .actions .key { flex: 1 1 auto; }
}

@media (max-width: 360px) {
  .tabs { gap: 4px; }
  .tab { padding: 10px 3px 8px; font-size: 0.85rem; }
  .tab[aria-current="page"] { padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #fff; }
  .topbar, .lightbox, .clip-toggle { display: none; }
  .card { box-shadow: none; }
}
