/* Justice Transitions: site styles
   Palette comes from the logo: harbor navy and the pale blue of the scales.
   The hero's lit diamond ("threshold") is the one bold element; keep the rest quiet.
   The warm daylight tone is used only for keyboard focus outlines. */

:root {
  --navy: #003D5A;
  --navy-deep: #002A3E;
  --sky: #9BD4E8;
  --sky-pale: #E3F1F7;
  --paper: #F6F8F9;
  --white: #FFFFFF;
  --ink: #142229;
  --ink-soft: #46565E;
  --line: #CAD7DD;
  --daylight: #F4C75E;
  --error: #A3261B;
  --success: #1E6B46;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4vw, 2.75rem); color: var(--navy); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--white);
  color: var(--navy);
  padding: 0.6rem 1rem;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

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

.site-header {
  background: var(--navy-deep);
  color: var(--white);
  position: relative;
  z-index: 2;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  flex-wrap: wrap;
  padding-block: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
}
.brand img {
  width: 44px;
  height: 44px;
  /* the mark is navy; give it a pale outline so it reads on the dark header */
  filter: drop-shadow(0 0 0.5px var(--sky)) drop-shadow(0 0 0.5px var(--sky));
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  font-size: 0.975rem;
}
.site-nav a {
  color: var(--white);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--sky); }
.site-nav .nav-phone {
  font-weight: 600;
  color: var(--sky);
}

@media (max-width: 40rem) {
  .header-inner { justify-content: center; }
  .site-nav { width: 100%; justify-content: center; flex-wrap: wrap; row-gap: 0.25rem; }
  .brand-name { font-size: 1.2rem; }
}

/* Hero: the one bold moment ---------------------------------------------
   A dark field with a lit diamond (the logo's shape) standing open on the right:
   the move from confinement into daylight. */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
  padding-block: clamp(4.5rem, 12vw, 9rem) clamp(5rem, 13vw, 10rem);
  isolation: isolate;
}
.threshold {
  position: absolute;
  z-index: -1;
  width: min(48vw, 36rem);
  aspect-ratio: 1;
  right: max(-8vw, -6rem);
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  background:
    radial-gradient(circle at 100% 100%,
      rgba(246, 251, 253, 0.92) 0%,
      rgba(200, 232, 243, 0.45) 22%,
      rgba(155, 212, 232, 0.14) 48%,
      rgba(155, 212, 232, 0) 75%);
  border: 1px solid rgba(155, 212, 232, 0.45);
  animation: dawn 2.4s ease-out 0.2s both;
}
.threshold::after {
  /* a second, inner edge: the doorway frame */
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(155, 212, 232, 0.28);
}
@keyframes dawn {
  from { opacity: 0.15; filter: saturate(0.3); }
  to   { opacity: 1;    filter: none; }
}

.hero-inner { position: relative; }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: 0.45em;
}
.hero-lede {
  max-width: 36rem;
  font-size: clamp(1.075rem, 1.6vw, 1.25rem);
  color: #D6E6ED;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

@media (max-width: 40rem) {
  .threshold { width: 80vw; right: -52vw; top: 72%; opacity: 0.55; animation: none; }
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  border-radius: 3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button-light { background: var(--white); color: var(--navy-deep); }
.button-light:hover { background: var(--sky-pale); }
.button-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.button-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.button-dark { background: var(--navy); color: var(--white); }
.button-dark:hover { background: var(--navy-deep); }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* Sections -------------------------------------------------------------- */

.section { padding-block: var(--section); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.about-intro p { font-size: 1.15rem; max-width: 34rem; }

.approach h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}
.approach-list { margin: 0; }
.approach-item {
  padding: 1.25rem 0 1.25rem 1.5rem;
  border-left: 2px solid var(--sky);
}
.approach-item + .approach-item { margin-top: 0.5rem; }
.approach-item dt {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.approach-item dd { margin: 0; color: var(--ink-soft); max-width: 36rem; }

@media (max-width: 52rem) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Mission */
.mission {
  background: var(--sky-pale);
  border-block: 1px solid var(--line);
}
.mission-inner { max-width: 60rem; }
.mission h2 { font-size: 1.25rem; font-family: var(--sans); font-weight: 700; color: var(--ink-soft); letter-spacing: 0.01em; }
.mission-statement { margin: 0 0 1.5rem; }
.mission-statement p {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.3vw, 2.4rem);
  line-height: 1.28;
  color: var(--navy);
  letter-spacing: -0.005em;
  margin: 0;
}
.mission-more { max-width: 42rem; color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.notice {
  margin: 1.75rem 0 0;
  padding: 1.1rem 1.25rem;
  background: #FFF6DB;
  border-left: 4px solid #C8932A;
  color: var(--ink);
}
.notice p { margin: 0; font-size: 0.975rem; line-height: 1.55; }
.notice .notice-title { font-weight: 700; margin-bottom: 0.35rem; }

.contact-details { margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.contact-details dt { font-weight: 700; font-size: 0.95rem; color: var(--ink-soft); }
.contact-details dd { margin: 0.1rem 0 0; font-size: 1.1rem; overflow-wrap: anywhere; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.15rem;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.975rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(0, 61, 90, 0.18);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.925rem; margin: 0; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.contact-form .button { justify-self: start; }
.form-status { margin: 0; min-height: 1.6em; font-weight: 600; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }

@media (max-width: 52rem) {
  .contact-grid { grid-template-columns: 1fr; }
}

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

.site-footer {
  background: var(--navy-deep);
  color: #C9DCE4;
  padding-block: 2.5rem;
  font-size: 0.95rem;
}
.footer-inner { display: grid; gap: 0.35rem; }
.footer-inner p { margin: 0; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.5rem !important;
}
.footer-brand img { filter: drop-shadow(0 0 0.5px var(--sky)) drop-shadow(0 0 0.5px var(--sky)); }

/* Simple pages (404, thanks) -------------------------------------------- */

.simple-page {
  min-height: 60vh;
  display: grid;
  align-content: center;
  padding-block: var(--section);
}
.simple-page h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); color: var(--navy); }
.simple-page p { max-width: 36rem; font-size: 1.15rem; }
