/* La portada y los pilares forman un único escenario; la app conserva sus estilos. */
.opening-composition {
  position: relative;
  isolation: isolate;
  background: linear-gradient(0deg, #101112, transparent 110px),
    linear-gradient(90deg, rgba(6,7,8,.94), rgba(6,7,8,.72) 44%, rgba(6,7,8,.22)),
    linear-gradient(0deg, #101112, transparent 25%),
    url('assets/fondo-gimnasio.webp') 70% center / cover no-repeat;
}
.site-header {
  position: fixed; height: 106px; border: 0; background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background .18s ease;
}
.site-header.is-scrolled { background: rgba(9,10,10,.94); }
.site-header .nav-inner { justify-content: space-between; }
.site-header .brand img { width: 142px; height: 142px; margin-left: -14px; }
.site-header .brand strong, .site-header .header-cta { display: none; }
.site-header .menu-toggle { display: block; margin: 0; border: 0; border-radius: 0; width: 46px; height: 44px; padding: 6px; }
.site-header .menu-toggle span { width: 100%; height: 2px; margin: 7px 0; }
.site-header .site-nav {
  position: absolute; top: 100%; left: auto; right: max(var(--pad), calc((100% - var(--max)) / 2));
  display: none; width: min(340px, calc(100% - 2 * var(--pad)));
  max-height: calc(100dvh - 110px); overflow-y: auto;
  background: #111213; padding: 26px; flex-direction: column; gap: 24px;
  border: 1px solid #ffffff29;
}
.site-header .site-nav.is-open { display: flex; }
.site-header .site-nav a { font-size: 15px; }
.site-header .site-nav .mobile-link { display: block; color: var(--yellow); }
#inicio { min-height: 0; padding: 146px 0 0; display: block; overflow: visible; }
#inicio::after { display: none; }
/* Fotografía original: capa de fondo continua, sin alterar la cuadrícula. */
.opening-composition::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--photo-selectors-bottom) + 100px);
  z-index: -1;
  pointer-events: none;
  background-color: #090a0a;
  background-image:
    linear-gradient(90deg, #090a0a 22%, rgba(9,10,10,.96) 43%, rgba(9,10,10,.45) 62%, transparent 78%),
    url('assets/portada-entrenador.webp');
  background-size: 100% 100%, auto var(--photo-rendered-height);
  background-position: center, right top;
  background-repeat: no-repeat;
  /* La foto permanece visible hasta los selectores y se funde después. */
  mask-image: linear-gradient(to bottom,
    #000 var(--photo-selectors-bottom),
    rgba(0,0,0,.94) calc(var(--photo-selectors-bottom) + 15px),
    rgba(0,0,0,.72) calc(var(--photo-selectors-bottom) + 35px),
    rgba(0,0,0,.35) calc(var(--photo-selectors-bottom) + 60px),
    rgba(0,0,0,.08) calc(var(--photo-selectors-bottom) + 85px), transparent);
}
#inicio .hero-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: auto auto; column-gap: 64px; row-gap: 28px; align-items: stretch;
}
#inicio .hero-copy { grid-column: 1; grid-row: 1; width: 100%; max-width: none; }
#inicio h1 {
  font-family: 'Manrope', sans-serif; font-size: clamp(45px, 5.26vw, 74px); font-weight: 800;
  font-style: italic; line-height: 1.01; letter-spacing: -.065em; margin: 0 0 20px;
}
#inicio h1 em { font-style: inherit; }
#inicio .hero-copy p { max-width: 490px; font-size: 18px; line-height: 1.5; margin: 0; color: #d0d0ce; }
#inicio .hero-description p + p { margin-top: 10px; }
#inicio .hero-portrait-region {
  position: relative; inset: auto; grid-column: 2; grid-row: 1 / 3;
  width: 100%; height: auto; min-width: 0; z-index: 1;
}
#inicio .hero-real-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; mask-image: none; }
#inicio .hero-actions { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; flex-wrap: nowrap; width: 100%; max-width: none; gap: 12px; }
#inicio .hero-actions .btn {
  width: 100%; min-width: 0; max-width: none; min-height: 56px; padding: 14px 22px;
  border-radius: 24px; font-size: 15px; letter-spacing: 0; justify-content: center; gap: 22px;
}
#inicio .hero-actions .btn:hover { transform: none; }
#inicio .hero-actions .btn-ghost { border: 1.5px solid #b7b7b4; background: transparent; }
#pilares { padding: 70px 0 28px; }
#pilares .section-title { text-align: center; font-style: italic; font-size: clamp(24px, 2.5vw, 36px); letter-spacing: -.055em; max-width: none; margin: 0 0 12px; }
#pilares .section-title em { font-style: inherit; }
#pilares .pillar-tabs { max-width: none; }
#pilares .pillar-tab { min-width: 0; min-height: 67px; font-size: 17px; gap: 15px; flex-direction: row; }
#pilares .pillar-tab svg { width: 30px; height: 30px; }
#pilares .pillar-tab.active { border-radius: 0; }
#pilares .pillar-panels { max-width: 830px; min-height: 0; padding-top: 22px; }
#pilares .pillar-panel { animation: none; }
#pilares .pillar-panel p { font-size: 16px; line-height: 1.65; }
@media (max-width: 600px) {
  .site-header { height: 82px; }
  .site-header .brand img { width: 110px; height: 110px; margin-left: -12px; }
  .site-header .menu-toggle { width: 38px; height: 42px; }
  .opening-composition { background-position: center, center, center, 72% center; }
  #inicio { padding: 110px 0 0; }
  .opening-composition::before {
    background-image:
      /* Separación localizada detrás del menú, sin desplazar ni recortar el rostro. */
      radial-gradient(ellipse 65px 46px at calc(100% - var(--pad) - 19px) 32px,
        rgba(9,10,10,.92), rgba(9,10,10,.65) 35%, transparent 100%),
      /* El degradado acompaña a la foto para conservar la luz sobre cara y torso. */
      linear-gradient(90deg, rgba(9,10,10,.97), rgba(9,10,10,.93) calc(48% - 30px), rgba(9,10,10,.84) calc(68% - 30px), rgba(9,10,10,.06) calc(83% - 30px), transparent calc(100% - 30px)),
      url('assets/portada-entrenador.webp');
    background-size: 100% 100%, 100% 100%, auto var(--photo-rendered-height);
    /* Mismo tamaño: reducir el desbordamiento derecho mueve la figura 30px a la izquierda. */
    background-position: center, center, right -25px top;
  }
  /* Continuación ambiental autorizada: recorte inferior, sin alterar la figura. */
  .opening-composition::after {
    content: '';
    position: absolute;
    top: calc(var(--photo-rendered-height) - 60px);
    left: 0;
    right: 0;
    height: calc(var(--photo-selectors-bottom) + 160px - var(--photo-rendered-height));
    z-index: -1;
    pointer-events: none;
    background-image:
      linear-gradient(90deg, rgba(9,10,10,.97), rgba(9,10,10,.93) calc(48% - 30px), rgba(9,10,10,.84) calc(68% - 30px), rgba(9,10,10,.4)),
      url('assets/portada-entrenador.webp');
    background-size: 100% 100%, auto var(--photo-rendered-height);
    background-position: center, right -25px bottom;
    background-repeat: no-repeat;
    filter: blur(7px);
    mask-image: linear-gradient(to bottom, transparent, #000 60px,
      #000 calc(100% - 100px), rgba(0,0,0,.72) calc(100% - 65px),
      rgba(0,0,0,.35) calc(100% - 40px), transparent);
  }
  #inicio .hero-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); column-gap: 12px; row-gap: 23px; }
  #inicio h1 { font-size: clamp(31.4px, 8.4vw, 37px); line-height: 1.04; letter-spacing: -.065em; margin: 0 0 16px; }
  #inicio .hero-copy p { font-size: 14px; line-height: 1.55; max-width: none; }
  #inicio .hero-portrait-region { grid-row: 1; }
  #inicio .hero-actions { grid-column: 1 / -1; grid-row: 2; gap: 10px; }
  #inicio .hero-actions .btn { font-size: 12px; min-height: 48px; padding: 12px 14px; gap: 13px; border-radius: 21px; }
  #pilares { padding: 56px 0 20px; }
  #pilares .section-title { font-size: clamp(19px, 5.2vw, 23px); line-height: 1.12; max-width: none; margin: 0 0 12px; }
  #pilares .pillar-tab { font-size: 11px; gap: 6px; min-height: 58px; padding: 10px 0; }
  #pilares .pillar-tab svg { width: 21px; height: 21px; }
  #pilares .pillar-panels { min-height: 0; padding-top: 16px; }
  #pilares .pillar-panel p { font-size: 14px; line-height: 1.65; }
}
