/*
 * FSN public information site, Stage A. One stylesheet, no framework, no fonts or files from any
 * other host. Colour tokens are taken from app/globals.css (the owner-approved palette); the dark
 * scheme below is this site's own and uses the same hues. Mobile first: the base rules are the
 * 360 px layout and the media queries only widen it.
 */

:root {
  color-scheme: light dark;

  --bg: #fbf8f1;
  --surface: #ffffff;
  --surface-alt: #f4f7f9;
  --tint: #eef7f6;
  --sand: #fcf5e8;
  --ink: #1d2e3d;
  --ink-heading: #0f2a3f;
  --ink-muted: #4f6070;
  --link: #1b6c85;
  --accent: #135569;
  --accent-deep: #0f4a5e;
  --on-accent: #ffffff;
  --line: #dfe6ec;
  --line-strong: #7a8896;
  --note-bg: #eef7f6;
  --note-line: #1b6c85;
  --caution-bg: #fcf5e8;
  --caution-line: #a7742b;
  --focus: #0b57d0;
  --header-bg: #ffffff;
  --footer-bg: #16384f;
  --footer-ink: #f1f6fa;
  --footer-link: #cfe6f2;

  --gutter: 16px;
  --measure: 40rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a24;
    --surface: #152634;
    --surface-alt: #122230;
    --tint: #12303b;
    --sand: #271f14;
    --ink: #e6edf3;
    --ink-heading: #ffffff;
    --ink-muted: #b8c6d2;
    --link: #8fd0e3;
    --accent: #8fd0e3;
    --accent-deep: #b4e1ee;
    --on-accent: #0e1a24;
    --line: #2b4153;
    --line-strong: #6f8598;
    --note-bg: #12303b;
    --note-line: #8fd0e3;
    --caution-bg: #271f14;
    --caution-line: #e0b266;
    --focus: #9cc2ff;
    --header-bg: #0f2a3f;
    --footer-bg: #0a131b;
    --footer-ink: #e6edf3;
    --footer-link: #a9dcec;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  /* Keep the footer at the bottom of the window on short pages (pricing, 404). */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  color: var(--ink-heading);
  line-height: 1.2;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.1875rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.5rem;
  color: var(--on-accent);
}

/* ------------------------------------------------------------------ layout */

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.band {
  padding: 2.5rem 0;
}

.band--surface {
  background: var(--surface);
}

.band--tint {
  background: var(--tint);
}

.band--sand {
  background: var(--sand);
}

.measure {
  max-width: var(--measure);
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------------ header */

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: inline-block;
  align-self: flex-start;
  line-height: 0;
}

.brand img {
  height: 3rem;
  width: auto;
}

/* The approved logo is not recoloured (brand rule 1). In dark mode it sits on a light plate so the
   wordmark stays readable; the separate dark-background artwork was not legible on the dark header. */
@media (prefers-color-scheme: dark) {
  .brand {
    padding: 0.25rem 0.625rem;
    background: #ffffff;
    border-radius: 0.5rem;
  }
}

/* Compact on a phone so the seven links fit in two rows instead of three (still well over the
   24px WCAG 2.2 target size); the roomier sizes return from 40rem up. */
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.4375rem 0.5rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.site-nav a:hover {
  background: var(--tint);
  color: var(--ink-heading);
}

.site-nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* ------------------------------------------------------------------- hero */

.hero {
  padding: 2rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lede {
  font-size: 1.1875rem;
  color: var(--ink);
}

.hero-media {
  margin: 1.5rem 0 0;
}

.hero-media img,
.figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.figure {
  margin: 1.5rem 0 0;
}

/* ----------------------------------------------------------- notes, status */

.note {
  margin: 1.25rem 0;
  padding: 1rem 1.125rem;
  background: var(--note-bg);
  border-left: 4px solid var(--note-line);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.note p:last-child {
  margin-bottom: 0;
}

.note--caution {
  background: var(--caution-bg);
  border-left-color: var(--caution-line);
}

.note h2,
.note h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.4em;
}

/* ----------------------------------------------------------------- buttons */

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--accent);
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--on-accent);
}

.button--quiet {
  background: transparent;
  color: var(--link);
  border-color: var(--line-strong);
}

.button--quiet:hover {
  background: var(--tint);
  color: var(--ink-heading);
  border-color: var(--line-strong);
}

/* ------------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.band--surface .card {
  background: var(--bg);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p:last-child {
  margin-bottom: 0;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.steps > li {
  counter-increment: step;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps > li::before {
  content: "Step " counter(step);
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.steps h3 {
  margin-bottom: 0.4em;
}

.steps p:last-child {
  margin-bottom: 0;
}

.ticks {
  padding-left: 1.25rem;
}

.ticks li {
  margin-bottom: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}

.chips li {
  padding: 0.25rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
}

.states dt {
  font-weight: 700;
  color: var(--ink-heading);
}

.states dd {
  margin: 0 0 0.9rem;
}

.mail-link {
  display: inline-block;
  /* Scales down so the whole address fits on a 360px screen instead of breaking mid-word. */
  font-size: clamp(0.8rem, 3.8vw, 1.25rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: 0;
  padding: 2rem 0 2.5rem;
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-size: 0.9375rem;
}

.site-footer a {
  color: var(--footer-link);
}

.site-footer p {
  max-width: 48rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.site-footer li a {
  display: inline-block;
  padding: 0.35rem 0;
}

/* ----------------------------------------------------------------- widen */

@media (min-width: 40rem) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .band {
    padding: 3.5rem 0;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .grid--two,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .site-nav ul {
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
  }
}

@media (min-width: 64rem) {
  h1 {
    font-size: 2.875rem;
  }

  .grid--three {
    grid-template-columns: repeat(3, 1fr);
  }

  .split {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .split .hero-media,
  .split .figure {
    margin-top: 0;
  }
}

/* --------------------------------------------------------- motion + print */

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

@media print {
  .skip-link,
  .site-nav {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }
}
