/* Fondo y capas de la portada. Edita aquí el color general del hero. */
.hero {
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background: linear-gradient(108deg, #fff 0%, #f8fbff 52%, #eef5fc 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(90deg, #fff 0%, #fffffff7 28%, #ffffffd8 48%, #ffffff73 70%, #ffffff18 100%);
}

/* Foto de fondo: blur, opacidad y encuadre para que el texto siga siendo legible. */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  filter: blur(4px) saturate(0.82);
  transform: scale(1.025);
  opacity: 0.54;
  pointer-events: none;
}

.hero-mobile-mark {
  display: none;
}

.hero-inner,
.hero-bottom,
.hero-trust {
  position: relative;
  z-index: 2;
}

/* Distribución escritorio: texto a la izquierda y arte visual a la derecha. */
.hero-inner {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  position: relative;
  padding-top: 44px;
  padding-bottom: 38px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 595px;
}

/* Título principal. Ajusta font-size para cambiar su jerarquía visual. */
.hero h1 {
  font-size: clamp(42px, 4.3vw, 62px);
  max-width: 610px;
}

.hero h1 span {
  color: var(--magenta);
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero .eyebrow::after {
  content: "";
  width: 54px;
  height: 2px;
  background: var(--magenta);
  opacity: 0.85;
}

.hero-doctor {
  font-size: 19px;
  font-weight: 500;
  color: var(--navy);
  margin: 26px 0 8px;
}

.hero-description {
  font-size: 16px;
  max-width: 380px;
  line-height: 1.65;
  border-left: 2px solid var(--magenta);
  padding-left: 18px;
}

/* Botón de agenda y enlace secundario del hero. */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-actions .text-link {
  position: relative;
  font-size: 13px;
  padding-bottom: 9px;
}

.hero-actions .text-link::after {
  content: "";
  position: absolute;
  right: 29px;
  bottom: 3px;
  left: 0;
  height: 2px;
  background: var(--magenta);
  opacity: 0.85;
}

/* Ilustración del corazón para escritorio/tablet. */
.hero-art {
  height: 520px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.heart-depth {
  position: absolute;
  width: 860px;
  height: 860px;
  max-width: none;
  right: -220px;
  top: -190px;
  opacity: 0.2;
  filter: blur(7px);
  transform: rotate(-12deg) scale(1.04);
  z-index: -1;
  pointer-events: none;
}

.heart-disc {
  width: 345px;
  height: 345px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fffffff9, #f8fbfff0);
  box-shadow:
    inset 0 0 0 1px #ffffffda,
    0 28px 75px #20324d18,
    0 0 0 18px #ffffff2b;
  display: grid;
  place-items: center;
  position: relative;
  margin-top: -38px;
}

.heart-front {
  width: 320px;
  height: 320px;
  opacity: 0.9;
}

.art-caption {
  position: absolute;
  bottom: 44px;
  text-align: center;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.art-caption span:first-child {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.art-caption span:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 8px;
  color: #6a7483;
}

.art-caption span:last-child::before,
.art-caption span:last-child::after {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--magenta);
  opacity: 0.8;
}

/* Talón de ubicación y atención con cita previa. */
.hero-bottom {
  min-height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #cfdae8;
  font-size: 12px;
  color: #566274;
}

.hero-bottom > span,
.hero-bottom > button {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-bottom button {
  font-size: 12px;
  padding: 14px 0;
}

/* Lista de tres compromisos mostrada después de la portada. */
.hero-trust {
  background: linear-gradient(90deg, #fff, #fffcfd 56%, #fff);
  border-top: 1px solid #e6eaf0;
  border-bottom: 1px solid #edf0f4;
}

.hero-trust-inner {
  min-height: 104px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.trust-item {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  padding: 0 34px;
  border-right: 1px solid #d7e0ea;
}

.trust-item:first-child {
  padding-left: 0;
}

.trust-item:last-child {
  padding-right: 0;
  border-right: 0;
}

.trust-item img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 7px;
  border-radius: 50%;
  background: #f7edf2;
}

.trust-item span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trust-item strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.trust-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

@media (prefers-reduced-motion: no-preference) {
.hero-copy {
    animation: enter 0.8s both;
  }
}

@media (prefers-reduced-motion: no-preference) {
.hero-art {
    animation: enter 1.1s 0.1s both;
  }
}

@media (min-width: 1500px) {
.hero-inner {
    min-height: 690px;
  }
}

@media (min-width: 1500px) {
.hero-art {
    height: 570px;
  }
}

@media (min-width: 1500px) {
.heart-disc {
    width: 390px;
    height: 390px;
  }
}

@media (min-width: 1500px) {
.heart-front {
    width: 355px;
    height: 355px;
  }
}

@media (max-width: 1100px) {
.hero-inner {
    min-height: 585px;
  }
}

@media (max-width: 1100px) {
.hero h1 {
    font-size: 49px;
  }
}

@media (max-width: 1100px) {
.hero-actions {
    gap: 16px;
  }
}

@media (max-width: 1100px) {
.hero-actions .text-link {
    font-size: 12px;
  }
}

@media (max-width: 1100px) {
.hero-art {
    height: 485px;
  }
}

@media (max-width: 1100px) {
.heart-disc {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 1100px) {
.heart-front {
    width: 290px;
    height: 290px;
  }
}

@media (max-width: 1100px) {
.art-caption span:first-child {
    font-size: 15px;
  }
}

@media (max-width: 900px) {
.hero h1 {
    font-size: 43px;
  }
}

@media (max-width: 900px) {
.hero-art {
    height: 430px;
  }
}

@media (max-width: 900px) {
.heart-disc {
    width: 255px;
    height: 255px;
  }
}

@media (max-width: 900px) {
.heart-front {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 900px) {
.art-caption {
    bottom: 30px;
  }
}

@media (max-width: 900px) {
.art-caption span:first-child {
    font-size: 13px;
  }
}

@media (max-width: 900px) {
.art-caption span:last-child {
    font-size: 7px;
  }
}

@media (max-width: 900px) {
.art-caption span:last-child::before,
.art-caption span:last-child::after {
    width: 26px;
  }
}

@media (max-width: 900px) {
.heart-depth {
    right: -245px;
  }
}

@media (max-width: 900px) {
.hero-inner {
    min-height: 560px;
    grid-template-columns: 1.12fr 1fr;
  }
}

@media (max-width: 900px) {
.hero-doctor {
    font-size: 17px;
  }
}

@media (max-width: 900px) {
.hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .trust-item { padding: 0 16px; }
  .trust-item:first-child { padding-left: 0; }
  .trust-item:last-child { padding-right: 0; }
  .trust-item img { width: 36px; height: 36px; flex-basis: 36px; padding: 6px; }
}

@media (max-width: 640px) {
  .hero-trust-inner { grid-template-columns: 1fr; padding-block: 9px; }
}

@media (max-width: 640px) {
.trust-item,
.trust-item:first-child,
.trust-item:last-child {
    min-height: 58px;
    padding: 11px 0;
    border-right: 0;
    border-bottom: 1px solid #d7e0ea;
  }
}

@media (max-width: 640px) {
.trust-item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
.hero-inner {
    grid-template-columns: 1fr;
    padding-top: 44px;
    padding-bottom: 0;
    min-height: unset;
  }
}

@media (max-width: 640px) {
  .hero-photo {
    opacity: 0.4;
    object-position: 70% center;
    filter: blur(5px) saturate(0.7);
  }

  .hero::before {
    background: linear-gradient(90deg, #fffffff8 0%, #fffffff0 50%, #ffffffa8 100%);
  }
}

@media (max-width: 640px) {
.hero-copy {
    max-width: 430px;
  }
}

@media (max-width: 640px) {
.hero .eyebrow {
    font-size: 9px;
    margin-bottom: 20px;
  }
}

@media (max-width: 640px) {
.hero h1 {
    font-size: clamp(38px, 9.5vw, 51px);
    max-width: 430px;
    letter-spacing: -0.045em;
  }
}

@media (max-width: 640px) {
.hero-doctor {
    font-size: 17px;
    margin-top: 23px;
  }
}

@media (max-width: 640px) {
.hero-description {
    font-size: 15px;
    max-width: 310px;
  }
}

@media (max-width: 640px) {
.hero-actions {
    gap: 11px;
    margin-top: 26px;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
.hero-actions .button {
    font-size: 14px;
    min-height: 52px;
  }
}

@media (max-width: 640px) {
.hero-actions .text-link {
    font-size: 12px;
    padding: 10px 0;
  }
}

@media (max-width: 640px) {
.hero-art {
    height: 270px;
    margin-top: 2px;
  }
}

@media (max-width: 640px) {
.heart-disc {
    width: 210px;
    height: 210px;
    margin-top: -10px;
  }
}

@media (max-width: 640px) {
.heart-front {
    width: 207px;
    height: 207px;
  }
}

@media (max-width: 640px) {
.heart-depth {
    width: 535px;
    height: 535px;
    right: -160px;
    top: -205px;
    opacity: 0.1;
    filter: blur(5px);
  }
}

@media (max-width: 640px) {
.art-caption {
    bottom: 6px;
  }
}

@media (max-width: 640px) {
.art-caption span:first-child {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
.art-caption span:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
.hero-bottom {
    min-height: 80px;
    margin-top: 17px;
    gap: 6px;
    font-size: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 15px 0;
  }
}

@media (max-width: 640px) {
.hero-bottom button {
    font-size: 10px;
    padding: 0;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
.hero-bottom img {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 640px) {
.hero-bottom > span,
  .hero-bottom > button {
    gap: 5px;
  }
}

/* Escala de lectura para teléfono: aumenta textos y áreas pulsables. */
@media (max-width: 640px) {
  .hero-doctor {
    font-size: 19px;
  }

  .hero-description {
    font-size: 17px;
    line-height: 1.7;
    max-width: 340px;
  }

  .hero-actions .button,
  .hero-actions .text-link {
    font-size: 16px;
  }

  .hero-bottom,
  .hero-bottom button {
    font-size: 13px;
  }

  .trust-item strong,
  .trust-item small {
    font-size: 14px;
  }
}

/* ================================================================
   PORTADA DE TELÉFONO
   El contenido principal y el talón caben en la primera pantalla.
   Cambia heroVisual en src/data/site.mjs para elegir el fondo.
   ================================================================ */
@media (max-width: 640px) {
  .hero {
    min-height: calc(100svh - var(--header-height));
    display: flex;
    flex-direction: column;
    background: linear-gradient(155deg, #fff 8%, #f6f9fc 73%, #eef3f8 100%);
  }

  .hero-inner {
    flex: 1;
    display: flex;
    align-items: center;
    padding-top: 18px;
    padding-bottom: 16px;
    min-height: 0;
  }

  .hero-copy {
    width: 100%;
    max-width: 390px;
  }

  .hero .eyebrow {
    font-size: 10px;
    margin-bottom: 12px;
  }

  .hero .eyebrow::after {
    width: 28px;
  }

  .hero h1 {
    font-size: clamp(36px, 9.4vw, 44px);
    line-height: 1.12;
    max-width: 380px;
  }

  .hero-doctor {
    font-size: 18px;
    margin: 17px 0 5px;
  }

  .hero-description {
    font-size: 16px;
    line-height: 1.5;
    max-width: 340px;
    padding-left: 14px;
  }

  .hero-actions {
    margin-top: 19px;
    gap: 6px;
  }

  .hero-actions .button {
    min-height: 50px;
    padding: 12px 19px;
    font-size: 16px;
  }

  .hero-actions .text-link {
    font-size: 15px;
    padding: 7px 0;
  }

  .hero-bottom {
    min-height: 0;
    display: grid;
    gap: 7px;
    justify-content: stretch;
    margin-top: 0;
    padding: 13px 0 max(18px, env(safe-area-inset-bottom));
    font-size: 14px;
    line-height: 1.35;
  }

  .hero-bottom button {
    justify-self: start;
    margin-left: 0;
    padding: 2px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
  }

  .hero-bottom > span,
  .hero-bottom > button {
    gap: 9px;
  }

  .hero-bottom img {
    width: 17px;
    height: 17px;
  }

  .hero[data-hero-visual="logo"] .hero-photo {
    display: none;
  }

  .hero[data-hero-visual="logo"]::before {
    background: linear-gradient(90deg, #fffffff7 0%, #ffffffd9 48%, #ffffff5e 100%);
  }

  .hero-art {
    display: none;
  }

  .hero[data-hero-visual="logo"] .hero-mobile-mark {
    display: block;
    position: absolute;
    z-index: 1;
    width: min(92vw, 400px);
    height: auto;
    top: 27%;
    right: -22%;
    opacity: 0.2;
    filter: blur(2px);
    pointer-events: none;
  }

  .hero[data-hero-visual="imagen"] .hero-photo {
    opacity: 0.52;
    object-position: 72% center;
    filter: blur(5px) saturate(0.68);
    transform: scale(1.05);
  }

  .hero[data-hero-visual="imagen"]::before {
    background: linear-gradient(90deg, #fffffff8 0%, #fffffff0 35%, #ffffffb3 72%, #ffffff72 100%);
  }
}

@media (max-width: 640px) and (max-height: 700px) {
  .hero-inner {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .hero h1 {
    font-size: clamp(34px, 8.9vw, 39px);
  }

  .hero-doctor {
    margin-top: 12px;
  }

  .hero-actions {
    margin-top: 13px;
  }

  .hero-bottom {
    padding-top: 9px;
    padding-bottom: max(11px, env(safe-area-inset-bottom));
  }
}

/* La segunda sección aparece al deslizar: tres compromisos, un ritmo. */
@media (max-width: 640px) {
  .hero-trust {
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  }

  .hero-trust-inner {
    counter-reset: commitment;
    padding-block: 26px 34px;
  }

  .trust-item,
  .trust-item:first-child,
  .trust-item:last-child {
    counter-increment: commitment;
    display: grid;
    grid-template-columns: 30px 42px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 102px;
    padding: 18px 0;
    border-bottom: 1px solid #dce4ed;
  }

  .trust-item:last-child {
    border-bottom: 0;
  }

  .trust-item::before {
    content: "0" counter(commitment);
    color: var(--magenta);
    font-size: 13px;
    font-weight: 500;
    align-self: start;
    padding-top: 10px;
  }

  .trust-item img {
    width: 42px;
    height: 42px;
    flex-basis: auto;
    padding: 8px;
  }

  .trust-item span {
    gap: 4px;
  }

  .trust-item strong {
    font-size: 18px;
    line-height: 1.25;
  }

  .trust-item small {
    font-size: 15px;
    line-height: 1.4;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .hero-trust .trust-item.reveal-ready {
    transition: opacity 560ms var(--ease-premium), transform 560ms var(--ease-premium);
  }

  .hero-trust .trust-item:nth-child(2).reveal-ready { transition-delay: 85ms; }
  .hero-trust .trust-item:nth-child(3).reveal-ready { transition-delay: 170ms; }
}
