/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Brand palette — deep forest anchor */
  --color-forest:       #1C2B22;
  --color-forest-mid:   #2E4438;

  /* Sage green — primary accent */
  --color-sage:         #4A7C59;
  --color-sage-dark:    #376047;
  --color-sage-light:   #C8DBC7;
  --color-sage-glow:    rgba(74, 124, 89, 0.12);

  /* Amber — secondary accent */
  --color-amber:        #C4892A;
  --color-amber-light:  #F5E4C0;
  --color-amber-glow:   rgba(196, 137, 42, 0.15);

  /* Neutrals — warm earthy tones */
  --color-dark:         #2A2218;
  --color-dark-muted:   #4A4236;
  --color-mid:          #7A7060;
  --color-stone:        #F4EFE8;
  --color-parchment:    #FDFBF7;
  --color-white:        #FDFBF7;
  --color-border:       #DDD6CB;
  --color-border-light: #EAE5DD;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Timeline */
  --timeline-line-color: #DDD6CB;
  --timeline-dot-size:   20px;
  --timeline-line-width: 2px;
  --timeline-gutter:     56px;

  /* Layout */
  --nav-height:        64px;
  --transition:        0.28s ease;
  --radius-sm:         4px;
  --radius-md:         10px;
  --radius-lg:         16px;
  --shadow-sm:         0 1px 4px rgba(42, 34, 24, 0.06);
  --shadow-card:       0 4px 24px rgba(42, 34, 24, 0.10);
  --shadow-card-hover: 0 8px 40px rgba(42, 34, 24, 0.16);
  --shadow-lift:       0 16px 56px rgba(42, 34, 24, 0.22);
}

[data-bs-theme="dark"] {
  --color-dark:         #EDE8DF;
  --color-dark-muted:   #C5BEB4;
  --color-stone:        #1A1710;
  --color-parchment:    #201E19;
  --color-white:        #201E19;
  --color-border:       #3A3530;
  --color-border-light: #2E2B26;
  --color-mid:          #9C9488;
  --timeline-line-color:#3A3530;
}


/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.72;
  color: var(--color-dark);
  background-color: var(--color-stone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--color-sage); text-decoration: none; }
a:hover { color: var(--color-sage-dark); }


/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--color-dark);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.65rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

.display-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.kicker {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-sage-light);
}


/* ============================================================
   NAV — always dark forest
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: var(--color-forest);
  border-bottom: 1px solid var(--color-forest-mid);
}

.nav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #EDE8DF;
  transition: color var(--transition);
}
.nav-brand:hover { color: var(--color-amber); }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8FAF94;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-links a:hover { color: var(--color-amber); }
.nav-links a.active {
  color: var(--color-amber);
  border-bottom-color: var(--color-amber);
}


/* ============================================================
   FOOTER — dark forest, amber top accent
   ============================================================ */
.site-footer {
  margin-top: 6rem;
  padding: 3rem 2rem;
  border-top: 2px solid var(--color-amber);
  background: var(--color-forest);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #EDE8DF;
}

.footer-tagline {
  font-size: 0.82rem;
  color: #8FAF94;
  font-style: italic;
  line-height: 1.5;
}

.footer-copy {
  font-size: 0.78rem;
  color: #6A7A6B;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .footer-tagline { display: none; }
}


/* ============================================================
   HERO — FULL BLEED
   ============================================================ */
.hero-fullbleed {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-fullbleed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.12) 0%,
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,0.22) 55%,
    rgba(0,0,0,0.80) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 3rem 4rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content .display-title {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-content .kicker {
  color: var(--color-sage-light);
  margin-bottom: 0.75rem;
  display: block;
}


/* ============================================================
   ADVENTURE METADATA BAR
   ============================================================ */
.meta-bar {
  padding: 1.5rem 2rem;
  background: #EAE5DD;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.meta-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-mid);
}

.meta-item strong {
  font-weight: 600;
  color: var(--color-dark);
}

.meta-locations {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}


/* ============================================================
   LOCATION BADGE
   ============================================================ */
.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  background: var(--color-sage-glow);
  border: 1px solid rgba(74, 124, 89, 0.28);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--color-sage-dark);
}

.location-badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-sage);
  flex-shrink: 0;
}


/* ============================================================
   MINI MAP
   ============================================================ */
.mini-map-wrap {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  isolation: isolate;
}

.mini-map {
  position: relative;
  z-index: 0;
  height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

/* Override Leaflet attribution font */
.leaflet-control-attribution {
  font-family: var(--font-body) !important;
  font-size: 10px !important;
}


/* ============================================================
   TIMELINE
   ============================================================ */
.timeline-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.timeline-heading {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-mid);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.timeline {
  position: relative;
  padding-left: var(--timeline-gutter);
}

/* Vertical connecting line */
.timeline::before {
  content: '';
  position: absolute;
  left: calc(var(--timeline-dot-size) / 2 - var(--timeline-line-width) / 2);
  top: 10px;
  bottom: 0;
  width: var(--timeline-line-width);
  background: var(--timeline-line-color);
}

.timeline-node {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-node:last-child {
  margin-bottom: 0;
}

/* Dot */
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--timeline-gutter));
  top: 10px;
  width: var(--timeline-dot-size);
  height: var(--timeline-dot-size);
  border-radius: 50%;
  background: var(--color-border);
  border: 3px solid var(--color-stone);
  box-shadow: 0 0 0 2px var(--color-border);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  z-index: 1;
}

.timeline-node.is-open .timeline-dot,
.timeline-node.is-text-open .timeline-dot {
  background: var(--color-sage);
  border-color: var(--color-stone);
  box-shadow: 0 0 0 2px var(--color-sage), 0 0 18px var(--color-sage-glow);
  transform: scale(1.12);
}


/* ============================================================
   ENTRY CARD
   ============================================================ */
.entry-card {
  background: var(--color-parchment);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-sage);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-left-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.entry-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.timeline-node.is-text-open .entry-card {
  border-left-color: var(--color-amber);
  box-shadow: var(--shadow-card-hover);
}

.entry-header {
  padding: 1.4rem 1.6rem 1rem;
}

.entry-meta-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.day-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-amber);
}

.entry-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-dark);
  margin: 0 0 0.35rem;
}

.entry-snippet {
  font-size: 0.875rem;
  color: var(--color-mid);
  margin: 0;
  line-height: 1.55;
}


/* ============================================================
   PHOTO STRIP (thumbnail row — always visible)
   ============================================================ */
.photo-strip-wrap {
  padding: 0 1.6rem 0.9rem;
}

.photo-count {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-mid);
  margin-bottom: 0.5rem;
}

.photo-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  -webkit-overflow-scrolling: touch;
}

.photo-strip::-webkit-scrollbar { height: 3px; }
.photo-strip::-webkit-scrollbar-track { background: transparent; }
.photo-strip::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.photo-thumb {
  flex-shrink: 0;
  display: block;
  width: 120px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.photo-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background var(--transition);
}

.photo-thumb:hover::after {
  background: rgba(0,0,0,0.14);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.photo-thumb:hover img {
  transform: scale(1.06);
}


/* ============================================================
   READ MORE — journal text expand
   ============================================================ */
.entry-readmore {
  border-top: 1px solid var(--color-border-light);
}

.readmore-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.85rem 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-sage);
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.readmore-toggle:hover {
  background: var(--color-sage-glow);
  color: var(--color-sage-dark);
}

.readmore-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.timeline-node.is-text-open .readmore-icon {
  transform: rotate(180deg);
}

.entry-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-node.is-text-open .entry-text {
  max-height: 2000px;
}

.entry-text-inner {
  padding: 0.25rem 1.6rem 1.6rem;
  font-size: 0.925rem;
  line-height: 1.78;
  color: var(--color-dark-muted);
}

.entry-text-inner p:last-child { margin-bottom: 0; }


/* ============================================================
   ADVENTURES LANDING — SECTION HERO
   ============================================================ */
.section-hero {
  padding: calc(var(--nav-height) + 5rem) 2rem 4rem;
  background: var(--color-stone);
  border-bottom: 1px solid var(--color-border);
}

.section-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.section-hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 8vw, 7rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--color-dark);
  margin-bottom: 1.25rem;
}

.section-hero-desc {
  font-size: 1rem;
  color: var(--color-mid);
  max-width: 480px;
  line-height: 1.65;
}


/* ============================================================
   MAGAZINE GRID
   ============================================================ */
.adventures-grid-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.grid-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-mid);
  margin-bottom: 1.5rem;
  display: block;
}

.adventure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .adventure-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .adventure-grid {
    grid-template-columns: 1fr;
  }
}

.adventure-card {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--color-stone);
  transition: box-shadow var(--transition), transform var(--transition);
}

.adventure-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-5px);
}

.adventure-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.adventure-card:hover .adventure-card-image {
  transform: scale(1.05);
}

/* Static gradient for title readability */
.adventure-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(0,0,0,0.72) 100%
  );
  z-index: 1;
}

.adventure-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1.4rem;
}

.adventure-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

.adventure-card-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.adventure-card-meta span::before {
  content: '·';
  margin-right: 0.5rem;
}

.adventure-card-meta span:first-child::before {
  display: none;
}

/* Hover overlay — deep forest green */
.adventure-card-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(28, 43, 34, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
  text-align: center;
}

.adventure-card:hover .adventure-card-hover {
  opacity: 1;
}

.adventure-card-hover-text {
  color: rgba(255,255,255,0.88);
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.adventure-card-hover-cta {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-amber);
  border-bottom: 1px solid rgba(196, 137, 42, 0.5);
  padding-bottom: 1px;
}


/* ============================================================
   ADVENTURE SINGLE PAGE
   ============================================================ */
.adventure-hero {
  padding-top: var(--nav-height);
}

.adventure-hero .hero-fullbleed {
  height: calc(100vh - var(--nav-height));
}


/* ============================================================
   PHOTOSWIPE — FILMSTRIP + CAPTION
   ============================================================ */

/* Filmstrip: full-width thumbnail reel anchored to lightbox bottom */
.pswp__filmstrip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 90;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
}

.pswp__filmstrip-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.pswp__filmstrip-inner::-webkit-scrollbar { display: none; }

.pswp__filmstrip-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  opacity: 0.5;
  transition: opacity 0.18s, border-color 0.18s, transform 0.18s;
}

.pswp__filmstrip-thumb:hover {
  opacity: 0.85;
  transform: scale(1.06);
}

.pswp__filmstrip-thumb.is-active {
  border-color: var(--color-amber);
  opacity: 1;
  transform: scale(1.1);
}

.pswp__filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Caption: floats just above the filmstrip */
.pswp .pswp__adventure-caption {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.8rem;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  border: 2px solid #333;
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  z-index: 91;
  pointer-events: none;
  white-space: normal;
  overflow: hidden;
}


/* ============================================================
   PAGE OFFSET FOR FIXED NAV
   ============================================================ */
.page-offset {
  padding-top: var(--nav-height);
}

/* Anchor target offset (so nav doesn't cover headings) */
.timeline-node {
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}
