/* ============================================================
   BIM Forum Chile v10.1 — Animation & FX Layer
   Carga sobre v10-styles.css
   ============================================================ */

/* ── Word / Line Reveal ───────────────────────────────────── */
@keyframes wordReveal {
  from { transform: translateY(108%) skewY(3deg); opacity: 0; }
  to   { transform: translateY(0)    skewY(0);    opacity: 1; }
}
.word-reveal  { overflow: hidden; display: inline-block; }
.word-inner   { display: inline-block; animation: wordReveal .95s cubic-bezier(.16,1,.3,1) both; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.fade-up { animation: fadeSlideUp .85s cubic-bezier(.16,1,.3,1) both; }

/* ── Portada v10.1 overrides ──────────────────────────────── */
.portada__photo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: .13; transform: scale(1.05);
  transition: transform 16s ease-out;
}
.portada__photo.is-loaded { transform: scale(1); }
.portada__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.portada__overlay { position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(118deg, rgba(7,15,26,.97) 0%, rgba(7,28,60,.86) 52%, rgba(7,15,26,.78) 100%); }
.portada__shell { position: relative; z-index: 3; display: flex; flex-direction: column; flex: 1; }

/* Hex decorations animate */
.portada__hexa { z-index: 2; }
.portada__hexa.h1 { animation: hexFloat 9s ease-in-out infinite; }
.portada__hexa.h2 { animation: hexFloat 7s ease-in-out infinite; animation-delay: -3.5s; }
.portada__hexa.h3 { animation: hexFloat 11s ease-in-out infinite; animation-delay: -6s; }
@keyframes hexFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-18px) rotate(4deg); }
  66%      { transform: translateY(10px) rotate(-3deg); }
}

/* Glow dot on portada top */
.portada__top .dot { animation: dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 8px 2px rgba(85,187,235,.6)} }

/* Scroll line */
.portada__scroll::after {
  content: ''; display: block; width: 1px; height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,.4), transparent);
  animation: scrollGrow 2.2s ease-in-out infinite;
}
@keyframes scrollGrow {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 1; }
  45%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
  55%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── Hex Cursor ───────────────────────────────────────────── */
.hex-cursor {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  width: 28px; height: 32px; margin: -16px 0 0 -14px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  border: 1.5px solid rgba(1,117,201,.7);
  transition: transform .22s cubic-bezier(.16,1,.3,1), background .22s, border-color .22s;
  mix-blend-mode: screen;
}
.hex-cursor.is-link  { transform: scale(2.4) !important; background: rgba(243,146,0,.35); border-color: var(--c1); }
.hex-cursor.is-text  { transform: scale(.45) !important; background: rgba(1,117,201,.6); }
@media (hover: none) { .hex-cursor { display: none; } }

/* ── (Magnetic wrapper removed — buttons use standard hover states) ── */

/* ── Stagger delays ──────────────────────────────────────── */
.sd1 { animation-delay: .1s  !important; transition-delay: .1s  !important; }
.sd2 { animation-delay: .2s  !important; transition-delay: .2s  !important; }
.sd3 { animation-delay: .3s  !important; transition-delay: .3s  !important; }
.sd4 { animation-delay: .4s  !important; transition-delay: .4s  !important; }
.sd5 { animation-delay: .5s  !important; transition-delay: .5s  !important; }
.sd6 { animation-delay: .62s !important; transition-delay: .62s !important; }

/* ── Counter stat ────────────────────────────────────────── */
.stat .n .count { display: inline-block; }

/* ── Mosaic tiles with background images ─────────────────── */
.tile--img { background-size: cover !important; background-position: center !important; }
.tile--img::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.tile--img .label, .tile--img .plus { position: relative; z-index: 1; }

/* Each destination gets one unique, brand-true hue so the mosaic reads
   as a deliberate spectrum (cyan → blue → indigo → amber) instead of
   repeating the same overlay. All stops come from the brand palette vars. */

/* Each destination gets one unique, brand-true hue so the mosaic reads
   as a deliberate spectrum (cyan → blue → indigo → amber) instead of
   repeating the same overlay. All stops come from the brand palette vars.
   Every photo tile gets EXPLICIT white text — no inherited dark colors. */

.tile--nos.tile--img,
.tile--eventos.tile--img,
.tile--biblio.tile--img,
.tile--bs.tile--img,
.tile--prensa.tile--img,
.tile--socios.tile--img,
.tile--contacto.tile--img { color: #fff !important; }
.tile--nos.tile--img .label,
.tile--eventos.tile--img .label,
.tile--biblio.tile--img .label,
.tile--bs.tile--img .label,
.tile--prensa.tile--img .label,
.tile--socios.tile--img .label,
.tile--contacto.tile--img .label { color: #fff !important; }

.tile--nos.tile--img::before { background: linear-gradient(155deg, rgba(1,117,201,.62), rgba(11,27,44,.55)); } /* Primary Blue */

.tile--eventos.tile--img::before { background: linear-gradient(155deg, rgba(85,187,235,.55), rgba(35,139,203,.5)); } /* Vivid Cyan */

.tile--biblio.tile--img::before { background: linear-gradient(155deg, rgba(35,139,203,.58), rgba(20,42,63,.55)); } /* Teal-Blue */

.tile--socios.tile--img::before { background: radial-gradient(circle at 70% 30%, rgba(85,187,235,.55), rgba(43,154,214,.48) 45%, rgba(11,27,44,.6) 92%); } /* Community radial */

.tile--empleos.tile--img::before { background: linear-gradient(135deg, rgba(29,64,96,.6), rgba(1,117,201,.55)); } /* Azul profundo — distinto pero en familia */
.tile--empleos.tile--img { color: #fff !important; }
.tile--empleos.tile--img .label { color: #fff !important; }

.tile--contacto.tile--img::before { background: linear-gradient(155deg, rgba(20,42,63,.68), rgba(7,15,26,.66)); } /* Dark neutral */

.tile--bs.tile--img::before { background: linear-gradient(155deg, rgba(1,117,201,.6), rgba(7,15,26,.58)); } /* Indigo Navy */

.tile--prensa.tile--img::before { background: linear-gradient(155deg, rgba(43,154,214,.55), rgba(29,64,96,.5)); } /* Mid Blue */

/* ── About section image side ────────────────────────────── */
.about-img-wrap { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4/5; }
.about-img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-img-wrap::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(7,15,26,.65)); }
.about-img-badge {
  position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem; z-index: 1;
  background: rgba(7,15,26,.85); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 12px; padding: 1rem 1.25rem; color: #fff;
}
.about-img-badge strong { font-family: var(--f-d); display: block; margin-bottom: 4px; }
.about-img-badge span { font-size: .78rem; color: rgba(255,255,255,.55); }

/* ── Manifesto v10.1 ─────────────────────────────────────── */
.manifesto-v2 h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
.manifesto-v2 h2 em { -webkit-text-stroke: 2px var(--cta); -webkit-text-fill-color: transparent; font-style: normal; }
.manifesto-line { overflow: hidden; }
.manifesto-v2__eyebrow { display:flex; align-items:center; gap:.6rem; margin-bottom:1.5rem; font-family:var(--f-d); font-size:.72rem; font-weight:700; letter-spacing:.2em; text-transform:uppercase; color:var(--ink-400); }
.manifesto-v2__eyebrow::before { content:''; width:9px; height:10px; background:var(--cta); clip-path:var(--hex-pointy); flex-shrink:0; }
.manifesto-v2__mark { position:absolute; top:clamp(1rem,4vw,2.5rem); right:clamp(1rem,4vw,3rem); font-family:var(--f-d); font-size:clamp(6rem,14vw,11rem); font-weight:700; color:var(--ink-900); opacity:.035; line-height:1; pointer-events:none; user-select:none; }

/* ── Manifesto grid: text + facts card (fills the void, fixes button position) ── */
.manifesto-v2__grid { display:grid; grid-template-columns:1.4fr .85fr; gap:clamp(2.5rem,6vw,5rem); align-items:start; }
.manifesto-v2__facts { display:flex; flex-direction:column; gap:0; border:1px solid var(--ink-100); border-radius:16px; overflow:hidden; margin-top:.5rem; background:#fff; }
.manifesto-v2__fact { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; padding:1.35rem 1.5rem; border-bottom:1px solid var(--ink-100); }
.manifesto-v2__fact:last-child { border-bottom:none; }
.manifesto-v2__fact .n { font-family:var(--f-d); font-weight:700; font-size:1.6rem; color:var(--cta); letter-spacing:-.02em; }
.manifesto-v2__fact .l { font-family:var(--f-d); font-size:.72rem; letter-spacing:.06em; color:var(--ink-500); text-align:right; max-width:14ch; }
@media(max-width:860px){
  .manifesto-v2__grid { grid-template-columns:1fr; }
  .manifesto-v2__facts { flex-direction:row; margin-top:1.5rem; }
  .manifesto-v2__fact { flex:1; flex-direction:column; align-items:flex-start; gap:.4rem; border-bottom:none; border-right:1px solid var(--ink-100); }
  .manifesto-v2__fact:last-child { border-right:none; }
  .manifesto-v2__fact .l { text-align:left; max-width:none; }
}
.bsi-cta{ position:relative; overflow:hidden; background:linear-gradient(155deg, var(--navy-900) 0%, var(--navy-800) 55%, #0d2745 100%); }
.bsi-cta::before{
  content:''; position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:radial-gradient(rgba(255,255,255,.06) 1.4px, transparent 1.4px);
  background-size:26px 26px;
  -webkit-mask-image:radial-gradient(70% 90% at 50% 45%, #000 0%, transparent 75%);
  mask-image:radial-gradient(70% 90% at 50% 45%, #000 0%, transparent 75%);
}
.bsi-cta__standards{ display:flex; flex-wrap:wrap; justify-content:center; gap:.6rem; margin:1.75rem 0 0; position:relative; z-index:1; }
.bsi-cta__standard{ font-family:var(--f-d); font-weight:700; font-size:.72rem; letter-spacing:.06em; color:rgba(255,255,255,.7); background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.14); border-radius:99px; padding:.4rem .95rem; }
.bsi-cta__logo{ height:44px; width:auto; margin:0 auto 1.5rem; display:block; background:#fff; padding:.6rem 1.1rem; border-radius:10px; }

/* ── Manifiesto + Stats: unificados en el mismo fondo navy (sin salto de color) ── */
.manifesto.manifesto-v2{
  background:var(--navy-800) !important;
  padding-bottom:clamp(2rem,4vw,3rem) !important;
}
.manifesto.manifesto-v2 .manifesto-v2__eyebrow{ color:var(--c1) !important; }
.manifesto.manifesto-v2 h2{ color:#fff !important; }
.manifesto.manifesto-v2 h2 .a{ color:var(--c1) !important; }
.manifesto.manifesto-v2 h2 em{ color:var(--c1) !important; }
.manifesto.manifesto-v2 .manifesto__foot p{ color:rgba(255,255,255,.62) !important; }
.manifesto.manifesto-v2 .manifesto-v2__facts{ background:rgba(255,255,255,.05) !important; border-color:rgba(255,255,255,.12) !important; }
.manifesto.manifesto-v2 .manifesto-v2__fact{ border-bottom-color:rgba(255,255,255,.1) !important; }
.manifesto.manifesto-v2 .manifesto-v2__fact .n{ color:var(--c1) !important; }
.manifesto.manifesto-v2 .manifesto-v2__fact .l{ color:rgba(255,255,255,.55) !important; white-space:nowrap !important; font-size:.62rem !important; max-width:none !important; overflow:visible !important; }
.manifesto.manifesto-v2 .manifesto-v2__facts{ min-width:280px; }
.manifesto.manifesto-v2 .manifesto-v2__mark{ color:rgba(255,255,255,.05) !important; }
.manifesto.manifesto-v2 .btn--ghost{ border-color:rgba(255,255,255,.25) !important; color:#fff !important; }
.manifesto.manifesto-v2 .btn--ghost:hover{ border-color:var(--c1) !important; color:var(--c1) !important; }
.manifesto.manifesto-v2 + .stats-bar{ padding-top:clamp(1.5rem,3vw,2.5rem) !important; }
.manifesto.manifesto-v2 + .stats-bar::before{ content:none !important; }

/* ── Enhanced marquee ────────────────────────────────────── */
.marquee__track { animation-play-state: running; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ── Purpose card hover ──────────────────────────────────── */
.purpose-card { cursor: default; }
.purpose-card:hover .num { transform: scale(1.08) rotate(-3deg); }
.purpose-card .num { transition: transform .35s cubic-bezier(.16,1,.3,1); }

/* ── Line decoration ─────────────────────────────────────── */
.deco-line {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cta), transparent);
  margin: 0; opacity: .3;
}

/* ── Live badge pulse ────────────────────────────────────── */
@keyframes liveBadge { 0%,100%{box-shadow:0 0 0 0 rgba(243,146,0,.4)} 50%{box-shadow:0 0 0 6px rgba(243,146,0,0)} }
.util__live { animation: liveBadge 2.2s ease-out infinite !important; }

/* ── Reveal enhanced ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1); }
.reveal.is-in.sd1 { transition-delay: .1s; }
.reveal.is-in.sd2 { transition-delay: .2s; }
.reveal.is-in.sd3 { transition-delay: .32s; }

/* ── Portada side stat accent ────────────────────────────── */
@keyframes countPop { from{transform:scale(.9);opacity:0} to{transform:scale(1);opacity:1} }
.pdata { animation: countPop .6s cubic-bezier(.16,1,.3,1) both; }
.pdata:nth-child(1) { animation-delay: .2s; }
.pdata:nth-child(2) { animation-delay: .35s; }
.pdata:nth-child(3) { animation-delay: .5s; }
.pdata:nth-child(4) { animation-delay: .65s; }

/* ── Section image band ──────────────────────────────────── */
.img-band { position: relative; overflow: hidden; border-radius: 24px; aspect-ratio: 21/9; }
.img-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-band::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(7,15,26,.7) 0%, transparent 60%); }
.img-band-content { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; padding: 2.5rem; }

/* ── Voices v10.1 ────────────────────────────────────────── */
.voice:nth-child(2) { transform: translateY(2rem); }
.voice:nth-child(2):hover { transform: translateY(calc(2rem - 4px)); }
@media(max-width:780px){ .voice:nth-child(2){transform:none} }

/* ── Portada line v10.1 ──────────────────────────────────── */
.portada-line h1 .accent-dot { color: var(--c1) !important; display: inline-block; animation: dotBounce 3s ease-in-out 1.2s infinite; }
@keyframes dotBounce { 0%,80%,100%{transform:none} 40%{transform:translateY(-8px)} 60%{transform:translateY(-4px)} }

/* ── Stats bar glow v10.1 ─────────────────────────────────── */
.stats-bar { background: linear-gradient(135deg, #070f1a 0%, #0d2440 50%, #070f1a 100%); }

@media(prefers-reduced-motion:reduce){
  .portada__hexa, .hex-cursor, .portada__photo, .word-inner, .pdata { animation:none!important; transition:none!important; }
}
