/* Bergil 1.6: refinamiento móvil y movimiento premium. */

html { overflow-x: hidden; }

.site-header { background: #03060d; }

.site-logo,
.site-logo__default {
  position: relative;
  width: 210px;
  height: 70px;
  overflow: hidden;
}

.site-logo img,
.site-logo__default img {
  position: absolute;
  top: -39px;
  left: -16px;
  width: 272px !important;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: initial;
}

.footer-logo-frame {
  position: relative;
  display: block;
  width: 210px;
  height: 76px;
  margin-bottom: .8rem;
  overflow: hidden;
}

.site-footer .footer-logo-frame img {
  position: absolute;
  top: -39px;
  left: -16px;
  width: 272px;
  max-width: none;
  max-height: none;
  margin: 0;
}

.reveal {
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}

.btn,
.project-card__link,
.text-link,
.nav-main a {
  transition-timing-function: cubic-bezier(.16,1,.3,1);
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform: translateZ(0);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: currentColor;
  opacity: .08;
  transform: translateX(-105%);
  transition: transform .55s cubic-bezier(.16,1,.3,1);
}

.btn:hover::before { transform: none; }

.btn:active,
.nav-toggle:active,
.wa-float:active { transform: scale(.98); }

.project-card__media img,
.destination-row__media img,
.gallery img {
  transition: transform 1.1s cubic-bezier(.16,1,.3,1), filter .8s ease;
}

.project-card:hover .project-card__media img,
.gallery a:hover img {
  transform: scale(1.035);
  filter: saturate(1.05);
}

.rule-gold::after {
  transform-origin: left center;
  animation: bergil-rule-draw 1.1s .35s cubic-bezier(.16,1,.3,1) both;
}

@keyframes bergil-rule-draw {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

.universe-section--premium .universe__sun {
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.universe-section--premium .universe__sun img {
  width: 360px;
  max-width: none;
  height: auto;
}

.universe-section--premium .universe__sun::before {
  inset: -8px;
  border-style: solid dashed;
  border-color: rgba(201,154,82,.5);
}

.universe-section--premium .universe__glow {
  inset: -12%;
  background: radial-gradient(circle, rgba(201,154,82,.25), rgba(201,154,82,0) 68%);
}

@media (max-width: 900px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 1rem;
    min-height: 78px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .site-logo,
  .site-logo__default {
    width: 150px;
    height: 55px;
  }

  .site-logo img,
  .site-logo__default img {
    top: -28px;
    left: -12px;
    width: 195px !important;
  }

  .header-phone { display: none; }

  .nav-main {
    grid-column: 1 / -1;
    width: auto;
    margin: 0 -20px;
    background: #03060d;
  }

  .nav-main.is-open {
    animation: bergil-menu-open .45s cubic-bezier(.16,1,.3,1) both;
  }

  @keyframes bergil-menu-open {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 780px) {
  .universe-section--premium .universe,
  .post-type-archive-proyecto .universe-section--premium .universe {
    display: block;
    width: 100%;
    min-height: 540px;
    margin-top: 2.3rem;
    aspect-ratio: auto;
  }

  .universe-section--premium .universe__list { display: none; }

  .universe-section--premium .universe__planet { width: 72px; }

  .universe-section--premium .universe__planet-body {
    width: 60px;
    height: 60px;
  }

  .universe-section--premium .universe__planet-label {
    margin-top: .35rem;
    font-size: .56rem;
    line-height: 1.2;
  }

  .universe-section--premium .universe__planet-label em { font-size: .5rem; }

  .universe-section--premium .universe__sun {
    width: 132px;
    height: 132px;
  }

  .universe-section--premium .universe__sun img { width: 275px; }
  .universe-section--premium .universe__ring--1 { width: 170px; height: 170px; }
  .universe-section--premium .universe__ring--2 { width: 245px; height: 245px; }
  .universe-section--premium .universe__ring--3 { width: 330px; height: 330px; }
}

@media (max-width: 640px) {
  .page-hero {
    min-height: calc(100svh - 78px);
    display: flex;
    align-items: flex-end;
  }

  .page-hero__veil {
    background: linear-gradient(to top, rgba(3,21,38,.88), rgba(3,21,38,.24) 74%);
  }

  .page-hero__body {
    width: 100%;
    padding: 4rem 20px 4.8rem;
  }

  .page-hero h1,
  .destinations-hero h1 {
    max-width: 10ch;
    font-size: clamp(2.65rem, 13vw, 3.5rem);
    line-height: .98;
  }

  .page-hero__text,
  .destinations-hero__text {
    max-width: 30ch;
    margin-top: 1.5rem;
    font-size: .94rem;
    line-height: 1.65;
  }

  .page-hero .btn-row { margin-top: 1.7rem; }

  .page-hero .btn,
  .destination-cta .btn,
  .advisor__body .btn {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
  }

  .grid,
  .advisors,
  .compare__pickers { grid-template-columns: minmax(0, 1fr); }

  .advisor__media { aspect-ratio: 4 / 5.15; }
  .advisor__media img { object-position: center 12%; }

  .destination-row__body {
    min-height: 0;
    padding: 3.2rem 20px 3.6rem;
  }

  .destination-row__body h2 { font-size: clamp(2.55rem, 12vw, 3.6rem); }

  .team-editorial img {
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }

  .wa-float {
    right: 10px;
    bottom: 10px;
    padding: .65rem .78rem;
    font-size: .56rem;
  }
}

@media (max-width: 390px) {
  .universe-section--premium .universe { min-height: 500px; }

  .universe__detail-card {
    min-height: 132px;
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header,
  .rule-gold::after,
  .nav-main.is-open {
    animation: none;
  }
}
