/* ══════════════════════════════════════
   THEME DEFINITIONS
══════════════════════════════════════ */
[data-theme="orange"] {
  --bg: #F5A623; --bg2: #E8920A; --surface: #FFF3DC; --dark: #1E1004;
  --accent: #FF6B35; --accent2: #FDD17A; --text-on-bg: #1E1004;
  --text-muted: #7A4A10; --nav-bg: #1E1004; --pill-bg: #FF6B35;
  --pill-text: #FFF3DC; --tag-color: #FF6B35; --stamp: #c7730a;
}
[data-theme="green"] {
  --bg: #3A7D44; --bg2: #2d6436; --surface: #EEF7EF; --dark: #0D1F10;
  --accent: #7BC67E; --accent2: #C8EAC9; --text-on-bg: #EEF7EF;
  --text-muted: #a8d4ab; --nav-bg: #0D1F10; --pill-bg: #7BC67E;
  --pill-text: #0D1F10; --tag-color: #7BC67E; --stamp: #2a5c32;
}
[data-theme="tan"] {
  --bg: #C9A96E; --bg2: #b8945a; --surface: #FAF3E4; --dark: #2B1D0A;
  --accent: #8B5E3C; --accent2: #EDD9B0; --text-on-bg: #2B1D0A;
  --text-muted: #6b4520; --nav-bg: #2B1D0A; --pill-bg: #8B5E3C;
  --pill-text: #FAF3E4; --tag-color: #8B5E3C; --stamp: #7a4a28;
}
[data-theme="charcoal"] {
  --bg: #2E2E2E; --bg2: #1a1a1a; --surface: #F0EDEA; --dark: #0A0A0A;
  --accent: #F5A623; --accent2: #FDD17A; --text-on-bg: #F0EDEA;
  --text-muted: #aaaaaa; --nav-bg: #0A0A0A; --pill-bg: #F5A623;
  --pill-text: #0A0A0A; --tag-color: #F5A623; --stamp: #555555;
}
[data-theme="pink"] {
  --bg: #F2A7C3; --bg2: #e090b0; --surface: #FFF0F5; --dark: #2D0A1A;
  --accent: #E8457A; --accent2: #FFD6E7; --text-on-bg: #2D0A1A;
  --text-muted: #9A3060; --nav-bg: #2D0A1A; --pill-bg: #E8457A;
  --pill-text: #FFF0F5; --tag-color: #E8457A; --stamp: #b5316a;
}
[data-theme="marsh"] {
  --bg: #7C8C5E; --bg2: #6B7A4F; --surface: #F4EFE1; --dark: #1E2010;
  --accent: #C4622D; --accent2: #E8D5A3; --text-on-bg: #1E2010;
  --text-muted: #4A5230; --nav-bg: #1E2010; --pill-bg: #C4622D;
  --pill-text: #F4EFE1; --tag-color: #C4622D; --stamp: #5C6B3A;
}
[data-theme="slate"] {
  --bg: #5B7FA6; --bg2: #4A6E94; --surface: #EEF3F8; --dark: #0D1A26;
  --accent: #7EC8C8; --accent2: #C8DFF0; --text-on-bg: #0D1A26;
  --text-muted: #2E5070; --nav-bg: #0D1A26; --pill-bg: #7EC8C8;
  --pill-text: #0D1A26; --tag-color: #7EC8C8; --stamp: #3A5F80;
}

/* ══════════════════════════════════════
   RESET & BASE
══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --font-display: 'Fredoka One', cursive;
  --font-body: 'Nunito', sans-serif;
  --radius-pill: 999px;
  --radius-card: 20px;
  --shadow-card: 5px 5px 0px var(--dark);
  --transition: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-on-bg);
  font-family: var(--font-body);
  font-weight: 700;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.07) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════
   HIATUS BANNER
══════════════════════════════════════ */
.hiatus-banner {
  background: var(--dark);
  border-bottom: 3px solid var(--accent);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  text-align: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 101;
  transition: background 0.4s, border-color 0.4s;
}
.hiatus-banner-text {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--accent2);
  letter-spacing: 0.02em;
  transition: color 0.4s;
}
.hiatus-pill {
  background: var(--accent);
  color: var(--dark);
  font-weight: 900;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--dark);
  flex-shrink: 0;
  transition: background 0.4s;
}

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--bg);
  transition: background 0.4s, border-color 0.4s;
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-mark {
  width: 42px; height: 42px;
  background: var(--bg);
  border: 3px solid var(--accent2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  font-family: var(--font-display);
  color: var(--dark);
  font-weight: 400;
  line-height: 1;
  transition: transform var(--transition), background 0.4s;
  flex-shrink: 0;
}
.nav-logo:hover .logo-mark { transform: rotate(-8deg) scale(1.1); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--bg);
  transition: color 0.4s;
  letter-spacing: 0.01em;
}
.logo-sub {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
  transition: color 0.4s;
}
.nav-links { display: flex; gap: 0.3rem; list-style: none; }
.nav-links a {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { background: rgba(255,255,255,0.08); color: var(--bg); }
.nav-links a.active { color: var(--bg); background: rgba(255,255,255,0.15); }

/* ══════════════════════════════════════
   BIRD FACT BAR
══════════════════════════════════════ */
.bird-fact-bar {
  background: var(--bg2, var(--bg));
  border-top: 3px solid rgba(0,0,0,0.2);
  border-bottom: 3px solid var(--dark);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  transition: background 0.4s;
}
.fact-label {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--dark); color: var(--accent);
  font-weight: 900; font-size: 0.62rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  transition: color 0.4s;
}
.fact-text {
  font-size: 0.88rem; font-weight: 800;
  color: var(--dark); line-height: 1.5;
  flex: 1; min-width: 200px; opacity: 0.85;
  transition: color 0.4s;
}
.fact-refresh {
  background: var(--dark); color: var(--accent2);
  border: 2.5px solid var(--dark);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  cursor: pointer; flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
.fact-refresh:hover { transform: scale(1.08); }
.fact-refresh.spin { animation: spinOnce 0.4s ease; }
@keyframes spinOnce { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  background: var(--dark);
  padding: 2.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 3px solid var(--bg);
  position: relative;
  z-index: 1;
  transition: background 0.4s, border-color 0.4s;
}
.footer-brand { font-family: var(--font-display); font-size: 1rem; color: var(--bg); transition: color 0.4s; }
.footer-brand span { color: var(--accent); transition: color 0.4s; }
.footer-links { display: flex; gap: 0.3rem; list-style: none; }
.footer-links a {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  color: rgba(255,255,255,0.4);
  font-weight: 800; font-size: 0.72rem;
  text-decoration: none; transition: all 0.2s;
}
.footer-links a:hover { color: var(--bg); background: rgba(255,255,255,0.07); }
.footer-copy { font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.25); letter-spacing: 0.05em; }

/* ══════════════════════════════════════
   THEME SWITCHER
══════════════════════════════════════ */
.theme-switcher {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem;
}
.theme-toggle-btn {
  background: var(--dark); color: var(--accent2);
  border: 3px solid var(--accent2);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.1rem;
  font-family: var(--font-display); font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 0.5rem;
  box-shadow: 3px 3px 0 var(--dark);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.theme-toggle-btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--dark); }
.theme-palette {
  display: none; flex-direction: column; gap: 0.4rem; align-items: flex-end;
  animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.theme-palette.open { display: flex; }
.theme-option {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--dark);
  border: 2.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem 0.45rem 0.55rem;
  cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
  transition: all 0.2s ease; white-space: nowrap;
}
.theme-option:hover { border-color: rgba(255,255,255,0.5); color: #fff; transform: translateX(-3px); }
.theme-option.active { border-color: var(--accent); color: var(--accent); }
.theme-swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); flex-shrink: 0; }
.swatch-orange   { background: #F5A623; }
.swatch-green    { background: #3A7D44; }
.swatch-tan      { background: #C9A96E; }
.swatch-charcoal { background: #2E2E2E; }
.swatch-pink     { background: #F2A7C3; }
.swatch-marsh    { background: #7C8C5E; }
.swatch-slate    { background: #5B7FA6; }

/* ══════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2,0,0,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ══════════════════════════════════════
   SHARED ANIMATIONS
══════════════════════════════════════ */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes tiltFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}
@keyframes blink {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:0.4; transform:scale(0.7); }
}

/* ══════════════════════════════════════
   SPIN / WOBBLE (mascots)
══════════════════════════════════════ */
.spin-me {
  cursor: pointer;
  display: block;
  transform-origin: center center;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.spin-me.spinning { animation: spin-once 0.7s ease-in-out; }
.spin-me:active   { transform: scale(0.95); }
@keyframes spin-once {
  0%   { transform: rotate(0deg) scale(1); }
  70%  { transform: rotate(380deg) scale(1.05); }
  85%  { transform: rotate(350deg) scale(0.98); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ══════════════════════════════════════
   MOBILE NAV
══════════════════════════════════════ */
@media (max-width: 768px) {
  nav {
    padding: 0.75rem 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .nav-logo { width: 100%; align-items: center; }
  .logo-mark { width: 38px; height: 38px; font-size: 1.1rem; }
  .logo-title { font-size: 0.98rem; line-height: 1.05; }
  .logo-sub { font-size: 0.54rem; letter-spacing: 0.14em; margin-top: 3px; }
  .nav-links {
    width: 100%; display: flex; gap: 0.45rem;
    flex-wrap: nowrap; overflow-x: auto;
    white-space: nowrap; padding-bottom: 2px;
    -ms-overflow-style: none; scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links li { flex: 0 0 auto; }
  .nav-links a { flex: 0 0 auto; white-space: nowrap; font-size: 0.74rem; padding: 0.42rem 0.8rem; }
  .theme-switcher { bottom: 1rem; right: 1rem; }
  .theme-toggle-btn { font-size: 0.78rem; padding: 0.48rem 0.95rem; }
  .theme-option { font-size: 0.72rem; }
}
