/* =====================================================================
   HERDLES — cozy one-pager theme
   ---------------------------------------------------------------------
   Layered on top of Bootstrap 5 (loaded via CDN in index.html).

   >> TO RECOLOR THE WHOLE SITE: edit the variables in :root below. <<
   Everything (buttons, links, accents, cards) reads from these.
   ===================================================================== */

:root {
  /* ---- Brand palette (cozy / warm / colorful) ---- */
  --primary: #2FA866;        /* grassy green — main brand colour     */
  --primary-dark: #1F7D4C;   /* hover / pressed states               */
  --accent: #FFB23E;         /* sunny amber — highlights & badges    */
  --accent-2: #FF7E6B;       /* warm coral — secondary pops          */
  --sky: #6EC1E4;            /* friendly sky blue                    */

  /* ---- Surfaces & text ---- */
  --bg: #FFF8EF;             /* page background (warm cream)          */
  --bg-alt: #FDEEDC;         /* alternating section background        */
  --surface: #FFFFFF;        /* cards & panels                        */
  --ink: #33291F;            /* primary text (warm near-black)        */
  --muted: #665849;          /* secondary text                        */
  --line: #EFE2D2;           /* hairline borders                      */

  /* ---- Shape & depth ---- */
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(51, 41, 31, 0.10);
  --shadow-sm: 0 6px 18px rgba(51, 41, 31, 0.08);

  /* ---- Map our palette onto Bootstrap's tokens ---- */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 47, 168, 102;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--line);
  --bs-link-color: var(--primary-dark);
  --bs-link-hover-color: var(--primary);
  --bs-secondary-color: var(--muted);   /* darker muted text → WCAG AA */
}

/* ---------------------------------------------------------------------
   Base & typography
   ------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, .display-1, .display-2, .display-3 {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

a { text-decoration: none; }

/* Small uppercase label that sits above section titles */
.eyebrow {
  display: inline-block;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: rgba(47, 168, 102, 0.12);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.9rem, 4vw, 2.75rem); }
.section-lead { color: var(--muted); font-size: 1.15rem; max-width: 46rem; }

/* Anchor offset so the fixed navbar never covers a section heading */
section[id] { scroll-margin-top: 90px; }

/* ---------------------------------------------------------------------
   Buttons (Bootstrap 5.3 reads these per-button CSS vars)
   ------------------------------------------------------------------- */
.btn { font-family: "Fredoka", sans-serif; font-weight: 500; border-radius: 999px; }
.btn-lg { padding: 0.8rem 1.9rem; }

.btn-primary {
  --bs-btn-bg: var(--primary-dark);          /* darker green → white text passes WCAG AA */
  --bs-btn-border-color: var(--primary-dark);
  --bs-btn-hover-bg: #17613b;
  --bs-btn-hover-border-color: #17613b;
  --bs-btn-active-bg: #17613b;
  --bs-btn-active-border-color: #17613b;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--primary-dark);
  --bs-btn-disabled-border-color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(31, 125, 76, 0.30);
}

.btn-outline-primary {
  --bs-btn-color: var(--primary-dark);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--primary);
  --bs-btn-active-border-color: var(--primary);
}

/* ---------------------------------------------------------------------
   Navbar — translucent over the hero, solid after scrolling
   ------------------------------------------------------------------- */
.navbar {
  background: rgba(255, 248, 239, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.navbar.scrolled {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.navbar-brand {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  padding-top: 0;
  padding-bottom: 0;
}
.navbar-brand img { height: 48px; width: auto; display: block; }
.navbar .nav-link {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0.15rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem !important;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus { color: var(--primary-dark); background: rgba(47, 168, 102, 0.10); }

/* ---------------------------------------------------------------------
   Hero — cinematic (background image + inline video + logo + CTAs)
   ------------------------------------------------------------------- */
.hero-cinematic {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;            /* avoids mobile URL-bar jump where supported */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 0 4rem;          /* top padding clears the fixed navbar */
  background: #1a1410 url("../assets/images/library_hero.jpg") center / cover no-repeat;
  overflow: hidden;
}
/* Darkening for legibility + a bottom fade into the page background */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(80rem 60rem at 50% 38%, rgba(0,0,0,0.05), rgba(0,0,0,0.55) 78%),
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 45%, rgba(0,0,0,0.30) 72%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
a.hero-badge { text-decoration: none; transition: background 0.2s ease, transform 0.2s ease; }
a.hero-badge:hover { background: rgba(255, 255, 255, 0.26); transform: translateY(-1px); color: #fff; }
.live-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #36d77a; margin-right: 0.55rem; flex: none; }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: livePulse 1.8s ease-out infinite; } }
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(54, 215, 122, 0.55); }
  70%  { box-shadow: 0 0 0 0.5rem rgba(54, 215, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(54, 215, 122, 0); }
}

.hero-logo {
  display: block;
  width: min(440px, 78vw);
  height: auto;
  margin: 0 auto 1.75rem;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}
.hero-logo-h1 { margin: 0; }   /* the hero logo is the page's <h1> */

.hero-video-frame {
  width: min(800px, 92vw);
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.hero-video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-cta { margin-top: 2rem; }

/* Scroll-down indicator */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.6rem;
  line-height: 1;
}
.hero-scroll:hover { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll { animation: heroBounce 1.8s ease-in-out infinite; }
}
@keyframes heroBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ---------------------------------------------------------------------
   Media placeholder tiles (screenshots, trailer, videos, hero art)
   Replace these with real <img>/<iframe> — see assets/images/README.md
   ------------------------------------------------------------------- */
.ph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: var(--radius);
  border: 2px dashed rgba(47, 168, 102, 0.45);
  background:
    repeating-linear-gradient(45deg, rgba(47,168,102,0.05) 0 14px, rgba(110,193,228,0.05) 14px 28px),
    var(--surface);
  color: var(--muted);
  font-family: "Fredoka", sans-serif;
  padding: 1rem;
  overflow: hidden;
}
.ph .ph-label { font-weight: 600; color: var(--primary-dark); }
.ph .ph-hint { font-size: 0.8rem; }
.ratio .ph { width: 100%; height: 100%; border-radius: var(--radius); }
.trailer-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* Inspiration section — Snoopy promo video (12:5 ultrawide) */
.snoopy-frame { margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.snoopy-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------------------------
   Cards (features, creatures, regions, media, system)
   ------------------------------------------------------------------- */
.card-cozy {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  font-size: 1.7rem;
  border-radius: 16px;
  background: rgba(47, 168, 102, 0.12);
  margin-bottom: 1rem;
}

/* List blocks in the "Master Your Abilities" section */
.ability-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); height: 100%; }
.ability-group h3 { font-size: 1.15rem; }
.ability-list { list-style: none; padding: 0; margin: 0; }
.ability-list li { padding: 0.45rem 0; border-top: 1px dashed var(--line); }
.ability-list li:first-child { border-top: 0; }
.ability-list li strong { color: var(--ink); }

/* Accessibility section: current / planned feature lists */
.access-list li { display: flex; gap: 0.65rem; padding: 0.55rem 0; border-top: 1px dashed var(--line); }
.access-list li:first-child { border-top: 0; }
.access-list li i { margin-top: 0.2rem; font-size: 1.05rem; flex-shrink: 0; }
.access-list--current li i { color: var(--primary); }
.access-list--planned li i { color: #c98a16; }

/* Screenshot grid tiles keep a 16:9 frame and zoom on hover */
.shot { display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.25s ease; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot:hover { transform: scale(1.03); z-index: 2; }
.shot:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Region cards get a colourful top accent bar */
.region-card .accent-bar { height: 8px; border-radius: var(--radius) var(--radius) 0 0; }

/* Pro-tip / story callouts */
.callout {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(255,178,62,0.14), rgba(110,193,228,0.14));
  box-shadow: var(--shadow-sm);
}

/* Language chips */
.chip {
  display: inline-block;
  background: rgba(110, 193, 228, 0.18);
  color: #1c5f7c;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin: 0.2rem;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------
   FAQ accordion
   ------------------------------------------------------------------- */
.accordion {
  --bs-accordion-border-color: var(--line);
  --bs-accordion-border-radius: var(--radius-sm);
  --bs-accordion-active-bg: rgba(47, 168, 102, 0.10);
  --bs-accordion-active-color: var(--primary-dark);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(47, 168, 102, 0.20);
}
.accordion-button { font-family: "Fredoka", sans-serif; font-weight: 500; }
.accordion-item { margin-bottom: 0.75rem; border-radius: var(--radius-sm); overflow: hidden; }

/* ---------------------------------------------------------------------
   Final call-to-action band
   ------------------------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(40rem 30rem at 90% 120%, rgba(255,126,107,0.30), transparent 60%),
    linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 28px;
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band .btn-outline-light { --bs-btn-hover-color: var(--primary-dark); }

/* ---------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */
.site-footer { background: #2A2118; color: #d8cdbf; }
.site-footer a { color: #d8cdbf; }
.site-footer a:hover { color: #fff; }
.site-footer h5 { color: #fff; font-size: 1rem; }
.site-footer .brand { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.3rem; color: #fff; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); font-size: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-link:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.10); }

/* Legal pages (privacy / terms / imprint) — sticky footer + readable column */
body.legal-page { display: flex; flex-direction: column; min-height: 100vh; }
body.legal-page main { flex: 1 0 auto; }
.legal { max-width: 880px; padding-top: 7rem; padding-bottom: 4rem; }
.legal h1 { margin-bottom: 0.25rem; }
.legal h2 { margin-top: 2.25rem; font-size: 1.35rem; }
.legal h2:first-of-type { margin-top: 1.5rem; }
.legal address { font-style: normal; line-height: 1.9; }
.legal .updated { color: var(--muted); margin-bottom: 2rem; }

/* ---------------------------------------------------------------------
   Small-screen tweaks
   ------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .navbar { background: var(--surface); box-shadow: var(--shadow-sm); }
  .navbar-collapse { padding-top: 0.5rem; }
  .section { padding: 4rem 0; }
}
