/* ==========================================================================
   Westside Medical Associates — site stylesheet
   Colours are taken from the clinic logo. To re-brand the whole site,
   change the values in the :root block below and nothing else.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand */
  --brand:        #56255F;   /* logo purple — headings, nav */
  --brand-deep:   #3A1741;
  --brand-tint:   #F5F0F7;
  --accent:       #A3122B;   /* logo crimson — primary calls to action */
  --accent-deep:  #7C0D20;
  --accent-tint:  #FDF2F4;
  --sky:          #4B7FB5;   /* logo blue — links, secondary accents */
  --sky-tint:     #EEF4FA;

  /* Neutrals */
  --ink:          #1B1A20;
  --body:         #35333D;
  --muted:        #63606D;
  --line:         #E3E0E8;
  --line-soft:    #EFEDF2;
  --bg:           #FFFFFF;
  --surface:      #F8F6FA;

  /* Type */
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, Georgia, "Times New Roman", serif;

  /* Layout */
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(27,26,32,.05), 0 8px 24px -12px rgba(27,26,32,.18);
  --shadow-lg: 0 2px 4px rgba(27,26,32,.05), 0 18px 44px -16px rgba(27,26,32,.24);
}

/* --------------------------------------------------------------- Reset --- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;      /* 17px — deliberately large; many patients are older */
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p, ul, ol { margin: 0 0 1.15em; }
li + li { margin-top: .4em; }

a { color: var(--sky); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }

strong { color: var(--ink); font-weight: 650; }

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

/* --------------------------------------------------------------- Utils --- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.wrap-narrow { max-width: var(--wrap-narrow); }

.skip-link {
  position: absolute; left: .5rem; top: -100px;
  background: var(--ink); color: #fff; padding: .7rem 1rem;
  border-radius: 8px; z-index: 100; text-decoration: none;
}
.skip-link:focus { top: .5rem; color: #fff; }

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

.section { padding-block: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem); }
.section--tint { background: var(--surface); }
.section--brand { background: var(--brand-tint); }

.lede { font-size: 1.15rem; color: var(--muted); }

/* ------------------------------------------------------------- Buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.4rem;
  font: inherit; font-weight: 650; line-height: 1.2;
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); color: #fff; }

.btn--secondary { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn--secondary:hover { background: var(--brand); color: #fff; }

.btn--ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--lg { padding: 1rem 1.75rem; font-size: 1.075rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn .icon { width: 1.1em; height: 1.1em; flex: none; }

/* ------------------------------------------------------- Notice banner --- */

.notice {
  background: var(--brand-deep); color: #fff;
  font-size: .95rem; text-align: center;
}
.notice .wrap { padding-block: .6rem; }
.notice a { color: #fff; font-weight: 650; }

/* -------------------------------------------------------------- Header --- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff;                     /* opaque: the logo artwork sits on white */
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding-block: .7rem;
}

/* The logo is the clinic's identity — give it room to actually be read. */
.brand { display: block; margin-right: auto; flex: none; line-height: 0; }
.brand img {
  width: clamp(126px, 30vw, 330px);
  height: auto;
}

/* Header quick actions — always visible, even on the smallest phone */
.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.header-actions .btn { padding: .6rem 1rem; font-size: .95rem; }
@media (max-width: 899px) {
  .header-actions .btn--book .label-long { display: none; }
}
/* On narrow phones the Call button becomes its icon; the accessible name
   still reads "Call the clinic at ...". Both actions stay one tap away. */
@media (max-width: 619px) {
  .wrap { padding-inline: 1rem; }
  .header-inner { gap: .5rem; }
  .header-actions { gap: .4rem; }
  .header-actions .btn { padding: .55rem .8rem; font-size: .9rem; }
  .header-actions .btn--call { width: 42px; height: 42px; padding: 0; }
  .header-actions .btn--call span { display: none; }
  .header-actions .btn .icon { width: 1.2em; height: 1.2em; }
  .nav-toggle { width: 42px; height: 42px; }
}

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; flex: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  color: var(--brand); cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brand); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ----------------------------------------------------------------- Nav --- */

.nav-bar { border-top: 1px solid var(--line-soft); }

.site-nav { display: none; padding-block: .5rem .9rem; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: block; padding: .7rem .25rem;
  color: var(--ink); text-decoration: none; font-weight: 550;
  border-bottom: 1px solid var(--line-soft);
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; padding-block: 0; }
  .site-nav ul { display: flex; align-items: center; gap: .15rem; flex-wrap: wrap; }
  .site-nav a {
    padding: .7rem .85rem; border-bottom: 0; border-radius: 8px 8px 0 0;
    font-size: .97rem; white-space: nowrap;
    border-bottom: 3px solid transparent;
  }
  .site-nav a:hover { background: var(--brand-tint); }
  .site-nav a[aria-current="page"] {
    background: var(--brand-tint); border-bottom-color: var(--accent);
  }
}

/* ---------------------------------------------------------------- Hero --- */

.hero {
  background:
    linear-gradient(180deg, var(--brand-tint) 0%, #fff 100%);
  padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem) 0;
}
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 3rem; }
}
.hero h1 { color: var(--brand-deep); }
.hero .lede { font-size: 1.2rem; max-width: 34ch; }
.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 2; object-fit: cover; width: 100%;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .9rem;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
}

/* ----------------------------------------------------------- Hours card --- */

.hours-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.hours-card h2, .hours-card h3 { margin-bottom: .9rem; }
.hours-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.hours-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--line-soft); margin: 0;
}
.hours-list li:last-child { border-bottom: 0; }
.hours-day { font-weight: 650; color: var(--ink); }
.hours-time { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 650; }
.hours-note { flex-basis: 100%; font-size: .9rem; color: var(--muted); }

/* --------------------------------------------------------------- Cards --- */

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .card-link { margin-top: auto; padding-top: .9rem; font-weight: 650; }

.card--link { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card--link:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }

.card-icon {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: .9rem;
  display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand);
}
.card-icon svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------- Action grid --- */

.actions { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.action {
  display: flex; gap: .9rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; text-decoration: none; color: var(--body);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.action:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--body); }
.action .card-icon { margin-bottom: 0; flex: none; background: var(--accent-tint); color: var(--accent); }
.action-title { display: block; font-weight: 700; color: var(--ink); margin-bottom: .15rem; }
.action-desc { display: block; font-size: .93rem; color: var(--muted); line-height: 1.5; }

/* ----------------------------------------------------------- Physicians --- */

.physician-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.physician-card {
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.physician-photo {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); margin-bottom: .8rem;
  border: 1px solid var(--line);
}
.physician-photo img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center top;
  transition: transform .3s ease;
}
.physician-card:hover .physician-photo img { transform: scale(1.03); }
.physician-photo--empty {
  aspect-ratio: 1/1; display: grid; place-items: center;
  color: var(--brand); font-family: var(--font-display); font-size: 2.4rem;
}
.physician-name { font-weight: 700; color: var(--ink); line-height: 1.3; }
.physician-card:hover .physician-name { color: var(--accent); }
.physician-creds { font-size: .84rem; color: var(--muted); line-height: 1.45; margin-top: .15rem; }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: .25rem .55rem; border-radius: 999px;
  background: var(--sky-tint); color: #2C5F8F; border: 1px solid #CFE0EF;
}
.physician-photo .badge { position: absolute; left: .5rem; bottom: .5rem; background: #fff; }

/* Individual physician page */
.physician-header { display: grid; gap: 1.75rem; }
@media (min-width: 760px) {
  .physician-header { grid-template-columns: 240px 1fr; align-items: start; }
}
.physician-header img { border-radius: var(--radius-lg); border: 1px solid var(--line); }
.physician-header h1 { margin-bottom: .25rem; }
.physician-header .creds { font-size: 1.05rem; color: var(--accent); font-weight: 650; margin-bottom: .75rem; }
.role-list { list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: .95rem; color: var(--muted); }
.role-list li { margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0 0 1.25rem; }
.tags li {
  margin: 0; font-size: .85rem; padding: .3rem .7rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--body);
}

/* ----------------------------------------------------------- Prose page --- */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; }
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-tint);
  padding: 1.15rem 1.35rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-block: 1.5rem;
}
.callout--info { border-left-color: var(--sky); background: var(--sky-tint); }
.callout--neutral { border-left-color: var(--brand); background: var(--brand-tint); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; font-size: 1.05rem; }

/* ------------------------------------------------------------ Page head --- */

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.75rem, 1.2rem + 2vw, 3rem);
}
.page-head h1 { margin-bottom: .35rem; }
.page-head .lede { margin-bottom: 0; max-width: 60ch; }

.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: .75rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .4rem; color: var(--line); }

/* ------------------------------------------------------------- Referral --- */

.referral-box {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.35rem 1.5rem;
}
.referral-box dl { display: grid; gap: .5rem 1rem; margin: 0; }
@media (min-width: 520px) { .referral-box dl { grid-template-columns: auto 1fr; } }
.referral-box dt { font-weight: 650; color: var(--ink); }
.referral-box dd { margin: 0; }

/* -------------------------------------------------------------- Gallery --- */

.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery img { border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; width: 100%; }

/* ------------------------------------------------------------- Contact --- */

.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: .85rem; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); margin: 0; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .card-icon { width: 36px; height: 36px; margin: 0; flex: none; }
.contact-list .card-icon svg { width: 18px; height: 18px; }
.contact-label { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.contact-value { font-weight: 650; color: var(--ink); font-size: 1.05rem; }
.contact-value a { color: var(--ink); }
.contact-value a:hover { color: var(--accent); }

.map-embed {
  border: 0; width: 100%; aspect-ratio: 4/3; border-radius: var(--radius);
  background: var(--surface);
}

/* -------------------------------------------------------------- Footer --- */

.site-footer {
  background: var(--brand-deep); color: #D9CFDD;
  padding-block: 3rem 2rem; margin-top: 0;
  font-size: .95rem;
}
.site-footer h2, .site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #F0C9D2; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 .5rem; }
.footer-logo {
  background: #fff; border-radius: 12px; padding: .9rem 1.1rem;
  display: inline-block; margin-bottom: 1.15rem;
}
.footer-logo img { width: 240px; max-width: 100%; height: auto; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .87rem; color: #B7A9BC;
}

/* --------------------------------------------------- Emergency reminder --- */

.emergency {
  background: var(--accent-tint); border-top: 1px solid #F2D6DC;
  padding-block: 1.1rem; font-size: .95rem; text-align: center; color: var(--accent-deep);
}
.emergency strong { color: var(--accent-deep); }

/* ---------------------------------------------------------------- Print --- */

@media print {
  .site-header, .site-nav, .notice, .site-footer, .emergency, .btn { display: none !important; }
  body { font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* ---------------------------------------------------------- Photography --- */

.photo-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.photo {
  display: block; text-decoration: none; color: inherit;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.photo:hover, .photo:focus-visible {
  border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px);
}
.photo img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.photo-caption {
  display: block; padding: .65rem .8rem;
  font-size: .88rem; line-height: 1.4; color: var(--muted);
}

/* Lightbox. Without JavaScript the thumbnails are plain links to the full
   image, so the gallery still works with scripting switched off. */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(18,16,22,.97);
  display: grid; grid-template-rows: 1fr auto; place-items: center;
  padding: clamp(.75rem, 2vw, 2rem);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 78vh; width: auto;
  border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.lightbox-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  justify-content: center; color: #fff; padding-top: 1rem; text-align: center;
}
.lightbox-caption { font-size: 1rem; font-weight: 600; }
.lightbox-count { font-size: .87rem; color: #B7A9BC; font-variant-numeric: tabular-nums; }
.lightbox button {
  font: inherit; color: #fff; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  width: 44px; height: 44px; cursor: pointer; display: grid; place-items: center;
}
.lightbox button:hover { background: rgba(255,255,255,.24); }
.lightbox button svg { width: 20px; height: 20px; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; }

/* ------------------------------------------------- Registered-patients band --- */

.registered-band {
  background: var(--brand-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 1.1rem;
}
.registered-band .wrap {
  display: flex; gap: .85rem; align-items: flex-start;
  max-width: var(--wrap);
}
.registered-band svg { width: 24px; height: 24px; flex: none; color: var(--brand); margin-top: .1rem; }
.registered-band p { margin: 0; font-size: .97rem; color: var(--body); }
.registered-band strong { color: var(--brand-deep); }
