/* Sturgis Police Department. Design tokens from handoff/HANDOFF.md. No inline styles anywhere (the CSP blocks them). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-var.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/space-grotesk-latin-var.woff2) format("woff2"); }

:root {
  --navy-900: #0B1830;
  --navy-800: #12233F;
  --navy-700: #1C3256;
  --navy-600: #24395C;
  --navy-line: #2A3B5A;
  --gold: #F2C14E;
  --gold-hover: #FFD772;
  --gold-text: #8A5A00;
  --link: #1D4E89;
  --ink: #16233A;
  --ink-soft: #4A5870;
  --on-navy: #DCE4F0;
  --on-navy-muted: #C9D3E2;
  --gray-100: #F3F5F8;
  --border: #D9DFE8;
  --font-heading: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-card: 12px;
  --radius-button: 8px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--ink); background: #FFFFFF; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: 38px; }
h3 { font-size: 19px; }
p, figure, dl, dd { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--navy-800); text-decoration: underline; }

/* Dark (navy) areas. :where() keeps these weak so buttons win. */
.dk { color: #FFFFFF; }
:where(.dk) a { color: #FFFFFF; }
:where(.dk) a:hover { color: var(--gold); }

/* Focus: navy ring on light backgrounds (gold is too faint on white), gold on navy */
:focus-visible { outline: 3px solid var(--navy-800); outline-offset: 2px; }
.dk :focus-visible { outline-color: var(--gold); }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; padding: 8px 12px; border-radius: 6px; background: #FFFFFF; color: var(--navy-800); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--news { padding: 64px 0; }
.section--quick { padding: 32px 0; }
.bg-gray { background: var(--gray-100); }
.stack { display: flex; flex-direction: column; gap: 28px; }
.section-head h2 { margin-top: 10px; }
.lead { font-size: 17px; }
.lead--on-navy { color: var(--on-navy); }
.muted { color: var(--on-navy-muted); }

.ey { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.ey--gold { color: var(--gold); }

/* object-position per photo, so faces are not cropped */
.op-25 { object-position: center 25%; }
.op-30 { object-position: center 30%; }
.op-35 { object-position: center 35%; }
.op-top { object-position: top; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border: 2px solid transparent; border-radius: var(--radius-button);
  font-weight: 600; text-align: center; text-decoration: none;
  background: var(--gold); color: var(--navy-800);
}
.btn:hover { background: var(--gold-hover); color: var(--navy-800); text-decoration: none; }
.btn--ghost { background: transparent; border-color: #FFFFFF; color: #FFFFFF; }
.btn--ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn--navy { background: var(--navy-800); color: #FFFFFF; }
.btn--navy:hover { background: var(--navy-700); color: #FFFFFF; }
.btn--outline { background: #FFFFFF; border-color: var(--navy-800); color: var(--navy-800); }
.btn--outline:hover { background: var(--gray-100); color: var(--navy-800); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- utility bar and header ---------- */
.utility { background: var(--navy-900); font-size: 14px; }
.utility__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-top: 10px; padding-bottom: 10px; }
.utility__911 { padding: 4px 12px; border-radius: 6px; background: var(--gold); color: var(--navy-800); }
.utility a { display: inline-block; padding: 4px 0; }
.utility__addr { margin-left: auto; }

.site-header { background: var(--navy-800); }
.site-header__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand:hover { text-decoration: none; }
.brand__logo { width: 72px; height: 79px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--font-heading); font-size: 22px; font-weight: 700; line-height: 1.2; }
.brand__place { font-size: 13px; color: var(--on-navy-muted); }
.brand:hover .brand__place { color: var(--on-navy-muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-left: auto; font-size: 15px; font-weight: 600; }
.nav a { padding: 12px 0; }

/* ---------- hero ---------- */
.hero { background: var(--navy-800); }
.hero__row { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding-top: 48px; padding-bottom: 64px; }
.hero__text { flex: 1 1 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero__title { font-size: clamp(36px, 5vw, 58px); }
.hero__lead { max-width: 520px; font-size: 18px; color: var(--on-navy); }

.slideshow { position: relative; flex: 1 1 400px; min-width: 0; height: 460px; overflow: hidden; border-radius: var(--radius-card); background: var(--navy-600); }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }
.slideshow__btn {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(11, 24, 48, .78); color: #FFFFFF; cursor: pointer;
}
.slideshow__btn:hover, .slideshow__btn:focus-visible { background: var(--navy-900); }
.slideshow__btn--prev { left: 12px; }
.slideshow__btn--next { right: 12px; }
.slideshow__count { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 10px 16px; background: rgba(11, 24, 48, .78); color: #FFFFFF; font-size: 14px; font-weight: 600; }

/* ---------- Facebook feeds ---------- */
.news__row { display: flex; flex-wrap: wrap; gap: 32px 40px; }
.news__feed { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.news__aside { flex: 1 1 280px; display: flex; flex-direction: column; gap: 14px; padding-top: 36px; }

.fb { position: relative; display: flex; justify-content: center; min-height: 460px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--gray-100); }
.fb--shelter { min-height: 380px; }
.fb__fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 24px; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.fb iframe { position: relative; z-index: 1; display: block; max-width: 100%; border: 0; background: #FFFFFF; }
.fb__note { font-size: 14px; color: var(--ink-soft); }

/* ---------- cards ---------- */
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.card { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-card); background: #FFFFFF; }
.card p { font-size: 15px; }
.card__link { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; font-weight: 600; }
.card__img { width: 100%; height: 150px; object-fit: cover; object-position: top; border-radius: var(--radius-button); }
.card--navy { flex: none; padding: 20px; border: 0; background: var(--navy-700); }
.card--navy p { color: var(--on-navy); }

.lk { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lk a { display: inline-block; padding: 10px 0; font-weight: 600; }

/* ---------- shelter ---------- */
.shelter__row { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.shelter__feed { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.shelter__info { flex: 1 1 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: 15px; }
.facts dt { font-weight: 700; }

/* ---------- Rally ---------- */
.rally { background: var(--navy-800); }
.rally__row { display: flex; flex-wrap: wrap; gap: 40px; }
.rally__text { flex: 1 1 420px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.rally__cards { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; }
.rally__photos { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 72px; }
.photo-card { flex: 1 1 280px; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-card); background: var(--navy-700); }
.photo-card img { display: block; width: 100%; height: 340px; object-fit: cover; }
.photo-card__zoom { display: block; }
.photo-card figcaption { padding: 16px 20px; font-size: 15px; color: var(--on-navy); }
.photo-card strong { color: #FFFFFF; }

/* ---------- photo strip ---------- */
.strip-section { padding-top: 72px; }
.strip { display: flex; flex-wrap: wrap; gap: 20px; }
.strip__wide { flex: 2 1 420px; }
.strip__narrow { flex: 1 1 280px; }
.strip img { display: block; width: 100%; height: 380px; object-fit: cover; border-radius: var(--radius-card); }
.strip figcaption { padding-top: 10px; font-size: 15px; }

/* ---------- join ---------- */
.join__row { display: flex; flex-wrap: wrap; gap: 40px; }
.join__cards { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.join__cards .card { flex: none; }
.join__flyer { flex: 1 1 320px; display: flex; justify-content: center; align-items: flex-start; }
.join__flyer img { width: 100%; max-width: 440px; height: auto; border-radius: var(--radius-card); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-900); }
.footer__row { display: flex; flex-wrap: wrap; gap: 32px 56px; padding-top: 56px; padding-bottom: 56px; font-size: 15px; }
.footer__col { flex: 1 1 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer__col--about { flex: 1 1 280px; gap: 10px; }
.footer__title { font-size: 24px; }
.footer__link { padding: 8px 0; }
.footer__bottom { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--navy-line); text-align: center; }
.footer__copy { font-size: 14px; color: var(--on-navy-muted); }
.footer__credit { font-size: 11px; color: var(--on-navy-muted); }
.footer__credit a { color: var(--on-navy-muted); text-decoration: underline; }

/* ---------- 404 ---------- */
.notfound__box { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-height: 40vh; }
.notfound h1 { font-size: clamp(36px, 5vw, 58px); }

.nowrap { white-space: nowrap; }

/* ---------- narrower screens ---------- */
@media (max-width: 887px) {
  /* news column and its side text stack here: drop the side text's top offset */
  .news__aside { padding-top: 0; }
}
@media (max-width: 699px) {
  .utility__addr { margin-left: 0; }
}
