/* Morgan Medical Practice PLLC: the approved design (warm editorial, after the Oura design language), ported from
   the WordPress demo without WordPress. Fonts are self-hosted: the content security policy allows no third party. */
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 300 400; font-display: swap; }

:root {
  --canvas: #f7f1e8;
  --surface: #ffffff;
  --ink: #1c1b1a;
  --stone: #4a4741;
  --forest: #224228;
  --sage-pale: #ced4b8;
  --sage-wash: #eceedd;
  --clay: #6b443d;
  --hairline: #e1dcd3;
  --primary: #2a72de;
  --primary-hover: #1d5bc0;
  --link: #1b55b5;
  --link-hover: #144089;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-lg: 24px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 220ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
.infobar a:not(.btn), address a, .foot a { display: inline-block; padding-block: 4px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.5rem; font-weight: 400; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.eyebrow { font: 700 .75rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--clay); margin: 0 0 1rem; }
.eyebrow.on-dark { color: var(--sage-pale); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--primary); color: #fff; font: 700 .95rem/1 var(--sans); text-decoration: none; border: 2px solid var(--primary); transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1.02rem; }
.btn-sm { min-height: 40px; padding: 0 18px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-light { background: var(--canvas); color: var(--forest); border-color: var(--canvas); }
.btn-light:hover { background: #fff; border-color: #fff; color: var(--forest); }

/* Header */
.announce { background: var(--forest); color: var(--canvas); text-align: center; font-size: .85rem; padding: 9px var(--gutter); }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--canvas); border-bottom: 1px solid transparent; transition: border-color var(--dur), box-shadow var(--dur); }
.site-header.scrolled { border-color: var(--hairline); box-shadow: 0 6px 20px -14px rgba(28, 27, 26, .35); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: var(--canvas); display: grid; place-items: center; font: 400 1.05rem/1 var(--serif); letter-spacing: .04em; }
.brand-text { font: 400 1.35rem/1.05 var(--serif); display: block; }
.brand-text small { display: block; font: 700 .7rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin-top: 3px; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.nav { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--stone); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 12px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-color: var(--clay); }
.phone { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.phone:hover { color: var(--primary); }
.nav-toggle { display: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 700 .9rem var(--sans); cursor: pointer; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(96px, 11vw, 140px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { max-width: 12ch; }
.lead { font: 300 clamp(1.25rem, 2.2vw, 1.6rem)/1.35 var(--serif); color: var(--stone); max-width: 36ch; margin-bottom: 1.6em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-media { margin: 0; aspect-ratio: 1080 / 961; overflow: hidden; border-radius: var(--radius-lg); background: var(--sage-pale); box-shadow: 0 30px 60px -34px rgba(34, 66, 40, .55); }
.hero-media img { display: block; width: 104%; max-width: none; margin: -1.5% 0 0; } /* crops the source image's thin edge artifacts */
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(247, 241, 232, .22); }
.hours div:last-child { border-bottom: 0; }
.hours dt { font-weight: 500; }
.hours dd { margin: 0; text-align: right; color: var(--sage-pale); }

/* Info bar overlapping the hero */
.infobar-wrap { position: relative; z-index: 2; margin-top: calc(-1 * clamp(56px, 7vw, 84px)); }
.infobar { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: clamp(24px, 4vw, 56px); background: var(--forest); color: var(--canvas); border-radius: var(--radius-lg); padding: clamp(24px, 3.4vw, 40px); box-shadow: 0 30px 60px -34px rgba(34, 66, 40, .6); }
.infobar h2 { font-size: 1.5rem; margin-bottom: 14px; }
.infobar p { color: var(--sage-pale); margin-bottom: 16px; }
.infobar a:not(.btn) { color: #fff; font-weight: 500; }
.infobar .btn { background: var(--canvas); border-color: var(--canvas); color: var(--forest); }
.infobar .btn:hover { background: #fff; border-color: #fff; }

/* Insurance carousel */
.insurance { background: var(--sage-wash); border-block: 1px solid var(--hairline); padding-block: clamp(48px, 7vw, 88px) clamp(32px, 5vw, 56px); margin-top: clamp(48px, 7vw, 88px); overflow: hidden; }
.ins-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.ins-head h2 { margin: 0; }
.ins-head .eyebrow { margin-bottom: .6rem; }
.pause { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--forest); background: transparent; color: var(--forest); font: 700 .85rem var(--sans); cursor: pointer; }
.pause:hover { background: var(--forest); color: #fff; }
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); padding-block: 16px; }
.track { display: flex; width: max-content; animation: slide 48s linear infinite; }
.marquee:hover .track, .marquee:focus-within .track, .marquee.paused .track { animation-play-state: paused; }
.logos { display: flex; gap: 20px; padding: 0 20px 0 0; margin: 0; list-style: none; }
.logo { flex: none; width: 212px; height: 96px; display: grid; place-items: center; padding: 18px 22px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; box-shadow: 0 14px 28px -22px rgba(34, 66, 40, .6); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.logo:hover { transform: translateY(-5px) scale(1.04); box-shadow: 0 22px 36px -22px rgba(34, 66, 40, .7); }
.logo img { max-width: 100%; max-height: 46px; width: auto; height: auto; object-fit: contain; }
.wordmark { font: 400 1.35rem/1.1 var(--serif); color: var(--forest); text-align: center; }
.ins-note { margin: 24px auto 0; color: var(--stone); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .logos { flex-wrap: wrap; justify-content: center; padding: 0; }
  .logos[aria-hidden="true"], .pause { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.portrait { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; border-radius: var(--radius-lg); background: var(--sage-pale); margin-bottom: 28px; }
.about-side h3 { font: 700 .75rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--clay); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 12px 0; border-bottom: 1px solid var(--hairline); color: var(--stone); }
.sub { font: 300 1.4rem/1.3 var(--serif); color: var(--stone); }
blockquote { margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--hairline); font: 300 1.5rem/1.35 var(--serif); }

/* Services */
.services { background: var(--surface); border-block: 1px solid var(--hairline); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 28px; transition: transform var(--dur) var(--ease), border-color var(--dur); }
.card:hover { transform: translateY(-3px); border-color: var(--clay); }
.num { display: block; font: 300 1.1rem var(--serif); color: var(--clay); margin-bottom: 20px; }
.card p { margin: 0; color: var(--stone); }
.visit-types { margin-top: 56px; }
.visit-types ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.visit-types li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border: 1px solid var(--hairline); border-radius: var(--radius); font-weight: 500; }

/* Referral */
.referral { background: var(--forest); color: var(--canvas); padding-block: clamp(56px, 8vw, 96px); }
.referral h2 { color: var(--canvas); }
.referral p { color: var(--sage-pale); max-width: 60ch; }
.referral-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }

/* Visit */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
address { font-style: normal; margin-top: 28px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 28px 32px; }
address p:last-child { margin: 0; }

/* Inner pages */
.page-head { padding-block: clamp(48px, 8vw, 96px) 0; }
.prose { max-width: 720px; }
.page-head + .section { padding-top: clamp(24px, 4vw, 48px); }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { margin-bottom: 0; }
.prose h2 { font-size: 2rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }

/* Footer */
.site-footer { background: var(--ink); color: #d9d4cb; padding-top: 64px; }
.site-footer a { color: #fff; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.foot-brand { color: #fff; margin-bottom: 12px; }
.foot-brand small { color: #b8b2a7; }
.foot-h { font: 700 .75rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sage-pale); margin-bottom: 14px; }
.emergency { color: #fff; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .88rem; color: #b8b2a7; }

/* Entrance, motion-safe only */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-media { animation: rise .7s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-media { animation-delay: .2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Responsive */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px var(--gutter) 28px; background: var(--canvas); border-bottom: 1px solid var(--hairline); }
  .primary-nav.open { display: flex; }
  .nav { flex-direction: column; gap: 4px; }
  .nav a { display: block; padding: 12px 0; }
  .hero-grid, .about-grid, .visit-grid, .referral-grid, .infobar { grid-template-columns: minmax(0, 1fr); }
  .cards, .visit-types ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-side { max-width: 420px; }
}
@media (max-width: 600px) {
  .cards, .visit-types ul, .foot { grid-template-columns: minmax(0, 1fr); }
  .announce { font-size: .8rem; }
  .brand-text { font-size: 1.15rem; }
  .cta-row .btn { width: 100%; }
}

/* Scheduler */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { color: var(--stone); font-size: .95rem; }
.sched-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sched-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: clamp(22px, 3.5vw, 40px); }
.sched-panel h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); outline: none; }
.tag { font: 700 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--sage-pale); color: var(--forest); }
.tag-quiet { background: var(--hairline); color: var(--stone); }
.options { border: 0; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.option, .toggle { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.option { padding: 16px 18px; border: 2px solid var(--hairline); border-radius: var(--radius); background: var(--canvas); transition: border-color var(--dur), background var(--dur); }
.option:has(input:checked) { border-color: var(--primary); background: #fff; }
.option:has(input:focus-visible), .chip:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.option small { display: block; color: var(--stone); }
.option input, .toggle input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.toggle { margin-top: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: block; min-width: 44px; padding: 11px 16px; border: 2px solid var(--hairline); border-radius: 999px; background: var(--canvas); font-weight: 500; text-align: center; transition: background var(--dur), border-color var(--dur), color var(--dur); }
.chip:hover span { border-color: var(--primary); }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.field { margin: 18px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--stone); }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 14px; border: 2px solid var(--hairline); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.nav-row[hidden] { display: none; }
.sched-summary { position: sticky; top: 108px; background: var(--forest); color: var(--canvas); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); }
.sched-summary h2 { font-size: 1.6rem; }
.sched-summary dt { color: var(--sage-pale); }
.sched-summary a { color: #fff; }
.sched-summary .hint { color: var(--sage-pale); margin: 0; }
@media (max-width: 960px) {
  .sched-grid { grid-template-columns: minmax(0, 1fr); }
  .sched-summary { position: static; }
}
@media (max-width: 600px) {
}


/* Long unbreakable strings (the practice email) must never force horizontal scroll. */
address, .foot, .infobar { overflow-wrap: anywhere; }
.social, .foot a.social, address a.social { display: inline-flex; align-items: center; gap: 8px; }
.social svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
a[href^="mailto:"] { overflow-wrap: anywhere; }

/* Announcement bar link, service-card extras, existing-patient note */
.announce a { color: #fff; font-weight: 500; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-top .num { margin: 0; }
.mini-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.mini-chips li { padding: 6px 12px; border-radius: 999px; background: var(--sage-pale); color: var(--forest); font-weight: 700; font-size: .85rem; }
.card-soon { border-style: dashed; background: transparent; }
@media (min-width: 961px) { .cards .card:last-child:nth-child(3n + 2) { grid-column: span 2; } }

/* Insurance browser: expands in place, searchable, scrolls inside its own box */
.logo[hidden] { display: none; }
.ins-browse { margin-top: 28px; display: flex; justify-content: center; }
.ins-panel.js { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.ins-panel.js.open { grid-template-rows: 1fr; }
.ins-clip { min-height: 0; overflow: hidden; }
.ins-clip > .wrap { padding-block: 28px 8px; }
.ins-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ins-tools input { flex: 1 1 280px; min-height: 48px; padding: 0 18px; border: 2px solid var(--hairline); border-radius: 999px; background: #fff; font: inherit; color: var(--ink); }
.ins-tools input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(42, 114, 222, .25); }
.ins-status { margin: 0; color: var(--stone); font-weight: 500; }
.ins-grid { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; max-height: 340px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--hairline); border-radius: 20px; background: rgba(255, 255, 255, .55); scrollbar-width: thin; scrollbar-color: var(--forest) transparent; }
.ins-grid .logo { width: auto; height: 88px; }
.ins-grid:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.ins-empty { margin: 16px 0 0; color: var(--stone); }
@media (prefers-reduced-motion: reduce) { .ins-panel.js { transition: none; } }
@media (max-width: 600px) {
  .ins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
  .ins-grid .logo { height: 76px; padding: 12px 14px; }
}

/* Platform forms (same look as the original scheduler) */
.sched-panel form { display: block; }
.sched-panel fieldset { border: 0; padding: 0; margin: 22px 0; }
.sched-panel legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.times { display: flex; flex-wrap: wrap; gap: 10px; }
.times legend { flex-basis: 100%; }
.field input[type=date] { padding-right: 10px; }
.field select { appearance: auto; }
.toggle { margin: 22px 0 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 16px 0 0; font-weight: 500; color: var(--forest); }
.form-status:empty { display: none; }
.notice { margin: 24px auto 0; padding: 14px 18px; border: 2px solid var(--clay); border-radius: var(--radius); background: var(--surface); color: var(--clay); font-weight: 500; }
.sched-summary p { color: var(--sage-pale); }
.hours-light { max-width: 520px; }
.hours-light div { border-bottom-color: var(--hairline); }
.hours-light dd { color: var(--stone); }
.foot-note { font-size: .88rem; color: #b8b2a7; }
.visit-grid .lead { margin-top: 1rem; }

/* Legal pages */
.legal-doc h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 1.8em; scroll-margin-top: 110px; }
.legal-doc h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
.legal-doc li { margin-bottom: .5em; }
.legal-callout { padding: 18px 22px; border: 2px solid var(--forest); border-radius: var(--radius); background: var(--surface); }
.legal-toc { margin: 28px 0; padding: 18px 22px; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); }
.legal-toc ul { margin: 0; padding-left: 1.2em; columns: 2 16rem; }
.legal-note { margin-top: 2.4em; padding-top: 18px; border-top: 1px solid var(--hairline); color: var(--stone); }
.legal-contact { margin-top: 0; }
.legal a { color: #fff; }

/* Phone numbers never break across lines */
a[href^="tel:"] { white-space: nowrap; }
