/* Red Setter Interactive
 *
 * One stylesheet, four themes. A theme is a set of custom properties under
 * [data-theme="..."]. The attribute sits on <html> for the whole page and on
 * each game card, so a card previews its own theme inside any page.
 * Components below read tokens only: no colours or fonts outside the themes.
 */

/* ---------- Fonts (downloaded only when a theme uses them) ---------- */

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/Playfair_Display/PlayfairDisplay-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("/fonts/IM_Fell_English/IMFellEnglish-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gothica";
  src: url("/fonts/Gothica/Gothica-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gothica";
  src: url("/fonts/Gothica/Gothica-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gothica";
  src: url("/fonts/Gothica/Gothica-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Gothica";
  src: url("/fonts/Gothica/Gothica-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Chewy";
  src: url("/fonts/Chewy/Chewy-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DynaPuff";
  src: url("/fonts/DynaPuff/DynaPuff-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DynaPuff";
  src: url("/fonts/DynaPuff/DynaPuff-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Luckiest Guy";
  src: url("/fonts/Luckiest_Guy/LuckiestGuy-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito/Nunito-Variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

/* ---------- Themes ---------- */

/* Studio: red matched to the wordmark in assets/logo-primary.svg. */
:root,
[data-theme="studio"] {
  --bg: #f5f5f5;
  --bg-image: none;
  --ink: #2a2a2a;
  --ink-strong: #1e1e1e;
  --muted: #666666;
  --surface: #ffffff;
  --surface-ink: #2a2a2a;
  --surface-strong: #1e1e1e;
  --surface-muted: #666666;
  --accent: #a84a3f;
  --accent-hover: #78352d;
  --accent-ink: #ffffff;
  --link: #a84a3f;
  --highlight: #d9a441;
  --highlight-ink: #1e1e1e;
  --border: #e4e4e4;
  --frame: #e4e4e4;
  --header-bg: rgba(245, 245, 245, 0.92);
  --header-ink: #1e1e1e;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Playfair Display", Georgia, "Times New Roman", serif;
  --display-weight: 700;
  --display-spacing: 0;
  --display-leading: 1.15;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 10px 30px rgba(30, 30, 30, 0.1);
  --btn-shadow: none;
  --card-bg: #ffffff;
  --card-ink: #1e1e1e;
  --card-frame: #e4e4e4;
}

/* Trinoxis: earthy, book and parchment. */
[data-theme="trinoxis"] {
  --bg: #e8d5c4;
  --bg-image: linear-gradient(180deg, #f0e6d6 0%, #e8d5c4 25%, #dcc4a8 50%, #d4b896 75%, #c9a882 100%);
  --ink: #3d2419;
  --ink-strong: #2d1810;
  --muted: #5a3a2b;
  --surface: #f8f2e8;
  --surface-ink: #3d2419;
  --surface-strong: #2d1810;
  --surface-muted: #5a3a2b;
  --accent: #78352d;
  --accent-hover: #5a241d;
  --accent-ink: #f8f2e8;
  --link: #78352d;
  --highlight: #d9a441;
  --highlight-ink: #2d1810;
  --border: rgba(90, 58, 43, 0.3);
  --frame: rgba(217, 164, 65, 0.6);
  --header-bg: rgba(240, 230, 214, 0.92);
  --header-ink: #2d1810;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Gothica", Georgia, "Times New Roman", serif;
  --display-weight: 700;
  --display-spacing: 0.01em;
  --display-leading: 1.15;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow: 0 12px 32px rgba(45, 24, 16, 0.22);
  --btn-shadow: none;
  --card-bg: linear-gradient(135deg, #2d1810 0%, #5a3a2b 55%, #3d2419 100%);
  --card-ink: #f0e6d6;
  --card-frame: #d9a441;
}

/* Starfished: palette and type taken from starfished.com. */
[data-theme="starfished"] {
  --bg: #103c5b;
  --bg-image: linear-gradient(180deg, #4d93a7 0%, #2b5477 22%, #17497a 55%, #103c5b 100%);
  --ink: #e6f5f3;
  --ink-strong: #ffffff;
  --muted: #cfdde8;
  --surface: #e6f5f3;
  --surface-ink: #17497a;
  --surface-strong: #103c5b;
  --surface-muted: #2b5477;
  --accent: #56a132;
  --accent-hover: #6fbb49;
  --accent-ink: #06210d;
  --link: #eac65f;
  --highlight: #eac65f;
  --highlight-ink: #103c5b;
  --border: rgba(230, 245, 243, 0.3);
  --frame: rgba(230, 245, 243, 0.55);
  --header-bg: rgba(230, 245, 243, 0.95);
  --header-ink: #103c5b;
  --font-display: "Chewy", "Comic Sans MS", cursive;
  --font-body: "DynaPuff", "Comic Sans MS", sans-serif;
  --display-weight: 400;
  --display-spacing: 0.02em;
  --display-leading: 1.1;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 10px 0 rgba(16, 60, 91, 0.35), 0 18px 30px rgba(6, 25, 41, 0.35);
  --btn-shadow: 0 5px 0 #3b7a1f;
  --card-bg: linear-gradient(180deg, #23cbee 0%, #4d93a7 30%, #17497a 100%);
  --card-ink: #ffffff;
  --card-frame: #e6f5f3;
}

/* Yeti Showdown: blues from the logo, red and yellow from its bunting.
 * Fonts are the ones the game itself uses. */
[data-theme="yeti-showdown"] {
  /* Sky blue sampled from the top of the hero art (hero.webp). */
  --bg: #eef3fa;
  --bg-image: linear-gradient(180deg, #6794ca 0%, #b5cbe7 30%, #eef3fa 62%, #ffffff 100%);
  --ink: #1f3b57;
  --ink-strong: #12304d;
  --muted: #3f5a75;
  --surface: #ffffff;
  --surface-ink: #1f3b57;
  --surface-strong: #12304d;
  --surface-muted: #3f5a75;
  --accent: #d62f3a;
  --accent-hover: #b0202b;
  --accent-ink: #ffffff;
  --link: #1d4fc4;
  --highlight: #ffc21f;
  --highlight-ink: #12304d;
  --border: #c9e2f2;
  --frame: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-ink: #12304d;
  --font-display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --display-weight: 400;
  --display-spacing: 0.03em;
  --display-leading: 1.1;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 12px 28px rgba(18, 48, 77, 0.16);
  --btn-shadow: 0 5px 0 #8c1820;
  --card-bg: linear-gradient(180deg, #6ea8e6 0%, #a9cdf3 100%);
  --card-ink: #12304d;
  --card-frame: #ffffff;
}

/* ---------- Base ---------- */

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

/* The page background lives on <html> so the .backdrop layer (z-index -1)
 * paints above it rather than behind it. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-spacing);
  line-height: var(--display-leading);
  color: var(--ink-strong);
}

h1:focus {
  outline: none;
}

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--link);
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Backdrop (decoration per theme) ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Starfished: the scene from starfished.com. Sky, sun, clouds and the sea
 * surface sit at the top of the page and scroll away; the reef sits at the
 * very bottom; bubbles rise through whatever part of the page is on screen. */

.reef,
.reef-bubbles {
  display: none;
}

[data-theme="starfished"] body {
  position: relative;
}

[data-theme="starfished"] .reef {
  --waterline: 400px;
  --seabed: clamp(150px, 20vw, 300px);
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.reef__sky {
  position: absolute;
  inset: 0 0 auto;
  height: var(--waterline);
  overflow: hidden;
  background: linear-gradient(180deg, #bac9d6 0%, #ddeff2 75%);
}

.reef__sky img {
  max-width: none;
}

.reef__haze {
  position: absolute;
  left: 50%;
  top: calc(var(--waterline) - 130px);
  width: 130%;
  opacity: 0.55;
  transform: translateX(-50%);
}

.reef__sun,
.reef__sun-glow {
  --sun: clamp(90px, 12vw, 150px);
  position: absolute;
  top: 176px;
  left: 8%;
  width: var(--sun);
  animation: sun-glow 9s ease-in-out infinite;
}

.reef__sun-glow {
  top: 136px;
  left: calc(8% - 40px);
  width: calc(var(--sun) + 80px);
  height: calc(var(--sun) + 80px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 247, 214, 0.75) 0%, rgba(255, 247, 214, 0.3) 45%, rgba(255, 247, 214, 0) 72%);
}

.reef__cloud {
  position: absolute;
  left: -30%;
  animation: cloud-drift linear infinite;
}

.reef__cloud:nth-of-type(3) { top: 100px; width: 210px; opacity: 0.65; animation-duration: 95s; animation-delay: -10s; }
.reef__cloud:nth-of-type(4) { top: 190px; width: 160px; opacity: 0.8; animation-duration: 130s; animation-delay: -60s; }
.reef__cloud:nth-of-type(5) { top: 84px; width: 130px; opacity: 0.55; animation-duration: 150s; animation-delay: -95s; }
.reef__cloud:nth-of-type(6) { top: 150px; width: 190px; opacity: 0.7; animation-duration: 110s; animation-delay: -30s; }

.reef__wave {
  position: absolute;
  left: 0;
  top: calc(var(--waterline) - 40px);
  z-index: 2;
  display: block;
  width: 100%;
  height: 60px;
}

.reef__wave path {
  fill: #4d93a7;
}

.reef__water {
  position: absolute;
  inset: calc(var(--waterline) - 10px) 0 0;
  z-index: 1;
  background: linear-gradient(180deg, #4d93a7 0, #2b5477 280px, #103c5b 640px);
}

.reef__sparkles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation: sparkle-twinkle ease-in-out infinite;
}

.reef__sparkles span:nth-child(1) { top: 36px; left: 12%; animation-duration: 4.5s; animation-delay: 0s; }
.reef__sparkles span:nth-child(2) { top: 84px; left: 30%; animation-duration: 5.2s; animation-delay: 1.1s; }
.reef__sparkles span:nth-child(3) { top: 24px; left: 48%; animation-duration: 3.8s; animation-delay: 2s; }
.reef__sparkles span:nth-child(4) { top: 108px; left: 65%; animation-duration: 5.8s; animation-delay: 0.6s; }
.reef__sparkles span:nth-child(5) { top: 48px; left: 80%; animation-duration: 4.2s; animation-delay: 2.6s; }
.reef__sparkles span:nth-child(6) { top: 96px; left: 92%; animation-duration: 5s; animation-delay: 1.8s; }

.reef__seabed {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: var(--seabed);
}

.reef__seabed-layer {
  position: absolute;
  inset: 0;
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: auto 100%;
}

.reef__seabed-layer--coral { background-image: url("/img/starfished/background/coral.webp"); }
.reef__seabed-layer--rocky { background-image: url("/img/starfished/background/rocky.webp"); opacity: 0.9; }

.reef__plants span {
  position: absolute;
  bottom: 6%;
  width: 12px;
  border-radius: 50% 50% 6px 6px / 65% 65% 8px 8px;
  background: linear-gradient(180deg, #4d93a7 0%, #56a132 100%);
  transform-origin: 50% 100%;
  opacity: 0.85;
  animation: plant-sway ease-in-out infinite;
}

.reef__plants span:nth-child(even) {
  background: linear-gradient(180deg, #56a132 0%, #3b7a1f 100%);
}

.reef__plants span:nth-child(1) { left: 6%; height: 70px; animation-duration: 4.2s; animation-delay: -0.6s; }
.reef__plants span:nth-child(2) { left: 16%; height: 46px; animation-duration: 3.4s; animation-delay: -2.1s; }
.reef__plants span:nth-child(3) { left: 32%; height: 82px; animation-duration: 5.6s; animation-delay: -1.3s; }
.reef__plants span:nth-child(4) { left: 50%; height: 54px; animation-duration: 4.8s; animation-delay: -3.4s; }
.reef__plants span:nth-child(5) { left: 66%; height: 76px; animation-duration: 3.9s; animation-delay: -0.2s; }
.reef__plants span:nth-child(6) { left: 82%; height: 50px; animation-duration: 5.1s; animation-delay: -2.8s; }
.reef__plants span:nth-child(7) { left: 92%; height: 66px; animation-duration: 4.5s; animation-delay: -1.8s; }

/* Leave room for the reef under the footer text. */
[data-theme="starfished"] .site-footer {
  padding-bottom: calc(clamp(150px, 20vw, 300px) * 0.7);
}

[data-theme="starfished"] .reef-bubbles {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.reef-bubbles span {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), #23cbee 70%, rgba(35, 203, 238, 0.3));
  opacity: 0;
  animation: bubble-rise 14s linear infinite;
}

.reef-bubbles span:nth-child(1) { left: 8%; width: 14px; height: 14px; animation-duration: 12s; animation-delay: 0s; }
.reef-bubbles span:nth-child(2) { left: 20%; width: 22px; height: 22px; animation-duration: 16s; animation-delay: 2s; }
.reef-bubbles span:nth-child(3) { left: 35%; width: 10px; height: 10px; animation-duration: 10s; animation-delay: 1s; }
.reef-bubbles span:nth-child(4) { left: 50%; width: 18px; height: 18px; animation-duration: 15s; animation-delay: 4s; }
.reef-bubbles span:nth-child(5) { left: 65%; width: 12px; height: 12px; animation-duration: 11s; animation-delay: 3s; }
.reef-bubbles span:nth-child(6) { left: 80%; width: 20px; height: 20px; animation-duration: 17s; animation-delay: 0.5s; }
.reef-bubbles span:nth-child(7) { left: 92%; width: 14px; height: 14px; animation-duration: 13s; animation-delay: 5s; }

@keyframes sun-glow {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(160vw); }
}

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.9; transform: scale(1); }
}

@keyframes bubble-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.85; }
  100% { transform: translate(20px, max(-560px, -62vh)); opacity: 0; }
}

@keyframes plant-sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

[data-theme="yeti-showdown"] .backdrop::before {
  content: "";
  position: absolute;
  inset: -40px 0 0;
  background-image:
    radial-gradient(circle, #ffffff 0 2px, transparent 3px),
    radial-gradient(circle, #ffffff 0 3px, transparent 4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 2px, transparent 3px);
  background-size: 180px 180px, 260px 260px, 120px 120px;
  background-position: 20px 30px, 110px 140px, 70px 90px;
  animation: snow 18s linear infinite;
}

@keyframes snow {
  to { background-position: 20px 750px, 110px 920px, 70px 450px; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: auto;
  height: 46px;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  color: var(--header-ink);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-spacing);
  text-decoration: none;
}

.site-nav .site-nav__social {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav__social .platform__icon {
  width: 1.15em;
  height: 1.15em;
}

/* Narrow phones: icon only, so the logo keeps its size. The label stays
 * available to screen readers. */
@media (max-width: 480px) {
  .site-nav__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .site-nav__social .platform__icon {
    width: 1.4em;
    height: 1.4em;
  }
}

.site-nav a:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Buttons, chips, labels ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.05rem;
  letter-spacing: var(--display-spacing);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--btn-shadow);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  border-color: currentColor;
  color: var(--ink-strong);
}

.btn--secondary:hover {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: var(--bg);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}

.status {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--highlight-ink);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.status--link {
  padding: 0;
}

.status--link a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.status--link a:hover {
  filter: brightness(1.08);
  background: var(--highlight);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.platform__icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* ---------- Games row ---------- */

.games--home {
  padding: 3.5rem 0 3rem;
}

.studio-intro {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.studio-headline {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

.studio-sub {
  margin: 0;
  font-size: 1.2rem;
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.game-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  height: 100%;
  overflow: hidden;
  border: 3px solid var(--card-frame);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  color: var(--card-ink);
  font-family: var(--font-body);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-6px) scale(1.01);
}

.game-card__art {
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card__art {
  transform: scale(1.06);
}

.game-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  width: 100%;
  padding: 1.4rem;
}

.game-card__name {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  letter-spacing: var(--display-spacing);
  line-height: 1.05;
}

.game-card__logo {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 auto;
}

.game-card__tagline {
  font-size: 0.98rem;
  line-height: 1.45;
}

.game-card__status {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--highlight-ink);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Card art per game */

.game-card[data-theme="trinoxis"] .game-card__art {
  inset: 10px;
  border: 1px solid rgba(217, 164, 65, 0.7);
  border-radius: 2px;
  background: radial-gradient(ellipse at 50% 30%, rgba(217, 164, 65, 0.18), transparent 65%);
}

/* Trinoxis has no logo image yet, so its name is set as a wordmark in the
 * game's own typeface and logo colour. */
.game-card[data-theme="trinoxis"] .game-card__name,
[data-theme="trinoxis"] .game-title {
  font-family: "IM Fell English", Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #edd199;
}

.game-card[data-theme="starfished"] .game-card__art {
  background-image:
    radial-gradient(circle at 16% 72%, rgba(255, 255, 255, 0.35) 0 7px, transparent 8px),
    radial-gradient(circle at 80% 22%, rgba(255, 255, 255, 0.3) 0 10px, transparent 11px),
    radial-gradient(circle at 66% 58%, rgba(255, 255, 255, 0.25) 0 4px, transparent 5px),
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.25) 0 5px, transparent 6px);
}

.game-card[data-theme="starfished"] .game-card__body {
  align-items: center;
  text-align: center;
}

/* Cards with supplied art. When the art already contains the title, the logo
 * is kept for screen readers on the home page and shown on the compact row. */

.game-card__art--image {
  background-position: top center;
  background-size: cover;
}

.games--home .game-card--art-title .game-card__logo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Supplied art can have scenery behind the tagline: fade the bottom of the
 * card into the theme's page colour so the text stays readable whatever the
 * art shows. */
.games--home .game-card__art--image::after {
  content: "";
  position: absolute;
  inset: 62% 0 0;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 88%, transparent) 12%, color-mix(in srgb, var(--bg) 94%, transparent) 100%);
}

.games--compact .game-card__art--image {
  display: none;
}

.games--compact .game-card--art-title .game-card__logo {
  width: auto;
  max-width: 100%;
  height: 44px;
  object-fit: contain;
}

/* Compact row on game pages */

.games--compact {
  padding: 1rem 0;
}

.games--compact .game-cards {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.games--compact .game-card {
  align-items: center;
  min-height: 64px;
  border-width: 2px;
  border-radius: var(--radius);
  box-shadow: none;
  opacity: 0.85;
}

.games--compact .game-card:hover,
.games--compact .game-card:focus-visible,
.games--compact .game-card[aria-current="page"] {
  opacity: 1;
  transform: none;
}

.games--compact .game-card[aria-current="page"] {
  outline: 3px solid var(--highlight);
  outline-offset: 2px;
}

.games--compact .game-card__body {
  align-items: center;
  padding: 0.5rem 0.9rem;
}

.games--compact .game-card__name {
  font-size: 1.15rem;
}

.games--compact .game-card__logo {
  width: 48px;
}

.games--compact .game-card__tagline,
.games--compact .game-card__status {
  display: none;
}

.games--compact .game-card[data-theme="trinoxis"] .game-card__art {
  inset: 4px;
}

/* ---------- Game page ---------- */

/* Same top padding as the full-width art heroes, so the status capsule sits
 * at the same height on every game page. */
.game-hero {
  padding: 1.5rem 0 2.5rem;
}

.game-hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.game-hero .btn-group,
.game-hero .chips {
  justify-content: center;
}

.game-hero--with-image .container {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  justify-items: start;
  text-align: left;
}

.game-hero--with-image .btn-group,
.game-hero--with-image .chips {
  justify-content: flex-start;
}

.game-title {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
}

.game-title--logo img {
  display: block;
  width: min(320px, 70vw);
  margin: 0 auto;
}

.game-tagline {
  max-width: 44rem;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  letter-spacing: var(--display-spacing);
  line-height: 1.3;
  color: var(--ink-strong);
}

.game-sub {
  max-width: 40rem;
  font-size: 1.15rem;
}

/* Hero with full-width key art: title over the sky, buttons over the foreground. */

.game-hero--art {
  display: flex;
  min-height: clamp(420px, 46vw, 680px);
  padding: 1.5rem 0 2.5rem;
  background: var(--hero-art) center bottom / cover no-repeat;
}

.game-hero--art .container {
  align-items: stretch;
}

.game-hero--art .game-hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Title at the top of the art, buttons at the bottom. */
.game-hero--art .btn-group {
  margin-top: auto;
}

.game-hero--art .game-title--logo img {
  width: min(760px, 92vw);
}

.game-hero--art .btn-group {
  margin-bottom: 0;
}

/* Scrim: darkens the top and bottom of busy art so a text title and the
 * buttons stay readable. */

.game-hero--scrim {
  background-image:
    linear-gradient(180deg, rgba(18, 9, 5, 0.95) 0%, rgba(18, 9, 5, 0.82) 30%, rgba(18, 9, 5, 0.4) 52%, rgba(18, 9, 5, 0.4) 66%, rgba(18, 9, 5, 0.92) 100%),
    var(--hero-art);
  background-position: center;
  background-color: #120905;
}

.game-hero--scrim .game-title {
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.8);
}

.game-hero--scrim .status {
  margin-bottom: 0.6rem;
}

.game-hero--scrim .btn--secondary {
  border-color: #f0e6d6;
  color: #f0e6d6;
}

.game-hero--scrim .btn--secondary:hover {
  background: #f0e6d6;
  color: #2d1810;
}

.game-intro {
  padding: 2.25rem 0 2rem;
  text-align: center;
}

.game-intro .game-tagline,
.game-intro .game-sub {
  margin-left: auto;
  margin-right: auto;
}

.game-intro .game-sub {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .game-hero--art {
    background-image: var(--hero-art-small);
  }

  .game-hero--scrim {
    background-image:
      linear-gradient(180deg, rgba(18, 9, 5, 0.95) 0%, rgba(18, 9, 5, 0.82) 30%, rgba(18, 9, 5, 0.4) 52%, rgba(18, 9, 5, 0.4) 66%, rgba(18, 9, 5, 0.92) 100%),
      var(--hero-art-small);
  }
}

.section {
  padding: 3.25rem 0;
}

.section--narrow .container {
  max-width: 54rem;
}

/* Long-form text, e.g. the privacy policy. */
.policy h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 1.5rem;
}

.policy h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.6rem;
}

.policy p,
.policy ul {
  margin-bottom: 0.9rem;
}

.policy ul {
  padding-left: 1.4rem;
  list-style: disc;
}

.section--center {
  text-align: center;
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1.25rem;
}

.lede {
  max-width: 44rem;
  font-size: 1.1rem;
}

.section--center .lede {
  margin-left: auto;
  margin-right: auto;
}

.detail-list {
  padding-left: 1.25rem;
  list-style: disc;
}

.detail-list {
  margin-bottom: 1.25rem;
}

.detail-list li {
  margin-bottom: 0.75rem;
}

.media {
  margin: 0;
}

.media__frame {
  display: block;
  width: 100%;
  border: 2px solid var(--frame);
  border-radius: var(--radius-lg);
  background: #1e1e1e;
  box-shadow: var(--shadow);
}

video.media__frame {
  aspect-ratio: 16 / 9;
}

.media figcaption,
.shot__caption {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.note {
  margin: 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--highlight);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  color: var(--surface-ink);
}

.note strong {
  color: var(--surface-strong);
}

/* Info panel: the same on every game page */

.game-info {
  padding: 0 0 1.5rem;
}

.game-info__panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--surface-ink);
  box-shadow: var(--shadow);
}

.game-info__row dt {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--surface-muted);
}

.game-info__row dd {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--surface-strong);
}

/* Platform capsules: brand-coloured tiles, the same in every theme. */

.capsules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.capsule {
  --capsule-bg: #4a5568;
  --capsule-ink: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 7px;
  background: var(--capsule-bg);
  color: var(--capsule-ink);
  text-decoration: none;
}

.capsule .platform__icon {
  width: 1.2rem;
  height: 1.2rem;
}

a.capsule:hover {
  filter: brightness(1.15);
}

.capsule--steam { --capsule-bg: #171a21; }
.capsule--ios,
.capsule--mac,
.capsule--appstore { --capsule-bg: #1c1c1e; }
.capsule--android,
.capsule--googleplay { --capsule-bg: #3ddc84; --capsule-ink: #073042; }
.capsule--windows { --capsule-bg: #0078d4; }
.capsule--linux { --capsule-bg: #333333; }
.capsule--xbox { --capsule-bg: #107c10; }
.capsule--playstation { --capsule-bg: #0070d1; }
.capsule--itch { --capsule-bg: #fa5c5c; --capsule-ink: #1e1e1e; }

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
  align-items: start;
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--frame);
  border-radius: var(--radius);
  background: #1e1e1e;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.shot:hover {
  transform: translateY(-3px);
}

.shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
}

.shot__caption {
  text-align: center;
}

/* Features and cards */

.features {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.features--with-image {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

/* Text first, image on the right: set "imageSide": "right" on the section. */
.features--image-right {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.features--image-right > :first-child {
  order: 2;
}

.features__image {
  display: block;
  width: 100%;
  border: 2px solid var(--frame);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.feature-list {
  display: grid;
  gap: 1.25rem;
}

.feature-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature__icon {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.feature-list h3,
.info-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.feature-list p {
  margin: 0;
}

.features .detail-list {
  margin-bottom: 0;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(var(--columns, auto-fit), minmax(var(--card-min, 220px), 1fr));
  gap: 1.25rem;
}

.info-card {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--surface-ink);
  box-shadow: var(--shadow);
}

.info-card h3 {
  color: var(--surface-strong);
}

.info-card__subtitle {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--surface-muted);
}

.info-card .chip {
  border-color: currentColor;
}

.info-card__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.info-card__icons img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Platforms */

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 170px;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--surface-strong);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.platform .platform__icon {
  width: 2rem;
  height: 2rem;
}

.platform__label {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.1rem;
}

.platform__status {
  font-size: 0.85rem;
  color: var(--surface-muted);
}

.section-links {
  margin: 0;
}

/* ---------- Newsletter ---------- */

.newsletter__card {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--surface-ink);
  box-shadow: var(--shadow);
}

.newsletter__card .section-heading {
  color: var(--surface-strong);
}

.newsletter__form .field {
  margin-bottom: 1rem;
}

.newsletter__form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.newsletter__form input[type="email"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--surface-muted);
  border-radius: var(--radius);
  background: #ffffff;
  color: #1e1e1e;
  font: inherit;
}

.newsletter__form .response,
.newsletter__form .mce_inline_error {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.form-note {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--surface-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  text-align: center;
  color: var(--muted);
}

[data-theme="yeti-showdown"] .site-footer {
  background: rgba(255, 255, 255, 0.85);
}

.site-footer p {
  margin: 0 0 0.4rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 3.5rem 4rem;
  border: 0;
  background: rgba(10, 10, 10, 0.92);
  color: #ffffff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(10, 10, 10, 0.6);
}

.lightbox figure {
  margin: 0;
  text-align: center;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  margin: 0 auto;
  border-radius: 8px;
}

.lightbox figcaption {
  margin-top: 0.8rem;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox__close {
  top: 0.75rem;
  right: 0.75rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 0.75rem;
}

.lightbox__nav--next {
  right: 0.75rem;
}

.lightbox__nav[hidden] {
  display: none;
}

/* ---------- Theme transition ----------
 * js/site.js swaps the page inside a view transition and grows the new theme
 * out of the clicked game card. Both snapshots stay still; only the clip moves.
 */

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }

  .brand img {
    height: 38px;
  }

  .site-nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.95rem;
  }

  .games--home {
    padding: 2.25rem 0 2rem;
  }

  .game-card {
    min-height: 220px;
  }

  .games--compact .game-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .games--compact .game-card__body {
    padding: 0.4rem;
  }

  .games--compact .game-card__name {
    font-size: 0.9rem;
    text-align: center;
  }

  .game-hero--with-image .container,
  .features--with-image {
    grid-template-columns: 1fr;
  }

  .features--image-right > :first-child {
    order: 0;
  }

  .info-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .section {
    padding: 2.5rem 0;
  }

  .newsletter__card {
    padding: 1.4rem;
  }

  .lightbox {
    padding: 3.5rem 0.75rem;
  }

  .lightbox__nav {
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
