:root {
  --ink: #020b16;
  --navy: #061426;
  --navy-light: #0c2138;
  --gold: #d9a84e;
  --gold-soft: #e8c67c;
  --white: #f5f4ef;
  --muted: #aeb9c7;
  --line: rgba(217, 168, 78, 0.65);
  --page-gutter: clamp(20px, 3.3vw, 64px);
  --condensed: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  color: var(--white);
  background:
    radial-gradient(circle at 50% -20%, #153455 0, transparent 36%),
    var(--ink);
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
  background: var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  height: 92px;
  border-bottom: 1px solid rgba(195, 211, 227, 0.2);
  background: linear-gradient(180deg, rgba(2, 11, 22, 0.9), rgba(2, 11, 22, 0.44));
  backdrop-filter: blur(8px);
}

.header-inner {
  width: min(100%, 1780px);
  height: 100%;
  margin: auto;
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: 230px 1fr 230px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 48px;
  height: 58px;
  fill: transparent;
  stroke: var(--gold);
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 8px rgba(217, 168, 78, 0.18));
}

.brand-mark__inner {
  stroke-width: 1;
  opacity: 0.5;
}

.brand-mark__star {
  fill: var(--gold);
  stroke-width: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.05;
}

.brand-copy span {
  color: var(--muted);
  font-size: 9px;
}

.brand-copy strong {
  color: var(--gold-soft);
  font-size: 17px;
  font-weight: 600;
}

.main-nav {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.4vw, 46px);
}

.nav-item {
  position: relative;
  display: grid;
  height: 100%;
  place-items: center;
  padding: 0 4px;
  color: #cad2db;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  outline: none;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, text-shadow 180ms ease, transform 100ms ease;
}

.nav-item::after {
  position: absolute;
  bottom: 20px;
  width: 0;
  height: 2px;
  content: "";
  background: var(--gold);
  box-shadow: 0 0 10px rgba(217, 168, 78, 0.45);
  transition: width 220ms ease, box-shadow 180ms ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--gold-soft);
  text-shadow: 0 0 14px rgba(217, 168, 78, 0.32);
}

.nav-item:hover::after,
.nav-item:focus-visible::after {
  width: 70%;
}

.nav-item:focus-visible {
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(217, 168, 78, 0.55);
}

.nav-item:active {
  color: #fff4d7;
  text-shadow: 0 0 18px rgba(232, 198, 124, 0.75);
  transform: translateY(2px) scale(0.94);
}

.nav-item:active::after {
  width: 86%;
  box-shadow: 0 0 16px rgba(217, 168, 78, 0.9);
}

.nav-item--active {
  color: var(--gold-soft);
}

.nav-item--active::after {
  width: 56px;
}

.motto {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 11px;
  padding-left: 24px;
  border-left: 1px solid rgba(219, 227, 235, 0.32);
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.motto svg {
  width: 20px;
  fill: var(--gold);
}

.motto__star {
  fill: var(--ink);
}

.hero {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgba(2, 11, 22, 0.42), rgba(2, 11, 22, 0.12) 48%, rgba(2, 11, 22, 0.15)),
    linear-gradient(0deg, rgba(2, 11, 22, 0.78), transparent 36%, rgba(2, 11, 22, 0.12)),
    url("assets/images/hero-police.png");
  background-position: center;
  background-size: cover;
}

.hero::before,
.academy::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(117, 153, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 153, 184, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, black, transparent 42%);
}

.hero__content {
  margin-top: 78px;
  text-align: center;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}

.eyebrow,
.academy__label,
.section-heading span {
  margin: 0 0 9px;
  color: var(--gold-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--condensed);
  font-size: clamp(98px, 12vw, 202px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: #fafafa;
  filter: drop-shadow(0 8px 2px rgba(1, 7, 14, 0.35));
}

.ornament,
.mini-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 25px auto 0;
  color: var(--gold);
}

.ornament span {
  width: 118px;
  height: 1px;
  background: var(--gold);
}

.ornament b {
  font-size: 18px;
}

.hero__lead {
  margin: 14px 0 0;
  color: rgba(232, 238, 245, 0.72);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.scroll-cue {
  position: absolute;
  right: var(--page-gutter);
  bottom: 27px;
  width: 28px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 30px;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  border-radius: 5px;
  background: var(--gold);
  transform: translateX(-50%);
}

.departments {
  padding: 38px var(--page-gutter) 22px;
  border-top: 1px solid rgba(76, 112, 145, 0.45);
  background:
    radial-gradient(circle at 50% 0, rgba(20, 54, 86, 0.4), transparent 40%),
    var(--ink);
}

.section-heading {
  display: none;
  margin: 0 0 24px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--condensed);
  font-size: 42px;
  letter-spacing: 0.04em;
  line-height: 1.12;
  text-transform: uppercase;
  text-wrap: balance;
}

.department-grid {
  width: min(100%, 1780px);
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.department-card {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: border-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.department-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 14, 28, 0.9), rgba(3, 14, 28, 0.5) 60%, rgba(3, 14, 28, 0.24)),
    linear-gradient(0deg, rgba(1, 8, 17, 0.82), transparent 65%);
}

.department-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42), 0 0 24px rgba(217, 168, 78, 0.08);
}

.department-card--lspd {
  background-image: url("assets/images/lspd.png");
}

.department-card--lssd {
  background-image: url("assets/images/lssd.png");
}

.department-card--sahp {
  background-image: url("assets/images/sahp.png");
}

.card-emblem {
  position: absolute;
  left: 22px;
  top: 50%;
  width: 105px;
  opacity: 0.13;
  transform: translateY(-50%);
}

.card-emblem svg {
  fill: transparent;
  stroke: #dbe5ed;
  stroke-width: 2;
}

.card-emblem--star svg {
  stroke-width: 1.6;
}

.card-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 28px 20px 23px;
  text-align: center;
}

.card-number {
  position: absolute;
  top: -10px;
  right: 7px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.card-content h3,
.academy h2 {
  margin: 0;
  font-family: var(--condensed);
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-shadow: 0 5px 2px rgba(0, 0, 0, 0.34);
}

.card-content h3 {
  font-size: clamp(54px, 4.4vw, 78px);
  line-height: 1.08;
}

.mini-ornament {
  gap: 10px;
  margin-top: 11px;
}

.mini-ornament span {
  width: 45px;
  height: 1px;
  background: var(--gold);
}

.mini-ornament b {
  color: var(--gold);
  font-size: 10px;
}

.card-content p {
  margin: 12px 0 15px;
  color: #f7f7f4;
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.card-arrow,
.academy__arrow {
  display: inline-block;
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: 200;
  line-height: 0.55;
}

.academy {
  position: relative;
  min-height: 278px;
  width: calc(100% - (2 * var(--page-gutter)));
  max-width: 1780px;
  margin: 0 auto 22px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  background-image:
    linear-gradient(90deg, rgba(3, 15, 29, 0.78), rgba(3, 15, 29, 0.46) 52%, rgba(3, 15, 29, 0.18)),
    linear-gradient(0deg, rgba(1, 8, 17, 0.68), transparent),
    url("assets/images/lea.png");
  background-position: center 56%;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: border-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.academy:hover {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42), 0 0 24px rgba(217, 168, 78, 0.08);
}

.academy__content {
  padding: 32px 20px 24px;
  text-align: center;
}

.academy h2 {
  font-size: clamp(76px, 7vw, 112px);
  line-height: 1.04;
}

.ornament--small {
  gap: 12px;
  margin-top: 16px;
}

.ornament--small span {
  width: 70px;
}

.ornament--small b {
  font-size: 11px;
}

.academy p {
  margin: 11px 0 13px;
  font-size: clamp(16px, 1.3vw, 21px);
}

footer {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(195, 211, 227, 0.12);
  color: rgba(202, 212, 222, 0.45);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: 190px 1fr;
  }

  .main-nav {
    justify-content: flex-end;
    gap: 24px;
  }

  .motto {
    display: none;
  }

  .department-grid {
    grid-template-columns: 1fr;
  }

  .department-card {
    min-height: 250px;
  }

  .card-content h3 {
    font-size: 72px;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 76px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .brand-mark {
    width: 40px;
    height: 48px;
  }

  .main-nav {
    gap: 18px;
  }

  .nav-item {
    display: none;
  }

  .nav-item--active {
    display: grid;
  }

  .nav-item--active::after {
    bottom: 14px;
    width: 42px;
  }

  .hero {
    min-height: 500px;
    background-position: 62% center;
  }

  .hero__content {
    margin-top: 48px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(64px, 18vw, 96px);
    letter-spacing: -0.01em;
  }

  .hero__lead {
    max-width: 260px;
    margin-inline: auto;
    line-height: 1.7;
  }

  .scroll-cue {
    display: none;
  }

  .departments {
    padding-top: 32px;
  }

  .department-card {
    min-height: 290px;
  }

  .department-card::before {
    background: linear-gradient(90deg, rgba(3, 14, 28, 0.9), rgba(3, 14, 28, 0.38));
  }

  .academy {
    min-height: 330px;
    background-position: 67% center;
  }
}

@media (max-width: 430px) {
  .brand-copy {
    display: none;
  }

  .hero {
    min-height: 460px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(58px, 18vw, 70px);
    letter-spacing: -0.01em;
  }

  .section-heading h2 {
    font-size: 32px;
  }

  .section-heading span {
    letter-spacing: 0.28em;
  }

  .ornament span {
    width: 72px;
  }

  .department-card {
    min-height: 265px;
  }

  .card-content h3 {
    font-size: 60px;
  }

  footer {
    justify-content: center;
  }

  footer span:last-child {
    display: none;
  }
}

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