/* ==============
   Layout global
   ============== */

.hero{
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-black{
  background: #000 !important;
}

/* Video */
.hero__video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

/* Overlay */
.hero__overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}

/* Topbar */
.hero__topbar{
  position: fixed;
  top: 2rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 3;
  pointer-events: auto;
  box-sizing: border-box;
}

.hero__logo-link{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.hero__logo{
  display: block;
  max-width: 170px;
  height: auto;
}

/* Título */
.hero__title{
  position: absolute;
  left: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1.25rem, 10vh, 5rem);
  margin: 0;
  font-family: "Averia Serif Libre", serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: .95;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
  z-index: 2;
  pointer-events: auto;
}

/* Acciones */
.hero__actions{
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}


.hero__actions .btn{
  margin: 0;
  white-space: nowrap;
}

/* Botón contacto */
.hero__contact{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  white-space: nowrap;
  line-height: 1;
  flex: 1 1 auto;
}
.hero__whatsapp-icon{
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  filter: invert(1);
}

/* Responsivo general */
@media (max-width: 1024px){
  .hero__topbar{
    top: 1.5rem;
    left: 1rem;
    right: 1rem;
    gap: .75rem;
  }

  .hero__logo{
    max-width: 140px;
  }

  .hero__actions{
    gap: .75rem;
  }

  .hero__actions .btn{
    padding: .75rem 1rem;
    font-size: .95rem;
  }
}

@media (max-width: 900px){
  .hero__title{
    bottom: clamp(6rem, 18vh, 9rem);
    font-size: clamp(2rem, 9vw, 3.8rem);
  }

  .hero__side-ctas{
    right: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 768px){
  .hero__topbar{
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .75rem;
  }

  .hero__logo-link{
    width: 100%;
  }

  .hero__logo{
    max-width: 110px;
  }

  .hero__actions{
    width: 100%;
    justify-content: space-between;
    gap: .75rem;
  }

  .hero__actions .btn{
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: .8rem .9rem;
    font-size: .95rem;
    justify-content: center;
  }

  .hero__title--raised{
    transform: none;
  }
}

@media (max-width: 520px){
  .hero__title{
    left: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px){
  .hero__logo{
    max-width: 92px;
  }

  .hero__actions{
    gap: .5rem;
  }

  .hero__actions .btn{
    padding: .72rem .7rem;
    font-size: .875rem;
    align-items: center;
    justify-content: center;
  }

  .hero__contact{
    gap: .35rem;
  }

  .hero__whatsapp-icon{
    width: 16px;
    height: 16px;
  }
}

/* Subir el título */
.hero__title--raised{
  transform: translateY(-10vh);
  will-change: transform;
}

@media (max-height: 900px){
  .hero__title--raised{
    transform: translateY(-36vh);
  }
}

@media (max-height: 820px){
  .hero__title--raised{
    transform: translateY(-30vh);
  }
}

@media (max-height: 760px){
  .hero__title--raised{
    transform: translateY(-36vh);
  }
}

/* ===== Closing Hero Section ===== */
.closing-hero{
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--closing-hero) no-repeat center bottom;
  background-size: cover;
  display: flex;
  justify-content: flex-start;
  padding: 2rem;
}

.closing-hero__overlay{
  color: #fff;
  max-width: 90%;
}

.closing-hero__overlay h2{
  font-family: "Averia Serif Libre", serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.2;
  margin: 0;
}

.closing-hero__overlay span{
  display: block;
}

@media (max-width: 768px){
  .closing-hero{
    min-height: 70vh;
    justify-content: center;
    text-align: center;
  }

  .closing-hero__overlay h2{
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

/* ===== Hero Historia ===== */
.hero--historia{
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero--historia .hero__title,
.hero--historia .hero__inner{
  position: relative;
  z-index: 2;
}

.hero--historia .hero__inner{
  width: 100%;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.hero--historia .hero__title{
  margin: 0;
  color: #fff;
  font-family: "Averia Serif Libre", serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(2.5rem, 8vw, 8.75rem);
  line-height: clamp(2.2rem, 6.5vw, 6.875rem);
  letter-spacing: -0.03em;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
  vertical-align: bottom;
}

@media (max-width: 900px){
  .hero--historia{
    min-height: 80vh;
  }
}
/* ===== Footer look & feel ===== */
.site-footer{
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  padding: 14px 18px;
  width: 100%;
  min-height: 70px;
  margin: 24px 0 0;
}
.footer__wrap{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.footer__brand{
  display: inline-flex;
  align-items: center;
}

.footer__brand img{
  display: block;
  width: 68px;
  height: auto;
}

.footer__nav{
  min-width: 0;
}

.footer__menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px 36px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.footer__menu li{
  margin: 0;
}

.footer__menu a{
  text-decoration: none;
  font: 500 .92rem "Plus Jakarta Sans", sans-serif;
  color: #93a2a7;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.footer__menu a:hover{
  text-decoration: underline;
  color: #6e7d82;
}

.to-top{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,.7);
  color: #8aa0a6;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  flex: 0 0 auto;
}

.to-top:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.95);
  color: #0e3445;
}

/* Tablet */
@media (max-width: 900px){
  .site-footer{
    padding: 14px 16px;
    width: min(100% - 20px, 1200px);
  }

  .footer__wrap{
    grid-template-columns: auto 1fr;
    gap: 14px 12px;
  }

  .to-top{
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .footer__nav{
    grid-column: 1 / -1;
  }

  .footer__menu{
    justify-content: flex-start;
    gap: 12px 20px;
  }
}

/* Mobile */
@media (max-width: 640px){
  .site-footer{
    padding: 16px 14px;
    width: calc(100% - 16px);
    margin: 16px auto;
    border-radius: 10px;
  }

  .footer__wrap{
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 12px;
  }

  .footer__brand img{
    width: 60px;
  }

  .footer__nav{
    grid-column: 1 / -1;
  }

  .footer__menu{
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
  }

  .footer__menu a{
    font-size: .95rem;
    line-height: 1.3;
  }

  .to-top{
    width: 36px;
    height: 36px;
    justify-self: end;
  }
}