/* ===================================================
   Western Nepal Travel Guide — Custom Styles
   Theme: Editorial travel journal
   Palette: Terracotta, saffron, forest green, parchment
   =================================================== */

/* ---------- Root tokens ---------- */
:root {
  --color-bg:          #F5EFE6;
  --color-bg-alt:      #EDE5D8;
  --color-card:        #FFFBF5;
  --color-text:        #2C1810;
  --color-text-muted:  #7A6B5D;
  --color-border:      #DDD0C1;
  --color-terracotta:  #B85C38;
  --color-terracotta-d:#8B3A1F;
  --color-saffron:     #C49B3C;
  --color-saffron-l:   #E8C96B;
  --color-forest:      #3A6B4C;
  --color-teal:        #2B7A78;
  --color-rose:        #9B2C3F;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Outfit', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Typography ---------- */
.font-display { font-family: 'Cormorant Garamond', 'Georgia', serif; }
.font-body    { font-family: 'Outfit', system-ui, sans-serif; }

/* ---------- Navigation ---------- */
#main-nav {
  background: transparent;
  transition: background .45s ease, box-shadow .45s ease, color .3s ease;
}
#main-nav.scrolled {
  background: rgba(245, 239, 230, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
#main-nav.scrolled .nav-link { color: var(--color-text); }
#main-nav.scrolled .nav-brand { color: var(--color-terracotta); }

.nav-link {
  position: relative;
  color: rgba(255,255,255,.85);
  transition: color .3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--color-terracotta);
  transition: width .3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ---------- Hero ---------- */
#hero {
  background:
    linear-gradient(160deg,
      #1a0a04  0%,
      #3d1308 18%,
      #7c2d12 36%,
      #b85c38 52%,
      #c4853c 68%,
      #c49b3c 82%,
      #e8c96b 100%
    );
}

.hero-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  opacity: .35;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.mountain-silhouette {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  line-height: 0;
  color: var(--color-bg);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.scroll-indicator { animation: float 2.5s ease-in-out infinite; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s cubic-bezier(.22,1,.36,1),
              transform .75s cubic-bezier(.22,1,.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .25s; }
.reveal-delay-4 { transition-delay: .3s; }
.reveal-delay-5 { transition-delay: .35s; }

/* ---------- Leaflet overrides ---------- */
.leaflet-tile-pane {
  filter: sepia(8%) saturate(88%) brightness(104%) hue-rotate(-4deg);
}

.leaflet-popup-content-wrapper {
  background: var(--color-card);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(44,24,16,.18);
  padding: 0;
  overflow: hidden;
}
.leaflet-popup-content { margin: 0; width: 260px !important; }
.leaflet-popup-tip     { background: var(--color-card); }

.leaflet-popup-close-button {
  color: var(--color-text-muted) !important;
  font-size: 20px !important;
  top: 8px !important;
  right: 10px !important;
}

/* Custom map marker pin */
.map-pin {
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-45deg);
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.map-pin:hover {
  transform: rotate(-45deg) scale(1.15);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.map-pin svg {
  transform: rotate(45deg);
  width: 16px; height: 16px;
}

.pin-origin   { background: var(--color-terracotta); }
.pin-buddhist { background: var(--color-saffron); }
.pin-hill     { background: var(--color-forest); }
.pin-nature   { background: var(--color-teal); }

.map-pin.active {
  transform: rotate(-45deg) scale(1.25);
  box-shadow: 0 0 0 4px rgba(184,92,56,.35), 0 6px 20px rgba(0,0,0,.3);
}

/* ---------- Route buttons ---------- */
.route-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all .25s ease;
}
.route-btn:hover {
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
}
.route-btn.active {
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
  color: #fff;
}

/* ---------- Destination cards ---------- */
.dest-card {
  background: var(--color-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(44,24,16,.06);
  transition: box-shadow .35s ease, transform .35s ease;
}
.dest-card:hover {
  box-shadow: 0 12px 36px rgba(44,24,16,.1);
  transform: translateY(-4px);
}

.dest-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s cubic-bezier(.22,1,.36,1);
}
.dest-details.open { max-height: 900px; }

.dest-toggle svg {
  transition: transform .3s ease;
}
.dest-toggle.open svg {
  transform: rotate(180deg);
}

/* Theme accent bars on cards */
.accent-buddhist { border-top: 3px solid var(--color-saffron); }
.accent-hill     { border-top: 3px solid var(--color-forest); }
.accent-nature   { border-top: 3px solid var(--color-teal); }

/* ---------- Itinerary tabs ---------- */
.itin-tab {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all .25s ease;
}
.itin-tab:hover { color: var(--color-text); }
.itin-tab.active {
  background: var(--color-terracotta);
  color: #fff;
}

.itin-panel { display: none; }
.itin-panel.active { display: block; }

/* Timeline dots */
.timeline-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid var(--color-bg);
  position: absolute;
  left: -8px; top: 4px;
}

/* ---------- Budget tier cards ---------- */
.budget-card {
  padding: 24px;
  border-radius: 14px;
  border: 1.5px solid var(--color-border);
  background: var(--color-card);
  transition: border-color .3s, box-shadow .3s;
}
.budget-card:hover {
  border-color: var(--color-terracotta);
  box-shadow: 0 4px 16px rgba(184,92,56,.08);
}

/* ---------- Practical section ---------- */
.info-card {
  padding: 32px;
  background: var(--color-card);
  border-radius: 16px;
  border: 1px solid var(--color-border);
}
.info-card h3 { margin-top: 16px; }

/* ---------- Legend ---------- */
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #bfb3a3; }

/* ---------- Mobile menu ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
#mobile-menu.open { max-height: 300px; }

/* ---------- Selection ---------- */
::selection {
  background: rgba(184, 92, 56, .2);
  color: var(--color-text);
}

/* ---------- Decorative divider ---------- */
.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.ornament::before,
.ornament::after {
  content: '';
  width: 60px; height: 1px;
  background: var(--color-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero-title  { font-size: 3.5rem !important; line-height: .9 !important; }
  #map-container { height: 400px !important; }
}
