/* Eudora Squirrels - shared styles for every page */

:root {
  --acorn: #6b3d1e;
  --bark: #071062;   /* City of Eudora navy (from cityofeudoraks.gov) */
  --fur: #b8673a;
  --leaf: #1d3a9e;   /* lighter navy for buttons and labels */
  --leaf-dark: #071062;
  --cream: #fbf5ea;
  --paper: #ffffff;
  --sun: #f2b632;
  --ink: #1a1f36;
  --muted: #555b70;
  --line: #e6d8c3;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(7, 16, 98, 0.12);
  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  transition: background-color 0.4s, filter 0.4s;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.15;
  color: var(--bark);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }

a { color: var(--leaf-dark); }
img { max-width: 100%; height: auto; display: block; }

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

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--bark);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
}
.logo img { width: 36px; height: 36px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--cream);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.15); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(242, 182, 50, 0.35), transparent 40%),
    linear-gradient(160deg, #fff6e3 0%, #f6e3c4 100%);
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-art { max-width: 340px; justify-self: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--leaf);
  margin: 0 0 8px;
}
.page-hero { padding: 40px 0 44px; }
.page-hero .wrap { grid-template-columns: 1fr auto; }
.page-hero .hero-art { max-width: 180px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--leaf);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--leaf-dark); }
.btn.secondary { background: transparent; color: var(--bark); border: 2px solid var(--bark); }
.btn.secondary:hover { background: var(--bark); color: var(--cream); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Sections and cards ---------- */
section { padding: 56px 0; }
section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-intro { max-width: 40em; color: var(--muted); margin-bottom: 28px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card .icon { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); }
.card h3 { margin-bottom: 6px; }

/* ---------- Placeholder marker (remove when real content arrives) ---------- */
.placeholder { position: relative; outline: 2px dashed #d08a2e; outline-offset: 4px; }
.placeholder::before {
  content: "PLACEHOLDER";
  position: absolute;
  top: -12px;
  right: 10px;
  background: #d08a2e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 999px;
  z-index: 1;
}
.photo-slot {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #efe2cc, #efe2cc 12px, #f6ecdb 12px, #f6ecdb 24px);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  padding: 16px;
}

/* ---------- Suspect cards ---------- */
.suspect { text-align: center; }
.suspect img { width: 120px; margin: 0 auto 10px; }
.suspect .tag {
  display: inline-block;
  background: #fde9b8;
  color: var(--acorn);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.flip-x { transform: scaleX(-1); }

/* ---------- Scoreboard ---------- */
.scoreboard { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 560px; }
.score { text-align: center; padding: 18px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.score .num { font-family: "Fraunces", Georgia, serif; font-size: 2.6rem; font-weight: 800; color: var(--acorn); }
.score .num.small { font-size: 1.8rem; line-height: 1.2; padding: 6px 0; }

/* ---------- Events list ---------- */
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.event { display: grid; grid-template-columns: 90px 1fr; gap: 18px; align-items: start; }
.event .date {
  background: var(--leaf);
  color: #fff;
  border-radius: 12px;
  text-align: center;
  padding: 10px 6px;
  font-weight: 800;
  line-height: 1.2;
}
.event .date span { display: block; font-size: 1.7rem; font-family: "Fraunces", Georgia, serif; }

/* ---------- Lights-out fun ---------- */
body.lights-out { background: #1b130d; filter: brightness(0.35); }
.scamper {
  position: fixed;
  bottom: 18px;
  left: -140px;
  width: 110px;
  z-index: 50;
  pointer-events: none;
}
.scamper.go { animation: scamper 2.2s ease-in-out forwards; }
@keyframes scamper { to { left: calc(100% + 140px); } }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--leaf-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 60;
  max-width: calc(100% - 32px);
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  body, .scamper.go { transition: none; animation: none; }
}

/* ---------- Squirrel threat meter ---------- */
.meter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 24px;
  align-items: center;
}
.meter p { color: var(--muted); margin: 0; }
.pill {
  display: inline-block;
  background: #e3e8fb;
  color: var(--bark);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.pill-gold { background: var(--sun); color: var(--bark); margin: 0; }
.gauge { background: var(--bark); color: #fff; border-radius: 14px; padding: 20px; text-align: center; }
.gauge-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; }
.gauge-level { font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; font-weight: 800; color: var(--sun); margin: 4px 0 10px; }
.gauge-track { background: rgba(255, 255, 255, 0.15); height: 14px; border-radius: 999px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4caf50, var(--sun), #e0592a); transition: width 1s ease; }
.gauge-scale { display: flex; justify-content: space-between; font-size: 0.72rem; opacity: 0.75; margin-top: 6px; }
.ticker { margin: 16px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-weight: 700; }
.btn.secondary.light { color: var(--cream); border-color: var(--cream); }
.btn.secondary.light:hover { background: var(--cream); color: var(--bark); }

/* ---------- Grid Defender ---------- */
.arcade { background: var(--bark); color: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.arcade h2 { color: var(--sun); }
.arcade > p { color: rgba(255, 255, 255, 0.85); max-width: 46em; }
.game { position: relative; border-radius: 14px; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.2); }
.hud { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #040a3f; padding: 10px 14px; font-weight: 800; font-size: 0.95rem; }
.hud strong { color: var(--sun); font-size: 1.2rem; margin-left: 4px; }
.hud-health { display: flex; align-items: center; gap: 8px; flex: 0 1 220px; }
.health-track { flex: 1; height: 12px; background: rgba(255, 255, 255, 0.15); border-radius: 999px; overflow: hidden; }
.health-fill { height: 100%; width: 100%; background: #4caf50; transition: width 0.2s, background-color 0.2s; }
#grid-defender { display: block; width: 100%; height: 380px; touch-action: none; cursor: pointer; }
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 63, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.overlay[hidden] { display: none; }
.overlay h3 { color: var(--sun); font-size: clamp(1.6rem, 4vw, 2.4rem); }
.overlay p { max-width: 30em; color: rgba(255, 255, 255, 0.85); }
.btn-gold { background: var(--sun); color: var(--bark); }
.btn-gold:hover { background: #ffd060; }
.game-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; opacity: 0.75; margin-top: 10px; }

/* ---------- Trivia ---------- */
.trivia { max-width: 720px; }
.trivia-top { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--leaf); margin-bottom: 10px; }
.trivia-options { display: grid; gap: 10px; margin: 16px 0; }
.trivia-options button {
  text-align: left;
  font: inherit;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.trivia-options button:hover:not(:disabled) { border-color: var(--leaf); background: #eef1fc; }
.trivia-options button.right { border-color: #2e7d32; background: #e7f5e8; color: #1b5e20; }
.trivia-options button.wrong { border-color: #c62828; background: #fdecea; color: #8e1c1c; }
.trivia-feedback { font-weight: 800; padding: 12px; border-radius: 12px; background: #eef1fc; color: var(--bark) !important; }
.trivia-feedback[hidden] { display: none; }

@media (max-width: 760px) {
  .meter { grid-template-columns: 1fr; }
  #grid-defender { height: 340px; }
  .hud { font-size: 0.85rem; }
  .arcade { padding: 18px; }
}

/* ---------- News card (Squirrel Saga) ---------- */
.card.news { border-left: 6px solid var(--sun); align-self: start; }
.card.news h3 { font-size: 1.5rem; }
.card.news p { margin-bottom: 12px; }
.card.news blockquote { margin: 0 0 14px; padding: 10px 14px; background: #eef1fc; border-radius: 10px; font-style: italic; color: var(--bark); }
.card.news cite { display: block; margin-top: 6px; font-style: normal; font-weight: 700; font-size: 0.9rem; color: var(--muted); }

/* ---------- Photo with caption ---------- */
.photo { margin: 0; justify-self: center; max-width: 380px; }
.photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
.photo figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.photo .credit { display: block; font-size: 0.8rem; margin-top: 4px; }
.caught { margin: 36px auto 0; max-width: 640px; text-align: center; }
.caught img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.caught figcaption { margin-top: 12px; color: var(--muted); }
.caught figcaption strong { color: var(--ink); display: block; margin-bottom: 4px; }
.history-text .card { margin-top: 20px; }

/* ---------- Snapshot photos (home page) ---------- */
.snapshot { margin: 0; }
.snapshot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 65% center; border-radius: var(--radius); box-shadow: var(--shadow); }
.snapshot figcaption { font-size: 0.9rem; color: var(--muted); font-weight: 700; margin-top: 8px; }

/* ---------- Local spots (Explore page) ---------- */
.card.spot { padding: 0 0 22px; overflow: hidden; }
.card.spot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 16px; }
.card.spot h3, .card.spot p { padding: 0 22px; }
.card.spot .tag { font-weight: 700; color: var(--leaf); margin-bottom: 8px; }

.card p.more { margin-top: 10px; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bark);
  color: #e8d9c4;
  padding: 32px 0;
  font-size: 0.95rem;
}
.site-footer a { color: var(--sun); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer p { margin: 0 0 6px; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .hero .wrap, .page-hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 200px; grid-row: 1; }
  .page-hero .hero-art { max-width: 120px; }
  .event { grid-template-columns: 70px 1fr; }
}
