:root{
  --scale-start: 92.6;
  --scale-end:   1;
  --progress: 0;
  --scale: calc(var(--scale-start) - (var(--scale-start) - var(--scale-end)) * var(--progress));
  --logo-y: 25%;
  --white-alpha: 0;
  --bg-alpha: 1;
  --logo-end-w: 40vw;

  /* Animaciones del menú */
  --overlay-fade-ms: 360ms;
  --panel-slide-ms:  360ms;
  --panel-ease: cubic-bezier(.22,.61,.36,1);
}


.gantari-<uniquifier> {
  font-family: "Gantari", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}

*{ box-sizing:border-box }
html, body { height:100%;}
html { scroll-behavior: smooth; }
body { margin:0; background:#000; color:#fff; font-family:"Gantari", sans-serif;font-size:25px;font-weight:500;line-height:30px; }
h1{font-size: 90px;line-height: 90px;font-weight: 900;}
h2{font-size: 60px;line-height: 60px;font-weight: 900;}
.acentoverde{color:#009589!important;}
.fondoverde{background-color:#009589!important;border-radius: 5px;padding-left: 5px;padding-right: 5px;}
.acentomorado{color:#7d257e!important;}
.fondomorado{background-color:#7d257e!important;border-radius: 5px;padding-left: 5px;padding-right: 5px;}
.nota{font-size: 15px;margin-top: 5px;}

/* ===== HERO / MÁSCARA ===== */
.hero { height: 200vh; }
.hero__sticky {
  position: sticky; top: 0; height: 100vh;
  overflow: clip; isolation: isolate;
  background: linear-gradient(180deg, rgba(0,149,137,1) 0%, rgba(10,10,10,1) 100%);
}
.hero__layer{ position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.maskCommon{
  -webkit-mask-image: url("img/logo-mask.svg");
  mask-image: url("img/logo-mask.svg");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center var(--logo-y); mask-position: center var(--logo-y);
  mask-mode: alpha;
  -webkit-mask-size: calc(var(--logo-end-w) * var(--scale)) auto;
  mask-size:         calc(var(--logo-end-w) * var(--scale)) auto;
}
.hero__bgMasked{ background: url("img/hero.jpg") center / cover no-repeat fixed; opacity: var(--bg-alpha); }
.hero__whiteLogo{ background: #fff; opacity: calc(var(--white-alpha) * var(--bg-alpha)); }

/* ===== TOP BAR: LOGO IZQ + HAMBURGUESA DER ===== */
.topbar{
  position: fixed; inset: 0 0 auto 0; height: 0; z-index: 10; pointer-events: none;
}
.brand, .hambWrap{ position: absolute; top: .75rem; pointer-events: auto; }
.brand{ left: 1.75rem; display: flex; align-items: center; gap: .5rem; }
.brand a{ display:inline-flex; align-items:center; text-decoration:none; color:inherit }
/* Logo fijo usando el SVG como máscara para que siempre sea blanco */
.brandLogo{
  width: clamp(120px, 20vw, 200px);
  height: clamp(28px, 8vw, 55px);
  background: #fff;
  -webkit-mask: url("img/logo-mask.svg") center / contain no-repeat;
  mask: url("img/logo-mask.svg") center / contain no-repeat;
  image-rendering: -webkit-optimize-contrast;
}

.hambWrap{ right: 1.75rem; }
.hamburger{
  appearance: none; border: 0; background: rgba(255,255,255,0.08);
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(6px);
}
.hamburger:focus-visible{ outline: 2px solid #fff }
.hamburger svg{ width: 22px; height: 22px }

/* ===== OVERLAY MENÚ A PANTALLA COMPLETA (con FADE) ===== */
.menuOverlay{
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: stretch;
  background: rgba(0,0,0,.9);
  opacity: 0; visibility: hidden;
  transition:
    opacity var(--overlay-fade-ms) var(--panel-ease),
    visibility 0s linear var(--overlay-fade-ms);
}
.menuOverlay.is-open{
  opacity: 1; visibility: visible;
  transition:
    opacity var(--overlay-fade-ms) var(--panel-ease),
    visibility 0s;
}

.menuGrid{
  display: grid; grid-template-columns: 1fr 1fr; height: 100%;
}
.menuPreview, .menuPanel{
  opacity: 0;
  transform: translateY(8px) scale(.995);
  transition:
    opacity var(--panel-slide-ms) var(--panel-ease),
    transform var(--panel-slide-ms) var(--panel-ease);
}
.menuOverlay.is-open .menuPreview,
.menuOverlay.is-open .menuPanel{
  opacity: 1;
  transform: none;
}

/* Columna izquierda: preview */
.menuPreview{
  position: relative;
  background: #111 center / cover no-repeat;
}
.menuPreview::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.25) 100%);
  pointer-events: none;
}
/* Columna derecha: links */
.menuPanel{
  display: flex; flex-direction: column; justify-content: center; gap: 0.5rem;
  padding: clamp(1rem, 5vw, 3rem);
  background: #0a0a0a;
}
.menuTitle{
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  letter-spacing: .08em; text-transform: uppercase;
  opacity:.7; margin: 0 0 .5rem;
}
.menuList{ list-style: none; padding: 0; margin: 0; }
.menuItem + .menuItem{ margin-top: .25rem; }
.menuLink{
  text-align: left;
  display: block; width: 100%;
  text-decoration: none; color: #fff;
  font-size: clamp(1.1rem, 1.5vw, 2.0rem);
  line-height: 1.05; font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
  padding: .25rem .5rem; border-radius: .6rem;
}
.menuLink:hover, .menuLink:focus-visible{
  background: rgba(255,255,255,0.08);
  outline: none;
}

/* Botón cerrar con fade de apoyo */
.menuClose{
  position: absolute; top: .75rem; right: .75rem;
  appearance: none; border: 0; background: rgba(255,255,255,.08);
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer;
  opacity:.9; transition: opacity 180ms ease;
}
.menuClose:hover{ opacity:1 }
.menuClose:focus-visible{ outline: 2px solid #fff }



/* ===== CONTENIDO ===== */
.content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background-image:
    url("img/mega4.webp"),
    linear-gradient(180deg, rgba(10,10,10,1) 0%, rgba(124,36,125,1) 100%);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}
.content__inner { max-width: 80ch; text-align: center; }

/* Días */
section.anchor{
  min-height: 70vh; display:grid; place-items:center; padding: 3rem 1rem;
}

@media (prefers-reduced-motion: reduce){
  .hero__bgMasked, .hero__whiteLogo{ transition: none; }
  .menuOverlay, .menuPreview, .menuPanel, .menuClose{ transition: none !important; }
}


/* ===== GLOBAL NOISE OVERLAY (ajustable) ===== */
:root{
  --noise-opacity: .9;       /* Intensidad del grano (0..1) */
  --noise-size: 280px;        /* Tamaño del tile del ruido */
  --noise-blend: soft-light;  /* overlay | soft-light | multiply | screen */
}
body::after{
  content:"";
  position: fixed; inset: 0;
  z-index: 99999;             /* por encima de todo (no bloquea clics) */
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: var(--noise-size) var(--noise-size);
  background-repeat: repeat;
  mix-blend-mode: var(--noise-blend);
  opacity: var(--noise-opacity);
}
/* Opcional: animación sutil tipo “film grain” */
@keyframes noiseJitter { 
  0%, 100% { transform: translate3d(0,0,0) }
  25% { transform: translate3d(.4px,-.2px,0) }
  50% { transform: translate3d(-.3px,.3px,0) }
  75% { transform: translate3d(.2px,.2px,0) }
}
body.noise-animate::after{
  animation: noiseJitter 1400ms steps(5) infinite;
}
@media (prefers-reduced-motion: reduce){
  body.noise-animate::after{ animation: none; }
}

/* === Zoom on hover para la imagen de inicio === */
.zoomable{
  cursor: zoom-in;
  transition: transform 320ms var(--panel-ease), box-shadow 320ms var(--panel-ease);
  will-change: transform;
}
.zoomable:hover{
  transform: scale(1.09);
}





/* ===== MODAL CON FONDO DESENFOCADO (imagen clickeada) ===== */
.imgModal{
  position: fixed; inset: 0;
  z-index: 100010;  /* por encima del overlay de ruido */
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}
.imgModal.is-open{
  opacity: 1; visibility: visible;
  pointer-events: auto;
  transition: opacity 260ms ease, visibility 0s;
}
.imgModal__backdrop{
  position: absolute; inset: 0;
  background: center / cover no-repeat;
  filter: blur(14px) brightness(.55);
  transform: scale(1.04);
  opacity: 0; transition: opacity 260ms ease;
}
.imgModal.is-open .imgModal__backdrop{ opacity: 1; }

.imgModal__scroll{
  position: absolute; inset: 0;
  overflow: auto;
  display: grid; place-items: center;
  padding: clamp(16px, 3vw, 36px);
}
.imgModal__content{
  position: relative;
  width: min(1100px, 96vw);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  padding: clamp(10px, 1.2vw, 14px);
}
.imgModal__close{
  position: absolute; top: 8px; right: 8px;
  line-height: 1; width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  z-index: 2;
}

/* Imagen clon para animación "crecer a pantalla completa" */
.zoomClone{
  position: fixed; left: 0; top: 0;
  transform-origin: center center;
  z-index: 100011;
  box-shadow: 10px 10px 20px rgba(0,0,0,.5);
  border-radius: 20px;
  transition: transform 420ms cubic-bezier(.22,.61,.36,1), opacity 420ms ease;
  will-change: transform;
}

/* Reduce motion: evitar animación de zoom */
@media (prefers-reduced-motion: reduce){
  .zoomClone{ transition: none !important; }
}

body.modal-open-body-lock{ overflow: hidden; }


/* ===== Mejoras: Fade-in + Bounce del contenido, y botón X fijo en el borde ===== */
@keyframes contentPop {
  0%   { transform: scale(0.985); }
  80%  { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.imgModal__content{
  opacity: 0;
  transform: translateY(6px) scale(0.985);
}
.imgModal.is-open .imgModal__content{
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 340ms ease, transform 340ms ease;
  transition-delay: 240ms; /* empieza cuando el zoom casi termina */
  animation: contentPop 420ms cubic-bezier(.22,.61,.36,1) 220ms both;
}

.imgModal__close{
  position: fixed !important;
  top: clamp(14px, 2.4vw, 26px);
  right: clamp(14px, 2.4vw, 26px);
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 28px; line-height: 1;
  z-index: 100012;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.imgModal__close:hover{
  background: rgba(255,255,255,.95);
}

.texto-responsivo {
    width: 100%;
    margin: 0 auto;           /* centra en horizontal */
  }
  @media (min-width: 768px) {
    .texto-responsivo { width: 50%; }
  }

 button{
  border-style: solid;
  border-width: 1px;
  border-color: white;
  background-color: transparent;
  border-radius: 10px;
  color: white;
  margin-top: 20px;
  padding: 5px 15px;
 } 
 .con-overlay {
    position: relative;
    overflow: hidden;
  }

  .con-overlay .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9); /* negro 80% */
    z-index: 10;
    pointer-events: all; /* bloquea clics */
  }

  .con-overlay .container {
    position: relative;
    z-index: 5; /* contenido debajo */
  }
  .semblanza{
    font-size: 15px;
    line-height: 17px;
    font-weight: 100;
  }
  .cambio{
    background: linear-gradient(90deg,orange,yellow,orangered);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 100%;
    animation: color-shift 2s ease-in-out infinite;
  }
  .cambio2{
    background: linear-gradient(135deg, #002459, #69004d, #362a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 100%;
    animation: color-shift 2s ease-in-out infinite;
  }
  @keyframes color-shift {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

  .circle-top{
    /* tamaño del círculo */
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
  }
  .circle-top img{
    width: 130%;
    height: 130%;
    object-fit: cover;        /* llena el círculo */
    object-position: top;     /* muestra la parte superior */
    display: block;
  }


  /* Contenedor y centrado */
  .layered{
    display: grid;            /* apila capas */
    place-items: center;      /* centra vertical y horizontal */
    width: min(900px, 100%);  /* opcional: tamaño máximo */
    position: relative;
  }
  .layered > *{ grid-area: 1 / 1; }  /* todas las capas se superponen */

  /* Capa 1: imagen de fondo */
  .bg-img{
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  /* Capa 2: overlay negro con transparencia */
  .scrim{
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.0);  /* ajusta la opacidad a tu gusto */
    pointer-events: none;
    border-radius: 20px;
    z-index: 1;
  }

  /* Capa 3: SVG centrado */
  .top-svg{
    width: clamp(64px, 13%, 220px);  /* tamaño responsivo */
    height: auto;
    z-index: 2;
    pointer-events: none;   
                     /* por encima del scrim */
    /* Si NO quieres que se pueda clickear el SVG, usa: pointer-events:none; */
  }



  @media (max-width: 720px){
  .menuGrid{ grid-template-columns: 1fr 1fr; }
  .menuLink{ font-size: clamp(1.1rem, 7vw, 2.2rem); }
  h1{
    font-size: 56px;
line-height: 50px;
  }
  .overlay h2{
  margin-top: 50px;
  font-size: 28px;
line-height: 28px;
font-weight: 500;
}
}

.overlay h2{
  margin-top: 50px;
  font-weight: 500;
}

.descargables-slider{
  margin-bottom: 50px;
}
/* Carrusel de descargables */
.descargables-slider .desc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: inherit;
  user-select: none;

}

.descargables-slider .desc-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,.5);
  transition: transform .25s ease, box-shadow .25s ease;
  border-style: solid;
  border-color: white;
}

.descargables-slider .desc-item:hover img {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
}

.descargables-slider .desc-item span {
  font-size: .85rem;
  text-align: center;
  opacity: .85;
}

.social-icons a {
  display:inline-block;
  margin: 0 .5rem;
}
.social-icons i {
  font-size: 20px;          /* o usa fa-2x en cada <i> */
  color: white;
  transition: transform .2s ease, opacity .2s ease;
}
.social-icons a {
  color: white!important;
  text-decoration: none!important;
  font-size: 20px;
  text-align: center;
}
.social-icons i:hover { transform: translateY(-1px); opacity:.85; }

.flecha{
  border-width: 2px!important;
  font-size: 20px;
font-weight: 900;
background-color: white;
}

/* --- iOS Safari: fix de zoom en fondos enmascarados --- */
@supports (-webkit-touch-callout: none) {
  .hero__sticky { 
    /* ayuda a evitar reproyecciones raras en iOS */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Las capas dejan de ser fixed y pasan a absolute
     para que se posicionen respecto al contenedor sticky */
  .hero__layer { 
    position: absolute !important; 
    inset: 0; 
  }

  /* Quitamos el attachment: fixed que dispara el bug */
  .hero__bgMasked{
    background-attachment: scroll !important;
    background-position: center center !important;
    background-size: cover !important;
  }
}





