/* Campersignals — Dark Design System
   ------------------------------------------------
   Core tokens, typography, components.
   Referenced by every page. */

:root {
  /* Neutrals — cool dark with a subtle green undertone */
  --bg:         #0b0f0d;
  --bg-raise:  #11161300;
  --surface:    #121815;
  --surface-2:  #171f1b;
  --line:       #1f2925;
  --line-2:     #2a3731;
  --text:       #e8efea;
  --text-dim:   #a5b3ac;
  --text-mute:  #6f7c76;

  /* Campersignals green (from logo) — used sparingly as accent */
  --green:       #4ea860;
  --green-soft:  #6fc37e;
  --green-deep:  #2f7a3f;
  --green-glow:  rgba(78, 168, 96, 0.25);
  --green-line:  rgba(78, 168, 96, 0.35);

  /* Semantic */
  --danger:  #e2574c;
  --warn:    #f0b429;

  /* Type */
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  /* Layout */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --max-wrap:  1160px;

  /* Shadow & focus */
  --shadow-1: 0 1px 0 rgba(255,255,255,0.03), 0 10px 30px rgba(0,0,0,0.45);
  --focus:    0 0 0 3px rgba(78, 168, 96, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* Subtle ambient backdrop: dim radial green glow top-left + tight grain */
  background-image:
    radial-gradient(ellipse 60% 40% at 12% -5%, rgba(78,168,96,0.12), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 110%, rgba(78,168,96,0.06), transparent 60%);
  background-attachment: fixed;
}

/* Typography ---------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1em; color: var(--text-dim); }
p strong { color: var(--text); font-weight: 600; }

a {
  color: var(--green-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
a:hover { color: #87d495; border-bottom-color: var(--green-line); }
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

::selection { background: var(--green-glow); color: #fff; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }

/* Layout -------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max-wrap);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

main { flex: 1 0 auto; }

.section {
  padding: clamp(40px, 7vw, 96px) 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-soft);
  padding: 6px 12px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: rgba(78,168,96,0.06);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
}

/* Header -------------------------------------------------------- */
.cs-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(11, 15, 13, 0.75);
  border-bottom: 1px solid var(--line);
}
.cs-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.cs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  border: 0;
}
.cs-brand:hover { color: var(--text); border: 0; }
.cs-brand img {
  height: 32px; width: 32px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(78, 168, 96, 0.2));
}
.cs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cs-nav a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 0;
}
.cs-nav a:hover { color: var(--text); background: var(--surface); border: 0; }
.cs-nav a.is-active {
  color: var(--text);
  background: var(--surface);
}
.cs-nav a.is-active::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 10px var(--green-glow);
}
.cs-burger {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}
@media (max-width: 820px) {
  .cs-burger { display: inline-flex; align-items: center; gap: 8px; }
  .cs-nav {
    display: none;
    position: absolute;
    top: 62px;
    right: 18px;
    left: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    box-shadow: var(--shadow-1);
  }
  .cs-nav.is-open { display: flex; }
  .cs-nav a { padding: 12px 14px; border-radius: 10px; }
}

/* Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  line-height: 1;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--green);
  color: #07110a;
  border-color: var(--green);
}
.btn--primary:hover {
  background: var(--green-soft);
  border-color: var(--green-soft);
  color: #07110a;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--green-line);
  color: var(--text);
}

.btn--lg { padding: 16px 24px; font-size: 16px; border-radius: 14px; }

/* Card ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.card--hover:hover {
  border-color: var(--green-line);
  transform: translateY(-2px);
}

/* Footer -------------------------------------------------------- */
.cs-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: #080b09;
  padding: 48px 0 32px;
}
.cs-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
@media (max-width: 720px) {
  .cs-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}
.cs-footer h4 {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
  font-weight: 500;
}
.cs-footer__links { display: flex; flex-direction: column; gap: 8px; }
.cs-footer__links a {
  color: var(--text-dim);
  font-size: 14px;
  border: 0;
}
.cs-footer__links a:hover { color: var(--text); border: 0; }
.cs-footer__social { display: flex; gap: 14px; margin-top: 14px; }
.cs-footer__social a {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.cs-footer__social a:hover { color: var(--green-soft); border-color: var(--green-line); }
.cs-footer__social svg { width: 18px; height: 18px; }
.cs-footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: var(--text-mute);
}
.cs-footer__bottom .fine { line-height: 1.55; }
.cs-footer__brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cs-footer__brand-line img { height: 26px; width: 26px; }
.cs-footer__brand-line strong {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.cs-footer p.tagline {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 32ch;
  margin: 0;
}

/* Sticky bottom CTA (index only) -------------------------------- */
.cs-sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: rgba(11, 15, 13, 0.88);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--line);
  padding: 12px 0;
  transform: translateY(120%);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1);
}
.cs-sticky-cta.is-visible { transform: translateY(0); }
.cs-sticky-cta__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.cs-sticky-cta__text {
  display: flex; flex-direction: column;
  min-width: 0;
}
.cs-sticky-cta__text strong {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
}
.cs-sticky-cta__text span {
  font-size: 12px;
  color: var(--text-mute);
}
.cs-sticky-cta form {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  max-width: 520px;
}
.cs-sticky-cta input[type="email"] {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
}
.cs-sticky-cta input[type="email"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}
@media (max-width: 720px) {
  .cs-sticky-cta__text { display: none; }
  .cs-sticky-cta form { max-width: none; }
}

/* Prose (legal/help pages) -------------------------------------- */
.prose {
  max-width: 72ch;
  margin: 0 auto;
}
.prose h2 {
  font-size: 1.3rem;
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--line);
}
.prose h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.prose h3 { font-size: 1.05rem; margin-top: 2em; color: var(--text); }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.3em; }
.prose strong { color: var(--text); }

/* Breadcrumb */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 0;
  margin-bottom: 24px;
}
.crumb:hover { color: var(--green-soft); border: 0; }

/* Utility */
.muted { color: var(--text-dim); }
.dim   { color: var(--text-mute); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }
.hidden-sm { }
@media (max-width: 640px) { .hidden-sm { display: none !important; } }

/* Cookie banner (dark, subtle) ---------------------------------- */
.cs-cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
  display: none;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}
.cs-cookie.is-visible { display: block; }
.cs-cookie__inner {
  max-width: var(--max-wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.cs-cookie__text { flex: 1 1 320px; }
.cs-cookie__text strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 2px;
}
.cs-cookie__actions { display: flex; gap: 8px; }
