/* SB Clinic — public site. One page, the logo's geometry as the layout:
   45° clipped corners, a four-segment band, teal and coral from the mark. */

@font-face { font-family: "Red Hat Display"; font-weight: 700; font-display: swap; src: url("fonts/red-hat-display-700.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-weight: 800; font-display: swap; src: url("fonts/red-hat-display-800.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/atkinson-400.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/atkinson-700.woff2") format("woff2"); }

:root {
  --ink: #10262c;
  --sub: #4b6166;
  --bg: #ffffff;
  --tint: #eef6f5;
  --line: #d6e3e3;
  --teal: #0b5a6b;
  --on-teal: #ffffff;
  --mint: #5bbfb5;
  --coral: #f4a086;
  --peach: #f9b8a2;
  --rust: #a9502e;
  --open-bg: #dff3ec;
  --open-fg: #0b6249;
  --shut-bg: #fbe9e2;
  --shut-fg: #8f3f20;
  --draft: #c2410c;
  --foot-bg: #0b5a6b;
  --foot-fg: #e6f3f1;

  --f-display: "Red Hat Display", "Segoe UI", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --cut: 14px;
  --head-h: 76px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e5efef; --sub: #a3b7ba; --bg: #0c1d22; --tint: #132a30; --line: #24404a;
    --teal: #74cfc4; --on-teal: #0c1d22; --rust: #f4a086;
    --open-bg: #123b33; --open-fg: #8fe5c6; --shut-bg: #3a2620; --shut-fg: #f8c0a8;
    --draft: #fb923c; --foot-bg: #08161a; --foot-fg: #a3b7ba;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.125rem/1.6 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.cham { clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.kicker { font: 700 0.8rem/1.2 var(--f-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); }
.lead { color: var(--sub); max-width: 60ch; }
.section-head { display: grid; gap: 12px; margin-bottom: 32px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--teal); color: var(--on-teal); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Segment band — the only divider */
.seg { display: flex; gap: 5px; height: 8px; overflow: hidden; }
.seg i { flex: 1; transform: skewX(-35deg); }
.seg i:nth-child(1) { background: var(--mint); }
.seg i:nth-child(2) { background: #0b5a6b; }
.seg i:nth-child(3) { background: var(--coral); }
.seg i:nth-child(4) { background: var(--peach); }

/* Buttons: the clipped shape is painted by ::before so the focus ring survives */
.btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; font: 700 1.05rem/1.1 var(--f-body); color: var(--teal); text-decoration: none;
  border: 0; background: none; cursor: pointer; --btn-bg: var(--tint); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--btn-bg);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px); }
.btn:hover::before { filter: brightness(0.96); }
.btn.primary { color: var(--on-teal); --btn-bg: var(--teal); }
.btn.whatsapp { color: #10262c; --btn-bg: var(--coral); }
.btn.on-tint { --btn-bg: var(--bg); }
.btn svg { width: 22px; height: 22px; flex: none; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--head-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--teal); font: 800 1.25rem/1 var(--f-display); letter-spacing: 0.06em; }
.brand img { width: 48px; height: 48px; }
.site-nav ul { display: flex; gap: 28px; }
.site-nav a { color: var(--sub); text-decoration: none; font-weight: 700; font-size: 1rem; padding: 8px 0; }
.site-nav a:hover { color: var(--teal); }
.head-call { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--teal); white-space: nowrap; }
.head-call svg { width: 22px; height: 22px; }
@media (prefers-color-scheme: dark) { .brand img { background: #f6faf9; border-radius: 8px; padding: 3px; } }

/* Hero */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: calc(100vh - var(--head-h) - 1px - 8px); min-height: calc(100svh - var(--head-h) - 1px - 8px); }
.hero > .wrap { flex: 1; width: 100%; align-content: center; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; padding-block: 56px 48px; align-items: start; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.6rem); font-weight: 800; letter-spacing: -0.015em; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero .lead { font-size: 1.2rem; margin-top: 20px; }
.hero .actions { margin-top: 28px; }

.today { background: var(--tint); padding: 26px; display: grid; gap: 16px; align-content: start; }
.chip { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; background: var(--line); color: var(--sub); }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.chip[data-state="open"] { background: var(--open-bg); color: var(--open-fg); }
.chip[data-state="closed"] { background: var(--shut-bg); color: var(--shut-fg); }
.chip:empty { display: none; }
.today h2 { font-size: 1.2rem; font-weight: 700; }
.sessions { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; }
.sessions dt { color: var(--sub); }
.sessions dd { font-weight: 700; }
.hero .today .actions { margin-top: 6px; }

.hills { flex: none; width: 100%; height: clamp(100px, min(24svh, 18vw), 230px); object-fit: cover; object-position: center 78%; }

@media (min-width: 821px) and (max-height: 720px) { .hero .wrap { padding-block: 28px 24px; } }

/* Sections */
.band { padding-block: 72px; }
.band.tint { background: var(--tint); }

/* About and Why us: a photo beside a short paragraph; .flip puts the photo on the right */
.split { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 56px; align-items: center; }
.split.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
.split-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px; }
.split-text { display: grid; gap: 12px; max-width: 60ch; }
.split-text h2 { margin-bottom: 6px; }
.split-text p:not(.kicker) { color: var(--sub); font-size: 1.15rem; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service { background: var(--tint); padding: 22px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; }
.service img { width: 76px; height: 76px; }
.service h3 { font-size: 1.12rem; }
.service p { color: var(--sub); font-size: 1rem; }
.service small { font-size: 0.88rem; color: var(--teal); font-weight: 700; }
.services-note { margin-top: 26px; color: var(--sub); }

/* Visit */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.map { min-height: 420px; border: 1.5px solid var(--line); background: var(--tint); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
.reach { gap: 0; align-content: start; }
.reach .sub { display: grid; gap: 14px; }
.reach .sub + .sub { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 26px; }
.phone { font: 800 1.35rem/1.2 var(--f-display); }
.phone a { color: var(--ink); text-decoration: none; }
.panel { background: var(--bg); border: 1.5px solid var(--line); padding: 26px; display: grid; gap: 14px; align-content: start; }
.panel h3 { display: flex; align-items: center; gap: 10px; }
.panel h3 svg { width: 24px; height: 24px; color: var(--teal); }
.panel p, .panel li { color: var(--sub); }
.panel address { font-style: normal; font-size: 1.1rem; color: var(--ink); }
.panel .actions .btn { min-height: 46px; padding: 10px 16px; font-size: 0.98rem; }
.hours-all { display: grid; gap: 2px; }
.hours-all span { color: var(--sub); font-weight: 700; }
.hours-all strong { font: 800 1.6rem/1.2 var(--f-display); color: var(--ink); }
.fine { font-size: 0.85rem; color: var(--sub); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.notes { display: grid; gap: 8px; }
.notes li { padding-left: 18px; position: relative; }
.notes li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 8px; background: var(--coral); transform: rotate(45deg); }

/* Photos */
/* Four columns, two rows, no empty cells: the signboard runs tall, the room runs wide. */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 270px; grid-auto-flow: dense; gap: 14px; }
.shot { display: block; min-width: 0; padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: var(--tint); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.shot:hover img, .shot:focus-visible img { transform: scale(1.05); }
.shot.tall { grid-row: span 2; }
.shot.wide { grid-column: span 2; }

/* Lightbox: every photo in one row, swiped or stepped through; always dark */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #061013; color: #f1f6f6; overflow: hidden; }
.lightbox::backdrop { background: rgba(6, 16, 19, 0.6); }
.lb-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track li { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: center; padding: 64px max(72px, env(safe-area-inset-left, 0px)) 72px; }
.lb-track img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; }
.lb-count { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); font-weight: 700; font-size: 0.95rem; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb-btn svg { width: 26px; height: 26px; }
.lb-close { top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: max(12px, env(safe-area-inset-left, 0px)); }
.lb-next { right: max(12px, env(safe-area-inset-right, 0px)); }
.lb-btn:disabled { opacity: 0.3; cursor: default; }
body:has(.lightbox[open]) { overflow: hidden; }
@media (max-width: 560px) {
  .lb-track li { padding: 64px 12px 76px; }
  .lb-track img { max-height: calc(100dvh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: max(10px, env(safe-area-inset-bottom, 0px)); transform: none; }
}
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } .shot:hover img, .shot:focus-visible img { transform: none; } }

/* FAQ */
.faq { display: grid; gap: 26px; max-width: 70ch; }
.faq div { display: grid; gap: 8px; }
.faq dt { font: 700 1.15rem/1.3 var(--f-display); }
.faq dd { color: var(--sub); }

/* Footer */
.site-foot { background: var(--foot-bg); color: var(--foot-fg); padding-block: 44px 120px; }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.site-foot b { display: block; color: #fff; font: 800 1.15rem/1.2 var(--f-display); margin-bottom: 8px; letter-spacing: 0.04em; }
@media (prefers-color-scheme: dark) { .site-foot b { color: var(--ink); } }
.site-foot a { color: inherit; }
.site-foot p { font-size: 0.98rem; }
.emergency { font-weight: 700; }
.legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 18px; font-size: 0.88rem !important; opacity: 0.85; }

/* Phone dock: Call · WhatsApp · Directions, once the hero buttons are off screen */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; grid-template-columns: repeat(3, 1fr);
  background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  transform: translateY(110%); transition: transform 0.2s ease; }
.dock a { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 12px; font-weight: 700; font-size: 0.9rem; color: var(--teal); text-decoration: none; }
.dock a.primary { background: var(--teal); color: var(--on-teal); }
.dock svg { width: 24px; height: 24px; }
.show-dock .dock { transform: none; }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }

/* Draft markers: a dashed outline round anything the clinic has not confirmed. Launch = none left. */
.draft [data-draft] { outline: 2px dashed var(--draft); outline-offset: 4px; }

/* Layout breakpoints */
@media (max-width: 1000px) {
  .site-nav { display: none; }
}
@media (max-width: 820px) {
  .hero .wrap, .visit-grid, .site-foot .wrap { grid-template-columns: 1fr; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 28px; }
  .split-img { max-width: 420px; }
  .split.flip .split-img { order: -1; }
  .map, .map iframe { min-height: 320px; }
  .hero .wrap { gap: 28px; padding-block: 36px 32px; }
  .band { padding-block: 52px; }
  .dock { display: grid; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 210px; gap: 10px; }
}
@media (max-width: 560px) {
  .head-call span { display: none; }
  .hero .actions .btn { flex: 1 1 100%; }
  .services { grid-template-columns: 1fr 1fr; gap: 10px; }
  .service { padding: 16px; }
  .service img { width: 56px; height: 56px; }
  .service p { font-size: 0.95rem; }
}
@media (max-width: 340px) { .services { grid-template-columns: 1fr; } }
