/* =============================================================================
   BEAR WARRIORS UNITED — FLORIDA FIELD JOURNAL
   Aesthetic: Vintage naturalist field guide, editorial warmth, gold on forest
   Fonts: Zilla Slab (display) + Libre Franklin (body)
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:ital,wght@0,400;0,600;0,700;1,400&family=Libre+Franklin:wght@300;400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  /* Forest base — deep naturalist greens */
  --forest:       #0c1a0d;
  --canopy:       #122017;
  --understory:   #1a2e1e;
  --grove:        #243828;
  --fern:         #2d4a33;
  --bark:         #3a2812;
  --bark-warm:    #4a3418;
  --leather:      #2a1e0c;
  --peat:         #1a1208;

  /* Gold ink palette — field journal accents */
  --gold:         #c8962a;
  --gold-warm:    #dba840;
  --gold-light:   #e8c060;
  --gold-dim:     #8a6418;
  --gold-ink:     rgba(200,150,42,0.18);
  --gold-wash:    rgba(200,150,42,0.07);
  --gold-rule:    rgba(200,150,42,0.28);

  /* Parchment — aged paper tones */
  --parchment:    #f0e8d0;
  --parchment-2:  #e4d8b8;
  --cream:        #ede0c0;
  --ivory:        #f8f2e4;
  --vellum:       rgba(240,232,208,0.85);

  /* Transparency layers */
  --mist:         rgba(240,232,208,0.05);
  --mist-mid:     rgba(240,232,208,0.10);
  --mist-strong:  rgba(240,232,208,0.16);
  --shadow:       rgba(0,0,0,0.55);
  --shadow-deep:  rgba(0,0,0,0.82);

  /* Layout */
  --sidebar-w:    320px;
  --header-h:     60px;
  --footer-h:     44px;
  --music-h:      80px;

  /* Easing */
  --ease-spring:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:     cubic-bezier(0.0, 0, 0.2, 1);
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) var(--peat);
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--peat); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

body {
  font-family: 'Libre Franklin', sans-serif;
  background: var(--forest);
  color: var(--cream);
  font-size: 16px;
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Subtle paper grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Vignette edges */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 110% 60% at 50% 50%, transparent 58%, rgba(0,0,0,0.3) 100%);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-warm); }

/* --- Progress Bar (field journal bookmark) --- */
.progress-bar-top {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 500;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-light));
  transition: width 0.15s linear;
  box-shadow: 0 0 8px rgba(200,150,42,0.6);
}

/* --- Tab Bar --- */
#tab-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(180deg,
    rgba(12,18,10,0.99) 0%,
    rgba(14,22,12,0.97) 100%);
  border-bottom: 1px solid var(--gold-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.7);
}

#tab-bar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

#tab-bar .brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* Logo badge — engraved gold seal */
#tab-bar .brand .logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%,
    var(--gold-light), var(--gold-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Zilla Slab', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--peat);
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px var(--gold-rule),
    0 0 16px rgba(200,150,42,0.35),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

#tab-bar .event-title {
  font-family: 'Zilla Slab', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  letter-spacing: 0.01em;
}

/* Tab pills — field guide index tabs */
#tab-bar .tab-buttons {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
  border-radius: 3px;
  border: 1px solid var(--gold-rule);
}

.tab-btn {
  padding: 7px 18px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: rgba(240,232,208,0.42);
  font-family: 'Libre Franklin', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.22s var(--ease-out);
  white-space: nowrap;
  text-transform: uppercase;
}

.tab-btn.active {
  background: linear-gradient(160deg, var(--gold-warm), var(--gold));
  color: var(--peat);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(200,150,42,0.4);
}

.tab-btn:hover:not(.active) {
  background: var(--mist-mid);
  color: var(--cream);
}

/* Live clock — field notes timestamp */
#tab-bar .live-clock {
  font-family: 'Zilla Slab', serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.03em;
  min-width: 90px;
  text-align: right;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
