/* Intro animada (se muestra solo si <html> tiene la clase .intro-on) */
.awi { display: none; }
.intro-on body { overflow: hidden; }
.intro-on .awi {
  display: block; position: fixed; inset: 0; z-index: 1000;
  background: #0B0B0B; color: #F4F1ED; font-family: var(--font, "Manrope", system-ui, sans-serif);
  /* Red de seguridad: si el JS no corre, la intro se oculta sola. */
  animation: intro-failsafe .01s linear 20s forwards;
}
@keyframes intro-failsafe { to { visibility: hidden; opacity: 0; pointer-events: none; } }
.awi.is-run { animation: none; }
.awi.is-out { opacity: 0; transform: scale(1.02); transition: opacity .8s ease, transform .8s ease; pointer-events: none; }

.awi__fx { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.awi__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.awi__scene {
  grid-area: 1 / 1; width: min(1100px, 100%); text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s .5s;
}
.awi__scene.is-on { opacity: 1; visibility: visible; transition: opacity .5s ease, visibility 0s; }
.awi__scene.is-off { opacity: 0; filter: blur(6px); transform: translateY(-12px); transition: opacity .45s ease, filter .45s ease, transform .45s ease, visibility 0s .45s; }

/* Escena 1: símbolo */
.awi__mark { width: clamp(96px, 16vw, 160px); height: auto; overflow: visible; margin: 0 auto 26px; display: block; }
.awi__mark path { fill: #F4F1ED; opacity: 0; transform-box: fill-box; transform-origin: 0% 100%; transform: translate(-30px, 30px) scale(.6) skewX(-12deg); }
.is-on .awi__mark path { animation: ola .9s cubic-bezier(.2, .8, .2, 1) forwards; }
.is-on .awi__mark path:nth-child(2) { animation-delay: .16s; fill: #A8A29E; }
.is-on .awi__mark path:nth-child(3) { animation-delay: .32s; fill: #6B6762; }
@keyframes ola { to { opacity: 1; transform: none; } }
.awi__brand { margin: 0; font-size: clamp(40px, 7vw, 76px); font-weight: 700; letter-spacing: -.04em; line-height: 1; overflow: hidden; }
.awi__brand span { display: inline-block; transform: translateY(105%); }
.is-on .awi__brand span { animation: sube .8s cubic-bezier(.2, .8, .2, 1) .55s forwards; }
.awi__tag { margin: 18px 0 0; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: #A8A29E; display: flex; justify-content: center; gap: 14px; }
.awi__tag > * { opacity: 0; transform: translateY(8px); }
.awi__tag i { font-style: normal; }
.is-on .awi__tag > * { animation: aparece .6s ease forwards; }
.is-on .awi__tag > *:nth-child(1) { animation-delay: 1.0s; } .is-on .awi__tag > *:nth-child(2) { animation-delay: 1.1s; }
.is-on .awi__tag > *:nth-child(3) { animation-delay: 1.2s; } .is-on .awi__tag > *:nth-child(4) { animation-delay: 1.3s; }
.is-on .awi__tag > *:nth-child(5) { animation-delay: 1.4s; }
@keyframes sube { to { transform: none; } }
@keyframes aparece { to { opacity: 1; transform: none; } }

/* Frases cinéticas */
.awi__big { margin: 0; font-size: clamp(40px, 8.2vw, 112px); font-weight: 700; letter-spacing: -.045em; line-height: .98; }
.awi__big .w { display: inline-block; opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(10px); }
.is-on .awi__big .w { animation: palabra .7s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 90ms); }
.awi__big .muted { color: #6B6762; text-decoration: line-through; text-decoration-thickness: .06em; text-decoration-color: #A8A29E; }
.awi__big .accent { background: linear-gradient(90deg, #F4F1ED, #A8A29E 60%, #F4F1ED); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.is-on .awi__big .accent { animation: palabra .7s cubic-bezier(.2, .8, .2, 1) forwards, brillo 2.4s linear .6s infinite; animation-delay: calc(var(--i, 0) * 90ms), .9s; }
@keyframes palabra { to { opacity: 1; transform: none; filter: none; } }
@keyframes brillo { to { background-position: -200% 0; } }
.awi__sub { margin: 26px auto 0; max-width: 36ch; font-size: clamp(16px, 1.8vw, 21px); color: #A8A29E; opacity: 0; }
.is-on .awi__sub { animation: aparece .7s ease .75s forwards; }

/* Cifras */
.awi__scene--stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; text-align: left; }
.stat { padding: 8px 32px; border-left: 1px solid #262626; opacity: 0; transform: translateY(16px); }
.is-on .stat { animation: aparece .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.is-on .stat:nth-child(2) { animation-delay: .18s; } .is-on .stat:nth-child(3) { animation-delay: .36s; }
.stat b { display: block; font-size: clamp(64px, 10vw, 140px); font-weight: 700; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 14px; color: #A8A29E; font-size: 15px; max-width: 26ch; }

/* Lista de proyectos */
.awi__eyebrow { margin: 0 0 22px; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: #A8A29E; }
.awi__list { list-style: none; margin: 0; padding: 0; }
.awi__list li { font-size: clamp(26px, 4.4vw, 56px); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; opacity: 0; transform: translateX(-24px); }
.awi__list em { font-style: normal; font-weight: 500; font-size: .32em; letter-spacing: .2em; text-transform: uppercase; color: #6B6762; vertical-align: middle; margin-left: .6em; }
.is-on .awi__list li { animation: entra .55s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 140ms); }
@keyframes entra { to { opacity: 1; transform: none; } }

/* Barra de progreso y botón */
.awi__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #1A1A1A; }
.awi__bar span { display: block; height: 100%; width: 0; background: #F4F1ED; }
.awi__skip {
  position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(20px, 4vw, 40px);
  font: 600 14px/1 var(--font, "Manrope", sans-serif); color: #F4F1ED; background: rgba(244, 241, 237, .06);
  border: 1px solid #3E3E3E; border-radius: 999px; padding: 14px 22px; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.awi__skip:hover { background: #F4F1ED; color: #0B0B0B; border-color: #F4F1ED; }
.awi__skip:focus-visible { outline: 2px solid #F4F1ED; outline-offset: 3px; }

@media (max-width: 760px) {
  .awi__scene--stats { grid-template-columns: 1fr; gap: 22px; }
  .stat { padding: 2px 0 2px 18px; }
  .stat b { font-size: 56px; }
  .stat span { margin-top: 6px; font-size: 14px; }
  .awi__list em { display: block; margin: 2px 0 10px; font-size: 11px; }
  .awi__list li { line-height: 1.05; }
}
