/* CLINIC MAREN — design tokens and layout.
   Tokens are the blueprint proposal (section 4); they are not measured brand values. */
:root {
  --bg: #FFFFFF;
  --surface: #F2F7FA;
  --text: #123047;
  --text-soft: #3F5A6E;
  --teal: #00788B;
  --teal-ink: #075D73;
  --border: #D7E4EB;
  --focus: #0B4F6C;
  --amber: #8A5A00;
  --amber-bg: #FFF4D6;
  --radius-s: 8px;
  --radius-m: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: 220ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-ink); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--s4); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 var(--s4); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: var(--s4); top: -100px;
  background: var(--text); color: #fff; padding: var(--s3) var(--s4);
  border-radius: var(--radius-s); z-index: 100; text-decoration: none;
}
.skip-link:focus { top: var(--s4); }

/* Preview banner: present only in --preview builds */
.preview-banner {
  background: var(--amber-bg); color: var(--amber);
  border-bottom: 1px solid #E9D39A;
  font-size: 0.9rem; padding: var(--s2) var(--gutter); text-align: center;
}
.preview-banner strong { font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: var(--s3) var(--s5);
  border-radius: var(--radius-s); border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.btn-primary { background: var(--teal-ink); color: #fff; }
.btn-primary:hover { background: #04475A; }
.btn-secondary { background: transparent; color: var(--teal-ink); border-color: var(--teal-ink); }
.btn-secondary:hover { background: var(--surface); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94); backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  padding-block: var(--s3);
}
.brand { display: inline-flex; align-items: center; gap: var(--s3); font-weight: 800; letter-spacing: 0.04em; color: var(--teal); text-decoration: none; font-size: 1.1rem; min-height: 44px; }
.brand-logo { height: 52px; width: auto; flex: none; display: block; }
.brand-text { display: block; line-height: 1.15; }
.brand small { display: block; font-weight: 500; letter-spacing: 0; color: var(--text-soft); font-size: 0.75rem; }
@media (max-width: 640px) { .brand-logo { height: 40px; } .brand { gap: var(--s2); } }
.site-nav { margin-inline-start: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s2); color: var(--text); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 4px; }
.site-header .btn { min-height: 44px; padding-block: var(--s2); }
@media (max-width: 640px) {
  .site-nav { order: 3; width: 100%; margin-inline-start: 0; }
  .site-nav a { padding-inline: 0; }
}

/* Sections */
section { padding-block: clamp(var(--s7), 8vw, var(--s9)); }
section + section { border-top: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: var(--s6); }
.section-head p { color: var(--text-soft); font-size: 1.05em; }
.kicker { display: block; color: var(--teal); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: var(--s3); }

/* Hero */
.hero { padding-block: clamp(var(--s6), 6vw, var(--s8)); background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.hero .wrap { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); } }
.hero-copy p.lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: var(--text-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.hero-media { border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 10px 30px rgba(18,48,71,0.12); aspect-ratio: 4 / 3; background: var(--surface); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 55%; }


/* Gallery */
.gallery { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: var(--s5); } }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .gallery a:hover img { transform: scale(1.02); } }
.gallery figcaption { padding-top: var(--s2); color: var(--text-soft); font-size: 0.95rem; }
.gallery .wide { grid-column: 1 / -1; }
.gallery .wide a { aspect-ratio: 16 / 9; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1448px); width: auto; }
.lightbox::backdrop { background: rgba(18,48,71,0.85); }
.lightbox-inner { position: relative; background: #fff; border-radius: var(--radius-m); overflow: hidden; }
.lightbox img { max-height: 84vh; width: auto; max-width: 96vw; }
.lightbox figcaption { padding: var(--s3) var(--s4); color: var(--text-soft); }
.lightbox-close {
  position: absolute; top: var(--s2); right: var(--s2); min-width: 44px; min-height: 44px;
  border-radius: 999px; border: 0; background: rgba(255,255,255,0.92); color: var(--text);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}

/* Visit */
.visit-grid { display: grid; gap: var(--s5); }
@media (min-width: 800px) { .visit-grid { grid-template-columns: 1fr 1fr; } }
.fact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.fact-list li { display: grid; gap: 2px; padding: var(--s4); background: var(--surface); border-radius: var(--radius-s); }
.fact-list .label { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft); }
.pending { color: var(--amber); font-style: italic; }

/* Final CTA */
.cta-final { background: var(--surface); text-align: center; }
.cta-final .wrap { max-width: 60ch; }
.cta-final .btn { margin-top: var(--s3); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: var(--s6); color: var(--text-soft); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); align-items: center; justify-content: space-between; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s4); }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }

/* Reveal: only when JS is running and motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 320ms ease, transform 320ms ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------------
   Services
   Base = static card gallery (no JS, reduced motion, no WebGL, bundle missing).
   services-ring.js (built from ring/) mounts React Bits Pro's Momentum Ring into
   .services-ring-mount and hides the gallery; its own rules live in services-ring.css.
   --------------------------------------------------------------------------- */
.services { scroll-margin-top: var(--header-h, 96px); }
.services-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3) var(--s5); align-items: end; margin-bottom: var(--s5); }
.services-head h2 { margin-bottom: var(--s2); }
.services-head p { margin: 0; color: var(--text-soft); max-width: 62ch; font-size: 0.95em; }
.skip-services { white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.skip-services:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .services-head { grid-template-columns: 1fr; } }

.services-ring { position: relative; }
.services-ring-mount[hidden] { display: none; }

/* Static gallery */
.services-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
@media (max-width: 520px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); } }
.service-card {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FBFD 100%);
  border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: var(--s3); display: grid; gap: var(--s3); align-content: start;
  box-shadow: 0 1px 2px rgba(18, 48, 71, 0.06), 0 6px 18px rgba(18, 48, 71, 0.08);
  scroll-margin-top: calc(var(--header-h, 96px) + var(--s4));
  transition: box-shadow 220ms ease, border-color 220ms ease;
}
@media (hover: hover) { .service-card:hover { border-color: #BFD6DF; box-shadow: 0 1px 2px rgba(18, 48, 71, 0.06), 0 16px 32px -12px rgba(18, 48, 71, 0.22); } }
.service-card:focus-within { border-color: #BFD6DF; }
.service-art { aspect-ratio: 941 / 1672; background: #fff; border-radius: var(--radius-s); overflow: hidden; }
.service-art img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.service-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.service-card h3 { margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; min-width: 0; }
.service-card .badge { position: absolute; top: var(--s4); left: var(--s4); margin: 0; z-index: 1; font-size: 0.7rem; background: var(--amber-bg); border-color: #E9D39A; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.service-card .btn { min-height: 44px; padding: var(--s2) var(--s4); font-size: 0.95rem; }
@media (max-width: 520px) { .service-card { padding: var(--s2); } .service-card .btn { width: 100%; justify-content: center; } }

/* ---------------------------------------------------------------------------
   Services photo ring (JS-enhanced; the same list is the static gallery without it)
   Original implementation: CSS 3D cylinder, rotated by site.js; cards are planes on the
   drum (rotateY + translateZ), the rotor turns, the front card is sharp, moving cards get
   a directional SVG blur. Sizes come from JS as custom properties.
   --------------------------------------------------------------------------- */
.services-ring.is-ring {
  --ring-h: clamp(520px, 76vh, 820px);
  border-radius: var(--radius-m); border: 1px solid var(--border); overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(18, 48, 71, 0.06), 0 24px 48px -24px rgba(18, 48, 71, 0.25);
}
.is-ring .ring-stage {
  position: relative; height: var(--ring-h); overflow: hidden; outline: none;
  perspective: var(--ring-p, 1600px); perspective-origin: 50% 50%;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(0, 120, 139, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #eef6fa 55%, #e3f0f6 100%);
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.is-ring .ring-stage.is-dragging { cursor: grabbing; }
.is-ring .ring-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--teal); }
.is-ring .ring-stage::before, .is-ring .ring-stage::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 2; pointer-events: none;
}
.is-ring .ring-stage::before { left: 0; background: linear-gradient(90deg, rgba(238, 246, 250, 0.9), transparent); }
.is-ring .ring-stage::after { right: 0; background: linear-gradient(270deg, rgba(238, 246, 250, 0.9), transparent); }
.is-ring [data-ring-rotor] {
  position: absolute; inset: 0; margin: 0; padding: 0; display: block; grid-template-columns: none;
  transform-style: preserve-3d;
  transform: translateZ(calc(-1 * var(--ring-r, 600px))) rotateY(var(--ring-angle, 0deg));
}
.is-ring .service-card {
  position: absolute; top: 50%; left: 50%; width: var(--card-w, 320px); height: var(--card-h, 568px);
  margin: calc(var(--card-h, 568px) / -2) 0 0 calc(var(--card-w, 320px) / -2);
  padding: 0; display: block; border: 0; border-radius: 14px; background: #fff;
  transform: rotateY(var(--a, 0deg)) translateZ(var(--ring-r, 600px));
  backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform;
  box-shadow: 0 1px 2px rgba(18, 48, 71, 0.08), 0 18px 36px -16px rgba(18, 48, 71, 0.35);
  transition: none; overflow: hidden;
}
.is-ring .service-card[data-hidden] { visibility: hidden; }
.is-ring .service-card .service-art { height: 100%; border-radius: 0; aspect-ratio: auto; }
.is-ring .service-card .service-art img { object-fit: contain; }
.is-ring .service-card .service-art::after {
  /* turns away from the viewer: darkens with the angle (set by JS as --dim) */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: rgba(18, 48, 71, var(--dim, 0));
}
.is-ring .service-card .service-art { position: relative; }
.is-ring .service-card .service-meta { display: none; }
.is-ring .service-card .badge { display: none; }
.is-ring.is-moving .service-card { filter: url(#ring-mblur); }
/* Scroll mode: the ring box sticks under the header while a spacer of (n − 1) card-widths
   (real content height, added by site.js) scrolls by; the heading scrolls away first; then it releases. */
.services.is-pinned .services-ring { position: sticky; top: var(--header-h, 0px); }
@media (max-width: 640px) {
  /* scroll mode on narrow screens: one compact control row so the stage keeps its height */
  .services-ring.is-scroll .ring-details { flex: 1 1 auto; }
  .services-ring.is-scroll .ring-bar { padding: var(--s2) var(--s3); gap: var(--s2); }
}
.ring-btn:disabled { opacity: 0.35; cursor: default; }
.ring-btn:disabled:hover { background: #fff; border-color: var(--border); }
.ring-btn[hidden] { display: none; }
.ring-flag { position: absolute; top: var(--s4); left: var(--s4); z-index: 3; margin: 0; font-size: 0.7rem; background: var(--amber-bg); border-color: #E9D39A; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.ring-flag[hidden] { display: none; }

.ring-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3) var(--s5); align-items: center;
  padding: var(--s4) var(--s5); border-top: 1px solid var(--border); background: #fff;
}
.ring-bar[hidden] { display: none; }
.ring-caption { margin: 0; min-width: 0; display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.ring-caption strong { font-size: 1.1rem; color: var(--text); }
.ring-counter { color: var(--text-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ring-controls { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.ring-btn {
  min-width: 44px; min-height: 44px; padding: 0 var(--s3); border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--teal-ink); font: inherit; font-weight: 600; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color var(--ease), border-color var(--ease);
}
.ring-btn:hover { background: var(--surface); border-color: #BFD6DF; }
.ring-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.ring-btn[aria-pressed="true"] { background: var(--teal-ink); color: #fff; border-color: var(--teal-ink); }
.ring-btn-icon { font-size: 1.25rem; }
.ring-details { min-height: 44px; padding: var(--s2) var(--s4); font-size: 0.95rem; }
.ring-hint { margin: var(--s2) 0 0; font-size: 0.85rem; color: var(--text-soft); }
.ring-hint[hidden] { display: none; }
@media (max-width: 640px) {
  .services-ring.is-ring { --ring-h: clamp(420px, 62vh, 600px); }
  .ring-bar { grid-template-columns: 1fr; padding: var(--s3) var(--s4); }
  .ring-controls { justify-content: space-between; width: 100%; }
  .ring-details { flex: 1 1 100%; justify-content: center; }
  .is-ring .ring-stage::before, .is-ring .ring-stage::after { width: 6%; }
}

/* Enlarged portrait view inside the shared lightbox */
.lightbox { max-height: 94vh; }
.lightbox.portrait { width: min(92vw, 820px); }
.lightbox.portrait .lightbox-inner { max-height: 92vh; overflow: auto; }
.lightbox.portrait img { width: 100%; max-width: none; max-height: none; height: auto; }
.lightbox.portrait .lightbox-close { position: sticky; top: var(--s2); float: right; margin-right: var(--s2); }

@media (prefers-reduced-motion: reduce) {
  .service-card { transition: none; }
  .gallery img { transition: none; }
}

/* ---------------------------------------------------------------------------
   Hero walkthrough video (preview builds)
   --------------------------------------------------------------------------- */
.hero-video { position: relative; aspect-ratio: 16 / 9; }
.hero-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 320ms ease; background: transparent;
}
.hero-video.is-playing video { opacity: 1; }
.hero-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: var(--s3);
  min-height: 56px; padding: var(--s3) var(--s5) var(--s3) var(--s4);
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: var(--teal-ink);
  font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 30px rgba(18, 48, 71, 0.25);
  transition: background-color var(--ease), transform var(--ease);
}
.hero-play:hover:not(:disabled) { background: #fff; transform: translate(-50%, -50%) scale(1.03); }
.hero-play:disabled { cursor: default; opacity: 0.8; }
.hero-play-icon {
  width: 32px; height: 32px; border-radius: 50%; background: var(--teal-ink); position: relative; flex: none;
}
.hero-play-icon::after {
  content: ""; position: absolute; left: 12px; top: 9px;
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff;
}
.hero-toggle {
  position: absolute; right: var(--s3); bottom: var(--s3);
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: var(--teal-ink); cursor: pointer;
  box-shadow: 0 4px 14px rgba(18, 48, 71, 0.25);
}
.hero-toggle-icon { position: absolute; left: 50%; top: 50%; width: 12px; height: 14px; transform: translate(-50%, -50%); }
.hero-toggle-icon::before, .hero-toggle-icon::after {
  content: ""; position: absolute; top: 0; width: 4px; height: 14px; background: var(--teal-ink); border-radius: 1px;
}
.hero-toggle-icon::before { left: 0; }
.hero-toggle-icon::after { right: 0; }
.hero-toggle.is-paused .hero-toggle-icon::before {
  left: 2px; width: 0; height: 0; background: transparent; border-radius: 0;
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--teal-ink);
}
.hero-toggle.is-paused .hero-toggle-icon::after { display: none; }
.hero-badge { position: absolute; left: var(--s3); top: var(--s3); margin: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
@media (prefers-reduced-motion: reduce) { .hero-video video, .hero-play { transition: none; } }

/* ---------------------------------------------------------------------------
   Full-bleed hero (preview builds with the walkthrough video)
   The media layer covers the whole section; copy and controls sit above a contrast overlay.
   --------------------------------------------------------------------------- */
.hero--full {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100svh - var(--header-h, 74px));
  display: grid; align-items: end;
  padding-block: clamp(var(--s6), 8vh, var(--s8)) clamp(var(--s6), 7vh, var(--s8));
  background: #0F2A3B;
}
.hero--full .wrap { position: relative; z-index: 2; display: block; }
.hero--full .hero-copy { position: relative; z-index: 2; }
.hero--full .hero-copy { max-width: 60ch; color: #fff; }
.hero--full .kicker { color: #9FE3EC; }
.hero--full .hero-copy p.lede { color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.hero--full h1 { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.hero--full .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.08); }
.hero--full .btn-secondary:hover { background: rgba(255, 255, 255, 0.18); }
.hero--full .btn-primary { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.hero--full :focus-visible { outline-color: #fff; }

.hero--full .hero-media {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; max-width: none; margin: 0; padding: 0;
  border: 0; border-radius: 0; box-shadow: none; aspect-ratio: auto;
}
.hero--full .hero-media img,
.hero--full .hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 55% 50%;   /* action moves centre-right: gate, stairs, entrance */
}
.hero--full .hero-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 30, 45, 0.18) 0%, rgba(10, 30, 45, 0.28) 45%, rgba(10, 30, 45, 0.72) 100%),
    linear-gradient(90deg, rgba(10, 30, 45, 0.45) 0%, rgba(10, 30, 45, 0) 60%);
}
.hero--full .hero-play, .hero--full .hero-toggle, .hero--full .hero-badge { z-index: 2; }
.hero--full .hero-toggle { right: var(--gutter); bottom: var(--s5); }
.hero--full .hero-badge { left: var(--gutter); top: var(--s4); }
.hero--full .hero-play { top: 42%; }
@media (max-width: 900px) {
  .hero--full .hero-media img, .hero--full .hero-media video { object-position: 58% 50%; }
}
@media (max-width: 640px) {
  .hero--full { min-height: calc(100svh - var(--header-h, 116px)); }
  .hero--full .hero-media img, .hero--full .hero-media video { object-position: 60% 50%; }
  .hero--full .hero-play { top: 36%; }
  .hero--full .hero-media::after {
    background:
      linear-gradient(180deg, rgba(10, 30, 45, 0.2) 0%, rgba(10, 30, 45, 0.35) 40%, rgba(10, 30, 45, 0.8) 100%);
  }
}

/* Phones (and any short landscape viewport): the whole 16:9 frame is shown, never cropped.
   The media layer leaves the cover position and becomes a normal block at the top of the section
   (full width, its own aspect ratio, capped to the space under the header, letterboxed with the
   section colour when the cap applies); heading and buttons follow below it in normal flow. */
@media (max-width: 760px), (max-height: 520px) {
  .hero--full { min-height: 0; display: block; padding-block: 0 clamp(var(--s6), 6vw, var(--s8)); }
  .hero--full .hero-media {
    position: relative; inset: auto; z-index: 0;
    width: 100%; height: auto; aspect-ratio: 16 / 9;
    max-height: calc(100svh - var(--top-chrome-h, var(--header-h, 116px)));
    margin: 0 auto; background: #0F2A3B;
  }
  .hero--full .hero-media img,
  .hero--full .hero-media video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: contain; object-position: 50% 50%;
  }
  .hero--full .hero-media::after { background: none; }
  .hero--full .wrap { padding-top: clamp(var(--s5), 5vw, var(--s7)); }
  .hero--full .hero-copy { max-width: none; }
  .hero--full .hero-play { top: 50%; }
  .hero--full .hero-toggle { right: var(--s3); bottom: var(--s3); }
  .hero--full .hero-badge { left: var(--s3); top: var(--s3); }
}

/* Hero copy entrance: CSS-only, runs once per page load, no JS timers */
@media (prefers-reduced-motion: no-preference) {
  .hero--full .hero-copy > * { animation: hero-rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero--full .hero-copy > .kicker { animation-delay: 80ms; }
  .hero--full .hero-copy > h1 { animation-delay: 180ms; }
  .hero--full .hero-copy > .lede { animation-delay: 300ms; }
  .hero--full .hero-copy > .hero-actions { animation-delay: 420ms; }
}
@keyframes hero-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------------
   Doctor / owner profile
   --------------------------------------------------------------------------- */
.doctor-card {
  display: grid; gap: var(--s5); align-items: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FBFD 100%);
  border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: var(--s5);
  box-shadow: 0 1px 2px rgba(18, 48, 71, 0.06), 0 12px 32px -12px rgba(18, 48, 71, 0.18);
}
@media (min-width: 900px) { .doctor-card { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); padding: var(--s6); } }
.doctor-portrait { border-radius: var(--radius-m); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 5; max-width: 420px; }
.doctor-portrait img { width: 100%; height: 100%; object-fit: cover; }
.doctor-role { margin: 0 0 var(--s2); color: var(--teal); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.doctor-name { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.15; margin-bottom: var(--s2); }
.doctor-specialty { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: var(--teal-ink); font-weight: 600; margin-bottom: var(--s5); }
.doctor-credentials { margin: 0; display: grid; gap: var(--s3); }
.doctor-credentials div { display: grid; gap: 2px; padding: var(--s3) var(--s4); background: var(--surface); border-radius: var(--radius-s); }
.doctor-credentials dt { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft); }
.doctor-credentials dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 640px) { .doctor-credentials { grid-template-columns: 1fr 1fr; } }

/* Contact details */
.hours { border-collapse: collapse; font-size: 0.95rem; }
.hours th { text-align: left; font-weight: 500; padding: 2px var(--s4) 2px 0; color: var(--text-soft); white-space: nowrap; }
.hours td { padding: 2px 0; font-variant-numeric: tabular-nums; }
.hours-tz { font-size: 0.85rem; color: var(--text-soft); margin-top: var(--s1); }
.phone-label { color: var(--text-soft); font-size: 0.85rem; margin-right: var(--s1); }
.fact-list a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }   /* tap target */

/* Visit actions and address link */
.visit-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Social links (footer icons, "Síguenos" group in the contact section) */
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.site-footer .social { gap: var(--s2); }
.social-link {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-width: 44px; min-height: 44px; padding: 0 var(--s3); border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--teal-ink);
  font-weight: 600; text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}
.social-link svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.social-link:hover { background: var(--surface); border-color: #BFD6DF; color: var(--teal); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .social-link:hover { transform: translateY(-1px); } }
.social-link:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.social--footer .social-link { width: 44px; padding: 0; }
.fact-list .social-link { min-height: 44px; }
.address-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; font-weight: 500; min-height: auto; display: inline; }
.address-link:hover { text-decoration-color: var(--teal-ink); color: var(--teal-ink); }

/* ---------------------------------------------------------------------------
   Google reviews
   --------------------------------------------------------------------------- */
.reviews { background: var(--surface); }
.reviews-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3) var(--s5); align-items: end; margin-bottom: var(--s5); }
@media (max-width: 640px) { .reviews-head { grid-template-columns: 1fr; } }
.reviews-head h2 { margin-bottom: var(--s2); }
.reviews-summary { margin: 0 0 var(--s2); font-size: 1.05rem; }
.reviews-aside { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s3); }
@media (max-width: 640px) { .reviews-aside { flex-direction: row; justify-content: space-between; align-items: center; } }
.reviews-controls { display: flex; gap: var(--s2); }
.reviews-controls button {
  min-width: 44px; min-height: 44px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--teal-ink); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.reviews-controls button:hover:not(:disabled) { background: #F2F7FA; }
.reviews-controls button:disabled { opacity: 0.35; cursor: default; }
.stars { color: #E0A100; letter-spacing: 0.04em; }
.reviews-track {
  list-style: none; margin: 0; padding: var(--s2) 0 var(--s4);
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84vw, 360px); gap: var(--s4);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin;
}
.review-card {
  scroll-snap-align: start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: var(--s5); display: grid; gap: var(--s3); align-content: start;
  box-shadow: 0 1px 2px rgba(18, 48, 71, 0.06), 0 10px 28px -14px rgba(18, 48, 71, 0.2);
  transition: box-shadow 220ms ease, border-color 220ms ease;
}
@media (hover: hover) { .review-card:hover { border-color: #BFD6DF; box-shadow: 0 1px 2px rgba(18, 48, 71, 0.06), 0 16px 32px -12px rgba(18, 48, 71, 0.22); } }
.review-top { display: flex; gap: var(--s3); align-items: center; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; }
.review-avatar--initial { display: grid; place-items: center; background: var(--teal); color: #fff; font-weight: 700; }
.review-author { margin: 0; font-weight: 600; }
.review-author a { color: var(--text); text-decoration: none; }
.review-author a:hover { text-decoration: underline; }
.review-meta { margin: 0; font-size: 0.9rem; color: var(--text-soft); display: flex; gap: var(--s2); align-items: center; }
.review-text { margin: 0; color: var(--text); line-height: 1.55; }
.review-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review-more { align-self: start; background: none; border: 0; padding: var(--s2) 0; min-height: 44px; color: var(--teal-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.review-source { margin: 0; font-size: 0.85rem; color: var(--text-soft); display: flex; align-items: center; gap: var(--s2); }
.google-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid var(--border); font-weight: 700; font-size: 0.8rem; color: #4285F4; }
.reviews--pending { padding-block: var(--s6); }
@media (prefers-reduced-motion: reduce) { .reviews-track { scroll-behavior: auto; } }
