/* =========================================
   RESET + GLOBAL
   ========================================= */

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

/* =========================================
   DESIGN TOKENS — DARK MODE (default)
   ========================================= */

:root {
  --dust:       #c8a97a;
  --rust:       #b5451b;
  --rust-dark:  #8a2f0f;
  --sand:       #f0e4cb;
  --dark:       #1a1612;
  --charcoal:   #2c2520;
  --mid:        #4a3e35;
  --muted:      #7a6a5a;

  /* Semantic tokens — dark mode defaults */
  --bg:         var(--dark);
  --bg-alt:     var(--charcoal);
  --text:       var(--sand);
  --text-muted: var(--muted);
  --accent:     var(--rust);
  --eyebrow:    var(--rust);
  --nav-bg:     transparent;
  --nav-bg-solid: rgba(26, 22, 18, 0.97);
  --nav-text:   var(--sand);
  --toggle-bg:  rgba(255,255,255,0.1);
  --toggle-text: var(--sand);
  --card-overlay-start: rgba(26,22,18,0.0);
  --card-overlay-end:   rgba(26,22,18,0.88);
  --map-ocean:  #1a1612;
  --map-land:   #3d2e20;
  --map-label:  #c8a97a;
  --rule-color: var(--rust);
  --hero-title-1: var(--sand);
  --hero-title-2: var(--rust);
  --stat-number: var(--rust);
  --stat-label:  var(--dust);
  --feat-border: var(--rust);
}

/* =========================================
   LIGHT MODE OVERRIDES
   ========================================= */

body[data-theme="light"] {
  --bg:         #f0e4cb;
  --bg-alt:     #e8d9bb;
  --text:       #1a1612;
  --text-muted: #5a4a3a;
  --eyebrow:    var(--rust);
  --nav-bg:     rgba(240, 228, 203, 0.95);
  --nav-bg-solid: rgba(240, 228, 203, 0.99);
  --nav-text:   var(--dark);
  --toggle-bg:  rgba(0,0,0,0.08);
  --toggle-text: var(--dark);
  --card-overlay-start: rgba(26,22,18,0.1);
  --card-overlay-end:   rgba(26,22,18,0.82);
  --map-ocean:  #d8c9a8;
  --map-land:   #b5945a;
  --map-label:  #1a1612;
  --hero-title-1: #1a1612;
  --hero-title-2: var(--rust);
  --stat-number: var(--rust);
  --stat-label:  var(--mid);
}

/* =========================================
   BASE
   ========================================= */

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* =========================================
   NAV
   ========================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease;
}

.nav.nav-solid {
  background: var(--nav-bg-solid);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--nav-text);
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-social a {
  color: var(--nav-text);
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}

.nav-social a:hover { opacity: 1; }

/* YouTube play triangle — invert on light */
body[data-theme="light"] .yt-play {
  fill: var(--bg);
}

/* =========================================
   HERO
   ========================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('./images/hero.jpg');
  background-size: cover;
  background-position: center 30%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,22,18,0.2) 0%,
    rgba(26,22,18,0.4) 40%,
    rgba(26,22,18,0.85) 75%,
    rgba(26,22,18,1.0) 100%
  );
  z-index: 2;
}

body[data-theme="light"] .hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(240,228,203,0.1) 0%,
    rgba(240,228,203,0.2) 40%,
    rgba(240,228,203,0.75) 70%,
    rgba(240,228,203,1.0) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 6rem 2rem 3.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--eyebrow);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.hero-title {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  line-height: 0.9;
  margin-bottom: 1.25rem;
}

.hero-title-rusty {
  display: block;
  font-size: clamp(4rem, 16vw, 10rem);
  color: var(--hero-title-1);
}

.hero-title-rhinos {
  display: block;
  font-size: clamp(4rem, 16vw, 10rem);
  color: var(--hero-title-2);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text);
  max-width: 600px;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.hero-rule {
  width: 60px;
  height: 3px;
  background: var(--rule-color);
  margin-bottom: 2.5rem;
}

/* =========================================
   STATS GRID
   ========================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 2rem;
  max-width: 500px;
}

.stat-number {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--stat-number);
  line-height: 1;
}

.stat-label {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--stat-label);
  margin-top: 0.2rem;
}

/* =========================================
   LAYOUT UTILITIES
   ========================================= */

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--eyebrow);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-heading-large {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.body-text {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 680px;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* =========================================
   ABOUT SECTION
   ========================================= */

.section-about {
  background: var(--bg-alt);
}

/* =========================================
   ROUTE MAP
   ========================================= */

.route-map {
  margin-top: 2.5rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--mid);
}

.route-map svg {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================
   EXPEDITIONS
   ========================================= */

.section-expeditions {
  background: var(--bg);
  padding-bottom: 0;
}

.section-expeditions .container {
  padding-bottom: 2rem;
}

/* Full-width stacked cards */
.expedition-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.expedition-card {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  cursor: pointer;
}

/* Featured card is taller */
.expedition-featured {
  min-height: 520px;
  border-left: 4px solid var(--feat-border);
}

.card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--mid); /* fallback when no image */
  transition: transform 0.5s ease;
  z-index: 1;
}

.expedition-card:hover .card-bg {
  transform: scale(1.03);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--card-overlay-start) 0%,
    var(--card-overlay-end) 100%
  );
  z-index: 2;
}

.card-content {
  position: relative;
  z-index: 3;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 700px;
}

.card-meta {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--dust);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--sand);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.card-tags {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: rgba(240,228,203,0.6);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.95rem;
  color: rgba(240,228,203,0.85);
  max-width: 560px;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.card-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--rust);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s, letter-spacing 0.2s;
}

.card-link:hover {
  color: var(--dust);
  letter-spacing: 3px;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
  background: var(--dark);
  padding: 3rem 0;
  text-align: center;
}

body[data-theme="light"] .footer {
  background: var(--charcoal);
}

.footer-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 3px;
  color: var(--sand);
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

/* =========================================
   LIGHT / DARK TOGGLE
   ========================================= */

.theme-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--toggle-bg);
  border: 1px solid rgba(128,100,70,0.3);
  border-radius: 4px;
  color: var(--toggle-text);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, color 0.2s;
}

.theme-toggle:hover {
  background: rgba(181, 69, 27, 0.2);
}

.toggle-icon { font-size: 0.85rem; }

/* =========================================
   RESPONSIVE
   ========================================= */

/* Landscape mobile — fix eyebrow clearing nav */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-content {
    padding-top: 5rem;
  }

  .hero-title-rusty,
  .hero-title-rhinos {
    font-size: clamp(2.5rem, 10vw, 5rem);
  }

  .hero-eyebrow {
    font-size: 0.7rem;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding: 5.5rem 1.25rem 2.5rem;
  }

  .stats-grid {
    gap: 1rem 1.5rem;
  }

  .expedition-card {
    min-height: 360px;
  }

  .expedition-featured {
    min-height: 460px;
  }

  .card-content {
    padding: 1.5rem 1.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}

@media (min-width: 769px) {
  .expedition-stack {
    max-width: 860px;
    margin: 0 auto;
  }

  .card-content {
    padding: 2.5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 7rem 3rem 4rem;
  }

  .stats-grid {
    grid-template-columns: repeat(4, auto);
    max-width: none;
    gap: 0 3rem;
  }
}
