/* =========================================================================
   MERION LIBERTY TROOP — PHILMONT 2028
   Design tokens: Deep forest greens + sunrise amber, topo-contour motif
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=IBM+Plex+Mono:wght@500;600&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --forest-deep:   #0B3D2E;
  --forest-mid:    #123F30;
  --trail-green:   #1F5E42;
  --trail-green-2: #2C7A55;
  --sunrise:       #E8A33D;
  --sunrise-dim:   #C9832A;
  --parchment:     #F4EFE1;
  --parchment-2:   #ECE4CE;
  --tan:           #C9B896;
  --charcoal:      #1B1E1A;
  --charcoal-soft: #3C4139;
  --white:         #FFFFFF;
  --danger:        #A23B2E;
  --ok:            #2C7A55;

  --font-display: 'Fjalla One', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --maxw: 1180px;
  --radius: 6px;
  --shadow-soft: 0 6px 24px rgba(11,61,46,0.14);
  --shadow-hard: 0 2px 0 rgba(0,0,0,0.25);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--parchment);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; border-radius: var(--radius); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; margin: 0 0 .5em; color: var(--forest-deep); line-height: 1.08; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sunrise-dim);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-bottom: .6em;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--sunrise);
  display: inline-block;
}

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

/* =========================== Topo contour texture =========================== */
.topo-bg {
  position: relative;
  background-color: var(--forest-deep);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(232,163,61,0.10), transparent 42%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23F4EFE1' stroke-opacity='0.07' stroke-width='1.4'%3E%3Cpath d='M50 500 Q150 420 120 320 Q90 220 200 180 Q310 140 300 60'/%3E%3Cpath d='M10 460 Q130 380 100 280 Q70 180 190 140 Q320 100 320 20'/%3E%3Cpath d='M-30 420 Q110 340 80 240 Q50 140 180 100 Q330 60 340 -20'/%3E%3Cpath d='M120 560 Q220 480 260 400 Q310 300 420 300 Q520 300 560 220'/%3E%3Cpath d='M100 600 Q210 510 260 440 Q320 350 430 340 Q540 330 590 260'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 600px 600px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--sunrise); color: var(--forest-deep);
  padding: .6em 1em; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 1em; top: 1em; }

/* =========================== Header / Nav =========================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--forest-deep);
  border-bottom: 3px solid var(--sunrise);
}
.nav-wrap {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7em 1.2em;
}
.brand { display: flex; align-items: center; gap: .7em; color: var(--parchment); }
.brand-logo {
  width: 48px; height: 48px; 
  border-radius: 50%; 
  border: 2px solid var(--parchment); 
  flex-shrink: 0;
  background-color: var(--white);
  object-fit: cover;
}
.brand-text { line-height: 1.15; }
.brand-text .t1 { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .03em; display: block;}
.brand-text .t2 { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .14em; color: var(--tan); text-transform: uppercase; }

.main-nav ul { display: flex; gap: 1.2em; align-items: center; flex-wrap: wrap;}
.main-nav a {
  color: var(--parchment-2); font-weight: 600; font-size: .90rem;
  padding: .4em .1em; border-bottom: 2px solid transparent;
  transition: border-color .18s, color .18s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--sunrise); border-bottom-color: var(--sunrise);
}

.nav-toggle {
  display: none; background: none; border: 2px solid var(--tan); border-radius: 4px;
  width: 42px; height: 38px; cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--parchment); display: block; }

/* =========================== Buttons =========================== */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-weight: 700; font-size: .92rem;
  padding: .75em 1.3em; border-radius: 4px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sunrise); color: var(--forest-deep); box-shadow: var(--shadow-hard); }
.btn-primary:hover { background: #f0b158; }
.btn-outline { background: transparent; border-color: var(--parchment-2); color: var(--parchment-2); }
.btn-outline:hover { border-color: var(--sunrise); color: var(--sunrise); }
.btn-dark { background: var(--forest-deep); color: var(--parchment); box-shadow: var(--shadow-hard); }
.btn-dark:hover { background: var(--forest-mid); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: .5em .9em; font-size: .8rem; }

/* =========================== Hero =========================== */
.hero {
  color: var(--parchment); padding: 4.2em 1.2em 3em;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5em; align-items: center; }
.hero h1 {
  color: var(--white); font-size: clamp(2.4rem, 5vw, 3.6rem);
  text-transform: uppercase; margin-bottom: .28em;
}
.hero h1 span { color: var(--sunrise); }
.hero .lede { color: var(--parchment-2); font-size: 1.08rem; max-width: 46ch; margin-bottom: 1.4em; }
.hero-ctas { display: flex; gap: .9em; flex-wrap: wrap; margin-bottom: 1.6em; }
.hero-meta { display: flex; gap: 1.6em; flex-wrap: wrap; font-family: var(--font-mono); font-size: .78rem; color: var(--tan); }
.hero-meta b { color: var(--sunrise); display: block; font-size: 1rem; font-family: var(--font-body); }

/* Elevation profile images integration */
.elev-card {
  background: rgba(244,239,225,0.05); border: 1px solid rgba(244,239,225,0.18);
  border-radius: 8px; padding: 1.2em;
  backdrop-filter: blur(2px);
  display: flex; flex-direction: column; gap: 1em;
}
.elev-card h3 { color: var(--parchment); font-size: .95rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2em; border-bottom: 1px solid rgba(244,239,225,0.2); padding-bottom: 0.5em;}
.peak-row { display: flex; align-items: center; justify-content: space-between; background: rgba(0,0,0,0.2); padding: 0.5em 1em; border-radius: 4px;}
.peak-name { font-weight: bold; color: var(--sunrise); font-size: 1.1rem; }
.peak-elev { font-family: var(--font-mono); color: var(--parchment); font-size: 0.85rem;}
.peak-image-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5em; margin-top: 0.5em;}
.peak-image-grid img { width: 100%; height: 120px; object-fit: cover; border: 1px solid var(--tan); }

/* =========================== Stat strip =========================== */
.stat-strip {
  background: var(--parchment-2); border-top: 1px solid var(--tan); border-bottom: 1px solid var(--tan);
}
.stat-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 1.6em 1.2em;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2em;
}
.stat-item { text-align: center; border-left: 1px solid var(--tan); padding: .2em .6em; }
.stat-item:first-child { border-left: none; }
.stat-item .num { font-family: var(--font-display); font-size: 2rem; color: var(--trail-green); }
.stat-item .lbl { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--charcoal-soft); }

/* =========================== Sections =========================== */
.section { padding: 3.6em 1.2em; }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section-head { max-width: 62ch; margin-bottom: 2em; }
.section-alt { background: var(--parchment-2); }
.section-dark { background: var(--forest-deep); color: var(--parchment); }
.section-dark h2, .section-dark h3 { color: var(--white); }

/* Card grid */
.card-grid { display: grid; gap: 1.4em; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--tan); border-radius: var(--radius);
  padding: 1.4em; box-shadow: var(--shadow-soft);
}
.card h3 { font-size: 1.15rem; margin-bottom: .4em; }
.card .tag {
  display: inline-block; font-family: var(--font-mono); font-size: .65rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--forest-deep); background: var(--parchment-2);
  border: 1px solid var(--tan); padding: .2em .55em; border-radius: 3px; margin-bottom: .6em;
}
.card ul { margin-top: .6em; }
.card li { position: relative; padding-left: 1.1em; margin-bottom: .4em; font-size: .94rem; }
.card li::before { content: "–"; position: absolute; left: 0; color: var(--sunrise-dim); font-weight: 700; }

.card-img { width: 100%; height: 200px; object-fit: cover; margin-bottom: 1em; border: 1px solid var(--parchment-2); }

/* Link list */
.link-list { display: flex; flex-direction: column; gap: .7em; }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
  background: var(--white); border: 1px solid var(--tan); border-radius: var(--radius);
  padding: .9em 1.1em;
}
.link-row .lbl { font-weight: 600; }
.link-row .url { font-family: var(--font-mono); font-size: .76rem; color: var(--charcoal-soft); display: block; margin-top: .15em; }
.link-row .btn { flex-shrink: 0; }
.section-dark .link-row { background: rgba(244,239,225,0.05); border-color: rgba(244,239,225,0.18); }
.section-dark .link-row .url { color: var(--tan); }
.section-dark .link-row .lbl { color: var(--parchment); }

/* Video embed */
.video-frame {
  position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--tan); box-shadow: var(--shadow-soft); margin-bottom: 1em;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Timeline */
.timeline { position: relative; padding-left: 2em; border-left: 3px solid var(--trail-green-2); }
.timeline-item { position: relative; padding-bottom: 1.8em; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.42em; top: .2em;
  width: 14px; height: 14px; border-radius: 50%; background: var(--sunrise); border: 3px solid var(--forest-deep);
}
.timeline-item .date { font-family: var(--font-mono); font-size: .75rem; color: var(--sunrise-dim); text-transform: uppercase; letter-spacing: .06em; }
.timeline-item h4 { margin: .15em 0 .25em; font-size: 1.05rem; }

/* Itinerary Days */
.day-list { display: flex; flex-direction: column; gap: 1em; }
.day-item {
  display: grid; grid-template-columns: 110px 1fr; gap: 1.2em;
  background: var(--white); border: 1px solid var(--tan); border-radius: var(--radius);
  padding: 1.1em 1.3em; align-items: start;
}
.day-item .day-num {
  font-family: var(--font-display); font-size: 1.6rem; color: var(--trail-green);
  border-right: 1px solid var(--tan); padding-right: 1em;
}
.day-item .day-num small { display: block; font-family: var(--font-mono); font-size: .6rem; color: var(--charcoal-soft); text-transform: uppercase; letter-spacing: .08em; }
.day-item h4 { font-size: 1.05rem; margin-bottom: .25em; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--tan); }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .94rem; }
th, td { text-align: left; padding: .8em 1em; border-bottom: 1px solid var(--parchment-2); }
thead th { background: var(--forest-deep); color: var(--parchment); font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--parchment); }
td.num, th.num { text-align: right; font-family: var(--font-mono); }
tfoot td { font-weight: 700; border-top: 2px solid var(--trail-green); background: var(--parchment-2); }

/* Callout boxes */
.callout {
  border-radius: var(--radius); padding: 1.2em 1.4em; border: 1.5px solid; display: flex; gap: .9em; margin-bottom: 1.2em;
}
.callout-icon { font-weight: bold; font-size: 1.2rem; flex-shrink: 0; font-family: var(--font-display);}
.callout-danger { background: #FBEDE9; border-color: var(--danger); color: #6E2A20; }
.callout-info { background: #EAF2ED; border-color: var(--trail-green-2); color: var(--forest-deep); }
.callout-warn { background: #FDF3E2; border-color: var(--sunrise-dim); color: #6B4A15; }
.callout h4 { margin: 0 0 .2em; color: inherit; font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
.callout p { margin: 0; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: .5em; }
.chip {
  font-family: var(--font-mono); font-size: .72rem; background: var(--forest-deep); color: var(--parchment);
  padding: .35em .75em; border-radius: 20px; border: 1px solid var(--trail-green-2);
}

/* Page header */
.page-head { color: var(--parchment); padding: 3.4em 1.2em 2.4em; }
.page-head .section-inner { max-width: var(--maxw); margin: 0 auto; }
.page-head h1 { color: var(--white); font-size: clamp(2rem, 4.4vw, 3rem); text-transform: uppercase; }
.page-head p { color: var(--parchment-2); max-width: 60ch; }
.breadcrumb { font-family: var(--font-mono); font-size: .72rem; color: var(--tan); margin-bottom: 1em; text-transform: uppercase; letter-spacing: .08em; }
.breadcrumb a { color: var(--sunrise); }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.small { font-size: .85rem; color: var(--charcoal-soft); }
.divider { height: 1px; background: var(--tan); margin: 2.4em 0; border: 0; }

/* Footer */
.site-footer { background: var(--forest-deep); color: var(--parchment-2); padding: 3em 1.2em 1.6em; }
.footer-grid {
  max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1.5fr; gap: 2em;
  padding-bottom: 2em; border-bottom: 1px solid rgba(244,239,225,0.15);
}
.footer-grid h4 { color: var(--sunrise); font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1em; }
.footer-grid a { display: block; margin-bottom: .6em; font-size: .9rem; color: var(--parchment-2); }
.footer-grid a:hover { color: var(--sunrise); }
.footer-bottom { max-width: var(--maxw); margin: 1.4em auto 0; display: flex; flex-direction: column; gap: .6em; font-size: .78rem; color: var(--tan); }
.footer-bottom div { display: flex; flex-wrap: wrap; gap: 1em; justify-content: space-between; width: 100%;}

/* Responsive */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .peak-image-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: 78%; max-width: 320px; height: 100vh;
    background: var(--forest-deep); padding: 5.4em 1.6em 2em; transform: translateX(100%);
    transition: transform .28s ease; box-shadow: -8px 0 30px rgba(0,0,0,0.3); z-index: 150;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0; align-items: flex-start;}
  .main-nav a { display: block; padding: .9em 0; border-bottom: 1px solid rgba(244,239,225,0.1); font-size: 1rem; width: 100%;}
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 140; }
  .nav-scrim.open { display: block; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 1.4em .8em; }
  .stat-item { border-left: none; border-top: 1px solid var(--tan); padding-top: .7em; }
  .stat-item:first-child, .stat-item:nth-child(2) { border-top: none; }
  .day-item { grid-template-columns: 1fr; }
  .day-item .day-num { border-right: none; border-bottom: 1px solid var(--tan); padding-right: 0; padding-bottom: .4em; display: flex; align-items: baseline; gap: .5em; }
  .link-row { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2.6em; }
  .section { padding: 2.6em 1em; }
}