/* ============================================================
   Spiral Game Breeders — shared stylesheet
   Rebuild of spiralgamebreeders.com for Cloudflare Pages
   Built 2026-07-01. GL-003 was empty, so a local token set
   is defined below (earthy premium safari/bush aesthetic).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Colour palette — deep bush green + tan/khaki + off-white */
  --color-bush:        #2e3a24;  /* deep bush green — headers, footer, primary */
  --color-bush-dark:   #222b1a;  /* darker green — hovers, overlays */
  --color-olive:       #4a5836;  /* mid olive — accents, borders */
  --color-khaki:       #a08a5a;  /* tan / khaki — button fill, dividers, decorative */
  --color-khaki-dark:  #8a7548;  /* khaki hover */
  --color-khaki-text:  #6d5c30;  /* AA-safe khaki for text on light surfaces (>=4.5:1) */
  --color-khaki-light: #d0bb86;  /* AA-safe khaki for text/accents on dark surfaces */
  --color-sand:        #efe9dc;  /* warm sand — elevated surfaces */
  --color-cream:       #f7f4ec;  /* off-white — page canvas */
  --color-ink:         #26271f;  /* body text */
  --color-muted:       #5f5d4f;  /* muted text */
  --color-line:        #d8cfba;  /* borders, dividers */
  --color-white:       #ffffff;

  /* Typography */
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Type scale */
  --text-display: clamp(2.6rem, 6vw, 5rem);
  --text-h1:      clamp(2rem, 4.5vw, 3.4rem);
  --text-h2:      clamp(1.6rem, 3vw, 2.4rem);
  --text-h3:      clamp(1.25rem, 2vw, 1.6rem);
  --text-body:    1.05rem;
  --text-small:   0.875rem;

  /* Spacing (8px base) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --maxw: 1180px;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(34, 43, 26, 0.12);
  --nav-h: 84px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-olive); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--color-bush);
  margin: 0 0 var(--space-sm);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p { margin: 0 0 var(--space-sm); }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-md); }

.section { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-lg); }
.section--sand { background: var(--color-sand); }
.section--bush { background: var(--color-bush); color: var(--color-cream); }
.section--bush h1, .section--bush h2, .section--bush h3 { color: var(--color-cream); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-khaki-text);
  margin: 0 0 var(--space-xs);
}

.section--bush .eyebrow { color: var(--color-khaki-light); }

.lead { font-size: 1.2rem; color: var(--color-muted); max-width: 62ch; }

.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 68ch; }
.measure-center { max-width: 68ch; margin-inline: auto; }

.divider {
  width: 64px; height: 3px; border: 0;
  background: var(--color-khaki);
  margin: var(--space-sm) 0 var(--space-md);
}
.center .divider, .divider.mx-auto { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: var(--text-small);
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  border: 2px solid var(--color-khaki);
  background: var(--color-khaki);
  color: var(--color-bush-dark);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--color-khaki-dark); border-color: var(--color-khaki-dark); color: var(--color-white); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--color-cream); border-color: var(--color-cream); }
.btn--ghost:hover { background: var(--color-cream); color: var(--color-bush); border-color: var(--color-cream); }
.btn--dark { background: var(--color-bush); border-color: var(--color-bush); color: var(--color-cream); }
.btn--dark:hover { background: var(--color-bush-dark); border-color: var(--color-bush-dark); color: var(--color-white); }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(46, 58, 36, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(160, 138, 90, 0.35);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md);
  height: var(--nav-h);
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-md);
}
.nav__brand { display: flex; align-items: center; gap: 0.75rem; }
.nav__brand img { height: 56px; width: auto; border-radius: 3px; }
.nav__brand-text { display: none; }

.nav__toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 8px;
}
.nav__toggle span { display: block; height: 2px; background: var(--color-cream); margin: 6px 0; transition: transform .25s, opacity .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav__menu {
  display: flex; align-items: center; gap: 0.35rem;
  list-style: none; margin: 0; padding: 0;
}
.nav__link {
  display: inline-block;
  color: var(--color-cream);
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav__link:hover, .nav__link:focus-visible { color: var(--color-khaki-light); text-decoration: none; }
/* Active page: colour + a non-colour cue (weight + underline) to satisfy WCAG 1.4.1 */
.nav__link[aria-current="page"] {
  color: var(--color-khaki-light);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--color-khaki-light);
}
.nav__submenu a[aria-current="page"] {
  color: var(--color-khaki-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dropdown (GAME) */
.nav__item--has-menu { position: relative; }
.nav__dropdown-toggle {
  font: inherit; background: none; border: 0; cursor: pointer;
  color: var(--color-cream);
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
  padding: 0.6rem 0.7rem; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.nav__dropdown-toggle:hover, .nav__dropdown-toggle:focus-visible { color: var(--color-khaki-light); }
.nav__dropdown-toggle::after { content: "\25BE"; font-size: 0.7em; }
.nav__submenu {
  position: absolute; top: 100%; left: 0;
  min-width: 190px;
  background: var(--color-bush-dark);
  border: 1px solid rgba(160, 138, 90, 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 0.4rem;
  display: none;
}
.nav__item--has-menu:hover .nav__submenu,
.nav__item--has-menu:focus-within .nav__submenu,
.nav__submenu[data-open="true"] { display: block; }
.nav__submenu a {
  display: block; color: var(--color-cream);
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.6rem 0.8rem; border-radius: var(--radius);
}
.nav__submenu a:hover, .nav__submenu a:focus-visible { background: var(--color-olive); color: var(--color-white); text-decoration: none; }

:focus-visible { outline: 3px solid var(--color-khaki); outline-offset: 2px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--color-white);
  background-size: cover; background-position: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(34,43,26,0.55), rgba(34,43,26,0.75));
}
.hero__inner { position: relative; z-index: 1; max-width: 900px; padding: var(--space-xl) var(--space-md); }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 0.4em; font-size: 0.9rem; color: var(--color-khaki-light); margin-bottom: var(--space-sm); }
.hero h1 { color: var(--color-white); font-size: var(--text-display); letter-spacing: 0.02em; }
.hero__tagline { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.95rem; color: var(--color-sand); margin-top: var(--space-sm); }

/* Page banner (interior pages) */
.page-banner {
  position: relative;
  padding-block: var(--space-2xl);
  text-align: center; color: var(--color-white);
  background-size: cover; background-position: center;
  background-color: var(--color-bush);
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: rgba(34,43,26,0.6); }
.page-banner__inner { position: relative; z-index: 1; }
.page-banner h1 { color: var(--color-white); }

/* ============================================================
   Content blocks
   ============================================================ */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-lg); align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }

.prose p { max-width: 70ch; }
.prose h3 { margin-top: var(--space-md); }

/* Card grid (galleries, game hub, animal cards) */
.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.gallery img {
  width: 100%; height: 240px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

.placeholder-tile {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 200px; padding: var(--space-md);
  background: repeating-linear-gradient(45deg, var(--color-sand), var(--color-sand) 12px, #e7dfcd 12px, #e7dfcd 24px);
  border: 1px dashed var(--color-khaki);
  border-radius: var(--radius);
  color: var(--color-muted); font-size: var(--text-small);
}

/* Feature card */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card img { width: 100%; height: 220px; object-fit: cover; }
.card__body { padding: var(--space-md); }
.card__body h3 { margin-top: 0; }

/* Big hub card (GAME page) */
.hub-card {
  position: relative; display: block;
  min-height: 420px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  color: var(--color-white);
  background-size: cover; background-position: center;
}
.hub-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34,43,26,0.15), rgba(34,43,26,0.8)); transition: background .3s; }
.hub-card:hover::before { background: linear-gradient(180deg, rgba(34,43,26,0.3), rgba(34,43,26,0.85)); }
.hub-card:hover { text-decoration: none; }
.hub-card__label {
  position: absolute; inset: auto 0 0 0; z-index: 1; padding: var(--space-lg);
}
.hub-card__label h2 { color: var(--color-white); margin-bottom: 0.25rem; }
.hub-card__label span { text-transform: uppercase; letter-spacing: 0.2em; font-size: var(--text-small); color: var(--color-khaki-light); }

/* Animal profile block */
.animal {
  display: grid; grid-template-columns: 320px 1fr; gap: var(--space-lg);
  align-items: start;
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--color-line);
}
.animal:last-child { border-bottom: 0; }
.animal img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.animal h3 { margin-top: 0; }
.animal .placeholder-tile { min-height: 260px; }

/* ============================================================
   Video (responsive iframe)
   ============================================================ */
.video-embed {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: var(--radius); overflow: hidden;
  background: var(--color-bush-dark); box-shadow: var(--shadow);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-card { background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-card__body { padding: var(--space-md); }
.video-card__body h3 { margin-top: 0; }

.video-placeholder {
  position: relative; width: 100%; padding-top: 56.25%;
  background: var(--color-bush); border-radius: var(--radius);
}
.video-placeholder span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: var(--space-md);
  color: var(--color-sand); font-size: var(--text-small); letter-spacing: 0.05em;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.field { margin-bottom: var(--space-sm); }
.field label { display: block; font-size: var(--text-small); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.35rem; color: var(--color-bush); }
.field input, .field textarea {
  width: 100%; padding: 0.8rem 0.9rem;
  font: inherit; color: var(--color-ink);
  background: var(--color-white);
  border: 1px solid var(--color-line); border-radius: var(--radius);
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--color-khaki); outline-offset: 1px; border-color: var(--color-khaki); }
.field textarea { min-height: 150px; resize: vertical; }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { margin-bottom: var(--space-sm); }
.info-list strong { display: block; text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--text-small); color: var(--color-khaki-text); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--color-bush-dark); color: var(--color-sand); padding-block: var(--space-lg); }
.site-footer h2 { color: var(--color-cream); font-size: var(--text-h3); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-lg); }
.site-footer a { color: var(--color-sand); }
.site-footer a:hover { color: var(--color-khaki); }
.footer-social img { width: 34px; height: 34px; border-radius: 50%; background: var(--color-cream); padding: 4px; }
.footer-social a { display: inline-block; }
.footer-bottom { border-top: 1px solid rgba(160,138,90,0.3); margin-top: var(--space-lg); padding-top: var(--space-sm); font-size: var(--text-small); color: var(--color-muted); }
.footer-bottom .container { color: #b9b3a0; }

/* ============================================================
   Responsive — single breakpoint at 768px
   ============================================================ */
@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bush-dark);
    border-top: 1px solid rgba(160,138,90,0.35);
    padding: var(--space-xs);
    display: none;
  }
  .nav__menu[data-open="true"] { display: flex; }
  .nav__link, .nav__dropdown-toggle { width: 100%; padding: 0.9rem 0.7rem; font-size: 0.95rem; }
  .nav__item--has-menu { position: static; }
  .nav__submenu { position: static; display: none; box-shadow: none; border: 0; background: rgba(0,0,0,0.2); margin: 0 0 0 var(--space-sm); }
  .nav__submenu[data-open="true"] { display: block; }
  .nav__dropdown-toggle::after { margin-left: auto; }

  .split, .grid--2, .contact-grid, .footer-inner { grid-template-columns: 1fr; }
  .animal { grid-template-columns: 1fr; }
  .hero { min-height: 68vh; }
  .page-banner { padding-block: var(--space-xl); }
}
