/* Inicio: foto, barra "Diseñamos … para …" y ventana de opciones */

.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #f4f4f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media,
.hero-media-next {
  position: absolute;
  inset: var(--header-h) 0 0;
  background-size: cover;
  background-position: center;
  transition: opacity .76s ease,transform 5s linear;
}

.hero::after {
  content: "";
  position: absolute;
  inset: var(--header-h) 0 0;
  background: linear-gradient(to bottom,rgba(255,255,255,.08),rgba(0,0,0,.20));
  pointer-events: none;
}

.hero.intro {
  background: #fff;
}

.hero.intro .hero-media,
.hero.intro .hero-media-next {
  opacity: 0 !important;
}

.hero.intro::after {
  opacity: 0;
}

.hero-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--esperanza-footer-h,46px) + 18px);
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 7px;
  background: rgba(235,235,235,.93);
  backdrop-filter: blur(18px);
  font-size: 22px;
  white-space: nowrap;
  box-shadow: 0 2px 14px rgba(0,0,0,.08);
  transition: bottom .9s cubic-bezier(.22,.75,.18,1),background .35s ease,box-shadow .35s ease;
  overflow: hidden;
}

.hero-bar.intro-center {
  bottom: calc(50vh - 32px);
}

.selector {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 500;
  font-size: 22px;
}

.selector::after {
  content: "⌄";
  margin-left: 5px;
  font-weight: 400;
}

.fade-word {
  display: inline-block;
  transition: .25s ease;
}

.fade-word.swap {
  opacity: 0;
  transform: translateY(8px);
}

.hero-copy.show {
  opacity: 1;
}

.hero-copy strong {
  display: block;
  font-size: 20px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(15px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.overlay.open {
  display: flex;
}

.overlay-card {
  width: min(1040px,92vw);
  min-height: 520px;
  background: var(--panel);
  border-radius: 12px;
  padding: 42px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.08);
}

.close {
  position: absolute;
  top: -58px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #f3f3f3;
  font-size: 28px;
  font-weight: 300;
}

.overlay-preview {
  width: min(620px,75%);
  height: 300px;
  margin: 0 auto 34px;
  border-radius: 2px;
  overflow: hidden;
  background: #ddd;
}

.overlay-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chip {
  border: 0;
  border-radius: 5px;
  padding: 7px 10px;
  background: #d9d9d9;
  font-size: 18px;
}

.chip:hover,
.chip.active {
  background: #111;
  color: #fff;
}

.overlay-footer {
  margin-top: 38px;
  text-align: center;
  font-size: 21px;
  color: #666;
}

html[data-theme="dark"] .hero {
  background: #1a1a1a;
}

html[data-theme="dark"] .hero.intro {
  background: #111;
}

html[data-theme="dark"] .hero-bar {
  background: rgba(42,42,42,.93);
  color: #f4f4f4;
}

html[data-theme="dark"] .selector {
  color: #f4f4f4;
}

html[data-theme="dark"] .overlay {
  background: rgba(0,0,0,.68);
}

html[data-theme="dark"] .close {
  background: #333;
  color: #fff;
}

html[data-theme="dark"] .chip {
  background: #555;
  color: #fff;
}

html[data-theme="dark"] .chip:hover,
html[data-theme="dark"] .chip.active {
  background: #fff;
  color: #111;
}

@media (max-width: 800px) {
  .hero-bar {
    width: calc(100% - 24px);
    bottom: calc(28svh + env(safe-area-inset-bottom,0px));
    white-space: normal;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 19px;
    padding: 12px 16px;
  }

  .hero-bar.intro-center {
    bottom: calc(50vh - 38px);
  }

  .selector {
    font-size: 19px;
  }

  .overlay {
    padding: 12px;
  }

  .overlay-card {
    padding: 24px 14px;
    min-height: 60vh;
  }

  .overlay-preview {
    width: 100%;
    height: 220px;
  }

  .chip {
    font-size: 15px;
  }
}

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

  .selector {
    font-size: 17px;
  }
}

.hero-bar.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(140%);
}

@media (max-width: 760px) {
  #heroBar.is-shown-mobile {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) !important;
  }

  #heroBar.is-hidden-mobile {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(140%) !important;
  }
}

.hero-copy {
  position: absolute;
  z-index: 5;
  bottom: calc(var(--esperanza-footer-h,46px) + 18px);
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .5s ease;
  left: var(--esperanza-page-gutter);
}

@media (max-width: 760px) {
  .hero-copy {
    left: var(--esperanza-page-gutter-mobile) !important;
  }
}
