/* Shared layout of the clinic designs (dental, derma): a full-screen photo behind the page, one
   frame per section, glass panels on top. Each design sets the tokens and its own type. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; color: var(--text); background: transparent;
  font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  padding-bottom: 84px;
}
.foot .footer-madeby { opacity: 1; color: var(--text); }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.backdrop { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--bg); }
.backdrop img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity 1.3s ease, transform 9s ease-out;
}
.backdrop img.is-on { opacity: 1; transform: scale(1); }
.shade { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--shade); }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: var(--display-weight, 600); line-height: 1.02; letter-spacing: var(--display-spacing, -0.02em); }
h1 { font-size: clamp(3rem, 12vw, 6.6rem); max-width: 13ch; }
h1 em { font-style: var(--em-style, normal); color: var(--accent-text); }
h2 { font-size: clamp(2.2rem, 7vw, 3.6rem); margin-bottom: 18px; }
.eyebrow { margin: 0 0 16px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-text); }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); max-width: 36rem; color: var(--muted); margin: 22px 0 0; }
.fine { font-size: 0.86rem; color: var(--muted); margin: 18px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px;
  border: 2px solid var(--accent); border-radius: var(--radius-btn, 999px); background: var(--accent); color: var(--accent-ink);
  font: 700 0.98rem/1.1 var(--body); text-decoration: none; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: 0.9rem; white-space: nowrap; flex-shrink: 0; }

.top { position: fixed; top: 48px; left: 0; right: 0; z-index: 40; transition: background 0.3s ease, top 0.3s ease; }
.top.is-solid { top: 0; background: var(--glass-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: var(--display-weight, 600) 1.25rem/1 var(--display); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand svg { flex-shrink: 0; color: var(--accent-text); }

.frame { min-height: 100svh; display: flex; align-items: center; padding: 130px 0 90px; }
.frame-hero { align-items: flex-end; padding-bottom: 80px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 34px; }
.today { margin: 0; font-weight: 600; }
.today::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; background: #9a8f86; }
.today.is-open::before { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--glass); font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; font-size: 0.95rem; color: inherit; }

.panel {
  max-width: 620px; padding: 32px 24px; border-radius: var(--radius, 24px);
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--panel-shadow, none);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.panel p { color: var(--muted); }
.panel-wide { max-width: 1000px; }

/* finder chips + treatments board */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.chip {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--text); font: 600 0.92rem/1.2 var(--body); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.board { list-style: none; margin: 0; padding: 0; }
.board li + li { border-top: 1px solid var(--line); }
.board-item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; width: 100%; min-height: 56px; padding: 14px 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.b-name { font: var(--display-weight, 600) 1.25rem/1.2 var(--display); }
.b-price { font-weight: 700; white-space: nowrap; color: var(--text); }
.b-meta { grid-column: 1 / -1; font-size: 0.88rem; color: var(--muted); }
.b-meta strong { color: var(--accent-text); font-weight: 700; margin-left: 6px; opacity: 0; transition: opacity 0.2s ease; }
.board-item:hover .b-name, .board-item:focus-visible .b-name { color: var(--accent-text); }
.board-item:hover .b-meta strong, .board-item:focus-visible .b-meta strong { opacity: 1; }
@media (hover: none) { .b-meta strong { opacity: 1; } }

/* steps */
.steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { position: relative; padding: 18px 18px 18px 64px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 18px; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }

/* before / after */
.cmp { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius, 24px); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp .before { filter: var(--before-filter, saturate(0.6) brightness(0.85) sepia(0.35)); }
.cmp .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.cmp-line::after { content: '⇆'; position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #222; font-size: 1.2rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.cmp-tag { position: absolute; top: 14px; padding: 5px 11px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.cmp-tag.b { left: 14px; } .cmp-tag.a { right: 14px; }
.cmp input[type=range] { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 44px; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp:has(input:focus-visible) { outline: 3px solid var(--accent-text); outline-offset: 4px; }

/* team */
.team { display: grid; gap: 14px; margin-top: 20px; }
.doc { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); }
.doc img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; }
.doc h3 { font-size: 1.25rem; }
.doc p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.doc .creds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.doc .creds span { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); font-size: 0.78rem; font-weight: 700; color: var(--text); }

/* quote */
.quote { margin: 0; max-width: 900px; min-height: 260px; transition: opacity 0.4s ease, transform 0.4s ease; }
.quote blockquote { margin: 0; font: var(--display-weight, 600) clamp(1.8rem, 5.6vw, 3.4rem)/1.12 var(--display); }
.quote blockquote::before { content: '“'; display: block; height: 0.6em; color: var(--accent-text); font-size: 1.6em; line-height: 1; }
.quote figcaption { margin-top: 22px; color: var(--muted); font-weight: 600; }
.quote .tag { margin-left: 10px; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 0.72rem; }
.quote.is-fading { opacity: 0; transform: translateY(10px); }
.dots { display: flex; gap: 6px; margin-top: 26px; }
.dots button { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.dots button::before { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 3px; border-radius: 2px; background: var(--line-strong); }
.dots button[aria-current="true"]::before { background: var(--accent); }
.rating { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-weight: 700; }
.rating b { font: var(--display-weight, 600) 2.4rem/1 var(--display); }

/* hours */
.big-time { margin: 0; font: var(--display-weight, 600) clamp(3rem, 12vw, 6.4rem)/1 var(--display); }
.week { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week li { padding: 10px 2px; border-top: 3px solid var(--line-strong); text-align: center; font-size: 0.76rem; line-height: 1.3; }
.week li b { display: block; font-size: 1rem; }
.week li.open { border-top-color: var(--text); }
.week li.is-today { border-top-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.week li.closed { color: var(--muted); }

/* visit */
.visit { display: grid; gap: 18px; align-items: stretch; }
.map { position: relative; min-height: 220px; margin-top: 18px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--glass); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map button { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.panel-cta { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.panel-cta .btn { margin-top: 10px; }
.link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-weight: 700; text-decoration: none; color: var(--accent-text); }

.foot { padding: 26px 0; background: var(--glass-strong); color: var(--muted); font-size: 0.86rem; }
.foot-inner { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.foot p { margin: 0; }
.foot a { display: inline-block; padding: 10px 0; }
.caption {
  position: fixed; right: 16px; bottom: 86px; z-index: 20; display: none; min-height: 32px; margin: 0; padding: 6px 10px; cursor: zoom-in;
  border-radius: 8px; background: var(--glass-strong); border: 1px solid var(--line); color: var(--muted); font: 600 0.72rem/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase;
}
.caption [data-n] { color: var(--accent-text); }
.sticky {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px;
}
.sticky a, .sticky button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 16px; font: 700 0.95rem/1 var(--body); text-decoration: none; cursor: pointer; border: 0; }
.sticky .call { background: var(--glass-strong); color: var(--text); border: 1px solid var(--line-strong); }
.sticky .book { background: var(--accent); color: var(--accent-ink); }

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .sticky { display: none; }
  .caption { display: block; bottom: 24px; right: 24px; }
  .frame { padding: 150px 0 110px; }
  .panel { padding: 42px; }
  .panel-right { margin-left: auto; }
  .visit { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .team { grid-template-columns: repeat(3, 1fr); }
  .doc { grid-template-columns: 1fr; text-align: left; }
  .doc img { width: 100%; height: auto; aspect-ratio: 4 / 4.2; }
  .foot-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .backdrop img { transition: opacity 0.01s; transform: none !important; }
  .quote, .btn { transition: none; }
}
