/* ============================================
   Miller Family Medicine
   Palette: brand teal + deep navy ink + warm neutrals
   Type:    Bricolage Grotesque (display) + Inter (body)
============================================ */

:root {
  /* brand */
  --teal:        #00A5B8;
  --teal-dark:   #007D8C;
  --teal-deep:   #005A66;
  --teal-tint:   #E5F5F7;
  --teal-tint-2: #F3FAFB;

  /* neutrals */
  --ink:         #0F1B2D;
  --ink-2:       #2A3648;
  --ink-3:       #4B5867;
  --ink-4:       #8892A1;
  --line:        #E4E8EE;
  --line-soft:   #EEF1F5;
  --bg:          #FFFFFF;
  --bg-warm:     #FAF7F1;   /* warm cream section, used sparingly */
  --bg-tint:     #F7F9FB;

  /* utility */
  --star:        #F5B301;

  /* type */
  --display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* radius scale */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* layout */
  --wrap: 1200px;
  --gutter: 24px;

  /* motion */
  --e: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: white; padding: 10px 16px;
  border-radius: var(--r-sm); z-index: 100;
}
.skip-link:focus { left: 8px; }

.kicker {
  display: inline-block;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 14px;
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ============ HEADER ============ */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: block;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }

.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sub {
  font-size: 12px;
  color: var(--ink-4);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav { display: flex; gap: 28px; align-items: center; }

.nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 0;
  position: relative;
  transition: color 0.2s var(--e);
}

.nav a::after {
  content: '';
  position: absolute; left: 0; bottom: 4px;
  width: 100%; height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--e);
}

.nav a:hover { color: var(--teal-dark); }
.nav a:hover::after { transform: scaleX(1); }

.call-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal);
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  transition: background 0.2s var(--e), transform 0.15s var(--e);
  box-shadow: 0 1px 2px rgba(0, 90, 102, 0.15);
}

.call-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }

.call-label-mobile { display: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15.5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--e), color 0.2s var(--e), border-color 0.2s var(--e), transform 0.15s var(--e);
  white-space: nowrap;
}

.btn:focus-visible { outline: 3px solid var(--teal-tint); outline-offset: 2px; }

.btn-primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 125, 140, 0.18);
}

.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover { border-color: var(--ink); background: var(--ink); color: white; }

.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ============ HERO ============ */

.hero {
  padding: 60px 0 80px;
  background:
    radial-gradient(circle at 90% -10%, var(--teal-tint) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-tint) 100%);
  border-bottom: 1px solid var(--line-soft);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-copy { max-width: 580px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: white;
  border: 1px solid var(--line);
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 28px;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04);
}

.pill-dot {
  width: 8px; height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 165, 184, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 165, 184, 0.18); }
  50%      { box-shadow: 0 0 0 7px rgba(0, 165, 184, 0.08); }
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(42px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 22px;
}

.hero-accent {
  display: block;
  color: var(--teal-dark);
}

.hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-3);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.fact-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}

.fact-num span {
  color: var(--teal);
  font-size: 22px;
  vertical-align: 4px;
  margin-left: 2px;
}

.fact-lbl {
  font-size: 13px;
  color: var(--ink-4);
  font-weight: 500;
}

/* portrait */

.hero-portrait { position: relative; }

.portrait-frame {
  aspect-ratio: 4/5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--teal-tint);
  box-shadow:
    0 30px 60px -20px rgba(0, 90, 102, 0.25),
    0 0 0 1px rgba(0, 125, 140, 0.06);
  position: relative;
}

.portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

/* Landscape building image needs different crop treatment */
.portrait-frame-building {
  aspect-ratio: 5/6;
}

.portrait-frame-building img {
  object-position: center 65%;
}

/* subtle teal wash on portrait */
.portrait-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 90, 102, 0.08));
  pointer-events: none;
}

.portrait-tag {
  position: absolute;
  left: -20px;
  bottom: 40px;
  background: white;
  padding: 14px 18px;
  border-radius: var(--r-md);
  box-shadow: 0 12px 30px -8px rgba(15, 27, 45, 0.18);
  border: 1px solid var(--line-soft);
  max-width: 260px;
}

.tag-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.tag-role {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ============ ABOUT ============ */

.about {
  padding: 100px 0;
  background: var(--bg);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.about-head {
  position: sticky;
  top: 100px;
}

.about-head h2 {
  max-width: 400px;
  margin-bottom: 28px;
}

.about-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-3);
  margin-bottom: 20px;
  max-width: 640px;
}

.about-doctor-image {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--teal-tint);
  box-shadow: 0 18px 36px -20px rgba(0, 90, 102, 0.3);
}

.about-doctor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.credentials {
  list-style: none;
  margin-top: 44px;
  display: grid;
  gap: 0;
}

.credentials li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.credentials li:last-child { border-bottom: 1px solid var(--line); }

.cred-k {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cred-v {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* ============ SERVICES ============ */

.services {
  padding: 100px 0;
  background: var(--bg-tint);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.services-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.services-head p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-3);
  margin-top: 18px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.svc {
  background: white;
  padding: 32px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  transition: transform 0.25s var(--e), box-shadow 0.25s var(--e), border-color 0.25s var(--e);
}

.svc:hover {
  transform: translateY(-3px);
  border-color: var(--teal-tint);
  box-shadow: 0 20px 40px -20px rgba(0, 90, 102, 0.18);
}

.svc-icon {
  width: 48px; height: 48px;
  background: var(--teal-tint);
  color: var(--teal-dark);
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.svc-icon svg { width: 22px; height: 22px; }

.svc h3 {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 10px;
}

.svc p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* ============ REVIEWS ============ */

.reviews {
  padding: 100px 0;
  background: var(--bg);
}

.reviews-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.reviews-head h2 { max-width: 480px; }

.rating-badge {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-warm);
  padding: 18px 22px;
  border-radius: var(--r-md);
  border: 1px solid #F0E9D9;
}

.rating-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.03em;
}

.rating-stars {
  display: flex; gap: 2px;
  color: var(--star);
  margin-bottom: 4px;
}

.rating-src {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.review {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column;
  transition: border-color 0.25s var(--e), box-shadow 0.25s var(--e);
}

.review:hover {
  border-color: var(--teal-tint);
  box-shadow: 0 12px 30px -18px rgba(0, 90, 102, 0.2);
}

.review-stars {
  color: var(--star);
  font-size: 15px;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.review p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 24px;
  flex: 1;
}

.review footer {
  display: flex; flex-direction: column;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.review-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 14.5px;
}

.review-meta {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: 2px;
}

/* ============ VISIT ============ */

.visit {
  padding: 100px 0;
  background: var(--bg-tint);
  border-top: 1px solid var(--line-soft);
}

.visit-inner {
  display: block;
}
.visit-content {
  width: 100%;
}

.visit-image {
  position: sticky;
  top: 100px;
}

.visit-image > img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: var(--r-xl);
  box-shadow:
    0 30px 60px -20px rgba(0, 90, 102, 0.25),
    0 0 0 1px rgba(0, 125, 140, 0.06);
  background: var(--teal-tint);
}

.visit-image-tag {
  position: absolute;
  left: -20px;
  bottom: 40px;
  background: white;
  padding: 14px 18px;
  border-radius: var(--r-md);
  box-shadow: 0 12px 30px -8px rgba(15, 27, 45, 0.18);
  border: 1px solid var(--line-soft);
  max-width: 260px;
}

.visit-content h2 { margin-bottom: 16px; }

.visit-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-3);
  margin-bottom: 40px;
  max-width: 680px;
}

.visit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.info-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 22px 20px;
}

.info-card-wide {
  grid-column: 1 / -1;
}

.info-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}

.info-head svg {
  width: 18px; height: 18px;
  color: var(--teal-dark);
}

.info-head h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.info-card p {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 4px;
}

.info-sub {
  font-size: 13px !important;
  color: var(--ink-4) !important;
  margin-top: 4px;
}

.info-sub-k {
  font-weight: 600;
  color: var(--ink-3);
  margin-right: 2px;
}

.info-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-dark);
  transition: color 0.2s var(--e);
}

.info-link:hover { color: var(--teal-deep); }

.text-link {
  color: var(--teal-dark);
  font-weight: 500;
  transition: color 0.2s var(--e);
  word-break: break-word;
}

.text-link:hover { color: var(--teal-deep); text-decoration: underline; }

.hours {
  list-style: none;
  margin-top: 4px;
}

.hours li {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.hours li:last-child { border-bottom: none; }

.hours li span:first-child { color: var(--ink-3); }

.hours li.closed span:last-child {
  color: var(--ink-4);
}

.fb-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 0.2s var(--e), color 0.2s var(--e), transform 0.15s var(--e);
}

.fb-link svg { color: #1877F2; }

.fb-link:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

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

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex; align-items: center; gap: 16px;
}

.footer-logo {
  width: 52px; height: 52px;
  display: block;
}

.footer-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  color: white;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.footer-sub {
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.footer-fax {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  letter-spacing: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
}

.footer-disclaimer {
  max-width: 520px;
  text-align: right;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .hero-portrait {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
  }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-head { position: static; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .visit-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .visit-image { position: relative; max-width: 440px; margin: 0 auto; }
  .visit-image > img { aspect-ratio: 4/5; }
  .credentials li { grid-template-columns: 160px 1fr; }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
  }
  .brand { flex: 1 1 auto; }
  .nav {
    order: 3; width: 100%;
    justify-content: space-between;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
  }
  .nav a { font-size: 13.5px; }
  .call-btn {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 9px 13px;
    gap: 6px;
  }
  .call-btn svg { width: 14px; height: 14px; }
  .call-label-full { display: none; }
  .call-label-mobile { display: inline; }
  .brand-name { font-size: 15.5px; }
  .brand-sub { font-size: 11.5px; }
  .brand-logo { width: 38px; height: 38px; }

  .hero {
    padding: 40px 0 60px;
  }
  .hero h1 { font-size: clamp(36px, 9vw, 48px); }
  .hero-lede { font-size: 16.5px; }
  .hero-actions .btn { flex: 1; }
  .hero-facts { gap: 12px; }
  .fact-num { font-size: 26px; }
  .fact-num span { font-size: 17px; }
  .fact-lbl { font-size: 11.5px; }
  .portrait-tag {
    left: 12px;
    bottom: 12px;
    padding: 12px 14px;
    max-width: 220px;
  }
  .tag-name { font-size: 14px; }
  .tag-role { font-size: 11.5px; }

  .about, .services, .reviews, .visit { padding: 64px 0; }

  .about-inner { gap: 28px; }

  .about-head h2 {
    margin-bottom: 22px;
  }

  .about-doctor-image {
    width: 100%;
    max-width: none;
    aspect-ratio: 5 / 4;
    margin-bottom: 24px;
    border-radius: var(--r-lg);
  }

  .about-doctor-image img {
    object-position: center 16%;
    transform: scale(1.08);
  }

  .credentials li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px 0;
  }
  .cred-v { font-size: 16.5px; }

  .services-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }

  .reviews-head { align-items: flex-start; }
  .rating-badge { padding: 14px 18px; }
  .rating-num { font-size: 32px; }

  .visit-grid {
    grid-template-columns: 1fr;
  }

  .info-card-wide {
    grid-column: auto;
  }

  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-contact { align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-disclaimer { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s var(--e);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: white;
  text-decoration: underline;
  text-underline-offset: 3px;
}