/* ==========================================================================
   Boise County Search & Rescue — site styles
   Single stylesheet for the whole site. Edit colors/spacing in :root below.
   ========================================================================== */

/* ---- 1. Design tokens (change the look of the whole site here) ------------ */
:root {
  /* Brand colors */
  --pine:        #14532d;  /* primary dark green */
  --pine-600:    #166534;
  --pine-500:    #15803d;
  --pine-050:    #f0f7f2;  /* very light green wash */
  --rescue:      #ea580c;  /* safety / rescue orange — used for calls-to-action */
  --rescue-600:  #c2410c;

  /* Neutrals */
  --ink:         #0f172a;  /* near-black text */
  --slate:       #475569;  /* muted text */
  --slate-300:   #cbd5e1;
  --border:      #e2e8f0;
  --bg:          #ffffff;
  --bg-muted:    #f8fafc;

  /* Layout */
  --maxw:        1120px;   /* max content width */
  --radius:      12px;
  --shadow:      0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg:   0 12px 40px rgba(15,23,42,.14);

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- 2. Base / reset ----------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pine-600); }
h1, h2, h3 { line-height: 1.15; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }

/* Accessibility: visible focus outlines for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--rescue);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ---- 3. Layout helpers --------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--muted { background: var(--bg-muted); }
.section--pine  { background: var(--pine); color: #fff; }
.section--pine h2, .section--pine h3 { color: #fff; }
.section__eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  font-weight: 700; color: var(--pine-500); margin-bottom: .75rem;
}
.section--pine .section__eyebrow { color: #86efac; }
.lead { font-size: 1.15rem; color: var(--slate); max-width: 62ch; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---- 4. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: .15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--rescue); color: #fff; }
.btn--primary:hover { background: var(--rescue-600); transform: translateY(-1px); }
.btn--pine { background: var(--pine); color: #fff; }
.btn--pine:hover { background: var(--pine-600); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { background: #fff; color: var(--pine); border-color: var(--border); }
.btn--outline:hover { border-color: var(--pine); }

/* ---- 5. Header / navigation --------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand__logo { width: 44px; height: 44px; flex: none; }
.brand__name { font-weight: 800; font-size: 1.05rem; line-height: 1.1; letter-spacing: -.01em; }
.brand__sub  { display: block; font-weight: 500; font-size: .72rem; color: var(--slate); letter-spacing: .02em; }

.nav__links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none; color: var(--ink); font-weight: 500;
  padding: .55rem .8rem; border-radius: 8px; font-size: .98rem;
}
.nav__links a:hover { background: var(--pine-050); color: var(--pine); }
.nav__links a[aria-current="page"] { color: var(--pine); font-weight: 700; }
.nav__cta { margin-left: .5rem; }

.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: .5rem; border-radius: 8px;
}
.nav__toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1rem; box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .85rem .5rem; border-radius: 0; border-bottom: 1px solid var(--border); }
  .nav__cta { margin: .75rem 0 0; }
  .nav__cta a { justify-content: center; }
}

/* ---- 6. Hero ------------------------------------------------------------- */
.hero {
  position: relative; color: #fff; text-align: center;
  padding: clamp(4rem, 12vw, 8rem) 0;
  background:
    linear-gradient(180deg, rgba(15,23,42,.55), rgba(20,83,45,.85)),
    var(--pine);
  overflow: hidden;
}
/* Full-width banner image (the official badge + landscape) shown above the hero.
   Whole image stays visible; no text is placed over it. */
.banner { background: var(--pine); line-height: 0; }
.banner img { width: 100%; height: auto; display: block; margin-inline: auto; }
/* Slightly tighter green hero when it sits right under the banner */
.hero--under-banner { padding: clamp(2.5rem, 6vw, 4rem) 0; }
/* Decorative mountain silhouette at the bottom of the hero */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 120px;
  background: url("../assets/mountains.svg") repeat-x bottom center / auto 120px;
  opacity: .35;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 20ch; margin-inline: auto; }
.hero__tag { font-size: 1.2rem; color: #dcfce7; max-width: 54ch; margin: 1rem auto 2rem; }
.hero__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.hero__badge {
  display: inline-block; margin-bottom: 1.25rem; padding: .35rem 1rem;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: #dcfce7;
}

/* ---- 7. Emergency / callout bar ------------------------------------------ */
.alertbar {
  background: var(--rescue); color: #fff; text-align: center;
  font-weight: 600; font-size: .95rem; padding: .6rem 1rem;
}
.alertbar a { color: #fff; text-decoration: underline; }

/* ---- 8. Grids & cards ---------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3 { grid-template-columns: 1fr; } .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); height: 100%;
}
.card__icon {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  background: var(--pine-050); color: var(--pine); margin-bottom: 1rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }

/* ---- 9. Stats ------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat__num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff; line-height: 1; }
.stat__label { color: #bbf7d0; font-size: .95rem; margin-top: .4rem; }

/* ---- 10. Split (image + text) ------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split__media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  min-height: 320px; background: var(--pine-050);
}

/* Real photo inside a .split — fills the column, rounded + shadowed */
.media-img {
  width: 100%; height: 100%; min-height: 320px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); display: block;
}

/* Reusable "image goes here" placeholder box */
.imgph {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, #eef2f6, #eef2f6 12px, #e6ebf1 12px, #e6ebf1 24px);
  color: var(--slate); min-height: 240px; border-radius: var(--radius);
  border: 1px dashed var(--slate-300); padding: 1rem; font-size: .9rem;
}
.imgph span { display:block; }
.imgph strong { color: var(--ink); }

/* ---- 11. Timeline / steps ------------------------------------------------ */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start; }
.steps .num {
  width: 44px; height: 44px; border-radius: 999px; background: var(--pine); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.steps h3 { margin: .15rem 0 .25rem; }

/* ---- 12. FAQ / details --------------------------------------------------- */
.faq { max-width: 760px; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: .75rem; background: #fff;
}
.faq summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--pine); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }

/* ---- 13. Forms ----------------------------------------------------------- */
.form { display: grid; gap: 1rem; max-width: 640px; }
.form label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: .35rem; }
.form input, .form textarea, .form select {
  width: 100%; padding: .75rem .9rem; border: 1px solid var(--slate-300);
  border-radius: 10px; font: inherit; color: var(--ink); background: #fff;
}
.form textarea { min-height: 140px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form small { color: var(--slate); }

/* ---- 14. Contact info list ---------------------------------------------- */
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.info-list li { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; align-items: start; }
.info-list .ic { color: var(--pine); }
.info-list .ic svg { width: 26px; height: 26px; }

/* ---- 15. Footer ---------------------------------------------------------- */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 3.5rem 0 2rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.footer-brand .brand__logo { width: 40px; height: 40px; }
.footer-brand strong { color: #fff; }
.footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-bottom {
  border-top: 1px solid #1e293b; margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem;
}
.social { display: flex; gap: .75rem; }
.social a { width: 38px; height: 38px; border-radius: 8px; background: #1e293b; display: grid; place-items: center; }
.social a:hover { background: var(--pine); }
.social svg { width: 20px; height: 20px; }

/* ---- 16. Utilities ------------------------------------------------------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.badge {
  display: inline-block; background: var(--pine-050); color: var(--pine);
  padding: .25rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
}
/* Status badges for capabilities */
.badge--active { background: var(--pine-050); color: var(--pine-600); }
.badge--dev    { background: #fff5ef; color: var(--rescue-600); }
