/* ==========================================================================
   Critical Access Urology — site styles
   ========================================================================== */

/* Fonts (self-hosted, latin subset) ------------------------------------- */
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback to minimise layout shift while fonts load */
@font-face {
  font-family: "Montserrat Fallback";
  src: local("Arial");
  ascent-override: 85.79%;
  descent-override: 22.25%;
  line-gap-override: 0%;
  size-adjust: 112.83%;
}

/* Tokens ----------------------------------------------------------------- */
:root {
  --navy: #1B3F75;
  --blue: #2A5F96;
  --light-blue: #69A5CB;   /* decoration / large text only */
  --slate: #2C4566;
  --pale: #DCE6F4;
  --text: #333333;
  --white: #FFFFFF;

  --font: "Montserrat", "Montserrat Fallback", Arial, Helvetica, sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 63, 117, 0.06), 0 8px 24px rgba(27, 63, 117, 0.08);
  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 80px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  line-height: 1.15;
  text-wrap: balance;
}
h1, h2 { font-weight: 800; }
h3 { font-weight: 700; }
p { margin: 0; }

a { color: var(--blue); }
a:hover { color: var(--navy); }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}
.skip-link:focus { top: 0.75rem; color: var(--white); }

/* Button ----------------------------------------------------------------- */
.button {
  display: inline-block;
  padding: 0.95rem 1.75rem;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(42, 95, 150, 0.25);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.button:hover {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(27, 63, 117, 0.3);
}

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--pale);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: block; flex: none; padding-block: 6px; }
.brand img { width: auto; height: 68px; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0.25rem;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--blue); border-bottom-color: var(--light-blue); }
.site-nav a.nav-cta {
  padding: 0.55rem 1.15rem;
  background: var(--navy);
  color: var(--white);
  border: 0;
  border-radius: 999px;
}
.site-nav a.nav-cta:hover { background: var(--blue); color: var(--white); }

.nav-toggle { display: none; }

@media (max-width: 719px) {
  :root { --header-h: 64px; }
  .brand img { height: 54px; }

  /* Without JS the links simply wrap under the logo */
  .no-js .header-inner { flex-wrap: wrap; padding-bottom: 0.5rem; }
  .no-js .site-nav ul { flex-wrap: wrap; gap: 0.25rem 1rem; }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-right: -8px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--navy);
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 24px;
    height: 2.5px;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--pale);
    box-shadow: 0 12px 24px rgba(27, 63, 117, 0.1);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
  }
  .js .site-nav a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--pale);
    font-size: 1.0625rem;
  }
  .js .site-nav a.nav-cta {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    text-align: center;
  }
}

/* Hero ------------------------------------------------------------------- */
.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  background: linear-gradient(180deg, #EEF3FA 0%, var(--white) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.hero-sub {
  margin-top: 1.25rem;
  max-width: 42ch;
  color: var(--slate);
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.5;
}
.hero .button { margin-top: 2rem; }

.hero-mark { display: none; }

@media (min-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .hero-mark {
    display: grid;
    place-items: center;
    justify-self: end;
    width: min(100%, 340px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 0 10px var(--pale), var(--shadow);
  }
  .hero-mark img { width: 56%; height: auto; }
}

/* Sections --------------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }

/* Physicians ------------------------------------------------------------- */
.physicians { padding-top: clamp(2.5rem, 6vw, 4.5rem); }

.physician-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 980px;
  margin-inline: auto;
}
@media (min-width: 720px) {
  .physician-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

.physician {
  padding: 2.25rem 1.5rem 2rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--pale);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.headshot {
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
  object-fit: cover;
  border-radius: 50%;
  background: var(--pale);
  box-shadow: 0 0 0 6px var(--pale), 0 0 0 8px rgba(105, 165, 203, 0.45);
}
.physician h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); }
.physician p {
  margin-top: 0.6rem;
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.7;
}

.together {
  max-width: 820px;
  margin: clamp(3rem, 7vw, 4.5rem) auto 0;
  text-align: center;
}
.together h2 { font-size: clamp(1.625rem, 3.4vw, 2.25rem); }
.together p {
  margin-top: 1.1rem;
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  line-height: 1.75;
}

/* Model ------------------------------------------------------------------ */
.model {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
.model h2 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}
.model-sub {
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
}

.model-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  gap: 0.75rem;
  max-width: 980px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
}
@media (min-width: 720px) {
  .model-cards { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1.25rem; }
}

.model-card {
  padding: 1.5rem 1.25rem 1.6rem;
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.eyebrow {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.model-card h3 {
  margin-top: 0.3rem;
  font-size: clamp(1.375rem, 2.6vw, 1.625rem);
  font-weight: 800;
}
.model-card p:last-child { margin-top: 0.3rem; }

.model-plus {
  color: var(--white);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
}

.model-close {
  max-width: 760px;
  margin: clamp(2rem, 5vw, 2.75rem) auto 0;
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  line-height: 1.7;
}

/* Services --------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.75rem;
  max-width: 980px;
  margin-inline: auto;
}
@media (min-width: 720px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; }
}

.service-col h3 {
  padding-bottom: 0.85rem;
  color: var(--blue);
  font-size: 1.1875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--pale);
}
.bullets {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.bullets li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.6rem;
  font-size: 1.125rem;
  line-height: 1.5;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: calc(0.5rem + 0.75em - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

/* Contact ---------------------------------------------------------------- */
.contact {
  background: var(--pale);
  text-align: center;
}
.contact h2 { font-size: clamp(1.625rem, 4vw, 2.5rem); }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 3.5rem;
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
  padding: 0;
  list-style: none;
}
.contact-links li { min-width: 0; max-width: 100%; }
.contact-label {
  display: block;
  color: var(--slate);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.contact-links a {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(1.05rem, 4.1vw, 1.75rem);
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: var(--light-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}
.contact-links a:hover { color: var(--blue); text-decoration-color: currentColor; }

.patients-note {
  margin-top: 2.25rem;
  color: var(--slate);
  font-size: 0.975rem;
}

/* Footer ----------------------------------------------------------------- */
.site-footer {
  padding-block: 2.5rem;
  background: var(--slate);
  color: var(--white);
  font-size: 0.9375rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.5rem;
}
.footer-logo { width: auto; height: 64px; }
.footer-text { flex: 1 1 320px; }
.site-footer :focus-visible { outline-color: var(--white); }
.model :focus-visible { outline-color: var(--white); }

@media (max-width: 719px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-text { flex-basis: auto; }
}

/* 404 -------------------------------------------------------------------- */
.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding-block: 4rem;
  text-align: center;
}
.not-found img { width: auto; height: 120px; margin: 0 auto 2rem; }
.not-found h1 { font-size: clamp(2rem, 5vw, 3rem); }
.not-found p { margin-top: 1rem; color: var(--slate); }
.not-found .button { margin-top: 2rem; }

/* Motion ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
