/* Bearpath — campsite pages (olympic/campsites/<slug>).

   One static fact page per campsite, generated into dist/ by
   scripts/build_static_site.py from the committed catalog. Like the About
   page it is an ordinary scrolling document: one readable column, the same
   spruce header bar, and no JavaScript at all. A campsite page is the surface
   most likely to be opened on a phone at a trailhead, so it shares About's
   breakpoint and keeps every link a comfortable thumb target there.

   Surfaces, ink, lines, the focus ring and --brand-font come from brand.css,
   which derives them from assets/brand/tokens/bearpath-colors.css. Both are
   linked before this file. See docs/campsite-pages.md. */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--brand-font);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
}

/* Visually hidden but available to screen readers: the "(opens in a new tab)"
   suffixes on outbound links. Same primitive as About's. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Header ─────────────────────────────────────────── */

.campsite-header {
  background: var(--brand-primary);
  color: var(--bearpath-canvas);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  flex-wrap: wrap;
}

.campsite-home {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.campsite-header .brand-logo {
  flex-shrink: 0;
  height: 22px;
  margin-right: 0;
}

.campsite-nav a {
  font-size: 0.8rem;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 5px;
  padding: 6px 12px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.campsite-nav a:hover { background: rgba(255, 255, 255, 0.14); }

.campsite-home:focus-visible,
.campsite-nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Document column ────────────────────────────────── */

.campsite {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  /* Long listing names and outbound URLs must never widen the page. */
  min-width: 0;
  overflow-wrap: break-word;
}

.campsite h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

.campsite-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.campsite-listing {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.campsite-listing-name { color: var(--text-body); }

.campsite section { margin-top: 30px; }

.campsite h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.campsite section p { margin-top: 10px; }

.campsite a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.campsite a:hover { color: var(--brand-deep); }
.campsite a:focus-visible { outline-offset: 1px; }

/* ── Badges ─────────────────────────────────────────── */

.campsite-badges {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.campsite-badge {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-tint);
  color: var(--text);
}

/* WIC only is a booking-method fact; it keeps the hue the planner and About
   use for it rather than an alarm colour. */
.campsite-badge--wic {
  border-color: #6B4E8F;
  color: #6B4E8F;
  background: var(--bg);
}

/* ── Location and the way back to the planner ───────── */

.campsite-location {
  margin-top: 14px;
  font-size: 0.95rem;
}

.campsite-location p + p { margin-top: 6px; }

.campsite-location-label { font-weight: 600; color: var(--text); }

.campsite-caveat {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.campsite-note,
.campsite-unmapped {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.campsite-unmapped { font-weight: 600; }

.campsite-actions { margin-top: 16px; }

.campsite .campsite-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.campsite .campsite-button:hover {
  background: var(--brand-deep);
  color: #fff;
}

.campsite-inline-links a { white-space: nowrap; }

/* ── Official links ─────────────────────────────────── */

.campsite-links {
  margin-top: 10px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campsite-links li { min-width: 0; }
.campsite-links a { overflow-wrap: anywhere; }

/* ── No write-up yet ────────────────────────────────── */

.campsite-writeup {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-primary);
  border-radius: 6px;
  padding: 14px 18px;
}

.campsite-writeup h2 { border-bottom: none; padding-bottom: 0; }

/* ── Reviewed write-up (Phase 3) ────────────────────── */

/* Rendered only on a page with reviewed editorial; a page without one never
   carries these classes, so nothing above changes for it. */
.campsite-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.campsite-breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-muted);
}

.campsite-breadcrumb + .campsite-intro { margin-top: 12px; }

.campsite-review-line {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.campsite-practical,
.campsite-sources {
  margin-top: 10px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campsite-practical { list-style: none; padding-left: 0; }
.campsite-practical-label { font-weight: 600; color: var(--text); }
.campsite-sources a { overflow-wrap: anywhere; }

/* ── Footer ─────────────────────────────────────────── */

.campsite-foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px 48px;
}

.campsite-foot p {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Campsite index (olympic/campsites/) ────────────── */

/* The index lists 152 links in one column. .campsite-links is for outbound
   links and breaks words anywhere, which is wrong for short camp names, so
   the index list gets its own spacing and its own secondary line. */
.campsite-index-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.campsite-index-list .campsite-note {
  display: block;
  margin-top: 2px;
}

/* ── Narrow screens ─────────────────────────────────── */

@media (max-width: 480px) {
  .campsite-header { padding: 10px 12px; }
  .campsite { padding: 20px 14px 32px; }
  .campsite h1 { font-size: 1.45rem; }
  .campsite-writeup { padding: 12px 14px; }
  .campsite-foot { padding: 12px 14px 40px; }

  /* Thumb targets, not pointer targets. */
  .campsite-nav a { min-height: 44px; padding: 6px 14px; }
  .campsite .campsite-button { min-height: 44px; }
  .campsite-links li { padding: 4px 0; }
  .campsite-index-list li { padding: 4px 0; }
  .campsite-sources li { padding: 4px 0; }
}
