/* Blue Escrow — site stylesheet
   Tokens → base → layout → components → pages → utilities */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/newsreader-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/public-sans.woff2") format("woff2");
}

:root {
  --navy: #0e2f4f;
  --navy-deep: #091f35;
  --blue: #2f7bbf;
  --blue-dark: #235f95;
  --foam: #eaf2f6;
  --foam-deep: #d7e5ec;
  --ink: #13202c;
  --mist: #5b6b7a;
  --line: #d5dee5;
  --white: #ffffff;
  --amber: #a8620e;
  --amber-bg: #fff4df;
  --amber-line: #e9c58c;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: 2.25rem;
  --step-5: 3rem;
  --step-6: 4rem;

  --measure: 64ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --container: 72rem;
  --radius: 4px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, var(--step-6)); }
h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, var(--step-5)); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }

p, ul, ol, dl { margin: 0 0 1.25em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

strong { font-weight: 600; }
small { font-size: var(--step--1); }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  line-height: 1.4;
  color: var(--navy);
  max-width: 34em;
}
.muted { color: var(--mist); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--navy); color: var(--white); padding: 0.5rem 1rem;
  z-index: 100; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Layout ---------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--tint { background: var(--foam); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3, .section--navy .lede { color: var(--white); }
.section--navy a { color: var(--white); }
.section--navy .muted { color: rgba(255,255,255,0.72); }

.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { max-width: 48ch; }

.grid-2 { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 48em) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 56em) { .grid-2--narrow-left { grid-template-columns: 2fr 3fr; } }

.figure { margin: 0; }
.figure img { width: 100%; object-fit: cover; border-radius: var(--radius); }
.figure--tall img { aspect-ratio: 4 / 5; }
.figure--wide img { aspect-ratio: 3 / 2; }
.figure figcaption { font-size: var(--step--1); color: var(--mist); margin-top: 0.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.5rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 2.75rem; width: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.5rem 0.75rem; font: inherit; color: var(--navy); cursor: pointer;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; max-width: none; }
.site-nav a {
  display: inline-block; padding: 0.5rem 0.75rem; text-decoration: none;
  color: var(--ink); font-weight: 500; font-size: var(--step--1);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--blue); }
.site-nav .nav-cta a {
  background: var(--navy); color: var(--white); border-radius: var(--radius);
  padding: 0.6rem 1rem; margin-left: 0.5rem; border-bottom: 0;
}
.site-nav .nav-cta a:hover { background: var(--navy-deep); }

@media (min-width: 60em) {
  .nav-toggle { display: none; }
}
@media (max-width: 59.99em) {
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gutter) 1rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { display: block; padding: 0.75rem 0.5rem; font-size: var(--step-0); border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--blue-dark); }
  .site-nav .nav-cta a { margin: 0.75rem 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border-radius: var(--radius);
  font: 500 var(--step-0) var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; line-height: 1.2;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-deep); color: var(--white); }
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--foam); color: var(--navy); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.section--navy .btn--outline, .hero__card .btn--outline, .cta-band .btn--outline { color: var(--white); border-color: rgba(255,255,255,0.6); }
.section--navy .btn--outline:hover, .hero__card .btn--outline:hover, .cta-band .btn--outline:hover { background: var(--white); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative; background: var(--navy);
  min-height: clamp(30rem, 78vh, 46rem);
  display: grid; align-items: end;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 45%;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,31,53,0.10) 0%, rgba(9,31,53,0.10) 55%, rgba(9,31,53,0.55) 100%);
}
.hero__panel {
  position: relative; z-index: 1;
  margin-block: clamp(2rem, 6vw, 4rem) 0;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.hero__card {
  background: var(--navy);
  color: var(--white);
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 40rem;
  box-shadow: 0 24px 48px -24px rgba(9,31,53,0.6);
}
.hero__card h1 { color: var(--white); margin-bottom: 0.6em; }
.hero__card p { color: rgba(255,255,255,0.86); font-size: var(--step-1); max-width: 36em; margin-bottom: 1.5em; }

/* Page hero (interior pages) */
.page-hero { background: var(--navy); color: var(--white); padding-block: clamp(3rem, 8vw, 5.5rem); }
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(255,255,255,0.84); font-size: var(--step-1); max-width: 40em; }
.page-hero--photo { position: relative; overflow: hidden; min-height: 22rem; display: grid; align-items: end; }
.page-hero--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.page-hero--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,47,79,0.85) 0%, rgba(14,47,79,0.55) 55%, rgba(14,47,79,0.25) 100%); }
.page-hero--photo .container { position: relative; z-index: 1; }

/* ---------- Fact list (definition rows with rules) ---------- */

.facts { list-style: none; margin: 0; padding: 0; max-width: none; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: 0.25rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 40em) { .facts li { grid-template-columns: 14rem 1fr; } }
.facts .facts__term { font-family: var(--serif); font-size: var(--step-2); color: var(--navy); margin: 0; line-height: 1.25; }
.facts .facts__desc { margin: 0; color: var(--mist); max-width: 48ch; }
.section--navy .facts, .section--navy .facts li { border-color: rgba(255,255,255,0.18); }
.section--navy .facts .facts__term { color: var(--white); }
.section--navy .facts .facts__desc { color: rgba(255,255,255,0.76); }

/* ---------- Service list ---------- */

.services { list-style: none; margin: 0; padding: 0; max-width: none;
  display: grid; gap: 0 clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--line); }
@media (min-width: 48em) { .services { grid-template-columns: 1fr 1fr; } }
.services li { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.services h3 { font-size: var(--step-2); margin-bottom: 0.35em; }
.services p { color: var(--mist); max-width: 40ch; }
.services a { font-weight: 500; }

/* Service detail blocks */
.service { padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line); scroll-margin-top: 5.5rem; }
.service:first-of-type { border-top: 0; }
.service__body ul { padding-left: 1.2em; }
.service__aside { background: var(--foam); padding: 1.5rem; border-radius: var(--radius); }
.service__aside h4 { font-size: var(--step-1); font-family: var(--sans); font-weight: 600; margin-bottom: 0.5em; }
.service__aside ul { padding-left: 1.2em; margin: 0; color: var(--ink); }
.service__aside li { margin-bottom: 0.35em; }

/* ---------- Process timeline (a real sequence) ---------- */

.steps { list-style: none; margin: 0; padding: 0; max-width: none; counter-reset: step; }
.steps li { position: relative; display: grid; gap: 0.5rem 1.5rem; padding: 1.5rem 0 1.5rem 3.75rem; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1.35rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: var(--step-2); color: var(--white); background: var(--navy);
}
.steps h3 { font-size: var(--step-2); margin: 0.35rem 0 0.25em; }
.steps p { color: var(--mist); max-width: 60ch; }
.steps .who { font-size: var(--step--1); color: var(--blue-dark); font-weight: 500; }
@media (min-width: 48em) {
  .steps li { grid-template-columns: minmax(0, 1fr) 14rem; }
  .steps .who { grid-column: 2; grid-row: 1 / span 2; padding-top: 0.6rem; }
}
.section--navy .steps li { border-color: rgba(255,255,255,0.18); }
.section--navy .steps li::before { background: var(--white); color: var(--navy); }
.section--navy .steps h3 { color: var(--white); }
.section--navy .steps p { color: rgba(255,255,255,0.76); }
.section--navy .steps .who { color: #9cc7ea; }

/* ---------- Notice (wire fraud) ---------- */

.notice {
  background: var(--amber-bg); border: 1px solid var(--amber-line); border-left: 6px solid var(--amber);
  padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius);
}
.notice h2, .notice h3 { color: var(--amber); margin-bottom: 0.4em; }
.notice p, .notice li { max-width: 60ch; }
.notice ul { padding-left: 1.2em; }

/* ---------- Contact / office strip ---------- */

.office { display: grid; gap: 2rem; }
@media (min-width: 56em) { .office { grid-template-columns: 1fr 1fr; align-items: center; } }
.office address { font-style: normal; line-height: 1.7; }
.office address strong { display: block; font-family: var(--serif); font-size: var(--step-2); color: var(--navy); font-weight: 500; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1.5rem; margin: 0; }
.hours dt { font-weight: 500; }
.hours dd { margin: 0; color: var(--mist); }

.map { aspect-ratio: 4 / 3; width: 100%; border: 0; border-radius: var(--radius); background: var(--foam); }

/* ---------- Forms ---------- */

.form { display: grid; gap: 1.25rem; max-width: 40rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1.25rem; min-width: 0; }
.form legend { font-family: var(--serif); font-size: var(--step-2); color: var(--navy); margin-bottom: 0.75rem; padding: 0; }
.form .row { display: grid; gap: 1.25rem; }
@media (min-width: 40em) { .form .row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 500; font-size: var(--step--1); }
.field .hint { font-size: var(--step--1); color: var(--mist); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #aebac4; border-radius: var(--radius);
  padding: 0.65rem 0.75rem; width: 100%;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(47,123,191,0.3); outline-offset: 0; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 0.6rem; }
.field--check input { width: 1.1rem; height: 1.1rem; margin-top: 0.25rem; }
.field--check label { font-weight: 400; font-size: var(--step-0); }
.form__status { padding: 1rem; border-radius: var(--radius); background: var(--foam); display: none; max-width: none; }
.form__status.is-visible { display: block; }
.form__status.is-error { background: var(--amber-bg); border: 1px solid var(--amber-line); }

/* ---------- Resources ---------- */

.glossary { max-width: none; display: grid; gap: 0 2rem; }
@media (min-width: 48em) { .glossary { grid-template-columns: 1fr 1fr; } }
.glossary div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.glossary dt { font-family: var(--serif); font-size: var(--step-2); color: var(--navy); }
.glossary dd { margin: 0.25rem 0 0; color: var(--mist); }

/* ---------- Team ---------- */

.team { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; gap: 2rem; }
@media (min-width: 40em) { .team { grid-template-columns: repeat(3, 1fr); } }
.team li { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.team h3 { font-size: var(--step-2); margin-bottom: 0.15em; }
.team p { color: var(--mist); max-width: none; }

/* ---------- CTA band ---------- */

.cta-band { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.cta-band .container { position: relative; padding-block: clamp(3rem, 8vw, 5rem); }
.cta-band h2 { color: var(--white); max-width: 18em; }
.cta-band p { color: rgba(255,255,255,0.84); max-width: 40em; margin-bottom: 1.5em; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.8); padding-block: 3.5rem 2rem; font-size: var(--step--1); }
.site-footer a { color: var(--white); }
.site-footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 48em) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.site-footer img { height: 2.75rem; width: auto; margin-bottom: 1rem; }
.site-footer h3 { color: var(--white); font-family: var(--sans); font-size: var(--step-0); font-weight: 600; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer p { max-width: 36em; }
.site-footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; color: rgba(255,255,255,0.6); }
.site-footer__legal p { margin: 0; max-width: none; }

/* ---------- Prose pages ---------- */

.prose h2 { font-size: var(--step-3); margin-top: 2em; }
.prose h3 { font-size: var(--step-2); margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose table { border-collapse: collapse; width: 100%; max-width: 44rem; margin-bottom: 1.5rem; font-size: var(--step--1); }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--navy); }

/* ---------- Utilities ---------- */

.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
