/* ==========================================================================
   Upper Peninsula Waterfalls — Shared Design System
   Palette: cool water blues + fresh teal/aqua accent
   Display: Fraunces (serif, carved-sign character)
   Body: Inter
   Utility/data: JetBrains Mono (trailhead stat strip, GPS data)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color */
  --color-bg:        #F5FAFC;
  --color-surface:   #FFFFFF;
  --color-ink:        #122430;
  --color-ink-soft:  #4C6772;
  --color-deep:      #143548;   /* deep water — header/footer */
  --color-deep-2:    #0D2733;   /* darker shade for depth/gradients */
  --color-mid:       #2E7291;   /* mid blue — links, active states */
  --color-foam:      #D8EEF4;   /* light foam — badge backgrounds */
  --color-foam-2:    #BFE4EC;
  --color-rust:      #12A3A0;   /* fresh teal accent — CTAs, signature marks */
  --color-rust-dark: #0C7C7A;
  --color-line:      #D7E6EA;
  --color-line-soft: #E9F2F4;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --max-width: 1180px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(13, 39, 51, 0.08);
  --shadow-md: 0 4px 16px rgba(13, 39, 51, 0.12);
  --shadow-lg: 0 12px 40px rgba(13, 39, 51, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-rust);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

/* ==========================================================================
   Site Header / Nav
   ========================================================================== */

.site-header {
  background: linear-gradient(180deg, var(--color-deep) 0%, var(--color-deep-2) 100%);
  color: #EAF4F7;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand svg { flex-shrink: 0; }
.brand .brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-foam-2);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  color: #D9EBF0;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.main-nav a:hover, .main-nav a.active {
  color: #fff;
  text-decoration: none;
  border-bottom-color: var(--color-rust);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-deep-2);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav a {
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid transparent;
  }
  .main-nav a.active, .main-nav a:hover { border-left-color: var(--color-rust); border-bottom-color: rgba(255,255,255,0.08); }
  .site-header { position: sticky; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-rust);
  color: #fff;
}
.btn-primary:hover { background: var(--color-rust-dark); box-shadow: var(--shadow-sm); }
.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-outline {
  background: transparent;
  color: var(--color-mid);
  border: 1.5px solid var(--color-mid);
}
.btn-outline:hover { background: var(--color-foam); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding-left: 10px;
  padding-right: 10px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,39,51,0.15) 0%, rgba(13,39,51,0.78) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 32px 0 28px;
  width: 100%;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-foam-2);
  margin-bottom: 10px;
}
.hero-eyebrow a { color: var(--color-foam-2); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 6px;
}
.hero-tagline {
  font-size: 1.05rem;
  color: #E4F1F4;
  max-width: 640px;
}

/* ==========================================================================
   Trailhead Stat Strip — SIGNATURE ELEMENT
   Styled like a real trailhead marker board: routed lettering, ticked dividers
   ========================================================================== */

.stat-strip {
  background: var(--color-deep-2);
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 8px 18px -14px rgba(0,0,0,0.6);
}
.stat-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
}
.stat {
  flex: 1 1 140px;
  padding: 16px 20px;
  border-right: 1px solid rgba(255,255,255,0.09);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-foam-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.stat-value .unit {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-foam-2);
  margin-left: 2px;
}

@media (max-width: 760px) {
  .stat-strip .wrap { padding: 0; }
  .stat { flex: 1 1 45%; border-bottom: 1px solid rgba(255,255,255,0.09); }
}

/* ==========================================================================
   Content Layout
   ========================================================================== */

.page-body {
  padding: 48px 0 64px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
}

.content-section { margin-bottom: 40px; }
.content-section h2 {
  font-size: 1.5rem;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-line);
  margin-bottom: 16px;
}
.content-section p { margin: 0 0 14px; color: var(--color-ink); }
.content-section p:last-child { margin-bottom: 0; }
.content-section {
    padding-left: 20px;
    padding-right: 20px;
}

.note-box {
  background: var(--color-foam);
  border-left: 4px solid var(--color-mid);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  font-size: 0.94rem;
  color: var(--color-deep);
  margin-bottom: 18px;
}
.note-box strong { color: var(--color-deep); }

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.93rem;
  color: var(--color-ink-soft);
}
.checklist li svg { flex-shrink: 0; color: var(--color-mid); }
@media (max-width: 500px) { .checklist { grid-template-columns: 1fr; } }

/* Sidebar */
.sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.side-card h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-deep);
  margin-bottom: 14px;
}
.gps-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-line-soft);
  font-size: 0.9rem;
  gap: 10px;
}
.gps-row:last-child { border-bottom: none; }
.gps-row .label { color: var(--color-ink-soft); }
.gps-row .value { font-family: var(--font-mono); color: var(--color-deep); text-align: right; }

.mini-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-line);
  margin-top: 12px;
  height: 160px;
}

/* Rating badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-foam);
  color: var(--color-deep);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 100px;
}

.page-breadcrumb {
    font-size: 0.85rem;
    color: var(--color-ink-soft);
    margin-bottom: 12px;
}
.page-breadcrumb a {
    color: var(--color-ink-soft);
    text-decoration: underline;
}
.page-breadcrumb a:hover {
    color: var(--color-teal, #12A3A0);
}


/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.gallery a {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.gallery a:hover img { transform: scale(1.06); }

/* ==========================================================================
   Related / More falls
   ========================================================================== */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.falls-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.falls-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.falls-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.falls-card-body { padding: 14px 16px; }
.falls-card-body .county {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-mid);
}
.falls-card-body h4 { margin: 4px 0 0; font-size: 1.05rem; color: var(--color-deep); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-deep-2);
  color: #B9D3DA;
  padding: 40px 0 24px;
  margin-top: 40px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.95rem; margin-bottom: 10px; }
.site-footer a { color: #B9D3DA; }
.site-footer a:hover { color: #fff; }
.social-row { display: flex; gap: 14px; margin-top: 6px; }
.social-row a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--color-rust); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.82rem;
  color: #7FA0AA;
}
.footer-bottom .wrap { justify-content: space-between; }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ==========================================================================
   Lightbox / Gallery Slideshow
   ========================================================================== */

.gallery a { cursor: zoom-in; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 39, 51, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 60px 20px;
  animation: lightboxFadeIn 0.15s ease;
}
.lightbox-overlay.open { display: flex; }

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-stage {
  position: relative;
  max-width: 1100px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: #0D2733;
}

.lightbox-caption {
  color: #D9EBF0;
  font-size: 0.85rem;
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-body);
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-foam-2);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.lightbox-close:hover { background: var(--color-rust); border-color: var(--color-rust); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox-nav:hover { background: var(--color-rust); border-color: var(--color-rust); }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

@media (max-width: 860px) {
  .lightbox-overlay { padding: 70px 16px 40px; }
  .lightbox-close { top: -42px; right: 0; width: 36px; height: 36px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-nav { width: 40px; height: 40px; background: rgba(13,39,51,0.55); }
}

/* ==========================================================================
   Map Popup Links
   Leaflet ships its own default popup link color and loads after our
   stylesheet, so these are pinned with !important to guarantee they win.
   ========================================================================== */

.leaflet-popup-content a.btn-primary,
.leaflet-popup-content a.popup-link {
  color: #ffffff !important;
  text-decoration: none !important;
}
.leaflet-popup-content a.btn-primary:hover,
.leaflet-popup-content a.popup-link:hover {
  color: #000000 !important;
  text-decoration: none !important;
}

.popup-link {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--color-rust);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  transition: background 0.15s ease;
}
.popup-link:hover {
  background: var(--color-foam-2);
}

.video-embed {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    margin: 0 0 16px 0;
    border-radius: 8px;
    overflow: hidden;
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-embed.vertical {
    max-width: 360px;
    aspect-ratio: 9 / 16;
}

.video-thumb-card {
    display: inline-block;
    max-width: 220px;
    margin: 0 12px 16px 0;
    text-align: center;
    vertical-align: top;
}
.video-thumb-card img {
    width: 100%;
    border-radius: 8px;
    display: block;
}
.video-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
}
.video-thumb-link {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--color-teal, #12A3A0);
    text-decoration: underline;
}
.video-thumb-link:hover {
    color: var(--color-ink-soft);
}

.draft-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: bold;
    text-align: center;
}
