:root {
  color-scheme: light;
  --page: #ffffff;
  --ink: #091536;
  --muted: #627390;
  --line: #e0e8f0;
  --soft: #f5f9fd;
  --card: #ffffff;
  --blue: #0967df;
  --blue-hover: #0756bd;
  --icon-bg: #edf5ff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111922;
  --ink: #edf3f9;
  --muted: #a9b9c9;
  --line: #344353;
  --soft: #192633;
  --card: #1a2835;
  --blue: #80b5ff;
  --blue-hover: #a4caff;
  --icon-bg: #263f5b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: 'DM Sans', Arial, sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
.container { width: min(1488px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 20; top: -60px; left: 15px; padding: 10px; background: var(--card); }
.skip-link:focus { top: 8px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Font Awesome Free icons, used as colourable masks. */
.icon { display: inline-block; flex: none; width: 1em; height: 1em; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-discord { --icon: url('/assets/icons/discord.svg'); }
.icon-users { --icon: url('/assets/icons/users.svg'); }
.icon-shield { --icon: url('/assets/icons/shield-halved.svg'); }
.icon-pin { --icon: url('/assets/icons/location-dot.svg'); }
.icon-heart { --icon: url('/assets/icons/heart.svg'); }
.icon-headset { --icon: url('/assets/icons/headset.svg'); }
.icon-medical { --icon: url('/assets/icons/star-of-life.svg'); }
.icon-fire { --icon: url('/assets/icons/fire-flame-curved.svg'); }
.icon-file { --icon: url('/assets/icons/file-lines.svg'); }
.icon-book { --icon: url('/assets/icons/book-open.svg'); }
.icon-car { --icon: url('/assets/icons/car.svg'); }
.icon-arrow { --icon: url('/assets/icons/arrow-right.svg'); }

/* Header */
.site-header { height: 63px; border-bottom: 1px solid var(--line); background: var(--page); }
.header-inner { width: min(1440px, calc(100% - 64px)); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 8px; flex: none; font: 800 21px/.86 'Manrope', Arial, sans-serif; letter-spacing: -.9px; white-space: nowrap; }
.brand-mark { display: block; width: 5px; height: 35px; background: #0967df; }
.site-nav { display: flex; align-items: center; align-self: stretch; gap: 34px; font-size: 13px; font-weight: 600; }
.site-nav a { position: relative; display: flex; align-items: center; height: 100%; }
.site-nav a:hover, .site-nav a.active { color: var(--blue); }
.site-nav a.active::after { content: ''; position: absolute; bottom: 13px; left: 0; right: 0; height: 2px; background: var(--blue); }
.menu-button { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 0 23px; border: 1px solid transparent; border-radius: 7px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.button .icon { font-size: 19px; }
.button .icon-arrow { font-size: 14px; }
.button-primary { color: #fff; background: #0b65da; }
.button-primary:hover { background: #0757bb; }
.button-outline { color: var(--ink); border-color: var(--line); background: var(--card); }
.button-outline:hover { border-color: var(--blue); }
.header-cta { min-height: 43px; padding-inline: 18px; font-size: 13px; box-shadow: 0 2px 8px #0b61db1c; }

/* Hero */
.hero-backdrop { padding: 16px 0 46px; background: linear-gradient(180deg, var(--soft), var(--soft)); }
.hero { display: grid; grid-template-columns: 40% 60%; align-items: center; min-height: 332px; }
.hero-copy { padding: 0 40px 0 24px; }
.section-kicker { color: #7899bf; font-size: 11px; font-weight: 800; letter-spacing: 4px; }
.hero h1 { margin-bottom: 10px; font: 800 clamp(60px, 4.55vw, 76px)/1.05 'Manrope', Arial, sans-serif; letter-spacing: -4.8px; }
.hero h1 span { color: #0b61d7; }
:root[data-theme="dark"] .hero h1 span { color: #80b5ff; }
.hero p { max-width: 550px; margin-bottom: 17px; color: var(--muted); font-size: 17px; line-height: 1.32; }
.hero-actions { display: flex; gap: 15px; }
.hero-actions .button:first-child { min-width: 258px; }
.hero-actions .button:last-child { min-width: 175px; }
.hero-photo { margin: 0 0 0 42px; }
.hero-photo img { width: 100%; height: 332px; object-fit: cover; object-position: center; border-radius: 10px; filter: brightness(1.18); }

/* Four-part summary */
.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 78px; margin-top: -35px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); box-shadow: 0 10px 30px #183e660b; }
.stat { position: relative; display: flex; align-items: center; gap: 30px; padding: 9px 30px; }
.stat:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.stat-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 57px; height: 57px; border-radius: 50%; color: var(--blue); background: var(--icon-bg); }
.stat-icon .icon { font-size: 27px; }
.stat p { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.stat strong { font: 800 23px/1.1 'Manrope', Arial, sans-serif; letter-spacing: -.8px; }
.stat p span { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* Divisions */
.divisions { padding-top: 25px; scroll-margin-top: 72px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 7px 0 10px; }
.section-heading h2 { margin: 0; font: 800 31px/1.2 'Manrope', Arial, sans-serif; letter-spacing: -1.4px; }
.section-heading a, .division-body a { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 13px; font-weight: 700; }
.section-heading a .icon, .division-body a .icon { font-size: 12px; }
.division-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.division-card { overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.division-photo { width: 100%; height: 91px; background-color: #223044; background-position: center; background-size: cover; }
.division-photo.police { background-image: url('/assets/community-police-van.jpg'); background-position: 45% 45%; }
.division-photo.control { background-image: url('/assets/community-police-suv.jpg'); background-size: 160%; background-position: 65% 25%; }
.division-photo.ambulance { background-image: url('/assets/community-ambulance.jpg'); background-position: 50% 42%; }
.division-photo.fire { background-image: url('/assets/community-police-van.jpg'); background-size: 190%; background-position: 66% 68%; }
.division-photo.civilian { background-image: url('/assets/community-police-suv.jpg'); background-size: 230%; background-position: 0% 0%; }
.division-body { display: flex; gap: 11px; min-height: 125px; padding: 10px 12px 11px; }
.division-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 52px; border-radius: 50%; color: var(--blue); background: var(--icon-bg); }
.division-icon .icon { font-size: 26px; }
.division-icon.fire-icon { color: #ee513f; background: #fff1ef; }
.division-body h3 { margin: 4px 0 4px; font: 800 16px/1.2 'Manrope', Arial, sans-serif; letter-spacing: -.3px; }
.division-body p { margin: 0 0 5px; color: var(--muted); font-size: 13px; line-height: 1.32; }

/* News and quick links */
.lower-grid { display: grid; grid-template-columns: 1.27fr 1fr; gap: 30px; margin-top: 15px; }
.lower-grid .section-kicker { display: block; margin-bottom: 8px; color: #687f9f; letter-spacing: 3px; }
.news-card { display: flex; align-items: center; gap: 20px; min-height: 101px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.news-card:hover, .quick-grid a:hover { border-color: #b6cbe5; }
.news-card img { flex: none; width: 217px; height: 86px; border-radius: 7px; object-fit: cover; }
.news-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.news-copy strong { font: 800 15px/1.25 'Manrope', Arial, sans-serif; }
.news-copy small { color: #8798ae; font-size: 11px; }
.news-copy > span { overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.32; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-card > .icon { color: #829ab7; font-size: 17px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 88px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: #354c6a; font-size: 13px; font-weight: 700; white-space: nowrap; }
:root[data-theme="dark"] .quick-grid a { color: var(--ink); }
.quick-grid a .icon { color: var(--blue); font-size: 26px; }

/* Content below the reference viewport */
.detail-sections { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 70px; padding-block: 75px 65px; }
.detail-sections section { padding: 29px 0; border-top: 1px solid var(--line); scroll-margin-top: 30px; }
.detail-sections h2 { margin-bottom: 9px; font: 800 25px/1.2 'Manrope', Arial, sans-serif; }
.detail-sections p { max-width: 610px; margin-bottom: 10px; color: var(--muted); line-height: 1.55; }
.detail-sections a { color: var(--blue); font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 72px; color: var(--muted); font-size: 12px; }
.footer-inner a { text-decoration: underline; text-underline-offset: 2px; }
.theme-toggle { border: 0; padding: 6px 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 700; }

@media (max-width: 1250px) {
  .site-nav { gap: 16px; }
  .header-inner { gap: 15px; }
  .brand { font-size: 18px; }
  .hero-copy { padding-right: 18px; }
  .hero h1 { font-size: clamp(52px, 5vw, 68px); }
  .hero p { font-size: 15px; }
  .stat { gap: 12px; padding-inline: 18px; }
  .division-grid { gap: 10px; }
  .division-body { gap: 8px; padding-inline: 10px; }
  .division-icon { width: 40px; height: 40px; }
  .division-icon .icon { font-size: 21px; }
  .division-body h3 { font-size: 14px; }
  .division-body p { font-size: 12px; }
}

@media (max-width: 950px) {
  .site-header { height: 62px; position: relative; z-index: 5; }
  .header-cta { margin-left: auto; }
  .menu-button { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; }
  .menu-button span { width: 22px; height: 2px; background: var(--ink); }
  .site-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; height: auto; padding: 14px 32px; background: var(--page); box-shadow: 0 10px 20px #10244b20; }
  .site-nav.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { height: 39px; }
  .site-nav a.active::after { display: none; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-photo { margin-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2)::after { display: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .division-grid { grid-template-columns: repeat(3, 1fr); }
  .division-photo { height: 120px; }
  .lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .container, .header-inner { width: calc(100% - 32px); }
  .brand { font-size: 16px; }
  .brand-mark { height: 29px; }
  .header-cta { min-height: 36px; padding-inline: 10px; font-size: 0; }
  .header-cta .icon { font-size: 18px; }
  .header-cta .icon-arrow { font-size: 13px; }
  .hero-backdrop { padding: 28px 0 58px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 25px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(51px, 13vw, 70px); letter-spacing: -3.4px; }
  .hero p { font-size: 15px; line-height: 1.42; }
  .hero-actions { flex-wrap: wrap; gap: 9px; }
  .hero-actions .button:first-child, .hero-actions .button:last-child { min-width: 0; padding-inline: 14px; font-size: 13px; }
  .hero-photo img { height: auto; aspect-ratio: 16 / 10; }
  .stats { margin-top: -30px; }
  .stat { gap: 8px; padding: 10px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-icon .icon { font-size: 18px; }
  .stat strong { font-size: 16px; }
  .stat p span { font-size: 11px; white-space: normal; }
  .divisions { padding-top: 30px; }
  .section-heading { align-items: flex-start; gap: 10px; }
  .section-heading h2 { font-size: 24px; }
  .section-heading a { font-size: 11px; white-space: nowrap; margin-top: 6px; }
  .division-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .division-photo { height: 100px; }
  .division-body { min-height: 148px; padding: 9px; }
  .division-icon { width: 31px; height: 31px; }
  .division-icon .icon { font-size: 17px; }
  .division-body h3 { font-size: 13px; }
  .division-body p, .division-body a { font-size: 11px; }
  .lower-grid { margin-top: 24px; gap: 23px; }
  .news-card { gap: 11px; padding: 8px; }
  .news-card img { width: 100px; height: 80px; }
  .news-copy strong { font-size: 13px; }
  .news-copy > span { font-size: 11px; }
  .news-card > .icon { display: none; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-sections { grid-template-columns: 1fr; padding-block: 50px; }
  .footer-inner { flex-wrap: wrap; justify-content: flex-start; padding-block: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
