/* Hero fotográfico TodAps — portada completa, responsive y ligera. */
#tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child {
  --hero-ink: #0c0c09;
  --hero-surface: #f4f4f1;
  --hero-blue: #0099d5;
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 72px) !important;
  margin-top: -2rem;
  padding: 0 !important;
  overflow: hidden;
  background: var(--hero-surface) !important;
}

@supports (height: 100dvh) {
  #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child { min-height: calc(100dvh - 72px) !important; }
}

html.dark #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child {
  background: var(--hero-surface) !important;
}

.hero-photo-cover::before,
.hero-photo-cover::after {
  display: none !important;
}

.hero-photo-media,
.hero-photo-wash {
  position: absolute;
  inset: 0;
}

.hero-photo-media {
  z-index: 0;
  display: block;
  overflow: hidden;
  background: var(--hero-surface);
}

.hero-photo-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  transform: translate3d(0, 0, 0) scale(1.015);
  transform-origin: 50% 58%;
  backface-visibility: hidden;
}

.hero-photo-wash {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 37%, rgba(244, 244, 241, .14) 50%, rgba(244, 244, 241, .82) 100%),
    linear-gradient(180deg, rgba(244, 244, 241, .08), transparent 35%, rgba(244, 244, 241, .08));
}

.hero-photo-cover .hero-minimal-shell {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(100%, 80rem);
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(23rem, .86fr) !important;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem) !important;
}

@supports (height: 100dvh) {
  .hero-photo-cover .hero-minimal-shell { min-height: calc(100dvh - 72px); }
}

.hero-photo-cover .hero-minimal-copy {
  grid-column: 2;
  width: 100%;
  max-width: 35rem;
  justify-self: end;
  color: var(--hero-ink);
}

.hero-photo-cover .hero-eyebrow {
  width: max-content;
  max-width: 100%;
  margin: 0 0 1rem;
  border: 0 !important;
  border-radius: 8px !important;
  background: rgba(244, 244, 241, .78) !important;
  box-shadow: none !important;
  color: var(--hero-blue) !important;
}

.hero-photo-cover .hero-title,
html.dark .hero-photo-cover .hero-title {
  max-width: 35rem !important;
  margin: 0 !important;
  color: var(--hero-ink) !important;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
  font-size: clamp(3.75rem, 6.2vw, 6.35rem) !important;
  font-weight: 760 !important;
  line-height: .9 !important;
  letter-spacing: -.072em !important;
  text-wrap: balance;
}

.hero-photo-cover .hero-emphasis,
html.dark .hero-photo-cover .hero-emphasis {
  color: var(--hero-blue) !important;
}

.hero-photo-cover .hero-description,
html.dark .hero-photo-cover .hero-description {
  max-width: 31rem;
  margin: 1.35rem 0 0;
  color: var(--hero-ink) !important;
  font-family: "Open Sans", Inter, Arial, sans-serif;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  font-weight: 560;
  line-height: 1.55;
}

.hero-photo-cover .hero-actions {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

#tab-inicio .hero-photo-cover .hero-primary-cta,
#tab-inicio .hero-photo-cover .hero-secondary-cta {
  min-height: 54px;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-family: "Open Sans", Inter, Arial, sans-serif;
  font-weight: 700;
}

#tab-inicio .hero-photo-cover .hero-primary-cta {
  background: var(--hero-ink) !important;
  color: #fff !important;
}

#tab-inicio .hero-photo-cover .hero-primary-cta:hover {
  background: var(--hero-blue) !important;
}

#tab-inicio .hero-photo-cover .hero-secondary-cta,
html.dark #tab-inicio .hero-photo-cover .hero-secondary-cta {
  background: rgba(244, 244, 241, .84) !important;
  color: var(--hero-ink) !important;
}

.hero-photo-cover .hero-reassurance,
html.dark .hero-photo-cover .hero-reassurance {
  margin: 1rem 0 0 !important;
  justify-content: flex-start;
  color: rgba(12, 12, 9, .72) !important;
}

.hero-photo-cover .hero-reassurance svg {
  color: var(--hero-blue) !important;
}

@keyframes todaps-hero-photo-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.015); }
  50% { transform: translate3d(-.35%, -.3%, 0) scale(1.028); }
}

html.motion-force .hero-photo-media img,
html.motion-mobile .hero-photo-media img {
  animation: todaps-hero-photo-drift 16s cubic-bezier(.45, 0, .55, 1) infinite;
}

@media (max-width: 960px) and (orientation: portrait) {
  #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child {
    min-height: calc(100svh - 62px) !important;
    margin-top: -.5rem;
  }

  @supports (height: 100dvh) {
    #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child { min-height: calc(100dvh - 62px) !important; }
  }

  .hero-photo-media img {
    object-position: center 68%;
    transform-origin: 50% 72%;
  }

  .hero-photo-wash {
    background:
      linear-gradient(180deg, rgba(244, 244, 241, .98) 0%, rgba(244, 244, 241, .82) 31%, rgba(244, 244, 241, .16) 53%, transparent 72%);
  }

  .hero-photo-cover .hero-minimal-shell {
    min-height: calc(100svh - 62px);
    padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) calc(5.25rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    display: block;
  }

  @supports (height: 100dvh) {
    .hero-photo-cover .hero-minimal-shell { min-height: calc(100dvh - 62px); }
  }

  .hero-photo-cover .hero-minimal-copy {
    width: min(100%, 35rem);
    max-width: none;
    margin: 0 auto;
    padding: 12px;
    text-align: left;
    background: linear-gradient(135deg, rgba(244, 244, 241, .78), rgba(244, 244, 241, .28));
    border-radius: 8px;
  }

  .hero-photo-cover .hero-title,
  html.dark .hero-photo-cover .hero-title {
    max-width: 31rem !important;
    font-size: clamp(2.65rem, 11.8vw, 4.8rem) !important;
    line-height: .91 !important;
  }

  .hero-photo-cover .hero-description {
    max-width: 28rem;
    margin-top: .9rem;
    font-size: clamp(.9rem, 3.4vw, 1rem);
    line-height: 1.45;
  }

  .hero-photo-cover .hero-actions {
    width: min(100%, 30rem);
    margin-top: 1rem;
  }

  #tab-inicio .hero-photo-cover .hero-primary-cta,
  #tab-inicio .hero-photo-cover .hero-secondary-cta {
    min-height: 50px;
    padding: .68rem .78rem !important;
    font-size: clamp(.8rem, 3.2vw, .92rem) !important;
    white-space: nowrap;
  }

  #tab-inicio .hero-photo-cover .hero-primary-cta { flex: 1.5 1 0; }
  #tab-inicio .hero-photo-cover .hero-secondary-cta { flex: 1 1 0; }

  .hero-photo-cover .hero-reassurance {
    margin-top: .7rem !important;
    font-size: .7rem !important;
  }
}

@media (max-width: 360px) and (orientation: portrait) {
  #tab-inicio .hero-photo-cover .hero-primary-cta,
  #tab-inicio .hero-photo-cover .hero-secondary-cta {
    min-height: 48px;
    padding: .55rem .5rem !important;
    gap: 5px !important;
    font-size: .69rem !important;
  }

  #tab-inicio .hero-photo-cover .hero-primary-cta svg,
  #tab-inicio .hero-photo-cover .hero-secondary-cta svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 360px) and (orientation: portrait) {
  .hero-photo-cover .hero-minimal-copy { padding: 8px; }
  .hero-photo-cover .hero-eyebrow { margin-bottom: .65rem; }
  .hero-photo-cover .hero-title,
  html.dark .hero-photo-cover .hero-title { font-size: clamp(2.35rem, 12vw, 2.75rem) !important; }
  .hero-photo-cover .hero-description { margin-top: .65rem; font-size: .84rem; }
  .hero-photo-cover .hero-actions { margin-top: .75rem; }
  #tab-inicio .hero-photo-cover .hero-primary-cta,
  #tab-inicio .hero-photo-cover .hero-secondary-cta { min-height: 46px; }
  .hero-photo-cover .hero-reassurance { margin-top: .55rem !important; }
}

@media (orientation: landscape) and (max-height: 560px) {
  #tab-inicio > section.todaps-hero-lab.hero-photo-cover:first-child,
  .hero-photo-cover .hero-minimal-shell {
    min-height: calc(100svh - 72px) !important;
  }

  .hero-photo-cover .hero-minimal-shell {
    padding: 32px 2rem calc(5.25rem + env(safe-area-inset-bottom));
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, .95fr) !important;
    align-items: start;
  }

  .hero-photo-cover .hero-title,
  html.dark .hero-photo-cover .hero-title {
    font-size: clamp(2.05rem, 4.25vw, 2.3rem) !important;
    line-height: .9 !important;
  }
  .hero-photo-cover .hero-eyebrow,
  .hero-photo-cover .hero-reassurance { display: none !important; }
  .hero-photo-cover .hero-description { margin-top: .5rem; font-size: .75rem; line-height: 1.3; }
  .hero-photo-cover .hero-actions { margin-top: .6rem; }
  #tab-inicio .hero-photo-cover .hero-primary-cta,
  #tab-inicio .hero-photo-cover .hero-secondary-cta {
    min-height: 42px;
    padding: .5rem .6rem !important;
    font-size: .72rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo-media img { animation: none !important; transform: none !important; }
}
