/* =============================================
   species.css  v1
   Shared layout for all species pages.
   Load order: main.css → species.css
   Tokens, fonts, and global components
   (np-cta, glass-frame, char-sign, info-card,
   list-block, forest-background-up, etc.)
   all come from main.css.
   This file owns species-page structure only.
   ============================================= */

/* ── Custom properties ───────────────────────── */
:root {
  --sp-bg:             #1b1606;
  --sp-accent:         #d37e0f;
  --sp-gold:           #d3a90f;
  --sp-parchment:      #f7f2e4;
  --sp-panel-border:   #ddd5c2;
  --sp-label:          #7A463A;
  --sp-body-ink:       #2d2d2b;
  --sp-light:          #e8dfc8;
  --sp-muted:          #c8b898;
  --sp-native-bg:      #1e4e03;
  --sp-native-text:    #c7e489;
  --sp-invader-bg:     rgb(95,2,2);
  --sp-invader-text:   #ffeeea;
  --sp-snap-native:    #c7e489;
  --sp-snap-intro:     #e8a87c;
  --sp-story-h3:       #d3a90f;
  --sp-story-link:     #f2d17c;
  --sp-status-green:   #345c30;
  --sp-status-ink:     #2e4c28;
  --sp-status-rule:    #c0d4ba;
}


/* ═══════════════════════════════════════════════
   HERO
   Design band (badge + title + essence) sits above
   the full-width photo. No text touches the image.
   ═══════════════════════════════════════════════ */
.sp-hero {
  width: 100%;
}

.sp-hero-band {
  background: var(--sp-bg);
  border-bottom: 3px solid var(--sp-accent);
  padding: 28px 48px;
}

/* Centers flex content within the full-width dark band */
.sp-hero-band-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.sp-hero-identity {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}

.sp-hero h1,
.sp-hero h2,
.sp-hero-name {
  font-family: 'National Park', Arial, sans-serif;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #f4ecd8;
  line-height: 1.06;
  margin: 0;
  text-align: left;
}

.sp-sci {
  font-family: 'Raleway', sans-serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--sp-gold);
  margin: 0;
  padding: 0;
}

.sp-essence {
  flex: 1 1 300px;
  max-width: 540px;
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  color: #e0d5be;
  line-height: 1.75;
  margin: 0;
}

.sp-hero-photo {
  width: 100%;
  line-height: 0;
}

.sp-hero-photo img {
  display: block;
  width: 100%;
  max-width: none;
  height: clamp(260px, 36vw, 520px);
  object-fit: cover;
  object-position: center center;
  margin: 0;
}

/* Status badges */
.sp-native-badge,
.sp-invader-badge {
  display: inline-block;
  font-family: 'National Park', Arial, sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 4px;
  width: fit-content;
}
.sp-native-badge  { background: var(--sp-native-bg);  color: var(--sp-native-text); }
.sp-invader-badge { background: var(--sp-invader-bg); color: var(--sp-invader-text); }

@media (max-width: 780px) {
  .sp-hero-band { padding: 24px 20px; }
  .sp-hero-band-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .sp-essence { max-width: 100%; flex-basis: auto; }
}


/* ═══════════════════════════════════════════════
   QUICK FACTS PANEL
   ═══════════════════════════════════════════════ */
.sp-facts-panel {
  max-width: 880px;
  margin: 22px auto 0;
  background: var(--sp-parchment);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.32);
}

.sp-facts-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.sp-facts-panel div {
  padding: 18px 22px;
  border-bottom: 1px solid var(--sp-panel-border);
  border-right: 1px solid var(--sp-panel-border);
}
.sp-facts-panel div:nth-child(even)      { border-right: none; }
.sp-facts-panel div:last-child,
.sp-facts-panel div:nth-last-child(2)    { border-bottom: none; }

.sp-facts-panel dt {
  font-family: 'National Park', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sp-label);
  margin-bottom: 5px;
}

.sp-facts-panel dd {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  color: var(--sp-body-ink);
  line-height: 1.5;
}

@media (max-width: 580px) {
  .sp-facts-panel dl                   { grid-template-columns: 1fr; }
  .sp-facts-panel div                  { border-right: none; }
  .sp-facts-panel div:nth-last-child(2){ border-bottom: 1px solid var(--sp-panel-border); }
  .sp-facts-panel div:last-child       { border-bottom: none; }
}


/* ═══════════════════════════════════════════════
   ID CUE PHOTO GRID
   ═══════════════════════════════════════════════ */
.sp-cue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 24px;
}

.sp-cue-grid figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(199,228,137,0.25);
}

.sp-cue-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  margin: 0;
}

.sp-cue-grid figcaption {
  padding: 12px 16px;
  font-family: 'National Park', Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e1d0a2;
  text-align: center;
}

/* list-block in ID section: match cue grid width, force dark text, balanced padding */
.sp-section .list-block {
  max-width: 1200px;
  color: #2d2d2b;
  padding: 22px 22px 14px;
}
.sp-section .list-block ul {
  margin-top: 0;
  margin-bottom: 0;
}
.sp-section .list-block p,
.sp-section .list-block li,
.sp-section .list-block strong {
  color: #2d2d2b;
}

/* CTA paragraph row spacing */
.sp-cta-row { margin-top: 28px; }

@media (max-width: 760px) {
  .sp-cue-grid { grid-template-columns: 1fr; gap: 14px; }
}


/* ═══════════════════════════════════════════════
   RANGE SECTION
   ═══════════════════════════════════════════════ */
.sp-section--range { background: rgba(0,0,0,0.22); }

.sp-prose {
  max-width: 760px;
  margin: 0 auto;
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  color: var(--sp-light);
  line-height: 1.75;
}
.sp-prose + .sp-prose        { margin-top: 16px; }
.sp-prose .sp-prose-secondary {
  color: var(--sp-muted);
  font-size: 0.97rem;
}


/* ═══════════════════════════════════════════════
   STORY HOOK CARDS
   ═══════════════════════════════════════════════ */
.sp-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 24px;
}

.sp-story-card {
  text-align: left;
  padding: 26px 28px;
}

.sp-story-card h3 {
  font-family: 'National Park', Arial, sans-serif;
  color: var(--sp-story-h3);
  text-align: left;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.sp-story-card p             { font-size: 0.97rem; }
.sp-story-card p:last-child  { font-size: 0.9rem; margin-bottom: 0; }
.sp-story-card a             { color: var(--sp-story-link); }

@media (max-width: 680px) {
  .sp-story-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════
   CONSERVATION / STATUS CARD
   ═══════════════════════════════════════════════ */
.sp-status-card {
  max-width: 900px;
  margin: 22px auto;
  text-align: left;
  padding: 28px 32px;
  background-color: var(--sp-parchment);
  color: var(--sp-body-ink);
}

.sp-status-card hr {
  border: none;
  border-top: 1px solid var(--sp-status-rule);
  margin: 20px 0 16px;
}

.sp-status-card h4 {
  text-align: left;
  color: var(--sp-status-green);
  font-family: 'National Park', Arial, sans-serif;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 10px;
}

.sp-status-card ul {
  font-size: 0.88rem;
  line-height: 1.7;
  padding-left: 18px;
  margin: 0;
  color: var(--sp-status-ink);
  max-width: none;
}

.sp-status-card a { color: var(--sp-status-ink); }


/* ═══════════════════════════════════════════════
   SPECIES SNAPSHOTS SECTION
   ═══════════════════════════════════════════════ */
.sp-snapshots-section {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top center;
  padding-bottom: 40px;
}

.sp-snapshots-section .sp-heading {
  padding-top: 36px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.9);
}

/* Pill treatment for subtitle legibility over busy forest background */
.sp-snapshots-section .sp-subhead {
  display: inline-block;
  background: rgba(0,0,0,0.55);
  padding: 5px 20px;
  border-radius: 30px;
  color: #e8dfc8;
  text-shadow: none;
}

.sp-snapshot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

/* Square, block-level snapshot cards */
.sp-snapshot-row .glass-frame {
  display: block;
  text-decoration: none;
  outline-offset: 4px;
}

.sp-snapshot-row .glass-frame img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  height: auto;
}

.sp-snap-label {
  font-family: 'National Park', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #efd56f;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 12px 4px;
  margin: 0;
}

.sp-snap-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  text-align: center;
  padding: 0 12px 10px;
  margin: 0;
}

.sp-snap-native     { color: var(--sp-snap-native); }
.sp-snap-introduced { color: var(--sp-snap-intro);  }

@media (max-width: 860px) {
  .sp-snapshot-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .sp-snapshot-row { grid-template-columns: repeat(2, 1fr); }
}


/* ═══════════════════════════════════════════════
   SPECIES PREV / NEXT NAV
   ═══════════════════════════════════════════════ */
.sp-species-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 8px;
}

.sp-species-nav a {
  font-family: 'National Park', Arial, sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f2d17c;
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid #6b4e2f;
  border-radius: 6px;
  background: rgba(0,0,0,0.35);
  transition: background 0.2s, color 0.2s;
}

.sp-species-nav a:hover {
  background: rgba(0,0,0,0.55);
  color: #ffe49c;
}


/* ═══════════════════════════════════════════════
   SECTION LAYOUT HELPERS
   ═══════════════════════════════════════════════ */
.sp-section       { padding: 48px 24px; }
.sp-section-inner { max-width: 1100px; margin: 0 auto; }

.sp-heading {
  font-family: 'National Park', Arial, sans-serif;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sp-accent);
  text-align: center;
  margin: 0 0 6px;
  letter-spacing: 0.04em;
}

.sp-subhead {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  color: var(--sp-muted);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 28px;
}


/* ═══════════════════════════════════════════════
   PAGE INTRO (top of species index page)
   ═══════════════════════════════════════════════ */
.sp-page-intro {
  text-align: center;
  padding: 44px 24px 8px;
  max-width: 760px;
  margin: 0 auto;
}

.sp-page-title {
  font-family: 'National Park', Arial, sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #f4ecd8;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}

.sp-page-lead {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  color: var(--sp-light);
  line-height: 1.75;
  margin: 0;
}


/* ═══════════════════════════════════════════════
   SPECIES ANCHOR WRAPPER
   Wraps all content for one species (hero + sections)
   ═══════════════════════════════════════════════ */
.sp-species-anchor {
  border-top: 3px solid rgba(211,126,15,0.55);
  margin-top: 48px;
}


/* ═══════════════════════════════════════════════
   CITATIONS / FURTHER READING PANEL
   Academic-style reference card
   ═══════════════════════════════════════════════ */
.sp-citations {
  max-width: 900px;
  margin: 22px auto 0;
  background: var(--sp-parchment);
  border-radius: 10px;
  overflow: hidden;
  border-left: 5px solid var(--sp-accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.28);
}

.sp-citations-heading {
  font-family: 'National Park', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sp-label);
  background: rgba(0,0,0,0.04);
  padding: 12px 22px;
  margin: 0;
  border-bottom: 1px solid var(--sp-panel-border);
}

.sp-citation-list {
  margin: 0;
  padding: 10px 22px 16px 44px;
  list-style: decimal;
}

.sp-citation-list li {
  font-family: 'Raleway', sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--sp-body-ink);
  padding: 8px 0 0 6px;
  border-top: 1px solid var(--sp-panel-border);
}
.sp-citation-list li:first-child { border-top: none; padding-top: 6px; }

.sp-citation-list a {
  color: var(--sp-label);
  text-underline-offset: 2px;
}
.sp-citation-list a:hover { color: var(--sp-accent); }


/* ═══════════════════════════════════════════════
   PLACEHOLDER SPECIES SECTIONS
   Shown for Douglas, Eastern Gray, Fox Squirrel
   until full content is added
   ═══════════════════════════════════════════════ */
.sp-placeholder-section {
  padding: 64px 24px;
  text-align: center;
}

.sp-placeholder-badge {
  display: inline-block;
  font-family: 'National Park', Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sp-muted);
  border: 1px solid rgba(200,184,152,0.35);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.sp-placeholder-section h2 {
  font-family: 'National Park', Arial, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #f4ecd8;
  margin: 0 0 8px;
}

.sp-placeholder-section .sp-sci {
  margin-bottom: 20px;
}

.sp-placeholder-section p {
  font-family: 'Raleway', sans-serif;
  font-size: 0.96rem;
  color: var(--sp-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}


/* ═══════════════════════════════════════════════
   SPECIES SECTION TRANSITIONS
   Between-species visual break: strong rule line
   + species-entry label, with optional graphic.
   Placed as first child inside .sp-species-anchor
   for Douglas, Eastern Gray, Fox Squirrel.
   ═══════════════════════════════════════════════ */
.sp-species-transition {
  text-align: center;
  padding: 40px 24px 24px;
}

.sp-transition-graphic {
  display: block;
  height: 80px;
  width: auto;
  max-width: 220px;
  margin: 0 auto 18px;
}

.sp-transition-label-row {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}

.sp-transition-label-row::before,
.sp-transition-label-row::after {
  content: '';
  flex: 1;
  height: 2px;
  background: rgba(211, 126, 15, 0.45);
}

.sp-transition-label {
  font-family: 'National Park', Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--sp-accent);
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 0 6px;
}


/* ═══════════════════════════════════════════════
   COLOR MORPH GRID
   4-up variant for species with notable color variation.
   Used in Eastern Gray section; add albino column when
   image is sourced.
   ═══════════════════════════════════════════════ */
.sp-morph-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 16px auto 8px;
  padding: 0 24px;
}
.sp-morph-grid figure { margin: 0; }
.sp-morph-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 6px;
}
.sp-morph-grid figcaption {
  font-family: 'National Park', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e1d0a2;
  text-align: center;
  margin-top: 7px;
}
.sp-morph-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1/1;
  background: rgba(255,255,255,0.04);
  border: 2px dashed rgba(200,184,152,0.35);
  border-radius: 6px;
  color: var(--sp-muted);
  font-family: 'Raleway', sans-serif;
  font-size: 0.82rem;
  text-align: center;
  padding: 14px;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .sp-morph-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Sub-heading for within-section panels (e.g. Color Variation) */
.sp-section-subhead {
  font-family: 'National Park', Arial, sans-serif;
  font-size: clamp(0.78rem, 1.3vw, 0.9rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sp-gold);
  text-align: center;
  margin: 34px 0 4px;
}


/* ═══════════════════════════════════════════════
   BRIDGE SECTION
   "Not all squirrels are tree squirrels"
   ═══════════════════════════════════════════════ */
.sp-bridge-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 52px 24px 56px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sp-bridge-section h2 {
  font-family: 'National Park', Arial, sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--sp-gold);
  margin: 0 0 16px;
}

.sp-bridge-section p {
  font-family: 'Raleway', sans-serif;
  font-size: 0.96rem;
  color: var(--sp-light);
  line-height: 1.8;
  margin: 0 0 22px;
}

.sp-bridge-section .np-cta {
  margin-top: 8px;
}

/*----- new css for species nav square images     */
.sp-page-lead span {
  display: block;
  text-align: center;
}

.species-tile {
  text-decoration: none;
  display: block;
  text-align: center;
}

.species-tile-label {
  display: block;
  margin-top: 0.75rem;
  font-family: 'National Park', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 232, 198, 0.95);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.species-tile-sub {
  display: block;
  margin-top: 0.15rem;
  font-family: Raleway, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.species-tile-sub.native {
  color: #c7e489;
}

.species-tile-sub.introduced {
  color: #e8a87c;
}


/* ------     polished CSS for SPECIES  4 card Navigation Banner Bar      --- */
body#species-page .species-banner {
  --species-card-gap: 24px;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--species-card-gap);
  align-items: start;
  justify-items: center;
  width: min(90vw, 1280px);
  margin: 24px auto 40px;
  padding: 0;
}

body#species-page .species-card {
  width: 100%;
  max-width: 260px;
  text-align: center;
}

body#species-page .species-card .glass-frame2 {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 10px !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body#species-page .species-card .glass-frame2 img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
}

body#species-page .species-card-label {
  margin-top: 10px;
  text-align: center;
}

body#species-page .species-name {
  display: block;
  font-family: 'National Park', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 232, 198, 0.96);
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
}

body#species-page .species-status {
  display: block;
  margin-top: 3px;
  font-family: 'Raleway', Arial, sans-serif;
  font-size: 0.74rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}

body#species-page .native-status {
  color: #c7e489;
}

body#species-page .introduced-status {
  color: #e8a87c;
}

@media (max-width: 900px) {
  body#species-page .species-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(92vw, 620px);
  }
}

@media (max-width: 420px) {
  body#species-page .species-banner {
    gap: 18px 14px;
    width: 94vw;
  }

  body#species-page .species-card .glass-frame2 {
    padding: 7px !important;
  }

  body#species-page .species-name {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }

  body#species-page .species-status {
    font-size: 0.66rem;
  }
}