:root {
  --surface: #f9f9f7;
  --surface-low: #f1f2ee;
  --surface-high: #e7e8e4;
  --white: #ffffff;
  --ink: #1a1c1c;
  --muted: #4b554b;
  --green: #126a2e;
  --green-soft: #dceee0;
  --navy: #003366;
  --blue-soft: #dbe8fb;
  --red: #bc000a;
  --red-dark: #930006;
  --gold: #d9b84f;
  --line: #d5d9d2;
  --shadow: 0 24px 48px -18px rgba(0, 33, 8, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--white);
  color: var(--ink);
  padding: 0.7rem 1rem;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(249, 249, 247, 0.86);
  border-bottom: 1px solid rgba(213, 217, 210, 0.7);
  backdrop-filter: blur(20px);
}

.nav {
  width: min(1220px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  color: var(--green);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 56px;
  max-width: min(42vw, 260px);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.05;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.nav-menu a {
  position: relative;
  color: #5f6660;
  font-weight: 700;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a[aria-current="page"] {
  color: var(--green);
}

.nav-menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.42rem;
  height: 2px;
  background: var(--green);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1.05rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--green);
  color: var(--white);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #0e5825;
}

.button.red {
  background: var(--red);
  color: var(--white);
}

.button.red:hover,
.button.red:focus-visible {
  background: var(--red-dark);
}

.button.white {
  background: var(--white);
  color: var(--navy);
}

.button.outline {
  border-color: var(--green);
  background: transparent;
  color: var(--green);
}

.section-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 705px;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
}

.hero-bg,
.hero-wash {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background: url("assets/home-hero.jpg") center / cover;
  opacity: 0.62;
}

.hero-wash {
  background:
    linear-gradient(to bottom, rgba(249, 249, 247, 0.68), rgba(249, 249, 247, 0.46), var(--surface)),
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.65), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 32px));
  padding: 5rem 0 8rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
li {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1,
h2,
h3,
.serif {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  color: var(--navy);
  font-size: clamp(2.7rem, 6vw, 5.9rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  font-size: 1.55rem;
}

.lead {
  max-width: 760px;
  margin: 1.3rem auto 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-style: italic;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.feature-band {
  position: relative;
  z-index: 2;
  margin-top: -4rem;
  padding-bottom: 5.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.feature-card {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  min-height: 100%;
  padding: 2.1rem;
  border-bottom: 5px solid var(--green);
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  box-shadow: var(--shadow);
}

.feature-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.icon-badge {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-weight: 900;
}

.section {
  padding: 5.8rem 0;
}

.soft {
  background: var(--surface-low);
}

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

.white-section {
  background: var(--white);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 4rem;
  align-items: center;
}

.split.reverse {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
}

.section-copy {
  display: grid;
  gap: 1.4rem;
}

.section-copy p,
.center-copy p,
.copy-block,
.copy-block p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.3rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.check-grid li,
.check-list li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--muted);
}

.check-grid li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--green);
}

.image-frame {
  position: relative;
}

.image-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-note {
  position: absolute;
  left: -1.2rem;
  bottom: -1.2rem;
  max-width: 250px;
  padding: 1.3rem;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.05rem;
}

.center-copy {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.center-copy p {
  margin-top: 1rem;
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.bento-card {
  min-height: 100%;
  padding: 1.6rem;
  border-radius: 8px;
  background: var(--surface-low);
  transition: transform 180ms ease, background-color 180ms ease;
}

.bento-card:hover {
  transform: translateY(-3px);
  background: var(--green-soft);
}

.bento-card h3 {
  color: var(--green);
  font-size: 1.35rem;
}

.bento-card p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.service-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.service-card,
.resource-card {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-height: 100%;
  padding: 1.5rem;
  border: 1px solid rgba(213, 217, 210, 0.84);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 36px -28px rgba(0, 0, 0, 0.3);
}

.service-card h3,
.resource-card h2,
.resource-card h3 {
  color: var(--ink);
}

.resource-card h2 {
  font-size: 1.6rem;
}

.service-card p,
.resource-card p {
  margin: 0;
  color: var(--muted);
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.navy-card {
  background: var(--navy);
  color: var(--white);
}

.navy-card h3,
.navy-card p {
  color: var(--white);
}

.green-card {
  background: var(--green);
  color: var(--white);
}

.green-card h3,
.green-card p {
  color: var(--white);
}

.blue-card {
  background: var(--blue-soft);
}

.image-card {
  min-height: 280px;
  overflow: hidden;
  padding: 0;
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.training-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
}

.training-panel h2,
.training-panel p {
  color: var(--white);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  color: var(--white);
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 5rem;
  background:
    linear-gradient(100deg, var(--surface) 0%, rgba(249, 249, 247, 0.9) 46%, rgba(249, 249, 247, 0.42) 100%),
    url("assets/services-hero.jpg") center / cover;
}

.page-hero.red {
  background:
    linear-gradient(100deg, rgba(26, 28, 28, 0.72), rgba(26, 28, 28, 0.34)),
    url("assets/contact-hero.jpg") center / cover;
  color: var(--white);
}

.page-resources .page-hero {
  background:
    linear-gradient(100deg, var(--surface) 0%, rgba(249, 249, 247, 0.9) 46%, rgba(249, 249, 247, 0.42) 100%),
    url("assets/resources-hero.jpg") center / cover;
}

.page-hero.red h1,
.page-hero.red p {
  color: var(--white);
}

.page-hero.red .page-hero-inner p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.88);
}

.page-hero-inner {
  max-width: 780px;
}

.page-hero-inner p:not(.eyebrow) {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.resource-card {
  grid-column: span 3;
}

.resource-card.compact {
  grid-column: span 2;
}

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

.resource-items li {
  display: grid;
  gap: 0.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.resource-items span {
  color: var(--muted);
}

.resource-items a {
  color: var(--green);
  font-weight: 900;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 1.2rem;
  margin-top: 2rem;
}

.contact-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 1rem;
  align-items: start;
}

.contact-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(188, 0, 10, 0.1);
  color: var(--red);
  font-weight: 900;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-item h3 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.05rem;
}

.contact-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.contact-item a {
  font-weight: 900;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}

.map-panel {
  min-height: 280px;
  overflow: hidden;
  margin-top: 2rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-low);
}

.map-panel iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}

.map-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.contact-form-shell {
  display: grid;
  gap: 1rem;
}

.form-status-box {
  padding: 1.2rem;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
}

.form-status-box p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Ensure JS-hidden referral-only rows are actually hidden */
.contact-form [hidden] {
  display: none !important;
}

.hp-field {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c8c9c5;
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.planned-form button[type="submit"] {
  background: #747474;
}

.form-note {
  min-height: 1.4rem;
  margin: 0;
  color: var(--red);
  font-weight: 900;
}

.field-help {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

input:focus,
select:focus,
textarea:focus,
.button:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid rgba(188, 0, 10, 0.22);
  outline-offset: 2px;
}

.site-footer {
  background: var(--surface-low);
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 3.5rem 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-grid h2,
.footer-grid h3 {
  font-size: 1rem;
  color: var(--green);
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #666b66;
}

.footer-grid ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a {
  text-decoration: none;
}

.footer-grid a:hover,
.footer-grid a:focus-visible {
  color: var(--green);
}

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

@media (max-width: 980px) {
  .nav-actions .button {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-menu a:last-child {
    border-bottom: 0;
  }

  .nav-menu a[aria-current="page"]::after {
    left: auto;
    right: 1rem;
    top: calc(50% - 4px);
    bottom: auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }

  .feature-grid,
  .split,
  .split.reverse,
  .training-panel,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card,
  .resource-card,
  .resource-card.compact {
    grid-column: span 6;
  }

  .image-note {
    left: 1rem;
  }
}

@media (max-width: 640px) {
  .nav {
    width: min(100% - 24px, 1220px);
  }

  .brand-logo {
    height: 42px;
    max-width: min(52vw, 210px);
  }

  .section-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1220px);
  }

  .hero {
    min-height: 650px;
  }

  .hero-content {
    padding: 3rem 0 6.5rem;
  }

  .feature-band {
    margin-top: -3.5rem;
    padding-bottom: 3.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .check-grid,
  .bento,
  .field-row {
    grid-template-columns: 1fr;
  }

  .service-card,
  .resource-card,
  .resource-card.compact {
    grid-column: 1 / -1;
  }

  .training-panel,
  .contact-form {
    padding: 1.3rem;
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }
}
