/* ====================================
   San Bernardino Mountains Land Trust
   Design System - WordPress Theme
   ==================================== */

/* === CSS Variables === */
:root {
  /* Primary Colors */
  --color-earth-orange: #df5e2a;  /* Main accent - CTAs, emphasis */
  --color-forest-dark: #68781d;   /* Core brand - buttons, highlights */

  /* Secondary Colors */
  --color-forest-light: #a7a86d;  /* Supporting backgrounds, hover states */
  --color-brown: #6c522e;         /* Headers, borders, grounding elements */

  /* Neutral Colors */
  --color-charcoal: #2a2929;      /* Main background, text overlay */
  --color-white: #ffffff;         /* Negative space, clean text */

  /* Derived Colors */
  --color-gray-900: #1a1919;
  --color-gray-800: #3a3939;
  --color-gray-700: #4a4949;
  --color-gray-600: #5a5959;
  --color-gray-500: #8a8989;
  --color-gray-400: #a9a9a9;
  --color-gray-300: #c9c9c9;
  --color-gray-200: #e0e0e0;
  --color-gray-100: #f0f0f0;

  /* Semantic Colors */
  --color-success: #68781d;
  --color-info: #a7a86d;
  --color-warning: #f0ad4e;
  --color-danger: #d9534f;

  /* Typography */
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-2xs: 0.35rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 5rem;

  /* Container */
  --container-width: 1200px;
  --container-padding: 1rem;

  /* Transitions */
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-charcoal);
  background-color: var(--color-white);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-earth-orange);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover, a:focus {
  color: var(--color-forest-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

/* === Container === */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* === Utility Classes === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  color: var(--color-brown);
  margin-bottom: 0.5rem;
}

.section-intro {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  max-width: 700px;
  margin: 0 auto;
}

/* === Skip Nav === */
.skip-nav {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-forest-dark);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  text-decoration: none;
}

.skip-nav:focus {
  top: 0;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: all var(--transition-base);
  cursor: pointer;
  font-family: var(--font-display);
}

.btn-primary {
  background-color: var(--color-earth-orange);
  color: var(--color-white);
  border-color: var(--color-earth-orange);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-forest-dark);
  border-color: var(--color-forest-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-white);
}

.btn-light {
  background-color: var(--color-white);
  color: var(--color-charcoal);
  border-color: var(--color-white);
}

.btn-light:hover,
.btn-light:focus {
  background-color: var(--color-gray-100);
  border-color: var(--color-gray-100);
  color: var(--color-charcoal);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-forest-dark);
  border-color: var(--color-forest-dark);
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--color-forest-dark);
  color: var(--color-white);
  border-color: var(--color-forest-dark);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background-color: var(--color-white);
  color: var(--color-charcoal);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--text-lg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-earth-orange);
  padding: 0;
  font-weight: 600;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* === Header & Navigation === */
.site-header {
  background-color: var(--color-charcoal);
  border-bottom: 2px solid var(--color-brown);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 0.5rem 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  flex-shrink: 0;
}

.logo {
  max-width: 224px;
  height: auto;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
}

.logo-tagline {
  font-family: var(--font-body);
  font-size: 10px;
  fill: var(--color-gray-500);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-gray-200);
  position: relative;
  transition: var(--transition-base);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--color-gray-200);
  left: 0;
  transition: var(--transition-base);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  color: var(--color-gray-200);
  font-family: 'Montserrat Alternates', 'Montserrat', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--text-lg);
  letter-spacing: 1px;
  transition: color var(--transition-base);
  padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--color-earth-orange);
}

.dropdown {
  position: relative;
}

.dropdown-arrow {
  font-size: 0.7em;
  margin-left: 0.25rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-gray-900);
  border: 1px solid var(--color-brown);
  border-radius: 4px;
  min-width: 200px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  list-style: none;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-gray-200);
  text-transform: none;
  font-size: var(--text-base);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background-color: var(--color-gray-800);
  color: var(--color-earth-orange);
}

.nav-cta {
  margin-left: 2rem;
}

/* Scrolled header state */
.site-header.scrolled {
  box-shadow: var(--shadow-lg);
}

/* Hidden header state (scroll down) */
.site-header.hidden {
  transform: translateY(-100%);
}

/* === Footer === */
.site-footer {
  background-color: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: var(--space-3xl) 0 var(--space-lg);
  border-top: 2px solid var(--color-brown);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-logo {
  max-width: 160px;
  height: auto;
  margin-bottom: var(--space-lg);
  filter: brightness(0.9);
  opacity: 0.9;
}

.footer-about p {
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-charcoal);
  border: 1px solid var(--color-brown);
  border-radius: 50%;
  color: var(--color-gray-300);
  transition: all var(--transition-base);
}

.social-links a:hover {
  background-color: var(--color-earth-orange);
  border-color: var(--color-earth-orange);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer-links h3,
.footer-contact h3 {
  color: var(--color-white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-lg);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a,
.footer-contact a {
  color: var(--color-gray-300);
  transition: color var(--transition-base);
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--color-earth-orange);
}

.footer-contact address {
  font-style: normal;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.office-hours {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.footer-bottom {
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-brown);
}

.footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-legal p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.legal-links {
  display: flex;
  gap: var(--space-lg);
}

.legal-links a {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.legal-links a:hover {
  color: var(--color-gray-300);
}
