/* ============================================================================
   Texas Fire Salaries — Base: reset, typography, layout, nav, footer, buttons, forms
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); color: var(--text); margin: 0 0 var(--sp-3); letter-spacing: -0.025em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0 0 var(--sp-4); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
strong { font-weight: 650; }
small { font-size: var(--fs-sm); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }
img { max-width: 100%; height: auto; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-2);
  margin: 0 0 var(--sp-3);
}
.lede { font-size: var(--fs-lg); color: var(--text-soft); line-height: var(--lh-body); }
.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-5); }
.wrap-narrow { max-width: var(--maxw-narrow); }
.section { padding-block: var(--sp-8); }
.section-sm { padding-block: var(--sp-6); }
.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: var(--sp-5); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; left: var(--sp-3); top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm); transition: top .15s ease;
}
.skip-link:focus { top: var(--sp-3); }

/* ---- Focus visibility (accessibility) ---- */
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 3px; }

/* ============================ Navigation ============================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 5px rgba(23,33,43,.035);
}
.nav {
  height: var(--nav-h); display: flex; align-items: center; gap: var(--sp-5);
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-5);
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; flex: 0 0 auto; object-fit: contain;
  filter: drop-shadow(0 1px 1px color-mix(in srgb, var(--text) 16%, transparent));
}
.brand small { display: block; font-family: var(--font-body); font-size: .59rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
.nav-links a {
  color: var(--text-soft); font-size: var(--fs-sm); font-weight: 650;
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
}
.nav-links a:hover { color: var(--text); background: var(--bg-sunken); text-decoration: none; }
.nav-links a.active { color: var(--text); background: transparent; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-cta { margin-left: var(--sp-2); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: var(--r-sm); width: 42px; height: 40px; cursor: pointer; color: var(--text); font-size: 1.2rem; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg-raised); border-bottom: 1px solid var(--border);
    padding: var(--sp-3); box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: transform .22s ease; margin-left: 0;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: var(--sp-3) var(--sp-3); font-size: var(--fs-base); border-radius: var(--r-md); }
  .nav-cta { margin: var(--sp-2) 0 0; }
}

/* ---- Mobile bottom bar (map/list & quick actions on small screens) ---- */
.mobile-bar { display: none; }
@media (max-width: 640px) {
  .mobile-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: var(--bg-raised); border-top: 1px solid var(--border);
    padding: var(--sp-2); gap: var(--sp-2); box-shadow: 0 -4px 14px rgba(28,35,46,.08);
  }
  .mobile-bar > * { flex: 1; }
  body.has-mobile-bar { padding-bottom: 68px; }
}

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 650; line-height: 1;
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-md); border: 1px solid transparent;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 8px rgba(185,63,27,.14); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 5px 12px rgba(185,63,27,.18); }
.btn-secondary { background: var(--accent-2); color: #fff; }
.btn-secondary:hover { background: var(--teal-700); color: #fff; }
.btn-outline { background: var(--bg-raised); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--bg-sunken); color: var(--text); border-color: var(--text-faint); }
.btn-ghost { background: transparent; color: var(--text-soft); padding-inline: var(--sp-3); }
.btn-ghost:hover { background: var(--bg-sunken); color: var(--text); }
.btn-sm { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); }
.btn-lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ============================ Forms ============================ */
label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text); margin-bottom: var(--sp-2); }
.field { margin-bottom: var(--sp-4); }
.field-hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--sp-1); font-weight: 400; }
.field-error { font-size: var(--fs-xs); color: var(--f-outdated-fg); margin-top: var(--sp-1); font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--fs-base); color: var(--text);
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-3); box-shadow: inset 0 1px 2px rgba(10,30,56,.03);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-soft); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--f-outdated-fg); }
.checkline { display: flex; align-items: flex-start; gap: var(--sp-2); font-weight: 500; }
.checkline input { width: auto; margin-top: 3px; }
.checkline label { margin: 0; font-weight: 500; }

/* ============================ Footer ============================ */
.site-footer {
  background: #F0F2F4;
  color: var(--text-soft); border-top: 1px solid var(--border); margin-top: var(--sp-9);
}
.footer-disclaimer {
  background: #E8EBEE; border-bottom: 1px solid var(--border);
  padding: var(--sp-4) 0; font-size: var(--fs-sm); color: var(--text-soft);
}
.site-footer .brand { color: var(--text); }
.site-footer .brand-mark { filter: none; }
.site-footer .faint { color: var(--text-faint); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); padding-block: var(--sp-7); }
.footer-inner h4 { font-family: var(--font-body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); margin-bottom: var(--sp-3); }
.footer-inner a { display: block; color: var(--text-soft); font-size: var(--fs-sm); padding: 3px 0; }
.footer-inner a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-block: var(--sp-4); font-size: var(--fs-xs); color: var(--text-faint); }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
