/* ==========================================================================
   Choice One Medical Group — site styles
   One set of tokens drives every page: change a value here, not in the HTML.
   ========================================================================== */

@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("assets/fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Colour */
  --ink: #102433;            /* headings, strong text */
  --ink-soft: #435866;       /* body copy */
  --ink-faint: #5d707c;      /* small meta text */
  --navy: #0e2433;           /* dark bands, primary buttons, footer */
  --accent: #1a7a33;         /* labels, numbers, links (passes contrast on white and tint) */
  --accent-on-dark: #8fd9a0; /* the same role on navy */
  --tint: #f3f6f4;           /* hero bands and alternating sections */
  --white: #ffffff;
  --line: rgba(16, 36, 51, 0.12);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --text-on-dark: rgba(255, 255, 255, 0.78);
  --muted-on-dark: rgba(255, 255, 255, 0.6);
  --shadow: 0 18px 48px rgba(16, 36, 51, 0.08);

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --fs-h1: clamp(42px, 5vw, 68px);
  --fs-h2: clamp(32px, 3.4vw, 48px);
  --fs-h2-sm: clamp(28px, 2.6vw, 36px);
  --fs-h3: 24px;
  --fs-lede: 19px;
  --fs-body: 17px;
  --fs-small: 15.5px;
  --fs-meta: 13px;
  --fs-label: 12px;

  /* Space and shape */
  --max: 1180px;
  --gutter: 32px;
  --section-y: 88px;
  --gap: 20px;
  --radius: 20px;
  --radius-sm: 12px;
  --img-h: 280px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink-soft);
  background: var(--white);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
button, input, textarea, select { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 460;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}
h1 { font-size: var(--fs-h1); max-width: 14ch; }
h2 { font-size: var(--fs-h2); max-width: 18ch; margin-bottom: 18px; }
h3 { font-size: var(--fs-h3); line-height: 1.2; margin-bottom: 10px; }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.lede { font-size: var(--fs-lede); max-width: 56ch; margin-top: 22px; }
.meta { font-size: var(--fs-meta); color: var(--ink-faint); }

/* ---------- Layout ---------- */
section { padding: var(--section-y) var(--gutter); }
section.tint { background: var(--tint); }
.wrap { max-width: var(--max); margin: 0 auto; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 36px;
}
.section-head h2 { margin-bottom: 0; max-width: 16ch; }
.section-head p { max-width: 40ch; margin: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--gutter);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.mark {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 560; font-size: 12px; letter-spacing: 0.04em;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong { font-weight: 560; font-size: 15px; }
.brand-name span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]:not(.nav-cta) { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-links .nav-cta { background: var(--navy); color: var(--white); padding: 10px 18px; border-radius: 999px; }
.nav-links .nav-cta:hover { color: var(--white); }
.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 15px;
  cursor: pointer;
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 460;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; border-color: rgba(16, 36, 51, 0.24); color: var(--ink); }
.btn-light { background: var(--white); color: var(--navy); }
.back { display: inline-block; font-size: 14px; color: var(--accent); text-decoration: none; margin-bottom: 20px; }
.back:hover, .more:hover { text-decoration: underline; }

/* ---------- Page heroes ---------- */
.page-hero, .home-hero { background: var(--tint); padding: 72px var(--gutter) 72px; }
.page-hero .lede, .home-hero .lede { margin-top: 22px; }
.home-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.home-hero h1 { max-width: 12ch; }
.company-logo {
  height: 76px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 24px;
}

/* ---------- Image frames: one treatment for every product image ---------- */
.frame {
  width: 100%;
  height: var(--img-h);
  object-fit: contain;
  background: var(--white);
  padding: 20px;
}
.frame-lg { height: 420px; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.photo { width: 100%; height: 440px; object-fit: cover; border-radius: var(--radius); }

/* Hero product collage (home and approach pages) */
.hero-products { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 12px; }
.hero-products figure {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-products figure:first-child { grid-row: span 2; }
.hero-products img { width: 100%; height: 190px; object-fit: contain; padding: 16px; flex: 1; }
.hero-products figure:first-child img { height: 100%; min-height: 380px; padding: 24px; }
.hero-products figcaption { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); padding: 0 16px 14px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  min-height: 260px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card > .frame { height: 100%; min-height: 260px; border-right: 1px solid var(--line); }
.card-body { padding: 26px 26px 24px; display: flex; flex-direction: column; }
.card-kicker { font-size: var(--fs-label); font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.card h3 { font-size: 28px; }
.card p { font-size: var(--fs-small); margin: 0; }
.card .more { margin-top: auto; padding-top: 18px; font-size: 14px; color: var(--accent); }

/* Product cards (company pages): image on top */
.card.stacked { display: block; }
.card.stacked > .frame { min-height: 0; height: var(--img-h); border-right: 0; border-bottom: 1px solid var(--line); }

/* Numbered principle cards */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.principle {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.num { font-family: var(--serif); color: var(--accent); font-size: 22px; line-height: 1; margin-bottom: 18px; }
.principle p { font-size: var(--fs-small); }

/* Resources grid (home) */
.branches { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.branches article, .branches .cta-tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.branches .num { font-size: 18px; margin-bottom: 14px; }
.branches h3 { font-size: 21px; }
.branches p { font-size: var(--fs-small); margin: 0; }
.branches .cta-tile { background: var(--navy); border-color: var(--navy); text-decoration: none; display: flex; flex-direction: column; }
.branches .cta-tile h3 { color: var(--white); }
.branches .cta-tile p { color: var(--text-on-dark); }
.branches .cta-tile .more { margin-top: auto; padding-top: 16px; color: var(--accent-on-dark); font-size: 14px; }

/* Numbered reasons list (home) */
.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li { display: grid; grid-template-columns: 80px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.reasons li:last-child { border-bottom: 1px solid var(--line); }
.reasons .num { font-size: 26px; margin: 4px 0 0; }
.reasons h3 { font-size: 28px; }
.reasons p { max-width: 70ch; }
.places { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.places b { font-weight: 520; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--ink); }

/* Portfolio company rows */
.company {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.company:first-child { border-top: 0; padding-top: 0; }
.company:last-child { padding-bottom: 0; }
.company > .frame { height: 360px; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.company h2 { font-size: var(--fs-h2-sm); }

/* Key facts row */
.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.facts div { font-size: var(--fs-meta); color: var(--ink-faint); }
.facts strong { display: block; color: var(--ink); font-size: 14px; font-weight: 560; margin-bottom: 2px; }

/* Leadership */
.leaders { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.leader { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.initials {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 24px;
  margin-bottom: 24px;
}
.leader h2 { font-size: var(--fs-h2-sm); margin-bottom: 8px; }
.role { color: var(--accent); margin: 0 0 18px; font-size: var(--fs-label); font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase; }
.leader p { font-size: var(--fs-small); }

/* ---------- Dark bands ---------- */
.contrast, .close-band { background: var(--navy); color: var(--text-on-dark); }
.contrast h2, .close-band h2 { color: var(--white); }
.contrast .eyebrow, .close-band .eyebrow { color: var(--accent-on-dark); }
.contrast .section-head p { color: var(--text-on-dark); }
.close-band h2 { max-width: 20ch; }
.close-band p { max-width: 50ch; }

.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: 18px 16px; border-bottom: 1px solid var(--line-on-dark); vertical-align: top; font-size: var(--fs-small); }
.compare th { font-weight: 560; font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-on-dark); }
.compare td:first-child { color: var(--muted-on-dark); width: 24%; padding-left: 0; }
.compare th:first-child { padding-left: 0; }
.compare td:nth-child(2) { width: 36%; }
.compare td:nth-child(3) { color: var(--white); }

/* ---------- Contact ---------- */
.form {
  display: grid;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 14px; color: var(--ink-soft); display: grid; gap: 6px; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
label.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy); }
input, textarea, select {
  border: 1px solid rgba(16, 36, 51, 0.2);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 130px; resize: vertical; }
.form button[disabled] { opacity: 0.6; cursor: wait; }
.success { display: none; padding: 14px 16px; background: #e6f3ea; border-radius: var(--radius-sm); color: var(--accent); font-size: 15px; }
.form-error { display: none; color: #9b2c2c; font-size: 14px; margin: 0; }
.trap { position: absolute; left: -9999px; }
.contact-aside h2 { font-size: var(--fs-h2-sm); margin-bottom: 12px; }
.contact-aside .facts a { color: var(--ink-soft); }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: var(--text-on-dark); padding: 64px var(--gutter) 32px; }
.foot { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { color: var(--white); font-family: var(--sans); font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase; font-size: var(--fs-label); margin: 0 0 14px; }
footer p { font-size: 15px; color: var(--text-on-dark); }
footer a { color: var(--text-on-dark); text-decoration: none; display: block; margin: 0 0 8px; font-size: 15px; }
footer a:hover { color: var(--white); }
.legal { max-width: var(--max); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--line-on-dark); font-size: var(--fs-meta); color: var(--muted-on-dark); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .branches { grid-template-columns: repeat(2, 1fr); }
  .card { grid-template-columns: 1fr; }
  .card > .frame { height: 220px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Mobile and small tablet ---------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; --section-y: 64px; --img-h: 240px; }
  .menu-btn { display: inline-flex; }
  .nav { padding: 12px var(--gutter); }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 16px; right: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .page-hero, .home-hero { padding: 48px var(--gutter) 56px; }
  .home-hero-grid, .split, .cards, .company, .leaders, .principles, .foot, .form-row { grid-template-columns: 1fr; }
  .split, .company, .home-hero-grid { gap: 32px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-products { grid-template-columns: repeat(3, 1fr); }
  .hero-products figure:first-child { grid-row: auto; }
  .hero-products img, .hero-products figure:first-child img { height: 140px; min-height: 0; padding: 12px; }
  .hero-products figcaption { font-size: 10px; padding: 0 10px 10px; }
  .frame-lg, .company > .frame { height: 300px; }
  .photo { height: 300px; }
  .reasons li { grid-template-columns: 1fr; gap: 6px; }
  .reasons h3, .card h3 { font-size: 24px; }
}

@media (max-width: 560px) {
  .branches { grid-template-columns: 1fr; }
  .hero-products { grid-template-columns: 1fr 1fr; }
  .hero-products figure:first-child { grid-column: span 2; }
}

/* Comparison table stacks into cards on phones */
@media (max-width: 640px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100% !important; }
  .compare tr { padding: 20px 0; border-bottom: 1px solid var(--line-on-dark); }
  .compare td { border-bottom: 0; padding: 4px 0; }
  .compare td:first-child { font-family: var(--serif); font-size: 21px; color: var(--white); padding-bottom: 10px; }
  .compare td[data-label]::before { content: attr(data-label); display: block; font-family: var(--sans); font-size: 11px; font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-on-dark); margin-bottom: 2px; }
  .compare td + td { margin-bottom: 10px; }
}

/* A split block that follows other content inside the same section */
.split.follow { margin-top: 64px; }
@media (max-width: 900px) { .split.follow { margin-top: 40px; } }
.nav-links .nav-cta[aria-current="page"] { color: var(--white); text-decoration: none; }
.contact-aside h2 { max-width: none; }

/* ---------- Product support ---------- */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.support-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.support-logo { height: 44px; width: auto; max-width: 220px; object-fit: contain; object-position: left center; margin-bottom: 22px; }
.support-card h3 { font-size: 28px; margin-bottom: 6px; }
.contact-list { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.contact-list li { font-size: var(--fs-small); color: var(--ink-soft); }
.contact-list span { display: block; font-size: var(--fs-meta); color: var(--ink-faint); }
.contact-list a { color: var(--ink); font-weight: 520; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.support-card .actions { margin-top: auto; padding-top: 24px; }
.support-note { margin-top: 32px; padding: 20px 24px; background: var(--tint); border-radius: var(--radius); font-size: var(--fs-small); }
.support-note a { color: var(--accent); font-weight: 520; text-decoration: none; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }

/* Facts: fixed columns so every company's row lines up the same way */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; }
.contact-aside .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .contact-aside .facts { grid-template-columns: 1fr 1fr; } }
