/* Fayette County Sheriff's Office - shared styles.
   Palette taken from the patrol livery: tan body, royal-blue stripe, white pinstripe. */
/* Fonts are hosted on our own server (Open Font License, see FONT-LICENSE files). */
@font-face { font-family: "Barlow Condensed"; src: url(font-barlow-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(font-barlow-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(font-barlow-700i.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(font-barlow-800i.woff2) format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(font-public-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(font-public-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(font-public-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #141b3d;
  --ink-soft: #4a5170;
  --blue: #2b47c9;
  --blue-deep: #1b2c86;
  --khaki: #cbb891;
  --khaki-pale: #ece4d3;
  --paper: #f4f5f8;
  --night: #0e1330;
  --white: #ffffff;
  --line: #d9dce6;
  --danger: #b4232f;
  --ok: #1f7a4d;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Public Sans", system-ui, sans-serif;

  --wrap: 1120px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(20, 27, 61, 0.06), 0 8px 24px rgba(20, 27, 61, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 0.5em; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3rem); font-style: italic; letter-spacing: 0; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--body);
  padding: 14px 22px; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 6px 18px rgba(43, 71, 201, 0.28); }
.btn-primary:hover { background: #3553de; color: var(--white); }
.btn-light { background: rgba(255, 255, 255, 0.08); color: var(--white); border-color: rgba(255, 255, 255, 0.45); backdrop-filter: blur(6px); }
.btn-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-quiet { background: transparent; color: var(--ink-soft); padding: 10px 12px; }
.btn-quiet:hover { color: var(--ink); background: rgba(20, 27, 61, 0.06); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--white); }
.btn-sm { padding: 8px 14px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- top bar ---------- */
.topbar { background: rgba(20, 27, 61, 0.96); backdrop-filter: saturate(140%) blur(10px); color: var(--white); position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--khaki); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.28rem; letter-spacing: 0.01em; line-height: 1; white-space: nowrap; }
.brand:hover { color: var(--white); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav > a, .nav-menu > summary { position: relative; color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.94rem; font-weight: 600; padding: 9px 12px; border-radius: var(--radius); cursor: pointer; }
.nav > a:hover, .nav-menu > summary:hover, .nav-menu[open] > summary { color: var(--white); background: rgba(255, 255, 255, 0.07); }
.nav > a[aria-current="page"], .nav-menu > summary.current { color: var(--white); }
.nav > a[aria-current="page"]::after, .nav-menu > summary.current::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--khaki); border-radius: 2px; }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; display: flex; align-items: center; gap: 6px; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::before { content: ""; order: 2; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease; }
.nav-menu[open] > summary::before { transform: translateY(1px) rotate(-135deg); }
.nav-drop { position: absolute; top: calc(100% + 10px); left: 0; min-width: 210px; background: var(--white); border-radius: 10px; padding: 8px; box-shadow: 0 14px 34px rgba(20, 27, 61, 0.22); border: 1px solid var(--line); display: grid; }
.nav-drop a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.94rem; padding: 10px 12px; border-radius: 6px; }
.nav-drop a:hover, .nav-drop a[aria-current="page"] { background: var(--paper); color: var(--blue-deep); }
.nav a.nav-icon { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; margin-left: 6px; }
.nav-icon svg { width: 20px; height: 20px; }
.nav a.nav-portal { background: var(--blue); color: var(--white); margin-left: 6px; padding: 9px 16px; }
.nav a.nav-portal:hover { background: #3a58e0; }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); width: 44px; height: 44px; padding: 0; cursor: pointer; border-radius: var(--radius); }
.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; margin: 0 auto; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; } .nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; background: var(--ink); padding: 10px 16px 18px; border-bottom: 3px solid var(--khaki); max-height: calc(100vh - 67px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav > a, .nav-menu > summary { padding: 13px 12px; font-size: 1rem; }
  .nav > a[aria-current="page"]::after, .nav-menu > summary.current::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; }
  .nav-menu > summary { justify-content: space-between; }
  .nav-drop { position: static; box-shadow: none; border: 0; background: rgba(255, 255, 255, 0.05); margin: 2px 0 6px; padding: 4px; }
  .nav-drop a { color: rgba(255, 255, 255, 0.85); }
  .nav-drop a:hover, .nav-drop a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); color: var(--white); }
  .nav a.nav-icon { display: none; }
  .nav a.nav-portal { margin: 10px 0 0; text-align: center; padding: 13px; }
}
@media (max-width: 420px) { .brand span { font-size: 1.08rem; } .brand img { width: 32px; height: 32px; } }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
input, select, textarea {
  width: 100%; font: 400 1rem var(--body); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #b9bed0; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(43, 71, 201, 0.18); }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

.form-error { color: var(--danger); font-weight: 600; font-size: 0.92rem; min-height: 1.4em; margin: 0 0 12px; }

/* ---------- footer ---------- */
.footer { background: var(--night); color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }
.footer::before { content: ""; display: block; height: 10px; background: linear-gradient(var(--khaki) 0 4px, var(--white) 4px 6px, var(--blue) 6px); }
.footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 28px; padding: 56px 0 44px; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; }
.footer-logo img { width: 48px; height: 48px; }
.footer-logo span { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--white); line-height: 1.1; }
.footer .footer-logo:hover { text-decoration: none; }
.footer-brand p { margin: 16px 0 0; max-width: 38ch; line-height: 1.55; font-size: 0.92rem; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 { font-family: var(--body); font-style: normal; font-size: 1rem; font-weight: 700; color: var(--khaki); margin: 4px 0 6px; letter-spacing: 0; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 32px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.footer-copy { line-height: 1.5; font-size: 0.9rem; }
.footer-copy a { color: var(--white); font-weight: 700; }
.footer-note { display: block; font-size: 0.82rem; opacity: 0.75; margin-top: 2px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); color: rgba(255, 255, 255, 0.8); }
.footer-social a:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.footer-social svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- shared inner-page parts ---------- */
.page-hero { position: relative; color: var(--white); background: var(--night); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-photo, url(photo-tahoe.jpg)) center 55% / cover; opacity: 0.55; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 19, 48, 0.97) 20%, rgba(14, 19, 48, 0.6) 65%, rgba(14, 19, 48, 0.35)), linear-gradient(0deg, rgba(14, 19, 48, 0.6), transparent 50%); }
.page-hero .wrap { position: relative; z-index: 1; padding: clamp(56px, 9vw, 104px) 0 clamp(44px, 7vw, 76px); }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; font-style: italic; text-transform: uppercase; margin: 0 0 16px; line-height: 0.92; letter-spacing: 0.005em; }
.page-hero p { max-width: 58ch; color: #d3d7e8; margin: 0; font-size: 1.1rem; }
/* the livery stripe: khaki body, white pinstripe, royal-blue band */
.page-stripe, .livery { height: 30px; background: linear-gradient(var(--khaki) 0 9px, var(--white) 9px 12px, var(--blue) 12px); }
.page-main { padding-bottom: 80px; }
.page-section { margin-top: 48px; }
.page-section > h2 { font-size: 2.1rem; margin-bottom: 6px; }
.page-section > p.sub { color: var(--ink-soft); margin-bottom: 22px; }
.loading, .empty-note { color: var(--ink-soft); padding: 30px 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
