/* ==========================================================================
   CORE VARIABLES & BASE STYLES
========================================================================== */

:root {
  --teal: #0B4F5C;
  --teal-dark: #083A44;
  --orange: #C98E23;
  --orange-text: #8A6410;
  --orange-btn: #E0A526;
  --orange-btn-hover: #CC931A;
  --gold: #C98E23;
  --ink: #14262B;
  --muted: #3F5A60;
  --warm: #FFFFFF;
  --peach: #EEF3F2;
  --line: #D3DEDC;
  --white: #FFFFFF;
  --focus: #04404F;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  padding-top: 80px;
}

/* ==========================================================================
   TYPOGRAPHY & STRUCTURAL WRAPPERS
========================================================================== */

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  color: var(--teal);
  margin: 0;
  line-height: 1.12;
}

p {
  margin: 0;
}

a {
  color: var(--teal);
}

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

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 64px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section .intro {
  margin-top: 10px;
  color: var(--muted);
  max-width: 36em;
}

.kicker {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange-text);
  text-transform: uppercase;
}

.body {
  margin-top: 16px;
  color: var(--muted);
  max-width: 34em;
}

.pull {
  margin: 0;
  padding: 8px 0 8px 28px;
  border-left: 5px solid var(--orange);
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--teal);
}

/* ==========================================================================
   GLOBAL BUTTONS
========================================================================== */

.btn {
  display: inline-flex;
  white-space: nowrap !important;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-orange {
  background: var(--orange-btn);
  color: #14262B;
}

.btn-orange:hover {
  background: var(--orange-btn-hover);
}

.btn-outline {
  background: var(--white);
  color: var(--teal);
  border-color: var(--teal);
}

.btn-orange:hover,
.btn-outline:hover {
  color: var(--white);
  background: var(--teal);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION (JS ResizeObserver Compliant)
========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: transform 0.3s ease-in-out;
}

.site-header.is-hidden {
  transform: translateY(-100%);
} 

.site-header .wrap {
  display: flex;
  flex-wrap: wrap !important;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand img {
  display: block;
  height: 68px;
  width: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

/* Absolute positioning is ONLY active when the mobile overlay is explicitly opened via JS */
.nav.is-open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background-color: var(--white);
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-weight: 500;
  font-size: 17px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--orange);
}

.mobile-cta-group {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 0 0.25rem;
  padding: 0;
  gap: 1.5rem;
}
  
.mobile-cta-group .btn {
  min-height: 2.5rem !important; 
  max-height: 2.6rem !important; 
  margin: 0rem 0rem;
  padding: 0.5rem 0.5rem;
}
@media (min-width: 769px) and (pointer: fine) {
  .header-button {
    min-height: 2.5rem !important; 
    max-height: 2.6rem !important; 
    margin: 0rem 0.2rem;
    padding: 1rem 1.75rem;
    font-size: 1rem;
  }
}

.menu-toggle {
  display: none;
  background: transparent;
  flex-direction: column;
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.menu-toggle .bar { 
  display: block; 
  width: 1.4rem;
  height: 0.125rem;
  margin: 0.25rem 0rem;
  background-color: var(--teal);
}

/* ==========================================================================
   PAGE COMPONENTS & HERO SECTIONS
========================================================================== */

.hero {
  background: var(--white);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 0.62fr 0.95fr;
  gap: 24px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--teal);
}

.hero .lead {
  margin-top: 22px;
  font-size: 20px;
  color: var(--muted);
  max-width: 30em;
}

.hero-map, .hero-photo, .doctors .doc-photo {
  margin: 0;
}

.hero-map svg, .hero-photo img, .doctors .doc-photo img, .records .phone img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-photo img, .doctors .doc-photo img {
  border-radius: 14px;
}

/* Fluid feature band - scales beautifully on tablet without media queries */
.features {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.features .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding-top: 36px;
  padding-bottom: 36px;
  text-align: center;
}

.feature .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--peach);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature svg {
  width: 34px;
  height: 34px;
}

.feature h3 {
  font-size: 19px;
  font-weight: 700;
}

.feature p {
  margin-top: 4px;
  font-size: 16px;
  color: var(--muted);
}

/* ==========================================================================
   CONTENT SECTIONS & CONTENT GRIDS
========================================================================== */

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

.statement .wrap {
  padding-top: 72px;
  padding-bottom: 72px;
}

.statement h2 {
  font-size: clamp(38px, 5.6vw, 70px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.statement p.sub {
  margin-top: 22px;
  font-size: 21px;
  color: var(--muted);
  max-width: 30em;
}

.statement .bar {
  width: 72px;
  height: 6px;
  margin-top: 28px;
  background: var(--orange);
}

.doctors .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.records {
  border-top: 1px solid var(--line);
}

.records .wrap {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 56px;
  align-items: center;
}

.records .phone {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 340px;
}

.pagehead {
  border-bottom: 1px solid var(--line);
}

.pagehead .wrap {
  padding-top: 56px;
  padding-bottom: 44px;
}

.pagehead h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.pagehead .lead {
  margin-top: 14px;
  font-size: 21px;
  color: var(--muted);
  max-width: 32em;
}

.pagehead .cta-row {
  margin-top: 26px;
}

.cols3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  margin-top: 28px;
}

.cols3 > div {
  border-top: 3px solid var(--teal);
  padding-top: 16px;
}

.cols3 h3 {
  font-size: 20px;
  font-weight: 700;
}

.cols3 p {
  margin-top: 8px;
  color: var(--muted);
}

.checklist {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 640px;
}

.checklist li {
  position: relative;
  padding-left: 38px;
  font-size: 19px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 8px;
  height: 15px;
  border: solid var(--orange);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.about-purpose {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.about-purpose h2 {
  margin-top: 10px;
}

.about-map {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-map .hero-map {
  max-width: 360px;
  width: 100%;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.contact-grid .contact-lines {
  margin-top: 20px;
  gap: 18px;
}

.contact-grid fieldset.group {
  margin-top: 8px;
}

.contact-grid .cta-row {
  margin-top: 28px;
}

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

.purpose .wrap {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.2fr;
  gap: 36px;
  align-items: center;
}

.purpose .quote {
  padding: 40px 0;
}

.purpose .quote p {
  font-family: 'Montserrat', sans-serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--teal);
}

.purpose .quote .bar {
  width: 52px;
  height: 4px;
  margin-top: 22px;
  background: var(--orange);
}

.purpose .photo {
  margin: 0;
  align-self: end;
}

.purpose .text {
  padding: 48px 0;
}

.purpose h2 {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 800;
}

.purpose .text p {
  margin: 16px 0 24px;
  color: var(--muted);
}

.steps {
  list-style: none;
  margin: 0 0 0 30px;
  padding: 25px 0 0;
  max-width: 760px;
  counter-reset: step;
}

.steps li {
  position: relative;
  border-left: 3px solid var(--orange);
  padding: 5px 0 30px 32px;
}

.steps li:last-child {
  border-left: 3px solid transparent;
  padding-bottom: 0;
}

.steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: -19px;
  top: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 {
  font-size: 21px;
}

.steps p {
  margin-top: 4px;
  color: var(--muted);
}

/* ==========================================================================
   FORMS & INPUT FIELDS
========================================================================== */

.thanks {
  display: none;
  margin-top: 40px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
}

.thanks h2 {
  font-size: 26px;
}

.thanks p {
  margin-top: 8px;
}

.form-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.form-page .intro {
  margin-top: 12px;
  color: var(--muted);
}

.form-page .thanks, .section > .form-page {
  padding: 0;
}

.form-page h2.form-title {
  font-size: 36px;
  font-weight: 800;
}

fieldset.group {
  border: 0;
  border-top: 3px solid var(--teal);
  margin: 40px 0 0;
  padding: 16px 0 0;
}

fieldset.group > legend {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--teal);
  padding: 0 12px 0 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 6px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field.full {
  grid-column: 1 / -1;
}

label, .label {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #7B8E92;
  border-radius: 6px;
}

textarea {
  resize: vertical;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 400;
}

.check input {
  width: 22px;
  height: 22px;
  accent-color: var(--teal);
  margin: 0;
}

.hint {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.form-actions {
  margin-top: 36px;
}

form.is-sent {
  display: none;
}

form.is-sent + .thanks {
  display: block;
}

.contact-lines {
  margin-top: 28px;
  display: grid;
  gap: 8px;
  font-size: 19px;
}

.contact-lines strong {
  color: var(--teal);
}

#org_fields {
  display: none;
  grid-column: 1 / -1;
}

#org_fields.is-visible {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ==========================================================================
   SITE FOOTER
========================================================================== */

.site-footer {
  background: var(--teal);
  color: #D3E3E6;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 16px;
}

.site-footer .name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--white);
}

.site-footer a {
  color: #D3E3E6;
}

/* ==========================================================================
   MEDIA QUERIES & ACCESSIBILITY (Layout Breakpoints Only)
========================================================================== */

@media (max-width: 960px) {
  .hero .wrap,
  .doctors .wrap,
  .records .wrap,
  .about-purpose,
  .about-map,
  .contact-grid,
  .purpose .wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero .wrap {
    padding-top: 40px;
  }

  .hero-map {
    max-width: 340px;
  }

  .hero h1, .pagehead h1 {
    font-size: 40px;
  }

  .records .phone {
    max-width: 300px;
  }

  .purpose .wrap {
    gap: 0;
  }

  .purpose .photo {
    max-width: 420px;
  }
}

/* space around the form on smart devices */
@media (max-width: 768px) {
  .section > .form-page {
    padding-left: 1.75rem;  
    padding-right: 1.75rem; 
  }
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .brand img {
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}