/* Hallmark · atmospheric · custom "negatoscopio" · Red Hat Display + Red Hat Mono · CaveDev web-pro 2026-12-03 */
/* Hallmark · waive 38iii · the second line of the hero h1 is set as one whole line, once · the place name "en Santa Cruz" anchors the hospital locally */
/* Critique: un hospital de cirugía y traumatología; la radiografía es el material, el rojo solo para emergencias. */

:root {
  --ink: #070d17;
  --ink-2: #0d1726;
  --film: #111d30;
  --line-dark: #1f2d44;
  --glow: #a9dcff;
  --glow-soft: rgba(169, 220, 255, .14);
  --blue: #1e8bd6;
  --blue-btn: #146aa9;
  --blue-deep: #0f5a9c;
  --red: #e31e24;
  --red-deep: #b5121a;
  --bone: #eef1f4;
  --paper: #f8f9fb;
  --text: #0b1220;
  --muted: #3f4b62;
  --on-dark: #e9eef6;
  --muted-dark: #a9b6ca;
  --white: #fbfcfe;
  --shadow: rgba(3, 8, 16, .45);

  --c01: rgba(7, 13, 23, .86);
  --black: #02060c;
  --c02: rgba(169, 220, 255, .04);
  --c03: rgba(7, 13, 23, .5);
  --c04: rgba(169, 220, 255, .35);
  --c05: rgba(7, 13, 23, .7);
  --c06: rgba(7, 13, 23, .55);
  --c07: rgba(7, 13, 23, 0);
  --c08: rgba(7, 13, 23, .75);
  --c09: rgba(169, 220, 255, .55);
  --c10: rgba(7, 13, 23, .2);
  --c11: rgba(7, 13, 23, .3);
  --c12: rgba(0, 0, 0, .55);
  --film-on: #15253d;
  --film-hover: #39507a;
  --rule: #dfe4ea;
  --red-wash: #fde8e8;
  --rule-hover: #b9c6d6;
  --c13: rgba(11, 18, 32, .08);
  --smear-bg: #f2e6e4;
  --eyepiece: #0c1422;
  --c14: rgba(0, 0, 0, .6);
  --c15: rgba(7, 13, 23, .85);
  --c16: rgba(15, 90, 156, .35);
  --c17: rgba(7, 13, 23, .72);
  --wa: #128c45;
  --c18: rgba(0, 0, 0, .3);
  --rule-chip: #cfd7e1;
  --rule-strong: #c8d1dc;
  --c19: rgba(30, 139, 214, .25);
  --dim-dark: #5d6c84;
  --f-display: 'Red Hat Display', ui-sans-serif, sans-serif;
  --f-mono: 'Red Hat Mono', ui-monospace, monospace;

  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 48px);
  --r: 14px;
  --r-lg: 22px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; line-height: 1.08; letter-spacing: -.025em; margin: 0; overflow-wrap: break-word; min-width: 0; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible, .on-dark:focus-visible { outline-color: var(--glow); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 400; background: var(--white); color: var(--text); padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.dark { background: var(--ink); color: var(--on-dark); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(.96); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--blue-btn); color: var(--white); }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-red { background: var(--red); color: var(--white); }
.btn-light { background: var(--white); color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--blue-deep); }
  .btn-red:hover { background: var(--red-deep); }
  .btn-ghost:hover { background: var(--glow-soft); }
  .btn-light:hover { background: var(--bone); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c01); color: var(--on-dark);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-dark);
}
.nav { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-logo { width: 46px; height: 46px; border-radius: 12px; background: var(--black); overflow: hidden; position: relative; flex: none; }
.brand-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform: scale(1.18); }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.brand-name span { font-size: 13px; color: var(--muted-dark); }
.menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 12px 16px; border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--muted-dark); transition: color 180ms ease, background-color 180ms ease; }
.menu a[aria-current="page"] { color: var(--white); background: var(--glow-soft); }
@media (hover: hover) and (pointer: fine) { .menu a:hover { color: var(--white); } }
.nav-cta { display: flex; gap: 12px; }
.nav-cta .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.menu-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-dark); background: transparent; color: var(--on-dark); cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .nav-cta .btn-primary { display: none; }
  .menu {
    position: absolute; top: calc(100% + 8px); right: var(--gut); left: var(--gut);
    flex-direction: column; padding: 12px; border-radius: var(--r-lg);
    background: var(--ink-2); border: 1px solid var(--line-dark); box-shadow: 0 24px 60px var(--shadow);
    transform-origin: top right; opacity: 0; transform: scale(.96) translateY(-6px); visibility: hidden;
    transition: opacity 160ms ease, transform 160ms var(--ease-out), visibility 0s linear 160ms;
  }
  .menu.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity 220ms ease, transform 240ms var(--ease-out), visibility 0s; }
  .menu a { padding: 16px 16px; font-size: 17px; }
}
@media (max-width: 560px) {
  .brand-name span { display: none; }
  .nav { gap: 12px; }
  .nav-cta .btn-red span { display: none; }
  .nav-cta .btn-red { width: 46px; padding: 0; }
}

/* ---------- Intro ECG ---------- */
.intro { display: none; }
.intro-on .intro, .intro.is-open { display: grid; position: fixed; inset: 0; z-index: 300; place-items: center; background: var(--ink); color: var(--glow); }
.intro-on { overflow: hidden; }
.intro.is-open { opacity: 0; transition: opacity 600ms ease; pointer-events: none; }
.intro-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 40px 40px; opacity: .55; }
.intro-ecg { position: absolute; left: 0; right: 0; top: 50%; width: 100%; height: 180px; transform: translateY(-50%); overflow: visible; }
.intro-ecg path { fill: none; stroke: var(--glow); stroke-width: 2.4; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--glow)); stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro.is-run .intro-ecg path { animation: ecg-draw 1300ms linear forwards; }
@keyframes ecg-draw { to { stroke-dashoffset: 0; } }
.js .intro-center { position: relative; z-index: 1; display: grid; justify-items: center; gap: 16px; opacity: 0; transform: scale(.94); transition: opacity 400ms ease, transform 500ms var(--ease-out); }
.js .intro.is-logo .intro-center { opacity: 1; transform: none; }
.intro-center::before { content: ""; position: absolute; inset: -60px -92px; z-index: -1; background: radial-gradient(closest-side, var(--ink) 55%, transparent); }
.intro-center img { width: 116px; height: 116px; border-radius: 26px; object-fit: contain; background: var(--black); }
.intro-read { display: flex; gap: 24px; font-size: 14px; color: var(--muted-dark); }
.intro-read b { color: var(--glow); font-weight: 500; }
.intro-skip { position: absolute; right: 20px; bottom: 20px; z-index: 2; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-dark); background: transparent; color: var(--muted-dark); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh - 72px, 900px); display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); color: var(--on-dark); isolation: isolate; }
.hero-media { position: absolute; inset: 0 0 0 var(--mx, 34%); z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-xray { position: absolute; inset: 0 0 0 var(--mx, 34%); z-index: -1; clip-path: circle(var(--lr, 0px) at calc(var(--lx, 70%) - var(--mxp, 0px)) var(--ly, 42%)); }
.hero-xray img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: grayscale(1) invert(1) contrast(1.3) brightness(1.05); }
.hero-xray::after { content: ""; position: absolute; inset: 0; background: var(--blue-deep); mix-blend-mode: color; opacity: .75; }
.hero-xray::before { content: ""; position: absolute; inset: 0; z-index: 1; background: repeating-linear-gradient(0deg, var(--c02) 0 1px, transparent 1px 5px); }
.lens { position: absolute; z-index: 0; left: 0; top: 0; width: calc(var(--lr, 0px) * 2); height: calc(var(--lr, 0px) * 2); border-radius: 50%; border: 2px solid var(--glow); box-shadow: 0 0 0 1px var(--c03), 0 0 30px var(--c04); transform: translate(calc(var(--lpx, 0px) - var(--lr, 0px)), calc(var(--lpy, 0px) - var(--lr, 0px))); pointer-events: none; }
.lens-read { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 10px); font-size: 12px; white-space: nowrap; color: var(--glow); background: var(--c05); padding: 4px 8px; border-radius: 999px; }
.hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 34%, var(--c06) 44%, var(--c07) 60%), linear-gradient(0deg, var(--c08) 0%, var(--c07) 34%); }
.hero-body { position: relative; padding-block: clamp(48px, 9vh, 112px); max-width: 600px; }
.hero h1 { font-size: clamp(42px, 6.2vw, 86px); font-weight: 500; letter-spacing: -.035em; line-height: .98; }
.hero h1 strong { font-weight: 800; color: var(--white); display: block; }
.hero-lead { margin-top: 24px; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted-dark); max-width: 30em; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-data { position: absolute; right: max(var(--gut), (100% - var(--wrap)) / 2); bottom: clamp(48px, 9vh, 110px); display: grid; gap: 12px; text-align: right; font-size: 13px; color: var(--muted-dark); }
.hero-data b { display: block; font-family: var(--f-display); font-size: 40px; font-weight: 700; line-height: 1; color: var(--white); letter-spacing: -.03em; }
.hero-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 0; background: var(--glow); box-shadow: 0 0 22px 4px var(--c09); opacity: 0; pointer-events: none; }
.is-loaded .hero-scan { animation: scan 1500ms var(--ease-io) 200ms both; }
@keyframes scan { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(min(100svh, 900px)); } }

.js .hero-body > * { opacity: 0; transform: translateY(18px); }
.is-loaded .hero-body > * { opacity: 1; transform: none; transition: opacity 700ms ease, transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 150ms); }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 52vh; }
  .hero { --mx: 0px; }
  .hero-media img, .hero-xray img { object-position: 55% 30%; }
  .hero-media, .hero-xray { bottom: auto; height: 62svh; }
  .hero-shade { background: linear-gradient(0deg, var(--ink) 38%, var(--c10) 75%, var(--c11) 100%); }
  .hero-data { position: static; display: flex; gap: 28px; text-align: left; margin-top: 32px; }
  .hero-data b { font-size: 32px; }
  .hero-body { padding-top: 0; }
}

/* ---------- Monitor de estado ---------- */
.monitor { background: var(--ink-2); color: var(--on-dark); border-block: 1px solid var(--line-dark); }
.monitor-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.monitor-cell { padding: 24px 24px; border-left: 1px solid var(--line-dark); display: grid; gap: 4px; min-width: 0; }
.monitor-cell:first-child { border-left: 0; padding-left: 0; }
.monitor-cell small { font-size: 13px; color: var(--muted-dark); }
.monitor-cell strong { font-size: 18px; font-weight: 600; }
.monitor-cell a { text-decoration: none; }
.pulse { display: inline-flex; align-items: center; gap: 12px; }
.pulse svg { width: 46px; height: 18px; flex: none; }
.pulse path { fill: none; stroke: var(--glow); stroke-width: 2; stroke-dasharray: 60; stroke-dashoffset: 60; animation: pulse-run 1.6s linear infinite; }
.pulse.is-closed path { stroke: var(--muted-dark); }
.pulse.is-red path { stroke: var(--red); }
@keyframes pulse-run { 0% { stroke-dashoffset: 60; } 70%, 100% { stroke-dashoffset: -60; } }
@media (max-width: 900px) {
  .monitor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-cell { padding: 20px 16px; }
  .monitor-cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .monitor-cell:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(72px, 10vw, 132px); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: clamp(34px, 4.4vw, 60px); }
.section-head p { color: var(--muted); font-size: 18px; max-width: 34em; }
.dark .section-head p { color: var(--muted-dark); }
@media (max-width: 800px) { .section-head { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ---------- Negatoscopio ---------- */
.lightbox { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.viewer { position: relative; border-radius: var(--r-lg); background: var(--black); border: 1px solid var(--line-dark); overflow: hidden; aspect-ratio: 4 / 4.4; }
.viewer::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 80% at 50% 40%, transparent 55%, var(--c12)); }
.viewer-film { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 260ms ease; }
.viewer-film.is-on { opacity: 1; }
.viewer { container-type: size; }
.viewer-film figure { position: relative; margin: 0; aspect-ratio: var(--ar, 1); width: min(100cqw, 100cqh * var(--ar, 1)); }
.viewer-film img { width: 100%; height: 100%; object-fit: contain; filter: brightness(.35) contrast(1.1); transition: filter 500ms ease; }
.viewer-film.is-lit img { filter: brightness(1.05) contrast(1.12); animation: flicker 420ms steps(1) 1; }
@keyframes flicker { 0% { filter: brightness(.4); } 15% { filter: brightness(1.1); } 30% { filter: brightness(.55); } 45%, 100% { filter: brightness(1.05) contrast(1.12); } }
.mark { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); z-index: 3; width: 0; height: 0; }
.js .mark i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--glow); background: var(--c03); transform: scale(0.4); opacity: 0; transition: transform 300ms var(--ease-out), opacity 200ms ease; }
.mark span { position: absolute; top: -1px; height: 2px; width: 64px; background: var(--glow); transform: scaleX(0); transform-origin: left center; transition: transform 380ms var(--ease-out); }
.js .mark b { position: absolute; top: -15px; white-space: nowrap; font-family: var(--f-mono); font-weight: 500; font-size: 13px; color: var(--ink); background: var(--glow); padding: 4px 8px; border-radius: 6px; opacity: 0; transform: translateY(4px); transition: opacity 240ms ease, transform 300ms var(--ease-out); }
.mark { --dir: 1; }
.mark span { left: 7px; }
.mark b { left: 74px; }
.mark.is-left span { left: auto; right: 7px; transform-origin: right center; }
.mark.is-left b { left: auto; right: 74px; }
.js .viewer-film.is-lit .mark i { transform: scale(1); opacity: 1; transition-delay: calc(var(--k) * 260ms + 450ms); }
.viewer-film.is-lit .mark span { transform: scaleX(1); transition-delay: calc(var(--k) * 260ms + 560ms); }
.js .viewer-film.is-lit .mark b { opacity: 1; transform: none; transition-delay: calc(var(--k) * 260ms + 720ms); }
.viewer-ui span { background: var(--ink); padding: 4px 8px; border-radius: 6px; }
.viewer-ui { position: absolute; left: 16px; right: 16px; top: 14px; z-index: 4; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-dark); pointer-events: none; }
.films { display: grid; gap: 12px; }
.film-btn { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; text-align: left; padding: 12px; border-radius: var(--r); border: 1px solid var(--line-dark); background: var(--film); color: var(--on-dark); cursor: pointer; transition: border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out); }
.film-btn:active { transform: scale(.98); }
.film-btn img { width: 74px; height: 74px; object-fit: cover; border-radius: 9px; filter: grayscale(1) brightness(.6); transition: filter 300ms ease; }
.film-btn strong { display: block; font-size: 18px; font-weight: 600; }
.film-btn small { display: block; font-size: 14px; color: var(--muted-dark); line-height: 1.45; margin-top: 2px; }
.film-btn[aria-pressed="true"] { border-color: var(--glow); background: var(--film-on); }
.film-btn[aria-pressed="true"] img { filter: grayscale(1) brightness(1.1); }
@media (hover: hover) and (pointer: fine) { .film-btn:hover { border-color: var(--film-hover); } }
.films-foot { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.films-foot p { font-size: 13px; color: var(--muted-dark); }
@media (max-width: 900px) {
  .lightbox { grid-template-columns: minmax(0, 1fr); }
  .viewer { aspect-ratio: 1 / 1.05; }
  .mark span { width: 30px; }
  .mark b { left: 40px; font-size: 11px; white-space: normal; width: max-content; max-width: 112px; line-height: 1.25; }
  .mark.is-left b { right: 40px; }
}

/* ---------- Servicios ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.svc { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 16px; padding: 28px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--rule); text-decoration: none; transition: transform 220ms var(--ease-out), border-color 200ms ease, box-shadow 220ms ease; min-width: 0; }
.svc-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--bone); color: var(--blue-deep); }
.svc-ico svg { width: 24px; height: 24px; }
.svc h3 { font-size: 22px; }
.svc p { color: var(--muted); font-size: 16px; margin-top: 8px; }
.svc-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--blue-deep); }
.svc-go svg { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
.svc.is-red .svc-ico { background: var(--red-wash); color: var(--red-deep); }
.svc.is-red .svc-go { color: var(--red-deep); }
.svc:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .svc:hover { transform: translateY(-3px); border-color: var(--rule-hover); box-shadow: 0 18px 40px var(--c13); }
  .svc:hover .svc-go svg { transform: translateX(3px); }
}
@media (max-width: 980px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } .svc { padding: 24px; } }

/* ---------- Microscopio ---------- */
.scope { position: relative; height: 240vh; background: var(--ink); color: var(--on-dark); }
.scope-stage { position: sticky; top: 72px; height: calc(100vh - 72px); display: grid; align-items: center; }
.scope-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.eyepiece { position: relative; width: min(100%, 72vh, 560px); aspect-ratio: 1; margin-inline: auto; border-radius: 50%; background: var(--smear-bg); overflow: hidden; box-shadow: 0 0 0 14px var(--eyepiece), 0 0 0 15px var(--line-dark), 0 30px 80px var(--c14); }
.eyepiece svg { position: absolute; inset: -8%; width: 116%; height: 116%; filter: blur(var(--blur, 12px)); transform: scale(var(--zoom, 1.25)) rotate(var(--rot, 0deg)); }
.eyepiece::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, transparent 70%, var(--c15)); pointer-events: none; }
.reticle { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--c16); }
.reticle::before { left: 50%; top: 12%; bottom: 12%; width: 1px; }
.reticle::after { top: 50%; left: 12%; right: 12%; height: 1px; }
.scope-copy h2 { font-size: clamp(34px, 4.4vw, 58px); }
.scope-copy > p { margin-top: 20px; color: var(--muted-dark); font-size: 18px; max-width: 30em; }
.dial { margin-top: 32px; display: flex; gap: 8px; }
.dial span { min-width: 64px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-dark); text-align: center; font-size: 14px; color: var(--muted-dark); transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease; }
.dial span.is-on { color: var(--ink); background: var(--glow); border-color: var(--glow); }
.tests { margin: 28px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.tests li { display: flex; gap: 12px; align-items: center; font-size: 16px; color: var(--muted-dark); transition: color 300ms ease; }
.tests li svg { opacity: .45; transition: opacity 300ms ease; }
.tests li.is-on { color: var(--white); }
.tests li.is-on svg { opacity: 1; }
.tests svg { width: 18px; height: 18px; color: var(--glow); flex: none; }
@media (max-width: 900px) {
  .scope { height: auto; }
  .scope-stage { position: static; height: auto; padding-block: 80px; }
  .scope-grid { grid-template-columns: minmax(0, 1fr); }
  .eyepiece { width: min(100%, 420px); }
  .tests li { opacity: 1; }
}

/* ---------- Directora ---------- */
.lead-doc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.doc-photo { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bone); }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; }
.doc-photo figcaption { position: absolute; left: 14px; bottom: 14px; right: 14px; font-size: 13px; color: var(--white); background: var(--c17); padding: 8px 12px; border-radius: 10px; }
.lead-doc h2 { font-size: clamp(32px, 4vw, 54px); }
.lead-doc blockquote { margin: 28px 0 0; font-size: clamp(20px, 2vw, 26px); line-height: 1.4; font-weight: 500; letter-spacing: -.01em; }
.lead-doc cite { display: block; margin-top: 16px; font-style: normal; color: var(--muted); font-size: 16px; }
.facts { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.facts div { padding: 20px; border-radius: var(--r); background: var(--white); border: 1px solid var(--rule); }
.facts b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.facts span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.4; }
@media (max-width: 860px) { .lead-doc { grid-template-columns: minmax(0, 1fr); } .doc-photo { aspect-ratio: 4 / 3.4; } }
@media (max-width: 480px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Banda de emergencia ---------- */
.er { background: var(--red); color: var(--white); }
.er-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding-block: clamp(40px, 6vw, 68px); }
.er h2 { font-size: clamp(30px, 4vw, 52px); }
.er p { margin-top: 12px; font-size: 18px; max-width: 34em; }
.er-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.er .btn-light { color: var(--red-deep); }
.er .btn-ghost { color: var(--white); }
@media (max-width: 820px) { .er-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-dark); padding-block: 64px 32px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
.site-footer h3 { font-size: 16px; color: var(--on-dark); font-weight: 600; letter-spacing: 0; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; text-decoration: none; transition: color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { color: var(--white); } }
.foot-brand p { margin-top: 16px; max-width: 26em; }
.socials { display: flex; gap: 8px; margin-top: 20px; }
.socials a { width: 44px; height: 44px; justify-content: center; border-radius: 12px; border: 1px solid var(--line-dark); }
.socials svg { width: 20px; height: 20px; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.wa-float .wa-btn { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: var(--white); box-shadow: 0 12px 30px var(--c18); transition: transform 160ms var(--ease-out); }
.wa-float .wa-btn svg { width: 28px; height: 28px; }
.wa-float:active .wa-btn { transform: scale(.94); }
.js .wa-float .wa-tip { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 600; opacity: 0; transform: translateX(8px); transition: opacity 180ms ease, transform 200ms var(--ease-out); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .js .wa-float:hover .wa-tip, .js .wa-float:focus-visible .wa-tip { opacity: 1; transform: none; } }

/* ---------- Páginas internas ---------- */
.page-hero { background: var(--ink); color: var(--on-dark); padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 48px 48px; opacity: .35; mask-image: linear-gradient(90deg, transparent 20%, var(--black) 100%); -webkit-mask-image: linear-gradient(90deg, transparent 20%, var(--black) 100%); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(40px, 5.6vw, 76px); font-weight: 500; letter-spacing: -.035em; max-width: 14em; }
.page-hero p { margin-top: 20px; font-size: 19px; color: var(--muted-dark); max-width: 34em; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted-dark); margin-bottom: 24px; }
.crumbs a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--white); } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--rule-chip); background: var(--white); cursor: pointer; font-size: 15px; font-weight: 500; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.svc.is-leaving { opacity: 0; transform: scale(.97); transition: opacity 140ms ease, transform 140ms ease; }
.svc.is-entering { animation: enter 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* Ficha de servicio */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.detail-photo { border-radius: var(--r-lg); overflow: hidden; background: var(--black); aspect-ratio: 4 / 4.2; position: sticky; top: 96px; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-photo.is-rx img { object-fit: contain; }
.detail h2 { font-size: clamp(28px, 3vw, 40px); }
.detail .txt { margin-top: 16px; font-size: 19px; color: var(--muted); }
.checks { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.checks li { display: flex; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.checks svg { width: 20px; height: 20px; color: var(--blue); flex: none; }
.detail-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.note { margin-top: 20px; font-size: 14px; color: var(--muted); }
.related { margin-top: clamp(56px, 8vw, 96px); }
.related h2 { font-size: 28px; margin-bottom: 24px; }
@media (max-width: 860px) { .detail { grid-template-columns: minmax(0, 1fr); } .detail-photo { position: static; aspect-ratio: 4 / 3; } }

/* Nosotros */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); }
.story h2 { font-size: clamp(30px, 3.6vw, 48px); }
.story-text p + p { margin-top: 20px; }
.story-text p { font-size: 19px; color: var(--muted); }
.story-text strong { color: var(--text); font-weight: 600; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pillar { padding: 28px; border-radius: var(--r-lg); background: var(--film); border: 1px solid var(--line-dark); }
.pillar svg { width: 26px; height: 26px; color: var(--glow); }
.pillar h3 { margin-top: 20px; font-size: 22px; }
.pillar p { margin-top: 8px; color: var(--muted-dark); font-size: 16px; }
.credits { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.credits a { color: var(--blue-deep); }
@media (max-width: 860px) { .story { grid-template-columns: minmax(0, 1fr); } .pillars { grid-template-columns: minmax(0, 1fr); } }

/* Contacto / agenda */
.book { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.form { display: grid; gap: 20px; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--rule); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .field legend { font-size: 15px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--rule-strong); background: var(--paper); font-size: 16px; transition: border-color 180ms ease; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--c19); }
.field[aria-invalid="true"] input, .field[aria-invalid="true"] select { border-color: var(--red); }
.err { font-size: 14px; color: var(--red-deep); min-height: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule-strong); font-weight: 500; font-size: 15px; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
.seg span svg { width: 18px; height: 18px; }
.seg input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.form .btn { justify-self: start; }
.status { font-size: 15px; color: var(--muted); }
.preview { position: sticky; top: 96px; display: grid; gap: 16px; }
.chart { padding: 24px; border-radius: var(--r-lg); background: var(--ink); color: var(--on-dark); border: 1px solid var(--line-dark); font-family: var(--f-mono); font-size: 14px; }
.chart-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed var(--line-dark); color: var(--muted-dark); }
.chart dl { margin: 16px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 16px; }
.chart dt { color: var(--muted-dark); }
.chart dd { margin: 0; color: var(--glow); overflow-wrap: anywhere; }
.chart dd.is-empty { color: var(--dim-dark); }
.chart svg.ecg-mini { width: 100%; height: 34px; margin-top: 16px; }
.chart svg.ecg-mini path { fill: none; stroke: var(--glow); stroke-width: 1.6; }
.map { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--rule); aspect-ratio: 16 / 10; background: var(--bone); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.contact-list a, .contact-list div { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; padding: 16px; border-radius: var(--r); background: var(--white); border: 1px solid var(--rule); }
.contact-list svg { width: 22px; height: 22px; color: var(--blue-deep); flex: none; margin-top: 2px; }
.contact-list small { display: block; color: var(--muted); font-size: 14px; }
.contact-list strong { font-weight: 600; }
.visit { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .book, .visit { grid-template-columns: minmax(0, 1fr); } .preview { position: static; } }
@media (max-width: 520px) { .form-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Revelado al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 600ms ease; }
  .js .hero-body > * { transform: none; }
  .is-loaded .hero-body > * { transition: opacity 600ms ease; }
  .is-loaded .hero-scan { animation: none; }
  .intro.is-run .intro-ecg path { animation-duration: 1ms; }
  .pulse path { animation: none; stroke-dashoffset: 0; }
  .viewer-film.is-lit img { animation: none; }
  .mark i, .mark span, .mark b { transition: opacity 300ms ease !important; transform: none !important; }
  .viewer-film:not(.is-lit) .mark i, .viewer-film:not(.is-lit) .mark span, .viewer-film:not(.is-lit) .mark b { opacity: 0; }
  .svc.is-entering { animation: fade 300ms ease both; }
  .btn:active, .chip:active, .svc:active, .film-btn:active { transform: none; }
}
@keyframes fade { from { opacity: 0; } }
