@import url('/assets/css/fonts.css');

/* =============================================================================
   Camp Longer — design system
   Direction: a USGS topographic quad sheet. Contour lines carry structure,
   trail blazes carry wayfinding, map-label type carries hierarchy.
   Palette is drawn from real topo sheet inks, not a generic outdoor palette.
   ========================================================================== */

:root {
  /* Surface */
  --paper:        #f7f5ef;  /* quad-sheet paper */
  --paper-sunk:   #efebe0;  /* recessed panels */
  --paper-raised: #fffdf8;  /* cards lifted off the sheet */

  /* Ink */
  --ink:          #1b2620;  /* body + headings */
  --ink-soft:     #55625a;  /* secondary text (4.9:1 on paper) */
  --ink-faint:    #7d8a82;  /* captions, metadata */

  /* Map inks — each has one job */
  --contour:      #a8763e;  /* contour lines: rules + dividers ONLY, never text */
  --contour-pale: #d8c2a0;
  --water:        #2c6382;  /* links, informational accents (5.2:1) */
  --woodland:     #cbdeb4;  /* vegetation fills, tags */
  --woodland-ink: #3d5730;  /* text on woodland fills */
  --blaze:        #c6402a;  /* trail blaze: primary CTA + current marker (5.1:1) */
  --blaze-deep:   #a4321f;

  /* Type */
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Source Serif 4', ui-serif, Georgia, serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* Type scale — 1.25 minor third, fluid at the top end */
  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1.0625rem;
  --t-md:   1.1875rem;
  --t-lg:   clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --t-xl:   clamp(1.5rem, 1.25rem + 1.2vw, 2rem);
  --t-2xl:  clamp(1.9rem, 1.45rem + 2.1vw, 2.9rem);
  --t-3xl:  clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem);

  /* Space — 4px base */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 3rem;     --s-8: 4rem;
  --s-9: 6rem;     --s-10: 8rem;

  /* Form */
  --radius-sm: 3px;
  --radius:    8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(27 38 32 / 0.06), 0 2px 6px rgb(27 38 32 / 0.04);
  --shadow:    0 2px 4px rgb(27 38 32 / 0.06), 0 8px 24px rgb(27 38 32 / 0.08);
  --shadow-lg: 0 4px 8px rgb(27 38 32 / 0.07), 0 18px 48px rgb(27 38 32 / 0.12);

  /* Motion — nothing linear, ever */
  --ease-out:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-both: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-lift: cubic-bezier(0.34, 1.3, 0.64, 1); /* slight overshoot, for grabbable things */
  --dur-fast:  160ms;
  --dur:       260ms;
  --dur-slow:  520ms;

  --measure: 68ch;
  --wrap:    72rem;
  --wrap-narrow: 44rem;
}

/* ---------- base ---------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.018em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}

p { margin: 0 0 var(--s-5); }

a {
  color: var(--water);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--blaze); }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--blaze);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--woodland); color: var(--woodland-ink); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100%;
  z-index: 100;
  padding: var(--s-3) var(--s-5);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 0; color: var(--paper); }

.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;
}

/* ---------- layout -------------------------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(100% - 2.5rem, var(--wrap-narrow));
  margin-inline: auto;
}

.section { padding-block: var(--s-9); }
.section-sunk { background: var(--paper-sunk); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
/* The eyebrow rule reads as a contour line running off the page edge. */
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--contour-pale), transparent);
}

/* ---------- contour divider (the signature) ------------------------------- */
/* Section transitions are stacked contour lines rather than a hard rule, so
   the page reads as terrain instead of stacked boxes. */

.contour-band {
  display: block;
  width: 100%;
  height: clamp(48px, 6vw, 96px);
  color: var(--contour-pale);
  pointer-events: none;
}
.contour-band path { fill: none; stroke: currentColor; stroke-width: 1.25; }
.contour-band path:nth-child(1) { opacity: 0.85; }
.contour-band path:nth-child(2) { opacity: 0.6; }
.contour-band path:nth-child(3) { opacity: 0.4; }
.contour-band path:nth-child(4) { opacity: 0.25; }

/* ---------- header -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--contour-pale);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: var(--s-4);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-lg);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.wordmark:hover { color: var(--ink); }

/* A real trail blaze: the painted rectangle that marks a route. */
.blaze-mark {
  width: 14px;
  height: 22px;
  border-radius: 2px;
  background: var(--blaze);
  flex: none;
  transition: transform var(--dur) var(--ease-lift);
}
.wordmark:hover .blaze-mark { transform: translateY(-2px) rotate(-4deg); }

.nav { display: flex; align-items: center; gap: var(--s-2); }

.nav__link {
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--ink); background: var(--paper-sunk); }

/* Current section gets the blaze — same language as the wordmark. */
.nav__link[aria-current='page'] { color: var(--ink); }
.nav__link[aria-current='page']::before {
  content: '';
  position: absolute;
  left: var(--s-3);
  right: var(--s-3);
  bottom: 2px;
  height: 3px;
  border-radius: 2px;
  background: var(--blaze);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* WCAG 2.5.8 minimum touch target */
  min-width: 44px;
  background: none;
  border: 1px solid var(--contour-pale);
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-toggle:hover { border-color: var(--contour); background: var(--paper-sunk); }

/* ---------- buttons ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: 0.01em;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur) var(--ease-lift),
    box-shadow var(--dur) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.btn-primary {
  background: var(--blaze);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--blaze-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--contour-pale);
}
.btn-quiet:hover {
  color: var(--ink);
  border-color: var(--contour);
  background: var(--paper-raised);
  transform: translateY(-2px);
}

/* ---------- hero ---------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: var(--s-9) var(--s-8);
  overflow: hidden;
}
/* Faint contour topography behind the hero — depth without a gradient wash. */
.hero__topo {
  position: absolute;
  inset: 0;
  color: var(--contour);
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
}
.hero__topo svg { width: 100%; height: 100%; }
.hero__topo path,
.hero__topo ellipse { fill: none; stroke: currentColor; stroke-width: 1; }
.hero__inner { position: relative; z-index: 1; }

.hero__title {
  font-size: var(--t-3xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 18ch;
  margin-bottom: var(--s-5);
}
.hero__lede {
  font-size: var(--t-lg);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: var(--s-6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }

/* ---------- cards --------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--s-6);
  list-style: none;
  padding: 0;
  margin: 0;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--contour-pale);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform var(--dur) var(--ease-lift),
    box-shadow var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--contour);
}

.card__media {
  aspect-ratio: 16 / 10;
  background: var(--paper-sunk);
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.card:hover .card__media img { transform: scale(1.04); }

.card__body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--s-3);
}
.card__title {
  font-size: var(--t-md);
  font-weight: 700;
  line-height: 1.22;
  margin: 0;
}
.card__title a {
  color: var(--ink);
  text-decoration: none;
}
.card__title a:hover { color: var(--blaze); }
/* Whole card is clickable, but the link text stays the accessible name. */
.card__title a::after { content: ''; position: absolute; inset: 0; }
.card { position: relative; }

.card__desc {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  display: flex;
  gap: var(--s-3);
  align-items: center;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px var(--s-2);
  border-radius: var(--radius-sm);
  background: var(--woodland);
  color: var(--woodland-ink);
  text-decoration: none;
}
a.tag:hover { background: var(--woodland-ink); color: var(--woodland); }

/* ---------- article ------------------------------------------------------- */

.article-header { padding-block: var(--s-8) var(--s-6); }
.article-title {
  font-size: var(--t-2xl);
  max-width: 22ch;
  margin-bottom: var(--s-5);
}
.article-lede {
  font-size: var(--t-lg);
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* Honest, specific metadata — dates and reading time, in data type. */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-block: var(--s-4);
  border-top: 1px solid var(--contour-pale);
  border-bottom: 1px solid var(--contour-pale);
}
.article-meta__sep { color: var(--contour-pale); }

.article-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-block: var(--s-6);
  border: 1px solid var(--contour-pale);
}

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s-5); }
.prose h2 {
  font-size: var(--t-xl);
  margin-top: var(--s-8);
  padding-top: var(--s-4);
  border-top: 2px solid var(--contour-pale);
}
.prose h3 { font-size: var(--t-lg); margin-top: var(--s-6); }
.prose h4 { font-size: var(--t-md); margin-top: var(--s-5); }
.prose ul, .prose ol { padding-left: var(--s-5); }
.prose li { margin-bottom: var(--s-2); }
.prose li::marker { color: var(--contour); }
.prose img {
  border-radius: var(--radius);
  margin-block: var(--s-6);
  border: 1px solid var(--contour-pale);
}
.prose blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--blaze);
  background: var(--paper-sunk);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--ink-soft);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
}
.prose th, .prose td {
  text-align: left;
  padding: var(--s-3);
  border-bottom: 1px solid var(--contour-pale);
}
.prose th { font-weight: 600; color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* Affiliate links carry a subtle, honest marker rather than hiding. */
.prose a[data-affiliate] {
  text-decoration-color: var(--contour);
  font-weight: 600;
}

/* ---------- product CTA --------------------------------------------------- */
/* Replaces the dead WordPress affiliate-plugin boxes. Its job: make the buy
   step obvious without pretending to know a price we can't verify — the note
   says so plainly, which reads as more trustworthy than a stale number. */

.product-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  margin-block: var(--s-6);
  padding: var(--s-5);
  background: var(--paper-raised);
  border: 1px solid var(--contour-pale);
  border-left: 4px solid var(--blaze);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.product-cta:hover { box-shadow: var(--shadow); border-color: var(--contour); }

.product-cta__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-md);
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

.product-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-sm);
  color: #fff;
  background: var(--blaze);
  text-decoration: none;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur) var(--ease-lift),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.product-cta__btn::after {
  content: '→';
  transition: transform var(--dur) var(--ease-lift);
}
.product-cta__btn:hover {
  background: var(--blaze-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.product-cta__btn:hover::after { transform: translateX(3px); }
.product-cta__btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.product-cta__note {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-faint);
  margin: 0;
  line-height: 1.5;
}

/* The prose rule adds top margin to every sibling; the CTA owns its own spacing. */
.prose > .product-cta + * { margin-top: var(--s-5); }

/* ---------- disclosure ---------------------------------------------------- */

.disclosure {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  padding: var(--s-4) var(--s-5);
  margin-block: var(--s-6);
  background: var(--paper-sunk);
  border: 1px solid var(--contour-pale);
  border-radius: var(--radius);
  font-size: var(--t-sm);
  color: var(--ink-soft);
}
.disclosure p { margin: 0; }
.disclosure__icon { color: var(--contour); flex: none; margin-top: 2px; }

/* ---------- forms --------------------------------------------------------- */

.form { margin-block: var(--s-6); max-width: 34rem; }
.form__row { margin-bottom: var(--s-5); }

.form__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-sm);
  margin-bottom: var(--s-2);
}

.form__input {
  width: 100%;
  font-family: inherit;
  font-size: var(--t-base);
  color: var(--ink);
  padding: var(--s-3) var(--s-4);
  background: var(--paper-raised);
  border: 1px solid var(--contour-pale);
  border-radius: var(--radius);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.form__input:hover { border-color: var(--contour); }
.form__input:focus {
  outline: none;
  border-color: var(--water);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--water) 22%, transparent);
}
.form__input:focus-visible { outline: none; }
textarea.form__input { resize: vertical; min-height: 8rem; }

.form__hint,
.form__note {
  display: block;
  font-size: var(--t-sm);
  color: var(--ink-faint);
  margin-top: var(--s-2);
}
.form__note { margin-top: var(--s-4); }

/* Honeypot — hidden from people, still reachable by bots. */
.form__hp { position: absolute; left: -5000px; }

/* ---------- related / footer ---------------------------------------------- */

.related { padding-block: var(--s-8); }

.site-footer {
  background: var(--ink);
  color: var(--paper-sunk);
  padding-block: var(--s-8) var(--s-6);
  margin-top: var(--s-9);
}
.site-footer a { color: var(--woodland); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--s-6);
  margin-bottom: var(--s-7);
}
.footer-heading {
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--s-3);
}
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.footer-list a { text-decoration: none; font-size: var(--t-sm); }
.footer-list a:hover { text-decoration: underline; }
.colophon {
  border-top: 1px solid rgb(255 255 255 / 0.14);
  padding-top: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: #9fb0a4;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
}

/* ---------- motion -------------------------------------------------------- */

/* Staggered reveal: the eye follows a cascade instead of a single flash.
   Content is visible by default and JS opts *into* the animation by setting
   .js-motion on <html>. If the script fails to load, nothing is ever hidden. */
.js-motion .reveal {
  opacity: 0;
  transform: translateY(14px);
}
.js-motion .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------------------------------------------------- */

@media (max-width: 46rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-3);
    background: var(--paper-raised);
    border-bottom: 1px solid var(--contour-pale);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: var(--s-3) var(--s-4); min-height: 44px; display: flex; align-items: center; }
  .nav__link[aria-current='page']::before { left: var(--s-4); right: auto; width: 18px; }
  .site-header__inner { position: relative; }
  .section { padding-block: var(--s-7); }
  .hero { padding-block: var(--s-7) var(--s-6); }
}

@media print {
  .site-header, .site-footer, .related, .contour-band { display: none; }
  body { background: #fff; }
}
