/*
 * components.css — WildFirefighters.com
 * Foundational component classes verbatim from sketch-findings-wildff skill.
 * Downstream plans (02-02, 02-03, 02-04) APPEND page-specific sections below.
 * DO NOT reorder these top-of-file selectors — downstream enforcement checks use
 * grep "^\.brand ", "^\.eq-id ", "\.lightbox" as existence tests.
 */

/* ─── Brand block ─── */
.brand {
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.brand small {
  display: block;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #6b6b70;
  margin-top: 4px;
}

/* ─── Navigation ─── */
.nav {
  border-bottom: 1px solid #d8d4cb;
}
.nav .container {
  display: flex;
  align-items: baseline;
  gap: 2.5rem;
  padding: 1.25rem 0;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0 0 0 auto;
}
.nav li a {
  color: #1c1c1e;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav li a.current {
  color: #a0421f;
  font-weight: 600;
}

/* ─── Equipment-ID pill ─── */
.eq-id {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  background: #f0d9cc;
  color: #a0421f;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 1.25rem;
}

/* ─── Inline mono pill ─── */
.mono-pill {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  padding: 2px 7px;
  background: #f0d9cc;
  color: #a0421f;
  border-radius: 2px;
  margin-right: 0.5rem;
}

/* ─── Eyebrow text ─── */
.eyebrow {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #6b6b70;
}

/* ─── Spec table ─── */
.spec-table {
  border-top: 1px solid #d8d4cb;
}
.spec-table .row {
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 0.85rem 0;
  border-bottom: 1px solid #d8d4cb;
  align-items: baseline;
}
.spec-table .row dt {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b6b70;
}
.spec-table .row dd {
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-size: 0.95rem;
  margin: 0;
}

/* ─── Photo card (.ph) ─── */
.ph {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  cursor: zoom-in;
  display: block;
  background: linear-gradient(135deg, #d8d4cb 0%, #f4f3f0 100%);
}
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph .corner-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 2px;
}
.ph .meta-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: rgba(255, 255, 255, 0.92);
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  padding: 1.5rem 0.75rem 0.75rem;
}
.ph .meta-overlay .title {
  font-weight: 600;
}
.ph .meta-overlay .why {
  display: block;
  text-transform: uppercase;
  color: #f0a050;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

/* Gallery photo card variants */
.ph.hero {
  aspect-ratio: 4/5;
  grid-row: span 2;
}
.ph.support {
  aspect-ratio: 4/3;
}

/* ─── Dark spec band ─── */
.specs {
  background: #2a2a2d;
  color: #f4f3f0;
  padding: 3.5rem 0;
}
.specs .grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.specs .stat strong {
  display: block;
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
}
.specs .stat span {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.65;
}

/* ─── Footer ─── */
.foot {
  padding: 3rem 0 2rem;
  border-top: 1px solid #d8d4cb;
  font-size: 0.85rem;
  color: #6b6b70;
}
.foot .container {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.foot .cert {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.foot .cert strong {
  color: #1c1c1e;
}
.foot ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0 auto;
  display: flex;
  gap: 1.25rem;
}
.foot ul li {
  color: #6b6b70;
}
.foot ul a {
  color: #6b6b70;
  text-decoration: none;
}

/* ─── Breadcrumb ─── */
.crumb {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #6b6b70;
  padding: 1rem 0;
}
.crumb a {
  color: #6b6b70;
  text-decoration: none;
}
.crumb a:hover {
  color: #a0421f;
}
.crumb .sep {
  margin: 0 0.5rem;
  opacity: 0.6;
}

/* ─── Equipment detail header ─── */
.hdr {
  padding: 2.5rem 0 2rem;
}
.hdr h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.hdr .nick {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #6b6b70;
  margin-top: 0.5rem;
}
.hdr .sub {
  font-size: 1.1rem;
  color: #6b6b70;
  margin-top: 1rem;
  max-width: 64ch;
}

/* ─── Equipment specs section ─── */
.specs-section {
  padding: 2rem 0 3rem;
  border-top: 1px solid #d8d4cb;
}
.specs-section h2 {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #6b6b70;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ─── Photo strip (adaptive — 1, 2, or 3+ photos) ─── */
.photo-strip {
  display: flex;
  gap: 8px;
  /* margin-block-only — preserve .container's margin: 0 auto centering */
  margin-block: 2.5rem;
}

/* CF-01 — Per-role aspect ratios for above-fold hero/evidence strip */
.photo-strip .ph[data-role="hero"] {
  flex: 0 0 calc(40% - 4px);
  aspect-ratio: 4/5;
}
.photo-strip .ph[data-role="evidence"] {
  flex: 1 1 calc(30% - 4px);
  aspect-ratio: 4/3;
}
.photo-strip .ph[data-role="detail"] {
  flex: 1 1 calc(30% - 4px);
  aspect-ratio: 4/3;
}

/* CF-02 — Single-photo strip centering: :has() primary rule */
.photo-strip:has(> :only-child) {
  justify-content: center;
}
.photo-strip:has(> :only-child) .ph {
  max-width: 480px;
}

/* CF-02 — Single-photo strip centering: fallback for browsers without :has() */
.photo-strip--single {
  justify-content: center;
}
.photo-strip--single .ph {
  max-width: 480px;
}

/* Mobile: single-column, natural aspect ratio */
@media (max-width: 500px) {
  .photo-strip {
    flex-direction: column;
  }
  .photo-strip .ph[data-role="hero"],
  .photo-strip .ph[data-role="evidence"],
  .photo-strip .ph[data-role="detail"] {
    flex: 1 1 auto;
    aspect-ratio: 4/3;
    max-width: 100%;
  }
}

/* ─── Narrative section ─── */
.narrative {
  padding: 2rem 0 3rem;
  max-width: 70ch;
}
.narrative p {
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

/* ─── Page header (.gh) — used by equipment index, about, services, gallery ─── */
.gh {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #d8d4cb;
  /* Centered marquee layout — eyebrow + h1 + intro all centered.
     For a 2-col text-and-image variant, opt in with class .gh.gh--with-image. */
  text-align: center;
}
.gh h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.gh p {
  max-width: 64ch;
  /* Center the constrained-width paragraph block within the (now centered) header */
  margin-inline: auto;
  color: #6b6b70;
}
.gh .intro {
  /* RichTextField wrapper — center its inline content (paragraphs from richtext) */
  margin-top: 1rem;
}
.gh .meta {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: #6b6b70;
  margin-top: 1.25rem;
}

/* ─── Gallery equipment section ─── */
.equip-section {
  margin: 3rem 0;
}
.equip-hdr {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 0 1.5rem;
  border-bottom: 2px solid #1c1c1e;
  margin-bottom: 1.5rem;
}
.equip-hdr .id {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  background: #f0d9cc;
  color: #a0421f;
  border-radius: 2px;
}
.equip-hdr h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.equip-hdr .nick {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  color: #6b6b70;
}
.equip-hdr .capability {
  margin-left: auto;
  max-width: 50%;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: #6b6b70;
}
.equip-hdr .capability strong {
  color: #1c1c1e;
}

/* ─── Gallery equipment photo grid ─── */
.equip-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 0.85rem;
}
@media (max-width: 800px) {
  .equip-grid {
    grid-template-columns: 1fr 1fr;
  }
  .equip-grid .ph.hero {
    grid-column: span 2;
    aspect-ratio: 4/3;
    grid-row: span 1;
  }
}
@media (max-width: 500px) {
  .equip-grid {
    grid-template-columns: 1fr;
  }
  .equip-grid .ph.hero {
    grid-column: span 1;
  }
  .equip-grid .ph {
    aspect-ratio: 4/3;
  }
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open {
  display: flex;
}
.lb-stage {
  position: relative;
  max-width: 80vw;
  max-height: 85vh;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-stage img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 2px;
}
.lb-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: rgba(255, 255, 255, 0.92);
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  padding: 1.5rem 1rem 0.75rem;
  border-radius: 0 0 2px 2px;
}
.lb-counter {
  position: absolute;
  top: -2rem;
  right: 0;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
}
.lb-close {
  position: absolute;
  top: -2rem;
  left: 0;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  padding: 0;
}
.lb-close:hover {
  color: #fff;
}
.lb-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.lb-prev {
  margin-right: 1rem;
}
.lb-next {
  margin-left: 1rem;
}
.lb-thumbs {
  /* TODO: thumbnail dots implementation (skip in v1 per plan — adds complexity) */
  display: flex;
  gap: 0.5rem;
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
}
.lb-thumbs button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.lb-thumbs button.active {
  background: #a0421f;
  border-color: #a0421f;
}
@media (max-width: 600px) {
  .lb-prev { margin-right: 8px; }
  .lb-next { margin-left: 8px; }
}

/* ─── Equipment index page (02-02) ─── */
.equipment-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 2rem 1.5rem;
}
.eq-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #d8d4cb;
  border-radius: 2px;
  overflow: hidden;
}
.eq-card .eq-thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.eq-card .eq-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.eq-card .eq-meta {
  padding: 1rem;
}
.eq-card h2 {
  margin: 0.4rem 0;
  font-size: 1.25rem;
}
.eq-card h2 a {
  color: #1c1c1e;
  text-decoration: none;
}
.eq-card .capability {
  color: #6b6b70;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.status-badge {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.status-badge.status-active {
  background: #a0421f;
  color: #ffffff;
}
.status-badge.status-reserve {
  background: transparent;
  color: #6b6b70;
  border: 1px solid #6b6b70;
}
.status-badge.status-retired {
  background: transparent;
  color: #6b6b70;
  border: 1px dashed #d8d4cb;
  text-decoration: line-through;
  opacity: 0.7;
}
.eq-card.eq-status-retired .eq-thumb img {
  filter: grayscale(0.4);
  opacity: 0.85;
}
.eq-card .empty {
  color: #6b6b70;
  font-style: italic;
  padding: 2rem;
}

/* ─── Plan 02-03: About + Services page additions ─── */
.page-body { padding: 2rem 0 4rem; }
.page-body > .container { padding-top: 0; padding-bottom: 0; }

/* About page — list wrappers for cert/agency/fire blocks */
.list-certification_item,
.list-agency_item,
.list-named_fire_item {
  list-style: none;
  padding: 0;
  /* margin-block-only — preserve .container's margin: 0 auto centering */
  margin-block: 1.5rem;
  max-width: 700px;
}
.list-certification_item li,
.list-agency_item li,
.list-named_fire_item li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #d8d4cb;
  font-size: 0.95rem;
}
.list-certification_item li .expires {
  color: #6b6b70;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}
.list-agency_item li .since,
.list-named_fire_item li .year {
  color: #6b6b70;
  font-size: 0.85rem;
}

/* ─── Contact page (02-04) ─── */
.contact-section { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; padding: 2rem 1.5rem; }
@media (max-width: 800px) { .contact-section { grid-template-columns: 1fr; } }
.contact-form .field { margin-bottom: 1.25rem; }
.contact-form label { display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.06em; color: #6b6b70; text-transform: uppercase; margin-bottom: 0.4rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #d8d4cb; border-radius: 2px; font-family: "Inter", system-ui, sans-serif; font-size: 0.95rem; background: #ffffff; box-sizing: border-box; }
.contact-form textarea { resize: vertical; min-height: 8rem; }
.submit-btn { background: #a0421f; color: #ffffff; border: 0; padding: 0.75rem 1.5rem; font-family: "Inter", system-ui, sans-serif; font-weight: 600; border-radius: 2px; cursor: pointer; font-size: 1rem; }
.submit-btn:hover { background: #842f12; }
.errors { color: #a0421f; font-size: 0.85rem; margin-top: 0.4rem; }
.form-errors { padding: 0.75rem; background: #fef0e9; border-left: 3px solid #a0421f; margin-bottom: 1rem; }
.contact-direct { background: #ffffff; border: 1px solid #d8d4cb; padding: 1.5rem; border-radius: 2px; }
.contact-direct h3 { margin-top: 0; font-size: 1rem; font-family: "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.1em; color: #6b6b70; }
.contact-direct a { color: #a0421f; }
.thank-you { padding: 2rem 0; max-width: 60ch; }

/* ─── Gallery closing paragraph (02-04) ─── */
.gallery-closing { padding: 3rem 0 1rem; text-align: center; border-top: 1px solid #d8d4cb; max-width: 60ch; margin: 0 auto; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85rem; color: #6b6b70; letter-spacing: 0.04em; }

/* Services page — 3-up capability card grid */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
@media (max-width: 800px) {
  .capability-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .capability-grid { grid-template-columns: 1fr; }
}
.capability-card {
  background: #ffffff;
  border: 1px solid #d8d4cb;
  border-radius: 2px;
  padding: 1.5rem;
}
.capability-card h3 {
  margin-top: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.capability-card .body {
  color: #1c1c1e;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ─── Home hero section (content above the hero image) ─── */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.5rem 0;
}
.hero .lede {
  max-width: 64ch;
  margin: 1rem auto;
  color: #1c1c1e;
  font-size: 1.05rem;
  line-height: 1.6;
}
.hero .meta {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: #6b6b70;
  margin-top: 1.25rem;
}
.hero-photo {
  margin-top: 2rem;
}
.hero-photo img {
  display: block;
  margin: 0 auto;            /* center even if smaller than container */
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

/* ─── Brand accent span (heading last word) ─── */
.accent {
  color: var(--color-brand-accent);
}

/* ─── Lists inside RichText narrative ─── */
/* Tailwind preflight strips list-style globally; restore inside RichText */
.narrative ul,
.narrative ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0 1.25rem;
}
.narrative ul { list-style: disc; }
.narrative ol { list-style: decimal; }
.narrative li {
  margin-bottom: 0.4rem;
  line-height: 1.55;
}

/* ─── Standalone photo_card (in body StreamFields, not in a strip) ─── */
.photo-card-standalone {
  margin: 1.75rem auto;
}
.photo-card-standalone .ph {
  aspect-ratio: 3 / 2;
  max-width: 800px;
  margin: 0 auto;
}
