/* ==========================================================================
   Tallowvale Studios — main stylesheet
   Central styling: variables, layout, components.
   Breakpoint-specific overrides live in responsive.css (loaded after this).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --color-bg: #0f1912;
  --color-bg-alt: #142219;
  --color-surface: #1b2c20;
  --color-surface-raised: #22392a;
  --color-border: #2d4634;
  --color-border-strong: #3d5c46;

  --color-text: #eee9dc;
  --color-text-muted: #a9b9ac;
  --color-text-faint: #7c8c7f;

  --color-accent: #c9a24b;       /* gold — primary brand accent */
  --color-accent-hover: #e0ba62;
  --color-accent-soft: rgba(201, 162, 75, 0.12);

  --color-verdania: #6fae7a;     /* green shard */
  --color-cindralis: #d3703f;    /* lava shard */
  --color-nimbara: #6fa3c9;      /* ice shard */

  --color-danger: #c96a4b;
  --color-success: #7ac97e;

  /* Typography */
  --font-heading: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs: 0.8rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: 1.15rem;
  --fs-lg: 1.4rem;
  --fs-xl: 1.9rem;
  --fs-2xl: 2.6rem;
  --fs-3xl: 3.4rem;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  /* Layout */
  --container-max: 1180px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.28);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Voorkomt dat iOS/Android de tekst zelf vergroot als je het toestel draait. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* De sticky header mag een anker (bv. #shard-cindralis) niet afdekken. */
[id] { scroll-margin-top: 5.5rem; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover, a:focus-visible { color: var(--color-accent-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
  letter-spacing: 0.01em;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--space-4); color: var(--color-text-muted); }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25em; color: var(--color-text-muted); }

button, input, textarea, select { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.section {
  padding-block: var(--space-8);
}

.section--alt {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-header {
  max-width: 640px;
  margin: 0 0 var(--space-7);
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* tekst gecentreerd, ook als de knop volle breedte is */
  gap: var(--space-2);
  min-height: 44px;        /* minimale tikhoogte voor touch */
  padding: 0.8em 1.6em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-accent);
  color: #1a1406;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--color-accent-hover);
  color: #1a1406;
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-block { width: 100%; justify-content: center; }
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Site header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 25, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--space-4);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav__list a {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
}

.main-nav__list a:hover,
.main-nav__list a[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* Menu-knop voor smalle schermen (zichtbaar onder 640px, zie responsive.css):
   drie streepjes + het woord "Menu"/"Close". De header heeft geen logo, dus
   het label maakt van een lege balk met losse hamburger een nette knop. */
.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.nav-toggle__label::before { content: "Menu"; }
.nav-toggle[aria-expanded="true"] .nav-toggle__label::before { content: "Close"; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--space-9) var(--space-8);
  background:
    linear-gradient(180deg, rgba(15, 25, 18, 0.35) 0%, rgba(15, 25, 18, 0.92) 100%),
    var(--color-bg) url("../images/backgrounds/hero-bg-placeholder.svg") center / cover no-repeat;
  border-bottom: 1px solid var(--color-border);
}

.hero--compact {
  padding-block: var(--space-8) var(--space-7);
}

.hero__inner {
  max-width: 720px;
  text-align: center;
}

.hero__title {
  margin-bottom: var(--space-5);
}

.hero__lede {
  font-size: var(--fs-md);
  max-width: 56ch;
  margin-inline: auto;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* --------------------------------------------------------------------------
   5b. Game carousel (Games page)
   A hero-sized band that pages between games with prev/next arrows and dots.
   Echoes of Verdania is the middle slide; the others are placeholders for
   games not announced yet. Wired up by initGameCarousel() in js/main.js.
   -------------------------------------------------------------------------- */
.game-carousel__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.game-carousel__viewport {
  flex: 1 1 auto;
  min-width: 0;
}

.game-slide {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}
.game-slide[hidden] { display: none; }

.game-carousel__arrow {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: rgba(15, 25, 18, 0.7);
  color: var(--color-text);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.game-carousel__arrow:hover,
.game-carousel__arrow:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.game-carousel__dots {
  display: flex;
  justify-content: center;
  margin-top: var(--space-5);
}

/* De knop zelf is een ruim (40px) tikvlak; het zichtbare puntje van 10px is
   de ::before. Zo blijft het er netjes uit zien maar is het te raken met een duim. */
.game-carousel__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.game-carousel__dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.game-carousel__dot:hover::before { border-color: var(--color-accent); }
.game-carousel__dot[aria-current="true"]::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   6. Cards & grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

.card h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.card p:last-child { margin-bottom: 0; }

.card--icon .card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  color: var(--color-accent);
}

/* Founder card (used on the About page) */
.founder {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-7);
  align-items: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}

.founder__photo {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.founder__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder__bio p { margin-bottom: var(--space-4); }

.founder__more {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}
.founder__more.is-open { max-height: 3000px; }

.founder__signoff {
  font-family: var(--font-heading);
  margin-top: var(--space-5);
}

.founder__toggle { margin-top: var(--space-2); }

/* Game showcase card (used on homepage) */
.game-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-7);
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}

.game-feature__art {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
}

.game-feature__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-feature__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.tag {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-muted);
}

.tag--verdania { border-color: var(--color-verdania); color: var(--color-verdania); }
.tag--cindralis { border-color: var(--color-cindralis); color: var(--color-cindralis); }
.tag--nimbara { border-color: var(--color-nimbara); color: var(--color-nimbara); }

/* --------------------------------------------------------------------------
   7. Screenshot / media placeholders
   Designed so a missing or not-yet-added image never breaks the layout:
   the wrapper keeps its aspect ratio and shows a styled placeholder state
   whether the <img> 404s or was never added.
   -------------------------------------------------------------------------- */
.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  border: 1px solid var(--color-border);
}

.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-4);
  color: var(--color-text-faint);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.media-frame__fallback svg {
  width: 32px;
  height: 32px;
  opacity: 0.6;
}

/* Hide the fallback once a real image has loaded successfully */
.media-frame.is-loaded .media-frame__fallback { display: none; }
/* If the image fails to load, hide the broken <img> and keep the fallback visible */
.media-frame.is-broken img,
.media-frame.is-broken video { display: none; }

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* --------------------------------------------------------------------------
   9. Shard cards (Verdania / Cindralis / Nimbara)
   -------------------------------------------------------------------------- */
.shard-card {
  appearance: none;
  /* Flex column, not block: a <button> vertically centres its own content
     when it's taller than that content, which pushed the shorter cards'
     screenshots down out of line with the others. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-top: 3px solid var(--color-border-strong);
  transition: transform var(--transition-fast);
}
.shard-card:hover,
.shard-card:focus-visible { transform: translateY(-2px); }
/* The whole border stays the shard's own colour, on every page theme (the
   theme override for .card below explicitly skips .shard-card). */
.shard-card--verdania { border-color: var(--color-verdania); }
.shard-card--cindralis { border-color: var(--color-cindralis); }
.shard-card--nimbara { border-color: var(--color-nimbara); }

/* Breathing room between the coloured shard pill and the heading under it */
.shard-card .tag { margin-bottom: var(--space-3); }

.shard-card__hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 25, 18, 0.6);
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.shard-card:hover .shard-card__hint,
.shard-card:focus-visible .shard-card__hint { opacity: 1; }

/* --------------------------------------------------------------------------
   9b. Shard screenshot lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 7, 0.88);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1000px);
}

.lightbox__close {
  position: absolute;
  top: -54px;
  right: 0;
  width: 44px;  /* touch-formaat */
  height: 44px;
  border-radius: 50%;
  /* Lichter dan de donkere backdrop, anders is de knop op een telefoon
     nauwelijks te vinden. */
  border: 1px solid var(--color-text-faint);
  background: var(--color-surface-raised);
  color: var(--color-text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { border-color: var(--color-accent); color: var(--color-accent); }

.lightbox__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-soft);
}

.lightbox__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: rgba(15, 25, 18, 0.7);
  color: var(--color-text);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox__nav:hover { border-color: var(--color-accent); color: var(--color-accent); }
.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }

.lightbox__counter {
  text-align: center;
  margin: var(--space-4) 0 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */
.form-field {
  margin-bottom: var(--space-5);
}
.form-field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75em 1em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-field small {
  display: block;
  margin-top: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--fs-xs);
}

.form-note {
  background: var(--color-accent-soft);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding-block: var(--space-7);
  color: var(--color-text-faint);
  font-size: var(--fs-sm);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.site-footer h4 {
  color: var(--color-text);
  font-size: var(--fs-base);
  margin-bottom: var(--space-3);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li { margin-bottom: var(--space-2); }
.site-footer a { color: var(--color-text-faint); }
.site-footer a:hover { color: var(--color-accent); }

.social-links {
  display: flex;
  gap: var(--space-3);
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-muted);
}
.social-links a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.social-links svg { width: 18px; height: 18px; }

/* The platform icons are loaded as <img>, so `currentColor` can't reach them.
   Force them to solid white regardless of the SVG's own fill. */
.social-links a img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.site-footer__bottom a {
  display: inline-block;
  padding-block: 0.7rem; /* genoeg hoogte om met een duim te raken */
}

.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   12. Misc components
   -------------------------------------------------------------------------- */
.breadcrumb {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.breadcrumb a { color: var(--color-text-faint); }
.breadcrumb a:hover { color: var(--color-accent); }

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-7);
}

.error-page {
  text-align: center;
  padding-block: var(--space-9);
}
.error-page__code {
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-4);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-accent);
  color: #1a1406;
  padding: 0.75em 1.25em;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   13. Echoes of Verdania — the three shards (tabbed)
   A WAI-ARIA tabs widget with one panel per shard. Each panel re-themes a
   small set of scoped `--s-*` variables so Verdania, Cindralis and Nimbara
   each read as their own world. Without JS every panel simply stacks.
   -------------------------------------------------------------------------- */
.shard-tabs {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.shard-tabs__list {
  display: flex;
  gap: var(--space-3);
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
}

/* One-line caption under the tabs: this strip also re-themes the whole page. */
.shard-tabs__note {
  max-width: 60ch;
  margin: 0 auto;
  padding: 0 var(--space-5) var(--space-4);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-text-faint);
}

.shard-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  /* Each tab always wears its own shard colour (like the shard cards further
     down the page), not just when it's the active one. */
  border: 1px solid var(--tab-accent, var(--color-border));
  border-radius: var(--radius-sm);
  color: var(--tab-accent, var(--color-text-muted));
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  /* No transition on background/box-shadow here: they resolve through
     color-mix(var(--tab-accent)), and Chromium freezes the computed value
     mid-transition when the selected state flips. The change is instant. */
}

.shard-tab__sub {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-text-faint);
}

.shard-tab:hover {
  background: color-mix(in srgb, var(--tab-accent, var(--color-accent)) 8%, transparent);
}

/* Active tab: stronger fill plus a doubled inner border, so it still stands
   out now that every tab is already colour-bordered. */
.shard-tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--tab-accent, var(--color-accent)) 18%, transparent);
  box-shadow: inset 0 0 0 1px var(--tab-accent, var(--color-accent));
}
.shard-tab[aria-selected="true"] .shard-tab__sub { color: inherit; }

.shard-tab--verdania { --tab-accent: var(--color-verdania); }
.shard-tab--cindralis { --tab-accent: var(--color-cindralis); }
.shard-tab--nimbara { --tab-accent: var(--color-nimbara); }

/* ---- Panel shell --------------------------------------------------------- */
.shard-panel { background: var(--s-body-bg); }
.shard-panel[hidden] { display: none; }

.shard-panel__hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-8);
  background: var(--s-hero-bg);
  border-bottom: 1px solid var(--s-line);
}
.shard-panel__hero > .container { position: relative; z-index: 1; }
.shard-panel__hero .eyebrow { color: var(--s-accent); }

.shard-panel__title {
  /* An <h1> now (the page-level hero was merged into this banner), but kept at
     h2 size so the shard banners look unchanged. */
  font-size: var(--fs-2xl);
  color: var(--s-title);
  margin-bottom: var(--space-4);
}

.shard-panel__lede {
  color: var(--s-text);
  font-size: var(--fs-md);
  max-width: 58ch;
  margin-bottom: 0;
}

.shard-panel__body { padding-block: var(--space-8); }
/* The three panels have different amounts of text, so without these two
   reservations the "Where you..." card row (and everything below it) starts at
   a different height depending on the shard. Reserve five lines for the lead
   paragraph and a common height for the cards, so the card row sits at a
   fixed spot with a bit of slack for editing the copy later. */
.shard-panel__body > .container > p:first-child { min-height: 8em; }
.shard-panel__body .grid--3 .card { min-height: 18rem; }
.shard-panel__body h2,
.shard-panel__body h3,
.shard-panel__body h4 { color: var(--s-title); }
.shard-panel__body p,
.shard-panel__body li { color: var(--s-text); }

.shard-panel .card {
  background: var(--s-surface);
  border-color: var(--s-line);
}
.shard-panel .tag {
  border-color: var(--s-accent);
  color: var(--s-accent);
}
.shard-panel .btn-primary {
  background: var(--s-accent);
  color: var(--s-on-accent);
}
.shard-panel .btn-primary:hover,
.shard-panel .btn-primary:focus-visible {
  background: var(--s-accent-hover);
  color: var(--s-on-accent);
}
.shard-panel .btn-secondary {
  border-color: var(--s-line);
  color: var(--s-text);
}
.shard-panel .btn-secondary:hover,
.shard-panel .btn-secondary:focus-visible {
  border-color: var(--s-accent);
  color: var(--s-accent);
}

/* ---- Kin cards --------------------------------------------------------- */
.kin-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.kin-card {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: var(--radius-md);
}
.kin-card__sprite {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: var(--radius-sm);
  background: var(--s-sprite-bg);
}
.kin-card h4 {
  margin-bottom: var(--space-1);
  font-size: var(--fs-base);
}
.kin-card p {
  margin: 0;
  font-size: var(--fs-sm);
}

/* ---- Verdania: the green shard --------------------------------------- */
/* The palette is shared by the panel (works with JS off, all panels stacked)
   and by `body.shard-theme--verdania`, which JS sets so the whole page
   chrome — header, tab bar, hero, footer — re-themes with the active tab.
   See section 14. */
.shard-panel--verdania,
body.shard-theme--verdania {
  --s-accent: #7cc088;
  --s-accent-hover: #93d29d;
  --s-on-accent: #10240f;
  --s-title: #eef3e6;
  --s-text: #c2d2bd;
  --s-line: #2f4a37;
  --s-surface: #17271b;
  --s-body-bg: #0f1912;
  --s-hero-bg: radial-gradient(130% 150% at 15% 0%, #1d3524 0%, #0f1912 68%);
  --s-hero-img: url("../images/echoes-of-verdania/verdania-map-crop.jpg");
  --s-sprite-bg: rgba(124, 192, 136, 0.10);
}
.shard-panel--verdania .shard-panel__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/echoes-of-verdania/verdania-map-crop.jpg") right center / cover no-repeat;
  opacity: 0.14;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

/* ---- Cindralis: the lava shard ------------------------------------------ */
.shard-panel--cindralis,
body.shard-theme--cindralis {
  --s-accent: #e0713f;
  --s-accent-hover: #f2895a;
  --s-on-accent: #1c0d06;
  --s-title: #f6e7df;
  --s-text: #d8b8a8;
  --s-line: #4a2a1c;
  --s-surface: #221008;
  --s-body-bg: #160b07;
  --s-hero-bg: radial-gradient(130% 130% at 82% 115%, #732813 0%, #2b110a 46%, #160b07 82%);
  --s-hero-img: url("../images/echoes-of-verdania/cindralis-banner.jpg");
  --s-sprite-bg: rgba(224, 113, 63, 0.12);
}
.shard-panel--cindralis .shard-panel__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/echoes-of-verdania/cindralis-banner.jpg") center / cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: luminosity;
  pointer-events: none;
}
.shard-panel--cindralis .shard-panel__hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e0713f 20%, #ffc07a 50%, #e0713f 80%, transparent);
}
.shard-panel--cindralis .card {
  box-shadow: 0 0 0 1px rgba(224, 113, 63, 0.07), var(--shadow-card);
}

/* ---- Nimbara: the ice shard ------------------------------------------- */
.shard-panel--nimbara,
body.shard-theme--nimbara {
  --s-accent: #8fc7e0;
  --s-accent-hover: #a9d6ea;
  --s-on-accent: #0b1a22;
  --s-title: #eef5f8;
  --s-text: #b9ccd6;
  --s-line: #2a3f4a;
  --s-surface: #141f26;
  --s-body-bg: #0d151a;
  --s-hero-bg: linear-gradient(180deg, #1b2c35 0%, #0d151a 100%);
  --s-hero-img: url("../images/echoes-of-verdania/nimbara-banner.jpg");
  --s-sprite-bg: rgba(143, 199, 224, 0.10);
}
.shard-panel--nimbara .shard-panel__hero {
  border-bottom-color: rgba(143, 199, 224, 0.28);
}
.shard-panel--nimbara .shard-panel__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/echoes-of-verdania/nimbara-banner.jpg") center / cover no-repeat;
  opacity: 0.16;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   14. Echoes of Verdania — whole-page theming
   initShardTabs() sets `body.shard-theme--<shard>` to match the active tab,
   so the whole page chrome (header, tab bar, page hero, footer) shifts with
   it — not just the panel. Scoped to that class, which exists only on
   echoes-of-verdania.html, so other pages are untouched.

   No CSS transitions on the background/border colours here on purpose: they
   resolve through `var(--s-*)`, and Chromium won't fire a transition (and
   freezes the computed colour at its old value) when only the custom
   property changes on the ancestor. The theme snaps instead.
   -------------------------------------------------------------------------- */
body[class*="shard-theme--"] {
  background: var(--s-body-bg);
}

/* Header */
body[class*="shard-theme--"] .site-header {
  background: var(--s-body-bg);
  border-bottom-color: var(--s-line);
}
body[class*="shard-theme--"] .main-nav__list a { color: var(--s-text); }
body[class*="shard-theme--"] .main-nav__list a:hover,
body[class*="shard-theme--"] .main-nav__list a[aria-current="page"] {
  color: var(--s-title);
  border-bottom-color: var(--s-accent);
}
body[class*="shard-theme--"] .nav-toggle { border-color: var(--s-line); color: var(--s-title); }
body[class*="shard-theme--"] .nav-toggle__bars span { background: var(--s-title); }

/* Tab bar (also the whole-page theme switcher) */
body[class*="shard-theme--"] .shard-tabs {
  background: var(--s-surface);
  border-bottom-color: var(--s-line);
}
body[class*="shard-theme--"] .shard-tabs__note { color: var(--s-text); }

/* Page hero — the band above the tabs */
body[class*="shard-theme--"] .hero {
  position: relative;
  overflow: hidden;
  background: var(--s-hero-bg);
  border-bottom-color: var(--s-line);
}
body[class*="shard-theme--"] .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--s-hero-img) center / cover no-repeat;
  opacity: 0.12;
  mix-blend-mode: luminosity;
  pointer-events: none;
}
body[class*="shard-theme--"] .hero > .container { position: relative; z-index: 1; }
body[class*="shard-theme--"] .hero__title { color: var(--s-title); }
body[class*="shard-theme--"] .hero__lede { color: var(--s-text); }
body[class*="shard-theme--"] .hero .eyebrow { color: var(--s-accent); }

/* Footer */
body[class*="shard-theme--"] .site-footer {
  background: var(--s-body-bg);
  border-top-color: var(--s-line);
  color: var(--s-text);
}
body[class*="shard-theme--"] .site-footer h4 { color: var(--s-title); }
body[class*="shard-theme--"] .site-footer p,
body[class*="shard-theme--"] .site-footer a { color: var(--s-text); }
body[class*="shard-theme--"] .site-footer a:hover { color: var(--s-accent); }
body[class*="shard-theme--"] .site-footer__bottom { border-top-color: var(--s-line); }
body[class*="shard-theme--"] .social-links a { border-color: var(--s-line); }
body[class*="shard-theme--"] .social-links a:hover { border-color: var(--s-accent); }

/* Content below the shard panels (the Overview / features / screenshot blocks
   moved over from games.html) uses the default green surface tokens. Re-map
   them to the active shard so the page doesn't turn green again below the
   fold. */
body[class*="shard-theme--"] .section--alt {
  background: var(--s-body-bg);
  border-top-color: var(--s-line);
  border-bottom-color: var(--s-line);
}
body[class*="shard-theme--"] .card,
body[class*="shard-theme--"] .game-feature {
  background: var(--s-surface);
}
body[class*="shard-theme--"] .game-feature,
body[class*="shard-theme--"] .card:not(.shard-card) {
  border-color: var(--s-line);
}
body[class*="shard-theme--"] .game-feature__art,
body[class*="shard-theme--"] .media-frame {
  background: var(--s-body-bg);
  border-color: var(--s-line);
}
body[class*="shard-theme--"] .shard-card__hint {
  background: color-mix(in srgb, var(--s-body-bg) 78%, transparent);
  color: var(--s-title);
}
body[class*="shard-theme--"] .card h3,
body[class*="shard-theme--"] .game-feature__content h3,
body[class*="shard-theme--"] .section-header h2 { color: var(--s-title); }
body[class*="shard-theme--"] .card p,
body[class*="shard-theme--"] .game-feature__content p,
body[class*="shard-theme--"] .media-frame__fallback { color: var(--s-text); }
body[class*="shard-theme--"] .section-header .eyebrow { color: var(--s-accent); }
body[class*="shard-theme--"] .game-feature__tags .tag {
  border-color: var(--s-line);
  color: var(--s-text);
}
