/* Plum Grove Police Department — department website. Dark, plum-accented, mobile-first. Self-hosted assets only.
   Image seam: the build writes /assets/media.css when site.json names a heroImage; it fills .hero-media and
   .band-media and sets <body data-hero="image">. Without it the contour/gradient treatment stands on its own. */
@font-face { font-family: "PG Display"; src: url("/assets/fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PG Display"; src: url("/assets/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a0c10; --bg-2: #0e1117; --surface: #141821; --surface-2: #1b202b; --line: #262c38; --line-2: #343b4a;
  --text: #eef0f4; --muted: #a9b1bf; --faint: #7d8697;
  --plum: #c3a0e6; --plum-2: #9a6cc4; --plum-deep: #2a1636; --leaf: #8fd1a8;
  --signal: #ff6a5e; --signal-deep: #5a1712; --amber: #f2c46b;
  --display: "PG Display", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px; --gutter: 20px; --max: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--plum); text-underline-offset: 3px; }
a:hover { color: #dcc6f3; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: .005em; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(40px, 7.4vw, 84px); text-transform: uppercase; }
h2 { font-size: clamp(28px, 3.6vw, 40px); text-transform: uppercase; }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--amber); color: #111; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.kicker { font: 500 15px/1.2 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--plum); margin: 0 0 14px; }

/* --- utility bar: emergency first ------------------------------------------------------------------ */
.utility { background: #06070a; border-bottom: 1px solid var(--line); font-size: 14px; }
.utility .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.utility a { color: var(--text); text-decoration: none; }
.utility a:hover strong { text-decoration: underline; }
.u-911 strong { color: var(--signal); }
.u-city { margin-left: auto; color: var(--muted); }
.u-city a { color: var(--muted); }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(255,106,94,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255,106,94,0); } 100% { box-shadow: 0 0 0 0 rgba(255,106,94,0); } }

/* --- masthead --------------------------------------------------------------------------------------- */
.masthead { position: sticky; top: 0; z-index: 20; background: rgba(10,12,16,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; gap: 16px 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; font-family: var(--display); text-transform: uppercase; line-height: 1; }
.brand-text .b1 { font-weight: 700; font-size: 22px; letter-spacing: .04em; }
.brand-text .b2 { font-weight: 500; font-size: 13px; letter-spacing: .24em; color: var(--muted); margin-top: 3px; }
.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a { font: 500 17px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 8px; white-space: nowrap; }
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--plum); border-radius: 0; }

/* --- banners ---------------------------------------------------------------------------------------- */
.banner { max-width: var(--max); margin: 16px auto 0; padding: 0 var(--gutter); }
.banner p { margin: 0; border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.banner .policy-draft { background: #3a2a10; color: #ffd9a0; border: 1px solid #7a5a20; }
.banner .draft-banner { background: var(--signal-deep); color: #ffd2cd; border: 1px solid #8a2a22; }

/* --- hero (home) and page heads: layered, image-ready ---------------------------------------------- */
.hero, .page-head { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero { min-height: min(86vh, 760px); display: flex; align-items: flex-end; }
.page-head { padding: 64px 0 40px; }
.hero-media, .hero-contour, .hero-scrim { position: absolute; inset: 0; z-index: -1; }
.hero-media { background:
  radial-gradient(60% 70% at 78% 30%, rgba(122,70,160,.38), transparent 70%),
  radial-gradient(50% 60% at 12% 90%, rgba(60,32,84,.55), transparent 70%),
  linear-gradient(180deg, #0f1119 0%, #0a0c10 100%);
  background-size: cover; background-position: center; }
.hero-contour { background: url("/assets/media/contour.svg") center / cover no-repeat; opacity: .55; animation: drift 60s ease-in-out infinite alternate; }
.page-head .hero-contour { opacity: .35; }
.hero-scrim { background: linear-gradient(180deg, rgba(10,12,16,0) 30%, rgba(10,12,16,.72) 78%, var(--bg) 100%); }
body[data-hero="image"] .hero-media { filter: saturate(.85) contrast(1.05); }
body[data-hero="image"] .hero-contour { opacity: .28; mix-blend-mode: screen; }
body[data-hero="image"] .hero-scrim { background:
  linear-gradient(90deg, rgba(10,12,16,.9) 0%, rgba(10,12,16,.55) 55%, rgba(10,12,16,.25) 100%),
  linear-gradient(180deg, rgba(10,12,16,.1) 40%, var(--bg) 100%); }
@keyframes drift { from { transform: scale(1.04) translate3d(-1%, 0, 0); } to { transform: scale(1.08) translate3d(1.5%, -1%, 0); } }
.hero-inner { padding-top: 120px; padding-bottom: 56px; width: 100%; }
.hero h1 { margin-bottom: 18px; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 .line2 { display: block; color: var(--plum); }
.hero-lead { font-size: clamp(18px, 2vw, 21px); color: #d5d9e2; max-width: 40ch; animation: rise .9s .12s cubic-bezier(.2,.7,.2,1) both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; animation: rise .9s .22s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page-head h1 { font-size: clamp(38px, 6vw, 64px); margin-bottom: 10px; }
.page-head .lead { color: #d5d9e2; font-size: 19px; max-width: 58ch; margin: 0; }

/* --- buttons ---------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 12px 20px; border-radius: 12px; font: 700 18px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border: 1px solid transparent; }
.btn-911 { background: var(--signal); color: #1a0503; }
.btn-911:hover { background: #ff8479; color: #1a0503; }
.btn-ghost { background: rgba(20,24,33,.7); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--plum); color: var(--text); }
.btn-plain { color: var(--plum); padding-left: 0; padding-right: 0; min-height: 44px; }

/* --- sections --------------------------------------------------------------------------------------- */
.section { padding: 72px 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 26px; }
.section-head p { color: var(--muted); margin: 0; max-width: 56ch; }

/* quick actions — overlap the hero's lower edge */
.actions { margin-top: -28px; position: relative; z-index: 2; }
.action-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .action-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .action-grid { grid-template-columns: repeat(3, 1fr); } }
.action { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-content: start; padding: 18px; min-height: 124px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.action:hover { border-color: var(--plum-2); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(154,108,196,.55); color: var(--text); }
.action .icon { grid-row: span 3; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--plum-deep); color: var(--plum); }
.action .icon svg { width: 24px; height: 24px; }
.action strong { font: 700 21px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.action span.sum { color: var(--muted); font-size: 14px; line-height: 1.45; }
.status { justify-self: start; display: inline-block; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; border: 1px solid; margin-top: 6px; }
.status-soon { color: var(--amber); border-color: rgba(242,196,107,.45); background: rgba(242,196,107,.08); }
.status-now { color: var(--leaf); border-color: rgba(143,209,168,.45); background: rgba(143,209,168,.08); }

/* notices */
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notice { border: 1px solid var(--line); border-left: 4px solid var(--plum-2); background: var(--surface); border-radius: 12px; padding: 16px 18px; }
.notice[data-level="advisory"] { border-left-color: var(--amber); }
.notice[data-level="urgent"] { border-left-color: var(--signal); }
.notice h3 { margin: 0 0 4px; }
.notice .meta { color: var(--faint); font-size: 13px; margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }
.empty { border: 1px dashed var(--line-2); border-radius: 12px; padding: 18px; color: var(--muted); margin: 0; }

/* "being built" strip */
.building { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(80% 140% at 100% 0%, rgba(122,70,160,.22), transparent 60%), var(--bg-2); }
.building ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.building li { border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--muted); }
.building p { color: var(--muted); margin: 0; }
.building h2 { margin-bottom: 8px; }

/* city band — second use of the image seam */
.city { position: relative; isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-media { position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, #120d18, #0a0c10 60%); background-size: cover; background-position: center; }
body[data-hero="image"] .band-media { filter: grayscale(1) contrast(1.1) brightness(.5); }
.city::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 20%, rgba(10,12,16,.7) 60%, rgba(42,22,54,.55)); }
.city .wrap { display: grid; gap: 28px; padding-top: 64px; padding-bottom: 64px; }
.city-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.city-card { border: 1px solid var(--line-2); background: rgba(20,24,33,.72); border-radius: var(--radius); padding: 18px; }
.city-card h3 { font-size: 19px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.city-card p { margin: 0; color: var(--muted); font-size: 15px; }
.city-card a { font-weight: 600; }

/* services page */
.svc-group { padding: 56px 0 8px; }
.svc-group > .wrap > h2 { display: flex; align-items: baseline; gap: 14px; }
.svc-group > .wrap > h2 small { font: 500 16px/1.3 var(--body); text-transform: none; color: var(--muted); letter-spacing: 0; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.svc { scroll-margin-top: 90px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.svc:target { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(195,160,230,.25); }
.svc-top { display: flex; align-items: center; gap: 12px; }
.svc-top .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--plum-deep); color: var(--plum); flex: none; }
.svc-top .icon svg { width: 22px; height: 22px; }
.svc h3 { margin: 0; font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
.svc p { margin: 0; color: var(--muted); }
.svc .now { color: var(--text); }
.svc .future { font-size: 14px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.svc .urgent { color: #ffc2bc; font-size: 14px; }
.svc .status { margin-top: 0; align-self: flex-start; }

/* resources */
.finder { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 20px; }
.finder label { font: 700 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.finder input { flex: 1 1 260px; min-height: 50px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; }
.finder input:focus-visible { border-color: var(--plum); }
.finder .count { color: var(--faint); font-size: 14px; flex-basis: 100%; margin: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.jump a { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); text-decoration: none; font-size: 14px; }
.jump a:hover { color: var(--text); border-color: var(--plum-2); }
.res-group { scroll-margin-top: 90px; padding-top: 28px; }
.res-group h2 { font-size: 26px; }
.res-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.res { display: grid; grid-template-columns: 1fr; gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.res h3 { font: 700 18px/1.3 var(--body); margin: 0; }
.res p { margin: 0; color: var(--muted); font-size: 15px; }
.res .links { display: flex; flex-wrap: wrap; gap: 8px; align-items: start; }
.res .links a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); text-decoration: none; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.res .links a.call { border-color: rgba(195,160,230,.5); color: var(--plum); }
.res .links a:hover { border-color: var(--plum); }
[hidden] { display: none !important; }

/* court */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; counter-reset: step; }
.steps li { counter-increment: step; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 700 34px/1 var(--display); color: var(--plum-2); margin-bottom: 10px; }
.steps h3 { font-size: 21px; text-transform: uppercase; }
.steps p { color: var(--muted); margin: 0; }
.doc-card { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: radial-gradient(90% 120% at 100% 0%, rgba(122,70,160,.2), transparent 60%), var(--surface); }
.doc-card p { margin: 0; color: var(--muted); }

/* contact */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.fact { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 20px; }
.fact h2, .fact h3 { font-size: 20px; letter-spacing: .06em; margin-bottom: 8px; text-transform: uppercase; }
.fact p { margin: 0 0 4px; }
.fact .big { font: 700 28px/1.1 var(--display); letter-spacing: .02em; }
.fact .muted, .muted { color: var(--muted); }
.fact-911 { border-color: rgba(255,106,94,.5); background: linear-gradient(180deg, rgba(90,23,18,.55), var(--surface)); }
.fact-911 .big a { color: var(--signal); }
.who { width: 100%; border-collapse: collapse; font-size: 15px; }
.who th, .who td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.who th { font: 700 14px/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* legal documents */
.doc { max-width: 780px; }
.doc h2 { font-size: 24px; margin-top: 36px; }
.doc li { margin: 6px 0; }
.doc .muted { margin-bottom: 20px; }
.consent { margin-top: 40px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.form-line { border-bottom: 1px solid var(--muted); height: 28px; margin: 6px 0 18px; }

/* footer */
.page-home .site-foot { margin-top: 0; }
.site-foot { margin-top: 80px; border-top: 1px solid var(--line); background: #07080b; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; padding-top: 44px; padding-bottom: 28px; }
.site-foot h2 { font-size: 15px; letter-spacing: .18em; color: var(--text); margin-bottom: 10px; }
.site-foot p { margin: 0 0 6px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0 0 6px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand img { width: 44px; height: 44px; flex: none; }
.foot-base { border-top: 1px solid var(--line); }
.foot-base .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-top: 16px; padding-bottom: 24px; }
.foot-base strong { color: var(--signal); }

/* --- responsive ------------------------------------------------------------------------------------- */
@media (min-width: 900px) {
  .building { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .city .wrap { grid-template-columns: .8fr 1.5fr; align-items: center; }
  .site-foot .wrap { grid-template-columns: 1.5fr 1.2fr 1.3fr 1fr 1fr; }
  .res { grid-template-columns: 1fr auto; }
  .res h3, .res p { grid-column: 1; }
  .res .links { justify-content: flex-end; grid-row: 1 / span 2; grid-column: 2; }
}
@media (max-width: 1000px) {
  .masthead .wrap { flex-wrap: wrap; gap: 0; padding-top: 10px; min-height: 0; }
  .site-nav { margin: 6px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 6px; width: calc(100% + var(--gutter) * 2); overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 10px 10px; font-size: 16px; }
}
@media (max-width: 760px) {
  .u-city { margin-left: 0; flex-basis: 100%; }
  .hero { min-height: 0; }
  .hero-inner { padding-top: 88px; padding-bottom: 60px; }
  .section { padding: 52px 0; }
  .svc-grid { grid-template-columns: 1fr; }
  .who, .who tbody, .who tr, .who td { display: block; }
  .who thead { display: none; }
  .who tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .who td { border: 0; padding: 2px 0; }
  .who td:first-child { font-weight: 700; color: var(--text); }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .btn { width: 100%; justify-content: center; }
  .btn-plain { width: auto; }
  .brand-text .b1 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .utility, .masthead, .site-foot, .hero-contour, .hero-media, .hero-scrim, .banner .draft-banner { display: none !important; }
  body { background: #fff; color: #000; }
  .page-head { padding: 0 0 12px; border: 0; }
  .page-head .lead, .muted, .doc .muted { color: #333; }
  a { color: #000; }
  .consent { border: 0; background: #fff; }
  .form-line { border-color: #000; }
}
