/*
Theme Name: The Cryptidnomicon
Theme URI: https://cryptidnomi.com
Author: RC
Author URI: https://cryptidnomi.com/about
Description: A dark-mode field research encyclopedia of cryptids. GeneratePress child theme.
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: cryptidnomicon
*/

/* =============================================
   BASE RESET & GLOBAL STYLES
   (from base.css)
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection {
  background: oklch(from var(--color-primary) l c h / 0.25);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* =============================================
   DESIGN SYSTEM
   (from style.css)
   ============================================= */

/* =============================================
   TYPE SCALE (fluid clamp)
   ============================================= */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* SPACING (4px system) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* FONTS */
  --font-display: 'Zodiak', Georgia, serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* RADIUS */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* TRANSITIONS */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* CONTENT WIDTHS */
  --content-narrow: 720px;
  --content-default: 960px;
  --content-wide: 1100px;
  --content-full: 100%;

  /* THREAT RATING COLORS */
  --threat-1: #4a7a3a;
  --threat-2: #7a8a3a;
  --threat-3: #c9942a;
  --threat-4: #b85a2a;
  --threat-5: #8b3a2a;
}

/* =============================================
   DARK MODE (DEFAULT)
   ============================================= */
:root, [data-theme="dark"] {
  --color-bg:               #141a14;
  --color-surface:          #1c2219;
  --color-surface-2:        #232a20;
  --color-surface-offset:   #2a2420;
  --color-surface-offset-2: #322c26;
  --color-surface-dynamic:  #3a3530;
  --color-divider:          #3d3830;
  --color-border:           #4a4438;

  --color-text:             #e8e0d0;
  --color-text-muted:       #8a9a7a;
  --color-text-faint:       #5a6450;
  --color-text-inverse:     #141a14;

  --color-primary:          #c9942a;
  --color-primary-hover:    #d4a43a;
  --color-primary-active:   #b88420;
  --color-primary-highlight: #2a2418;

  --color-error:            #8b3a2a;
  --color-warning:          #8b6a2a;
  --color-success:          #4a7a3a;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

/* =============================================
   LIGHT MODE
   ============================================= */
[data-theme="light"] {
  --color-bg:               #f5f0e6;
  --color-surface:          #ece6d8;
  --color-surface-2:        #e4ddd0;
  --color-surface-offset:   #ddd6c6;
  --color-surface-offset-2: #d4cdbf;
  --color-surface-dynamic:  #cbc4b4;
  --color-divider:          #c2baa8;
  --color-border:           #b8b09e;

  --color-text:             #1a1f1a;
  --color-text-muted:       #5a6450;
  --color-text-faint:       #8a8a7a;
  --color-text-inverse:     #f5f0e6;

  --color-primary:          #8a6a1a;
  --color-primary-hover:    #6a5010;
  --color-primary-active:   #5a4010;
  --color-primary-highlight: #ebe4d0;

  --color-error:            #8b3a2a;
  --color-warning:          #8b6a2a;
  --color-success:          #3a6a2a;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:               #f5f0e6;
    --color-surface:          #ece6d8;
    --color-surface-2:        #e4ddd0;
    --color-surface-offset:   #ddd6c6;
    --color-surface-offset-2: #d4cdbf;
    --color-surface-dynamic:  #cbc4b4;
    --color-divider:          #c2baa8;
    --color-border:           #b8b09e;
    --color-text:             #1a1f1a;
    --color-text-muted:       #5a6450;
    --color-text-faint:       #8a8a7a;
    --color-text-inverse:     #f5f0e6;
    --color-primary:          #8a6a1a;
    --color-primary-hover:    #6a5010;
    --color-primary-active:   #5a4010;
    --color-primary-highlight: #ebe4d0;
    --color-error:            #8b3a2a;
    --color-warning:          #8b6a2a;
    --color-success:          #3a6a2a;
    --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
    --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
    --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
  }
}

/* =============================================
   GLOBAL TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* =============================================
   COMPONENTS
   ============================================= */

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: box-shadow var(--transition-interactive);
}
.site-header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}
.site-logo svg {
  flex-shrink: 0;
}
.site-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

/* Mobile nav */
.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  padding: var(--space-6);
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  display: block;
  transition: color var(--transition-interactive);
}
.mobile-nav a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-12) var(--space-6) var(--space-8);
  margin-top: var(--space-16);
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-8);
}
.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.footer-brand .footer-tagline {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.footer-links h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-links a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  max-width: var(--content-wide);
  margin: var(--space-8) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-bottom a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-bottom a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

/* --- Threat Rating Badges --- */
.threat-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.4;
}
.threat-badge--1 { background: var(--threat-1); color: #e8e0d0; }
.threat-badge--2 { background: var(--threat-2); color: #e8e0d0; }
.threat-badge--3 { background: var(--threat-3); color: #141a14; }
.threat-badge--4 { background: var(--threat-4); color: #e8e0d0; }
.threat-badge--5 { background: var(--threat-5); color: #e8e0d0; }

/* --- Field Notes Callout (RC) --- */
.field-notes {
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface-offset);
  padding: var(--space-5) var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-6) 0;
}
.field-notes-header {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  font-variant-caps: small-caps;
}
.field-notes p {
  font-style: italic;
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}
.field-notes p:last-child {
  margin-bottom: 0;
}

/* --- Entry Data Block --- */
.data-block {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
}
.data-row:last-child {
  border-bottom: none;
}
.data-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.data-value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-align: right;
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.card:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.card-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.card-body {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-interactive);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
.btn-primary:active {
  background: var(--color-primary-active);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-text-muted);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

/* --- Form Inputs --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.form-input,
.form-textarea,
.form-select {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-faint);
}
.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Search Bar --- */
.search-bar {
  position: relative;
  max-width: 560px;
  width: 100%;
}
.search-bar input {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}
.search-bar input::placeholder {
  color: var(--color-text-faint);
}
.search-bar-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}

/* --- Section Utility --- */
.section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-6);
}
.section-narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
}
.section-default {
  max-width: var(--content-default);
  margin: 0 auto;
}
.section-wide {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.section-subtitle {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

/* --- Divider --- */
.divider {
  border: none;
  height: 1px;
  background: var(--color-divider);
  margin: var(--space-8) 0;
}

/* --- Tag/Chip --- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

/* --- Entry grid --- */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}

/* --- Stats bar --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums lining-nums;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .stats-bar {
    gap: var(--space-6);
  }
}

/* --- Responsive featured card --- */
@media (max-width: 640px) {
  .featured-card-grid {
    grid-template-columns: 1fr !important;
  }
  .featured-card-grid .featured-img {
    aspect-ratio: 16/9 !important;
    max-height: 250px;
  }
  .report-card-grid {
    grid-template-columns: 1fr !important;
  }
  .report-card-grid .tag-group {
    justify-content: flex-start;
  }
  .form-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* --- Filter tabs --- */
.filter-tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}
.filter-tab {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-interactive);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.filter-tab:hover {
  color: var(--color-text);
}
.filter-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-2);
}

/* --- Prose content --- */
.prose {
  max-width: var(--content-narrow);
}
.prose h2 {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.prose h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}
.prose p {
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.prose p em {
  color: var(--color-text-muted);
}
.prose ul, .prose ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}
.prose li {
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-2);
}
.prose blockquote {
  border-left: 3px solid var(--color-primary);
  padding: var(--space-3) var(--space-5);
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* --- Contributor attribution --- */
.contributor {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  font-style: italic;
  margin-bottom: var(--space-3);
}

/* --- Hero section --- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  max-width: 700px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1.1;
}
.hero-tagline {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.hero-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}


/* Google Fonts overrides for static site */
:root {
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-esoteric: 'Cinzel', Georgia, serif;
}

/* =============================================
   PNW MAP BACKGROUND LAYER
   ============================================= */
.map-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}
.map-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Page stack sits above map */
.page-stack {
  position: relative;
  z-index: 1;
}

/* =============================================
   MANILA FOLDER TAB NAVIGATION
   ============================================= */
.header-bar {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-2) var(--space-6) 0;
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
}

.nav-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
  list-style: none;
}

.nav-tab {
  position: relative;
  padding: var(--space-2) var(--space-5) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
  transition: all var(--transition-interactive);
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  display: block;
}

/* Manila paper texture line */
.nav-tab::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  height: 1px;
  opacity: 0.15;
}

/* Dark mode tabs */
[data-theme="dark"] .nav-tab,
:root:not([data-theme]) .nav-tab {
  background: linear-gradient(180deg, #2a2520 0%, #222018 100%);
  color: var(--color-text-muted);
  border-color: #3d3830;
}
[data-theme="dark"] .nav-tab::before,
:root:not([data-theme]) .nav-tab::before {
  background: #c9942a;
}
[data-theme="dark"] .nav-tab:hover,
:root:not([data-theme]) .nav-tab:hover {
  background: linear-gradient(180deg, #332e28 0%, #2a2620 100%);
  color: var(--color-text);
}
[data-theme="dark"] .nav-tab.active,
:root:not([data-theme]) .nav-tab.active {
  background: linear-gradient(180deg, #3a3428 0%, #322c22 100%);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: inset 0 2px 0 var(--color-primary);
}

/* Light mode tabs */
[data-theme="light"] .nav-tab {
  background: linear-gradient(180deg, #e8dcc8 0%, #ddd2be 100%);
  color: var(--color-text-muted);
  border-color: #c2baa8;
}
[data-theme="light"] .nav-tab::before {
  background: #8a6a1a;
}
[data-theme="light"] .nav-tab:hover {
  background: linear-gradient(180deg, #f0e4d0 0%, #e4d8c4 100%);
  color: var(--color-text);
}
[data-theme="light"] .nav-tab.active {
  background: linear-gradient(180deg, #f5edd8 0%, #ece4d0 100%);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: inset 0 2px 0 var(--color-primary);
}

/* Header edge/border line below tabs */
.header-edge {
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .header-edge,
:root:not([data-theme]) .header-edge {
  background: rgba(20,26,20,0.85);
}
[data-theme="light"] .header-edge {
  background: rgba(245,240,230,0.85);
}

/* Header controls (theme toggle etc.) */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  padding-bottom: var(--space-2);
}

/* Logo text uses esoteric font */
.site-logo-text {
  font-family: var(--font-esoteric);
}

/* =============================================
   HERO — fade to transparent at bottom
   ============================================= */
[data-theme="dark"] .hero-bg::after,
:root:not([data-theme]) .hero-bg::after {
  background: linear-gradient(
    to bottom,
    rgba(20,26,20,0.5) 0%,
    rgba(20,26,20,0.7) 50%,
    rgba(20,26,20,0.95) 85%,
    transparent 100%
  );
}
[data-theme="light"] .hero-bg::after {
  background: linear-gradient(
    to bottom,
    rgba(245,240,230,0.5) 0%,
    rgba(245,240,230,0.7) 50%,
    rgba(245,240,230,0.95) 85%,
    transparent 100%
  );
}

/* =============================================
   CONTENT PANELS — readable over map
   ============================================= */
.content-panel {
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
[data-theme="dark"] .content-panel,
:root:not([data-theme]) .content-panel {
  background: rgba(20,26,20,0.88);
}
[data-theme="light"] .content-panel {
  background: rgba(245,240,230,0.88);
}

/* Footer gets translucent bg too */
[data-theme="dark"] .site-footer,
:root:not([data-theme]) .site-footer {
  background: rgba(20,26,20,0.92);
}
[data-theme="light"] .site-footer {
  background: rgba(245,240,230,0.92);
}

/* =============================================
   RESPONSIVE — hide tabs on mobile
   ============================================= */
@media (max-width: 768px) {
  .nav-tabs { display: none; }
}
