/* Pulsar Ultrasonidos
   Paleta: logotipo de Linfolab (corazón facetado) + colores del logotipo oficial de Pulsar. */
:root {
  --ink: #231A47;        /* violeta profundo: texto y campo del ultrasonido */
  --ink-soft: #4A3F72;
  --violet: #6B58A6;
  --lavender: #C3B3DB;
  --mist: #F4F1FA;
  --sky: #A9D9F8;
  --azure: #00A9EF;
  --pink: #EC72A9;
  --magenta: #E8008A;
  --magenta-deep: #C2006F; /* botones: contraste AA con blanco */
  --paper: #FFFFFF;

  /* logotipo oficial de Pulsar */
  --brand-blue: #7A9ED4;
  --brand-mauve: #C68ABA;

  /* fondos de color (evitan la página toda en blanco) */
  --bg: #E8EBF7;          /* bruma pervinca: fondo general */
  --bg-lavender: #DCD3EE; /* sección de embarazo */
  --line: #CFC8E3;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { display: block; max-width: 100%; }

a { color: var(--violet); text-underline-offset: 3px; }
a:hover { color: var(--magenta-deep); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--magenta-deep);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s ease;
}
.btn:hover { background: #A3005D; color: #fff; }
.btn .ico { width: 20px; height: 20px; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sky); color: var(--ink); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.header-row {
  display: flex; align-items: center; gap: 24px;
  min-height: 80px;
}
.brand { display: block; margin-right: auto; border-radius: 6px; }
/* el PNG trae margen transparente; el margen negativo lo compensa */
.brand-logo { width: auto; height: 80px; margin: -8px 0 -8px -15px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .9688rem; }
.nav a:hover { color: var(--magenta-deep); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
  background:
    radial-gradient(40% 55% at 78% 40%, rgba(255,255,255,.55), transparent 70%),
    linear-gradient(135deg, #D3DDF4 0%, #DFD8F1 55%, #EBD6E8 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-copy h1 { max-width: 13ch; }
.lede {
  margin-top: 20px;
  font-size: 1.1875rem;
  color: var(--ink-soft);
  max-width: 44ch;
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  margin-top: 30px;
}
.link-tel {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration-color: var(--lavender);
  text-decoration-thickness: 2px;
}
.info-strip {
  margin: clamp(36px, 5vw, 56px) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(35,26,71,.10);
}
.info-strip > div { padding: 20px 26px; }
.info-strip > div + div { border-left: 1px solid var(--line); }
.info-strip dt { font-size: .875rem; color: var(--violet); font-weight: 700; }
.info-strip dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }
.info-strip a { color: var(--ink); text-decoration-color: var(--lavender); text-decoration-thickness: 2px; }
.info-strip a:hover { color: var(--magenta-deep); }

/* Simulación de ultrasonido: el elemento protagonista */
.scan { margin: 0; }
.scan-screen {
  position: relative;
  aspect-ratio: 5 / 4;
  background: #0A0718;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(195,179,219,.25), 0 24px 48px -16px rgba(35,26,71,.45);
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
}
.scan-screen:focus-visible { outline: 3px solid var(--azure); outline-offset: 4px; }
.scan-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scan-hud {
  position: absolute; inset: 0;
  pointer-events: none;
  color: var(--lavender);
  font-size: .8125rem;
}
.scan-id { position: absolute; left: 16px; top: 14px; }
.scan-id strong { color: #fff; font-family: var(--font-display); font-weight: 700; margin-right: 4px; }
.scan-status {
  position: absolute; right: 16px; top: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
}
.scan-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.scan-status[data-state="live"] i { background: var(--magenta); animation: live-dot 1.2s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .35; } }
.scan-note { position: absolute; left: 16px; bottom: 12px; font-size: .75rem; opacity: .75; }
.scan-fallback { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--lavender); text-align: center; }
.scan-caption {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: 14px;
  font-size: .9375rem;
  color: var(--ink-soft);
}
.scan-toggle {
  font: inherit; font-weight: 700;
  min-height: 40px; padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.scan-toggle:hover { background: var(--ink); color: #fff; }
.scan-hint-touch { display: none; }
@media (hover: none) {
  .scan-hint-pointer { display: none; }
  .scan-hint-touch { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-status[data-state="live"] i { animation: none; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-mist { background: var(--bg-lavender); }
.section-intro {
  margin-top: 14px;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* Estudios */
.studies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  margin-top: 44px;
}
.study-group {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 26px 28px 10px;
  box-shadow: 0 1px 2px rgba(35,26,71,.06);
}
.study-group h3 {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.5rem;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--ink);
}
.group-ico { width: 34px; height: 34px; }
.study-list { list-style: none; margin: 0; padding: 0; }
.study-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  align-items: center;
  gap: 4px 18px;
  padding: 14px 0;
  border-bottom: 1px solid #E6E0F1;
}
.study-list li:last-child { border-bottom: 0; }
.study-cta {
  font-size: .875rem;
  font-weight: 700;
  color: var(--magenta-deep);
  padding: 6px 12px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.study-cta:hover { background: var(--magenta-deep); color: #fff; }
.study-list strong { font-weight: 700; }
.study-list span { color: var(--ink-soft); font-size: .9688rem; }

.mobile-band {
  margin-top: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, #BBD3F2, #CFC3E6 55%, #E6C3DD);
}
.mobile-band h3 { font-size: 1.5rem; }
.mobile-band p { margin-top: 6px; max-width: 52ch; color: var(--ink-soft); }

/* Embarazo: secuencia real, por eso numerada */
.trimesters {
  list-style: none; padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
.trimesters::before {
  content: "";
  position: absolute; left: 28px; right: 28px; top: 27px;
  height: 3px;
  background: linear-gradient(90deg, var(--azure), var(--violet), var(--magenta));
  border-radius: 3px;
}
.trimesters li { position: relative; padding-right: clamp(16px, 3vw, 40px); }
.tri-num {
  position: relative;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 6px var(--bg-lavender);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 22px;
}
.trimesters li:nth-child(1) .tri-num { border-color: var(--azure); }
.trimesters li:nth-child(2) .tri-num { border-color: var(--violet); }
.trimesters li:nth-child(3) .tri-num { border-color: var(--magenta); }
.tri-weeks { margin: 4px 0 10px; color: #54428C; font-weight: 700; }
.trimesters p:last-child { color: var(--ink-soft); max-width: 32ch; }

/* Preparación */
.prep-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.prep {
  margin: 0; display: grid; gap: 0;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 6px 28px;
}
.prep > div {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  gap: 6px 24px;
  padding: 20px 0;
  border-top: 1px solid #E6E0F1;
}
.prep > div:first-child { border-top: 0; }
.prep dt { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }
.prep dd { margin: 0; color: var(--ink-soft); }

/* Visítanos */
.section-ink { background: var(--ink); color: #fff; }
.section-ink h2 { color: #fff; }
.visit-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: stretch;
}
.visit-info address {
  font-style: normal;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  margin-top: 22px;
}
.hours { margin: 28px 0 0; }
.hours > div { padding: 12px 0; border-top: 1px solid rgba(195,179,219,.3); }
.hours dt { color: var(--lavender); font-size: .9375rem; }
.hours dd { margin: 2px 0 0; font-size: 1.125rem; }
.hours a { color: #fff; }
.visit-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  margin-top: 30px;
}
.link-light { color: var(--sky); }
.link-light:hover { color: #fff; }
.map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 340px;
  background: #2E2459;
}
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* Pie */
.site-footer { padding: 28px 0 96px; background: #1A1338; color: var(--lavender); font-size: .9375rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img {
  height: 54px; width: auto;
  background: var(--paper);
  border-radius: 12px;
  padding: 2px 6px;
}
.site-footer a { color: var(--lavender); }
.site-footer a:hover { color: #fff; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #1FA855;
  color: #fff;
  box-shadow: 0 6px 18px rgba(35,26,71,.28);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #178A45; color: #fff; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
}
@media (max-width: 860px) {
  .hero-grid,
  .studies,
  .prep-grid,
  .visit-grid { grid-template-columns: 1fr; }
  .scan { max-width: 520px; width: 100%; margin: 8px auto 0; }
  .hero-copy h1 { max-width: 16ch; }
  .trimesters { grid-template-columns: 1fr; gap: 28px; }
  .trimesters::before { left: 27px; right: auto; top: 28px; bottom: 28px; width: 3px; height: auto;
    background: linear-gradient(180deg, var(--azure), var(--violet), var(--magenta)); }
  .trimesters li { display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; padding-right: 0; }
  .tri-num { grid-row: span 3; margin-bottom: 0; }
  .mobile-band { flex-direction: column; align-items: flex-start; padding: 24px; }
  .info-strip { grid-template-columns: 1fr; }
  .info-strip > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .brand-logo { height: 54px; }
  .study-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .study-list li span { grid-column: 1; grid-row: 2; }
  .study-list li .study-cta { grid-column: 2; grid-row: 1 / span 2; }
  .study-group, .prep { padding-left: 20px; padding-right: 20px; }
  .prep > div { grid-template-columns: 1fr; }
  .header-row { gap: 12px; }
}
