/* =========================================================
   Hiking Social - stylesheet
   A community site for hikers in the Potomac & Shenandoah region
   Palette: cream / moss / sage / clay - abundant whitespace,
   layered topographic motifs, soft parallax hero.
   ========================================================= */

:root {
  /* --- palette --- */
  --cream:        #faf6ec;
  --cream-deep:   #f2ecdd;
  --paper:        #fffdf7;
  --moss-900:     #263424;
  --moss-800:     #324532;
  --moss-700:     #3f5a3d;
  --sage-500:     #7c9a72;
  --sage-300:     #a9c19d;
  --sage-200:     #cddac2;
  --clay-600:     #b5592f;
  --clay-500:     #c76a3d;
  --ochre-500:    #d69a4c;
  --ink:          #2a2a24;
  --ink-soft:     #55574c;
  --line:         #ddd6c3;

  /* --- type --- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Work Sans", "Helvetica Neue", Arial, sans-serif;

  /* --- spacing scale --- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;
  --space-2xl: 10rem;

  --radius: 3px;
  --max-width: 1180px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
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: 600;
  color: var(--moss-900);
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
}
p { margin: 0 0 var(--space-sm); }
button { font-family: inherit; cursor: pointer; }

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

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

/* ---------- eyebrow / kicker ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay-600);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--clay-600);
  display: inline-block;
}
.kicker-center { justify-content: center; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--moss-900);
}
.brand svg { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--moss-800);
  position: relative;
  padding: 0.2rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--clay-600);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: 0.9rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--moss-800);
  color: var(--paper);
}
.btn-primary:hover { background: var(--moss-900); transform: translateY(-1px); }
.btn-clay {
  background: var(--clay-600);
  color: var(--paper);
}
.btn-clay:hover { background: #9c4a26; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--moss-800);
  border-color: var(--moss-800);
}
.btn-ghost:hover { background: var(--moss-800); color: var(--paper); }
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--moss-900); display: block;
}

/* ============================================================
   HERO - layered parallax ridgelines
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #fdfbf3 0%, var(--cream) 55%, var(--cream-deep) 100%);
}
.hero-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-layer {
  position: absolute;
  left: 0;
  width: 100%;
  bottom: 0;
  will-change: transform;
}
.hero-layer svg { width: 100%; display: block; }

.hero-layer--sky {
  bottom: auto;
  top: -10%;
  opacity: 0.5;
}
.hero-layer--far   { bottom: -4%; }
.hero-layer--mid   { bottom: -6%; }
.hero-layer--near  { bottom: -8%; }

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  text-align: center;
}
.hero-content h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  letter-spacing: -0.01em;
}
.hero-content h1 em {
  font-style: italic;
  color: var(--clay-600);
}
.hero-sub {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto var(--space-md);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.hero-meta {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--font-display);
}
.hero-meta div { text-align: center; }
.hero-meta strong {
  display: block;
  font-size: 1.7rem;
  color: var(--moss-800);
}
.hero-meta span {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.scroll-cue {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 5;
}
.scroll-cue .line {
  width: 1px; height: 34px; background: var(--ink-soft);
  animation: cue-pulse 2.2s ease-in-out infinite;
}
@keyframes cue-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(0.5); opacity: 1; }
}

/* ============================================================
   SECTION SCAFFOLDING
   ============================================================ */
section { position: relative; }
.section {
  padding: var(--space-2xl) 0;
}
.section-tight { padding: var(--space-xl) 0; }
.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}
.section-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.divider-contour {
  width: 100%;
  height: 46px;
  opacity: 0.55;
}

/* ---------- intro / mission ---------- */
.mission {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mission .wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-xl);
  align-items: center;
}
.mission-figure svg { width: 100%; height: auto; }
.mission-copy h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.mission-copy p { color: var(--ink-soft); font-size: 1.05rem; }
.mission-stats {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}
.mission-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--clay-600);
}
.mission-stats div span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   BLOG / TRAIL JOURNAL CARDS
   ============================================================ */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -26px rgba(38, 52, 36, 0.35);
}
.post-card-art {
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, var(--sage-200), var(--cream-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.post-card-art svg { width: 100%; height: 100%; }
.post-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-600);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.post-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.post-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  flex: 1;
}
.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0.8rem 0 1.1rem;
  flex-wrap: wrap;
}
.post-meta span { display: inline-flex; align-items: center; gap: 0.35em; }
.post-link {
  font-weight: 600;
  color: var(--moss-800);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.92rem;
}
.post-link svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.post-card:hover .post-link svg { transform: translateX(4px); }

/* ============================================================
   TRAIL MAP
   ============================================================ */
.map-section {
  background: var(--moss-900);
  color: var(--cream);
}
.map-section .section-head h2 { color: var(--cream); }
.map-section .section-head p { color: #c9d2c2; }
.map-shell {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.map-figure {
  background: #1d2919;
  border: 1px solid #3a4b34;
  border-radius: var(--radius);
  padding: var(--space-md);
}
.map-legend { display: flex; flex-direction: column; gap: var(--space-md); }
.legend-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid #3a4b34;
}
.legend-item:last-child { border-bottom: none; padding-bottom: 0; }
.legend-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
  border: 2px solid var(--cream);
  background: var(--clay-600);
}
.legend-item h4 { color: var(--cream); margin-bottom: 0.25rem; font-size: 1.1rem; }
.legend-item p { color: #c9d2c2; font-size: 0.92rem; margin: 0; }
.map-note {
  margin-top: var(--space-sm);
  font-size: 0.82rem;
  color: #9fae96;
  font-style: italic;
}

/* ============================================================
   CTA / SIGNUP
   ============================================================ */
.cta {
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-shell {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.cta-shell h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.cta-shell p { color: var(--ink-soft); font-size: 1.05rem; }
.signup-form {
  display: flex;
  gap: 0.75rem;
  margin-top: var(--space-md);
  max-width: 460px;
  margin-inline: auto;
  flex-wrap: wrap;
}
.signup-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.signup-form input[type="email"]:focus {
  outline: 2px solid var(--sage-500);
  outline-offset: 1px;
}
.form-note {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.form-success {
  display: none;
  margin-top: var(--space-md);
  padding: 0.9rem 1.2rem;
  background: var(--sage-200);
  border: 1px solid var(--sage-500);
  border-radius: var(--radius);
  color: var(--moss-900);
  font-weight: 500;
}
.form-success.visible { display: block; }

/* ---------- login teaser (in-page section) ---------- */
.login-teaser {
  padding: var(--space-xl) 0;
  text-align: center;
}
.login-teaser h3 { font-size: 1.6rem; }
.login-teaser p { color: var(--ink-soft); max-width: 480px; margin: 0 auto var(--space-md); }

/* ============================================================
   MODAL - subscriber login
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(38, 52, 36, 0.55);
/*  backdrop-filter: blur(3px); */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--paper);
  border-radius: var(--radius);
  width: 100%;
  max-width: 400px;
  padding: var(--space-lg) var(--space-md);
  position: relative;
  transform: translateY(12px);
  transition: transform 0.25s ease;
  border: 1px solid var(--line);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-soft);
}
.modal h3 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}
.modal-sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}
.field {
  margin-bottom: var(--space-sm);
}
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--moss-800);
  margin-bottom: 0.4rem;
}
.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream);
}
.field input:focus {
  outline: 2px solid var(--sage-500);
  outline-offset: 1px;
}
.modal .btn { width: 100%; margin-top: 0.4rem; }
.modal-foot {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: var(--space-sm);
}
.modal-foot a { color: var(--clay-600); font-weight: 600; }
.modal-message {
  display: none;
  text-align: center;
  background: var(--sage-200);
  border: 1px solid var(--sage-500);
  border-radius: var(--radius);
  padding: 0.8rem;
  color: var(--moss-900);
  font-size: 0.88rem;
  margin-top: var(--space-sm);
}
.modal-message.visible { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--moss-900);
  color: #c9d2c2;
  padding: var(--space-xl) 0 var(--space-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid #3a4b34;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--cream);
  margin-bottom: 0.8rem;
}
.footer-brand svg { width: 26px; height: 26px; }
.footer-grid p { font-size: 0.92rem; max-width: 280px; }
.footer-col h4 {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { font-size: 0.92rem; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ============================================================
   ARTICLE / BLOG POST PAGES
   ============================================================ */
.post-hero {
  background: linear-gradient(180deg, #fdfbf3 0%, var(--cream) 100%);
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--line);
}
.post-hero .wrap { max-width: 780px; }
.breadcrumb {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-md);
}
.breadcrumb a { color: var(--moss-800); font-weight: 600; }
.post-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); }
.post-dek { font-size: 1.15rem; color: var(--ink-soft); }
.post-hero-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.post-hero-meta span { display: inline-flex; gap: 0.4em; align-items: center; }

.post-hero-art {
  margin-top: var(--space-lg);
}
.post-hero-art svg { width: 100%; height: auto; }

.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
.article-body h2 {
  font-size: 1.7rem;
  margin-top: var(--space-md);
}
.article-body h3 {
  font-size: 1.25rem;
  color: var(--clay-600);
}
.article-body p, .article-body li {
  font-size: 1.06rem;
  color: var(--ink);
}
.article-body ul { list-style: none; margin: 0 0 var(--space-sm); }
.article-body ul li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.5rem;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 8px; height: 8px;
  background: var(--sage-500);
  border-radius: 50%;
}
.pull-note {
  border-left: 3px solid var(--clay-600);
  background: var(--cream-deep);
  padding: 1rem 1.3rem;
  font-size: 0.98rem;
  color: var(--moss-900);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.trail-facts {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-md);
  align-self: start;
}
.trail-facts h4 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay-600);
  margin-bottom: var(--space-sm);
}
.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.fact-row:last-child { border-bottom: none; }
.fact-row dt { color: var(--ink-soft); }
.fact-row dd { margin: 0; font-weight: 600; color: var(--moss-900); text-align: right; }

.elevation-profile {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}
.elevation-profile h4 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay-600);
  margin-bottom: 0.7rem;
}
.elevation-profile svg { width: 100%; height: auto; }

.related-posts {
  border-top: 1px solid var(--line);
  padding: var(--space-xl) 0;
  background: var(--paper);
}
.related-posts .wrap { max-width: var(--max-width); }
.related-posts h3 { text-align: center; margin-bottom: var(--space-lg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .journal-grid { grid-template-columns: repeat(2, 1fr); }
  .mission .wrap { grid-template-columns: 1fr; gap: var(--space-lg); }
  .mission-figure { max-width: 320px; margin: 0 auto; }
  .map-shell { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-body { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    padding: var(--space-md);
    border-bottom: 1px solid var(--line);
    gap: var(--space-md);
  }
  .journal-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: var(--space-md); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .signup-form { flex-direction: column; }
  .signup-form .btn { width: 100%; }
}
