/* A4 WAYPOINT base styles: tokens, reset, typography, layout, header, footer. */

:root {
  /* Brand colours. Navy and lime come from the district logo. Orange marks actions. */
  --navy: #0e1440;
  --navy-700: #1b2466;
  --navy-500: #3a4488;
  --lime: #84c318;
  --lime-ink: #3d6a00;
  --lime-tint: #eef8dc;
  --orange: #cf4a0c;
  --orange-hover: #ad3c08;
  --orange-bright: #f97316;
  --orange-tint: #fff0e6;
  --blue: #0b63c4;
  --blue-tint: #e8f1fc;

  /* Surfaces and text */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #0e1440;
  --ink-2: #454d6b;
  --ink-3: #5f6784;
  --line: #e1e5f0;
  --line-strong: #c9cfdf;

  /* Status */
  --danger: #b42318;
  --danger-tint: #fdecea;

  /* Type */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem);
  --step-4: clamp(2rem, 1.5rem + 2.4vw, 3rem);
  --step-5: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);

  /* Space, radius, depth */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(14, 20, 64, 0.06), 0 1px 3px rgba(14, 20, 64, 0.05);
  --shadow: 0 2px 4px rgba(14, 20, 64, 0.04), 0 8px 24px rgba(14, 20, 64, 0.07);
  --shadow-lg: 0 4px 8px rgba(14, 20, 64, 0.05), 0 20px 48px rgba(14, 20, 64, 0.12);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --container: 1200px;
  --header-h: 68px;
}

/* Reset */
[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--step-4);
}

h3 {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--lime);
  color: var(--navy);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

input,
textarea {
  caret-color: var(--orange);
}

* {
  scrollbar-color: var(--line-strong) transparent;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 32px;
  }
}

.section {
  padding-block: var(--space-8);
}

.section-tight {
  padding-block: var(--space-7);
}

.section-head {
  display: grid;
  gap: var(--space-3);
  max-width: 44rem;
  margin-bottom: var(--space-6);
}

.section-head p {
  color: var(--ink-2);
  font-size: var(--step-1);
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 60ch;
}

.muted {
  color: var(--ink-3);
}

/* Page intro used on inner pages */
.page-intro {
  padding-block: var(--space-7) var(--space-6);
}

.page-intro h1 {
  font-size: var(--step-4);
}

.page-intro .lede {
  margin-top: var(--space-3);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-4);
  font-size: var(--step--1);
  color: var(--ink-3);
  list-style: none;
}

.breadcrumb a {
  color: var(--ink-2);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line-strong);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 12px rgba(14, 20, 64, 0.05);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  display: grid;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--ink-3);
  font-weight: 500;
}

.site-nav {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.site-header .header-cta {
  display: none;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.nav-toggle .icon {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--surface);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-list {
  list-style: none;
  padding-block: var(--space-3) var(--space-5);
}

.mobile-nav-list > li {
  border-bottom: 1px solid var(--line);
}

.mobile-nav-list > li:last-child {
  border-bottom: 0;
}

.mobile-nav-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.mobile-nav-list a[aria-current="page"] {
  color: var(--orange);
}

.mobile-subnav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: var(--space-3);
}

.mobile-subnav a {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 500;
  font-size: 0.875rem;
}

.mobile-nav .btn {
  width: 100%;
  margin-top: var(--space-4);
}

@media (min-width: 1024px) and (max-width: 1179px) {
  .header-inner {
    gap: var(--space-4);
  }

  .nav-list {
    gap: 0;
  }

  .nav-link {
    padding: 8px 9px;
    font-size: 0.875rem;
  }

  .site-header .header-cta {
    padding: 0 14px;
  }
}

@media (min-width: 1024px) {
  .site-nav {
    display: block;
  }

  .site-header .header-cta {
    display: inline-flex;
  }

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* Footer */
.site-footer {
  margin-top: var(--space-8);
  background: var(--navy);
  color: #d5d9ea;
  padding-block: var(--space-7) var(--space-5);
  font-size: 0.9375rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.footer-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: none;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.375rem;
  color: #fff;
  letter-spacing: 0.01em;
}

.footer-tagline {
  margin-top: 6px;
  max-width: 32ch;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 8px;
}

.social-links {
  display: flex;
  gap: 10px;
  list-style: none;
  margin-top: var(--space-4);
}

.social-links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.15s;
}

.social-links a:hover {
  background: var(--lime);
  color: var(--navy);
}

.social-links .icon {
  width: 20px;
  height: 20px;
}

.site-footer :focus-visible {
  outline-color: var(--lime);
}

.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.8125rem;
  color: #aeb4cf;
}
