/* =========================================================================
   Cardiology Associates of Central Brevard — Design system
   Modular like a PINE module set: each region (header, hero, trust, cards,
   footer, etc.) is its own block, scoped via classes, no element selectors
   leaking across blocks.
   ========================================================================= */

/* ----- Design tokens ----- */
:root {
  --red:        #c62828;
  --red-dark:   #8e0000;
  --red-soft:   #fef6f6;
  --navy:       #1d3557;
  --navy-dark:  #142844;
  --navy-soft:  #f0f4f8;
  --cream:      #fdfaf6;
  --ink:        #1a1a1a;
  --body:       #2c2c2c;
  --muted:      #6a6a6a;
  --line:       #e5e5e5;
  --line-soft:  #f1f1f1;

  --serif:      'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --sans:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-pill: 999px;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 8px 24px rgba(0,0,0,.06);
  --shadow-lg:  0 14px 40px rgba(0,0,0,.12);

  --container:  1140px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--red);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover, a:focus { color: var(--red-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .5em;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

ul, ol { padding-left: 1.25em; }
li { margin-bottom: .25em; }

hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }

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

/* ----- Accessibility primitives ----- */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--red); color: #fff;
  padding: .5rem 1rem;
  z-index: 1000;
}
.skip-link:focus { top: 0; text-decoration: none; }

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

/* ----- Layout primitives ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { padding: 0; }
section { padding: 3rem 0; }
section:first-child { padding-top: 2.5rem; }
.section--tight  { padding: 1.75rem 0; }
.section--wide   { padding: 4rem 0; }
.section--cream  { background: var(--cream); }
.section--white  { background: #ffffff; }
.section--navy-soft { background: var(--navy-soft); }

.page-title {
  background:
    radial-gradient(circle at 85% 50%, rgba(198,40,40,0.05), transparent 60%),
    radial-gradient(circle at 10% 100%, rgba(29,53,87,0.05), transparent 60%),
    var(--cream);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--line);
}
.page-title__eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  margin-bottom: .75rem;
}
.page-title h1 { margin: 0; }
.page-title__lede { color: var(--muted); margin-top: .75rem; max-width: 38em; }

/* ============================== TOPBAR =============================== */
.topbar {
  background: var(--navy);
  color: #fff;
  font-size: .9rem;
  padding: .55rem 0;
}
.topbar a { color: #fff; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.topbar__hours { opacity: .88; }
.topbar__call {
  font-weight: 600;
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none;
}
@media (max-width: 540px) {
  .topbar__hours { display: none; }
  .topbar__inner { justify-content: center; }
}

/* ============================== HEADER =============================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__heart { width: 32px; height: 32px; flex-shrink: 0; }
.brand__name  {
  display: block;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
  line-height: 1.15;
}
.brand__tag {
  display: block;
  font-size: .78rem; color: var(--muted);
  margin-top: 2px;
}

.primary-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 1.5rem;
}
.primary-nav a {
  color: #333; font-size: .98rem;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--red);
  border-bottom-color: var(--red);
  text-decoration: none;
}

.header-cta {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--red); color: #fff;
  padding: .65rem 1.1rem; border-radius: var(--radius-pill);
  font-weight: 600; font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, transform .12s ease;
}
.header-cta:hover { background: var(--red-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.header-cta svg { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem .65rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .primary-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--line-soft); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { display: block; padding: .85rem 0; border-bottom: 0; }
  .nav-toggle { display: inline-flex; align-items: center; }
}
@media (max-width: 540px) {
  .header-cta span.label { display: none; }
  .header-cta { padding: .6rem .7rem; }
}

/* ================================ HERO =============================== */
.hero {
  background:
    radial-gradient(circle at 85% 30%, rgba(198,40,40,0.06), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(29,53,87,0.06), transparent 55%),
    var(--cream);
  padding: 4rem 0 4.5rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  margin-bottom: 1rem;
}
.hero h1 { margin-bottom: .75rem; }
.hero__lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 32em;
  margin-bottom: 1.75rem;
}
.hero__ctas {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-bottom: 1.75rem;
}
.hero__sub {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  color: var(--muted); font-size: .92rem;
}
.hero__sub strong { color: var(--ink); display: block; }

.hero__illus { width: 100%; max-width: 480px; margin-left: auto; }
@media (max-width: 880px) {
  .hero { padding: 2.5rem 0 3rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__illus { margin: 0 auto; max-width: 360px; }
}

/* =============================== BUTTONS ============================= */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn__icon { width: 18px; height: 18px; }
.btn--primary   { background: var(--red); color: #fff; }
.btn--primary:hover   { background: var(--red-dark); color: #fff; }
.btn--secondary {
  background: #fff; color: var(--navy);
  border-color: var(--navy);
}
.btn--secondary:hover { background: var(--navy); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); padding-left: 0; padding-right: 0; }
.btn--ghost:hover { color: var(--red); }

/* ============================ TRUST STRIP ============================ */
.trust {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}
.trust__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; text-align: center;
}
.trust__item {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  font-size: .9rem; color: var(--body);
}
.trust__icon { width: 32px; height: 32px; color: var(--red); }
.trust__label strong { display: block; color: var(--ink); font-size: 1rem; }
@media (max-width: 760px) { .trust__row { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }

/* ========================== SERVICES GRID ============================ */
.services-head { text-align: center; margin-bottom: 2.5rem; }
.services-head p { color: var(--muted); max-width: 38em; margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.service {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.service:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--red);
}
.service__icon {
  width: 44px; height: 44px;
  margin-bottom: 1rem;
  color: var(--red);
  background: var(--red-soft);
  padding: 9px;
  border-radius: var(--radius);
}
.service h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.service p  { color: var(--muted); font-size: .95rem; margin: 0; }

/* ============================ PHYSICIANS ============================= */
.physician {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.physician__photo {
  border-radius: var(--radius-sm);
  width: 100%;
  height: auto;
  object-fit: cover;
}
.physician h3 { margin-bottom: .25rem; }
.physician .role { color: var(--muted); font-style: italic; margin-bottom: .75rem; }
.physician__creds {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: .85rem;
}
.physician__creds span {
  background: var(--navy-soft); color: var(--navy);
  padding: .25rem .6rem;
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 600;
}
@media (max-width: 600px) {
  .physician { grid-template-columns: 1fr; }
  .physician__photo { max-width: 200px; }
}

/* ============================== EMBEDS =============================== */
.embed-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--navy-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.embed-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.embed-frame--map { padding-top: 50%; }

/* ============================ CONTACT CARD =========================== */
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.contact-card__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.contact-card h2 { margin-top: 0; }

/* =============================== LISTS =============================== */
.lined-list {
  list-style: none; padding: 0; margin: 0;
}
.lined-list li {
  padding: .85rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.02rem;
}
.lined-list li:last-child { border-bottom: 0; }
.lined-list small { color: var(--muted); display: block; font-size: .85rem; margin-top: .2rem; }

.pill-list {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding: 0; margin: 0; list-style: none;
}
.pill-list li {
  background: var(--red-soft); color: var(--red-dark);
  padding: .3rem .75rem;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  margin: 0;
}

/* =============================== CALLOUT ============================= */
.callout {
  background: var(--navy-soft);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout h3 { margin-top: 0; }

/* =============================== FOOTER ============================== */
.site-footer {
  background: var(--navy);
  color: #d6dbe3;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  font-size: .95rem;
}
.site-footer a { color: #ffd6d6; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h2 { color: #fff; font-size: 1.1rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand { display: flex; gap: .65rem; align-items: flex-start; margin-bottom: 1rem; }
.footer-brand__heart { width: 30px; height: 30px; flex-shrink: 0; }
.footer-brand strong { display: block; font-family: var(--serif); color: #fff; font-size: 1.05rem; }
.footer-brand small { color: #aab2bd; }

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .35rem; }

.footer-bottom {
  border-top: 1px solid #2a4063;
  padding-top: 1rem;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
  gap: 1rem;
  color: #aab2bd;
}
.footer-bottom nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 1rem;
}
.copyright { margin: 0; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ======================= MOBILE STICKY CALL BAR ====================== */
.sticky-call {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--red); color: #fff;
  padding: .9rem 1rem;
  text-align: center; font-weight: 600;
  box-shadow: 0 -4px 14px rgba(0,0,0,.18);
  z-index: 60;
}
.sticky-call a { color: #fff; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.sticky-call a:hover { text-decoration: none; }
.sticky-call svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .sticky-call { display: block; }
  body { padding-bottom: 60px; }
}

/* ================================ PRINT ============================== */
@media print {
  .topbar, .site-header, .site-footer, .nav-toggle, .embed-frame, .sticky-call, .header-cta { display: none !important; }
  body { color: #000; background: #fff; padding: 0; }
  a { color: #000; text-decoration: underline; }
}
