/* ==========================================================================
   CRES San Francisco — componentes interactivos
   Portada inmersiva, perfiles, cifras, feed de Instagram, reels, test,
   trivia, comunidad, medios y el bot «Cresi».
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Aparición al scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Portada inmersiva ---------- */
.hero2 { position: relative; overflow: hidden; background: var(--ink-deep); color: var(--white); isolation: isolate; }
.hero2-mosaic {
  position: absolute; inset: 0; z-index: -2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 50%;
  gap: 6px; transform: rotate(-4deg) scale(1.25);
}
.hero2-mosaic img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); animation: drift 22s ease-in-out infinite alternate; }
.hero2-mosaic img:nth-child(even) { animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateY(0) scale(1.02); } to { transform: translateY(-6%) scale(1.08); } }
.hero2::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,34,44,.96) 0%, rgba(10,34,44,.86) 45%, rgba(10,34,44,.45) 100%); }
.hero2-inner { min-height: 640px; padding-top: 96px; padding-bottom: 72px; display: flex; flex-direction: column; justify-content: center; gap: 28px; max-width: var(--container); }
.hero2 .eyebrow { color: var(--cyan-light); }
.hero2 h1 { font-size: clamp(3rem, 1.6rem + 6vw, 6.5rem); line-height: .95; letter-spacing: -.035em; max-width: 12ch; }
.hero2 h1 em { font-style: normal; color: var(--cyan); }
.hero2-rotator { font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem); font-weight: 500; color: var(--on-dark); min-height: 1.4em; }
.hero2-rotator [data-rotate] { display: inline-block; color: var(--white); border-bottom: 3px solid var(--red-brand); transition: opacity .35s, transform .35s; }
.hero2-rotator [data-rotate].is-out { opacity: 0; transform: translateY(8px); }
.hero2 .lead { color: var(--on-dark); max-width: 560px; }
.hero2 .btn--outline { border-color: var(--white); color: var(--white); }
.hero2 .btn--outline:hover { background: var(--white); color: var(--ink); }
.hero2-badge { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); font-size: .9375rem; }
.hero2-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

/* ---------- ¿Quién sos? ---------- */
.who { background: var(--white); border-bottom: 1px solid var(--line); }
.who-inner { padding-top: 28px; padding-bottom: 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.who-inner > strong { font-family: var(--font-display); font-size: 1.25rem; }
.who-list { display: flex; flex-wrap: wrap; gap: 10px; }
.who-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; transition: border-color .15s, background .15s; }
.who-list a:hover { border-color: var(--cyan-deep); background: var(--tint); color: var(--ink); }

/* ---------- Cifras ---------- */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 24px; }
.counter { border-top: 3px solid var(--cyan); padding-top: 16px; }
.counter strong { display: block; font-family: var(--font-display); font-size: clamp(3rem, 2rem + 3vw, 4.5rem); line-height: 1; letter-spacing: -.03em; }
.counter strong .suf { color: var(--cyan-deep); }
.counter > span { color: var(--muted); font-size: 1.0625rem; }
.counter--red { border-top-color: var(--red-brand); }
.section--dark .counter > span { color: var(--on-dark); }
.section--dark .counter strong .suf { color: var(--cyan-light); }

/* Barras de comunidad */
.cbars { display: flex; flex-direction: column; gap: 16px; }
.cbars li { display: grid; grid-template-columns: 220px minmax(0, 1fr) 48px; gap: 14px; align-items: center; }
.cb-label small { display: block; color: var(--muted); font-size: .8125rem; }
.cb-track { height: 16px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.cb-bar { display: block; height: 100%; width: 0; background: var(--cyan-deep); border-radius: 4px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.cbars.is-on .cb-bar { width: var(--w); }
.cbars strong { text-align: right; font-family: var(--font-display); font-size: 1.25rem; }
.data-note { margin-top: 16px; font-size: .875rem; color: var(--muted); }

/* ---------- Feed de Instagram ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.feed-item { position: relative; display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--tint); cursor: pointer; text-align: left; }
.feed-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feed-item:hover img, .feed-item:focus-visible img { transform: scale(1.06); }
.feed-cap { position: absolute; inset: auto 0 0 0; padding: 40px 14px 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; line-height: 1.2; background: linear-gradient(transparent, rgba(10,34,44,.92)); }
.tag-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: .02em; background: var(--cyan-light); color: var(--ink); }
.tag-administracion { background: #FFD27A; }
.tag-industrial { background: #FFB4A8; }
.tag-comunidad { background: #FFFFFF; }

.lightbox { padding: 0; border: 0; border-radius: 16px; width: min(960px, calc(100% - 32px)); max-height: calc(100% - 32px); background: var(--white); color: var(--ink); }
.lightbox::backdrop { background: rgba(10,34,44,.8); }
.lightbox-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); font-size: 1.75rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.lightbox-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.lightbox-body img { width: 100%; height: 100%; max-height: 80vh; object-fit: cover; }
.lightbox-text { padding: 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.lightbox-text h3 { font-size: 1.625rem; }
.lightbox-text p { color: var(--muted-strong); line-height: 1.55; }

/* ---------- Reels ---------- */
.reels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.reel { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.reel-play, .reel iframe { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 560px; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; }
.reel-play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.reel-icon { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--white); font-size: 1.75rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .2s; }
.reel-play:hover .reel-icon { transform: scale(1.1); }
.reel figcaption { font-weight: 600; line-height: 1.35; }
.section--dark .reel figcaption { color: var(--white); }

/* ---------- Logros y medios ---------- */
.logros { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.logro { background: var(--white); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; border-top: 4px solid var(--cyan); }
.logro:nth-child(2n) { border-top-color: var(--red-brand); }
.logro h3 { font-size: 1.25rem; }
.logro p { color: var(--muted-strong); line-height: 1.5; flex: 1; }
.logro a { font-weight: 600; text-decoration: none; }
.medios { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.medios li { border-bottom: 1px solid var(--line); }
.medios a { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; text-decoration: none; color: var(--ink); }
.medios a:hover .medio-title { text-decoration: underline; text-underline-offset: 4px; }
.medio-src { font-size: .8125rem; font-weight: 600; color: var(--cyan-deep); text-transform: uppercase; letter-spacing: .06em; }
.medio-title { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.25; }

/* ---------- Empresas / posgrados ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.tile { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.tile h3 { font-size: 1.25rem; }
.tile p { color: var(--on-dark); line-height: 1.5; }
.section:not(.section--dark) .tile { background: var(--white); border-color: var(--line); }
.section:not(.section--dark) .tile p { color: var(--muted-strong); }
.soon { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--pending-bg); color: var(--pending-ink); font-size: .8125rem; font-weight: 600; }
.open { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: #DDF5E6; color: #0E4D2A; font-size: .8125rem; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.form-grid input, .form-grid select { min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); font: inherit; background: var(--white); color: var(--ink); }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Íconos y colores de carrera ---------- */
:root { --c-di: #3AB6D2; --c-adm: #F5A623; --c-ing: #F0563F; --c-com: #8A9BA3; --c-star: #FFC93C; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.c-di { --c: var(--c-di); } .c-adm { --c: var(--c-adm); } .c-ing { --c: var(--c-ing); } .c-com { --c: var(--c-com); } .c-star { --c: var(--c-star); }
.ic-badge { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--c-di)) 18%, transparent); color: var(--c, var(--c-di)); }
.ic-badge .ic { width: 22px; height: 22px; }
.ic-badge--lg { width: 52px; height: 52px; border-radius: 16px; }
.ic-badge--lg .ic { width: 30px; height: 30px; }
.on-dark .ic-badge, .section--dark .ic-badge { background: color-mix(in srgb, var(--c, var(--c-di)) 26%, transparent); }

/* Íconos flotando de fondo (portada y fichas) */
.ic-float { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ic-float-item { position: absolute; color: var(--c); opacity: .5; transform: scale(var(--s, 1)); animation: floaty 9s ease-in-out infinite; }
.ic-float-item .ic { width: 44px; height: 44px; stroke-width: 1.5; }
@keyframes floaty { 0%, 100% { translate: 0 0; rotate: -8deg; } 50% { translate: 0 -26px; rotate: 10deg; } }

.hero2-inner { position: relative; z-index: 1; }

/* ---------- Portada interactiva ---------- */
.hero2-inner[data-hero] { position: relative; display: flex; flex-direction: column; gap: 28px; min-height: 0; padding-top: 72px; padding-bottom: 48px; }
.hero2-copy h1 { max-width: none; font-size: clamp(3rem, 1rem + 7.4vw, 9rem); line-height: .92; }
.hero2-copy .hero2-rotator { font-size: clamp(1.375rem, 1rem + 1.5vw, 2.25rem); }
.hero2-copy .lead { font-size: clamp(1.0625rem, .95rem + .45vw, 1.375rem); max-width: 640px; }
.hero2:has([data-hero])::before { background: linear-gradient(90deg, rgba(10,34,44,.95) 0%, rgba(10,34,44,.88) 50%, rgba(10,34,44,.78) 100%); }
.hero2-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero2-light { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle 340px at var(--mx, 72%) var(--my, 40%), rgba(58,182,210,.2), rgba(58,182,210,.05) 45%, transparent 70%); mix-blend-mode: screen; transition: background .1s; }
/* Título cinético */
.kinetic .k-ch { display: inline-block; animation: k-in .9s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(var(--i) * 40ms); }
.kinetic .k-sp { display: inline-block; width: .25em; }
@keyframes k-in { from { opacity: 0; transform: translateY(70%) rotate(10deg) scale(.8); filter: blur(6px); } }
.kinetic.k-done .k-ch { animation: none; transition: transform .25s cubic-bezier(.3,1.8,.5,1), color .25s; }
.kinetic.k-done .k-ch:hover { transform: translateY(-14%) rotate(-6deg) scale(1.08); color: var(--c-adm); }
.kinetic.k-done em .k-ch { animation: k-wave 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
.kinetic.k-done em .k-ch:hover { animation: none; color: var(--c-adm); }
@keyframes k-wave { 0%, 60%, 100% { transform: none; color: var(--cyan); } 30% { transform: translateY(-8%); color: #C9F3FB; } }
/* Palabra que cambia, con el color de cada carrera */
.hero2-word { display: inline-block; color: var(--c, var(--white)); border-bottom: 3px solid currentColor; transition: opacity .26s, transform .26s, color .3s; }
.hero2-word.is-out { opacity: 0; transform: translateY(10px) rotateX(70deg); }
/* Selector de carreras */
.hero2-explore { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero2-explore > span { font-weight: 600; color: var(--on-dark); margin-right: 4px; }
.hero2-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.18); color: var(--white); font-weight: 600; text-decoration: none; transition: background .2s, border-color .2s, transform .25s cubic-bezier(.3,1.6,.5,1); }
.hero2-chip .ic { width: 22px; height: 22px; color: var(--c); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.hero2-chip:hover, .hero2-chip:focus-visible, .hero2-chip.is-active { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); color: var(--white); transform: translateY(-2px); }
.hero2-chip:hover .ic, .hero2-chip.is-active .ic { transform: rotate(-12deg) scale(1.15); }
.magnetic { transition: transform .25s cubic-bezier(.3,1.6,.5,1), background .15s, color .15s; }
/* Partículas que forman cifras + leyenda */
.hero2-stage { position: relative; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; background: rgba(6,24,32,.45); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); }
@media (min-width: 1100px) {
  .hero2-copy h1 { white-space: nowrap; }
  .hero2-copy > :not(h1):not(.hero2-badge) { max-width: calc(100% - 380px); }
  .hero2-stage { position: absolute; right: var(--gutter); bottom: 48px; width: 330px; }
}
@keyframes breathe { 50% { transform: scale(1.08); opacity: .7; } }
.hero2-particles { position: relative; display: block; width: 100%; aspect-ratio: 9 / 5; cursor: pointer; touch-action: pan-y; }
.hero2-fact { position: relative; padding: 2px 4px 0 12px; border-left: 3px solid var(--c, var(--cyan)); min-height: 62px; }
.hero2-fact.is-pop { animation: factin .55s cubic-bezier(.2,1.2,.4,1); }
@keyframes factin { from { opacity: 0; transform: translateY(14px); } }
.hero2-fact-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c, var(--cyan)); }
.hero2-fact-tag .ic { width: 14px; height: 14px; }
.hero2-fact-text { margin-top: 4px; font-family: var(--font-body); font-weight: 500; font-size: .9375rem; line-height: 1.25; color: var(--white); }
.hero2-fact-text strong { color: var(--c, var(--cyan)); }
.hero2-dots { display: flex; gap: 2px; padding-left: 8px; }
.hero2-dot { position: relative; width: 22px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.hero2-dot span { position: absolute; left: 3px; right: 3px; top: 11px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.22); overflow: hidden; }
.hero2-dot span::after { content: ''; position: absolute; inset: 0; width: 0; background: var(--c); }
.hero2-dot.is-on span::after { width: 100%; }
.hero2-dots.is-run .hero2-dot.is-on span::after { animation: dotfill var(--dur, 4600ms) linear; }
@keyframes dotfill { from { width: 0; } }
.hero2-dot:hover span { background: rgba(255,255,255,.4); }/* Barra inferior: cuenta regresiva + novedades */
.hero2-bar { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.12); background: rgba(6,24,32,.6); backdrop-filter: blur(10px); }
.hero2-bar-inner { display: flex; align-items: stretch; gap: 0; min-height: 64px; }
.hero2-countdown { display: flex; align-items: center; gap: 12px; padding: 10px 24px 10px 0; margin-right: 8px; border-right: 1px solid rgba(255,255,255,.12); color: var(--white); text-decoration: none; flex: none; }
.hero2-countdown[hidden] { display: none; }
.hero2-countdown-label { padding: 3px 8px; border-radius: 6px; background: var(--red); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hero2-countdown strong { font-family: var(--font-display); }
.hero2-cd { display: inline-flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; }
.hero2-cd b { display: inline-block; min-width: 1.6ch; padding: 2px 4px; border-radius: 6px; background: rgba(255,255,255,.1); font-family: var(--font-display); font-size: 1.125rem; text-align: center; }
.hero2-cd i { font-style: normal; font-size: .75rem; color: var(--on-dark); margin-right: 6px; }
.hero2-cd b.is-tick { animation: tick .4s ease; }
@keyframes tick { 0% { transform: translateY(-40%); opacity: 0; } }
.hero2-ticker { position: relative; flex: 1; overflow: hidden; display: flex; align-items: center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.hero2-ticker-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.hero2-ticker:hover .hero2-ticker-track, .hero2-ticker:focus-within .hero2-ticker-track { animation-play-state: paused; }
.hero2-ticker-track a, .hero2-ticker-dup { display: inline-flex; align-items: center; }
.hero2-ticker-track a { gap: 8px; padding: 0 28px; color: var(--white); text-decoration: none; white-space: nowrap; font-weight: 500; }
.hero2-ticker-track a:hover { color: var(--cyan-light); }
.hero2-ticker-track a .ic { color: var(--cyan); }
.hero2-ticker-track a::after { content: '•'; margin-left: 28px; color: var(--red-brand); }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero2 .ic-float { z-index: 0; }
.hero2 .ic-float-item { opacity: .35; }
.career-hero { position: relative; isolation: isolate; overflow: hidden; }
.career-hero .ic-float-item { opacity: .28; }
.footer-links a .ic { color: var(--c); margin-right: 4px; }

/* Tarjetas de carrera con ícono */
.career-card { position: relative; }
.career-card-ic { position: absolute; top: 16px; right: 16px; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--white); color: var(--c); box-shadow: 0 8px 20px rgba(10,34,44,.18); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.career-card-ic .ic { width: 32px; height: 32px; }
.career-card:hover .career-card-ic { transform: rotate(-10deg) scale(1.12); }
.career-card { border-top: 4px solid var(--c, var(--cyan)); }
.career-hero-ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--white); color: var(--c); box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: bob 4s ease-in-out infinite; }
.career-hero-ic .ic { width: 42px; height: 42px; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.panel-ics { display: flex; gap: 8px; }

/* Píldoras y filtros con ícono */
.tag-pill { display: inline-flex; align-items: center; gap: 5px; }
.tag-pill .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.filters button { display: inline-flex; align-items: center; gap: 8px; }
.filters button .ic { width: 18px; height: 18px; }
.cb-label { display: flex; align-items: center; gap: 10px; }
.cbars li .cb-bar { background: var(--c, var(--cyan-deep)); }
.cbars .ic-badge { width: 32px; height: 32px; border-radius: 10px; }
.cbars .ic-badge .ic { width: 18px; height: 18px; }

/* ---------- Cresi ---------- */
.cresi { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cresi-rig { width: 100%; height: 100%; transform-origin: 50% 62%; will-change: transform; filter: drop-shadow(0 10px 10px rgba(14,47,59,.22)); }
.cresi canvas { display: block; width: 100%; height: 100%; }
.cresi.is-jump canvas { animation: c-jump .6s cubic-bezier(.3,1.6,.5,1); }
.cresi.is-shake canvas { animation: c-shake .5s ease; }
.cresi.is-wave canvas { animation: c-wave .8s ease; }
.cresi.is-spin canvas { animation: c-spin .9s cubic-bezier(.3,1.4,.5,1); }
@keyframes c-jump { 30% { transform: translateY(-16%) scale(1.04, .97); } 60% { transform: translateY(0) scale(.97, 1.03); } }
@keyframes c-shake { 20%, 60% { transform: translateX(-6%) rotate(-5deg); } 40%, 80% { transform: translateX(6%) rotate(5deg); } }
@keyframes c-wave { 25% { transform: rotate(-8deg); } 50% { transform: rotate(7deg); } 75% { transform: rotate(-4deg); } }
@keyframes c-spin { 0% { transform: scale(1); } 40% { transform: scale(1.12) rotate(-12deg); } 70% { transform: scale(1.05) rotate(370deg); } 100% { transform: rotate(360deg); } }
.cresi-bubble { position: absolute; left: 50%; bottom: 100%; z-index: 3; width: max-content; max-width: 230px; padding: 10px 14px; border-radius: 16px; background: var(--white); color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.3; text-align: center; box-shadow: 0 10px 30px rgba(10,34,44,.25); transform: translateX(-50%); }
.cresi-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; border: 8px solid transparent; border-top-color: var(--white); transform: translateX(-50%); }
.cresi-bubble.is-pop { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.85); } }

/* Cresi en la portada */
.hero2-cresi { position: absolute; right: max(2vw, calc((100vw - var(--container)) / 2)); bottom: 40px; width: min(34vw, 400px); aspect-ratio: 1; z-index: 1; }
.hero2-cresi::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.25), rgba(58,182,210,.25) 55%, transparent 72%); z-index: -1; }
.hero2-cresi .cresi-bubble { bottom: 88%; }

/* ---------- Test y trivia ---------- */
.play-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.play-card { position: relative; overflow: hidden; border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 18px; min-height: 460px; }
.play-card--test { background: var(--ink); color: var(--white); }
.play-card--trivia { background: var(--white); border: 1px solid var(--line); }
.play-card .eyebrow { margin: 0; }
.play-card--test .eyebrow { color: var(--cyan-light); }
.play-card h2 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); }
.play-card--test > p { color: var(--on-dark); }
.play-intro-ics { display: flex; gap: 10px; }
.play-intro-ics .ic-badge { animation: bob 3.6s ease-in-out infinite; }
.play-intro-ics .ic-badge:nth-child(2) { animation-delay: -1.2s; }
.play-intro-ics .ic-badge:nth-child(3) { animation-delay: -2.4s; }
.quiz-progress { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.play-card--trivia .quiz-progress { background: var(--tint); }
.quiz-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c-di), var(--c-adm), var(--c-ing)); transition: width .45s; }
.quiz-step { font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.quiz-q { font-size: clamp(1.25rem, 1rem + .8vw, 1.5rem); line-height: 1.2; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quiz-actions .btn { gap: 8px; }
.play-card--test .btn--outline { border-color: var(--white); color: var(--white); }
.play-card--test .btn--outline:hover { background: var(--white); color: var(--ink); }
.quiz-frase { font-family: var(--font-display); font-size: 1.25rem; }

/* Test */
.t-head { display: flex; align-items: center; gap: 12px; }
.t-back { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.3); background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.t-back:disabled { opacity: .3; cursor: default; }
.t-step { font-weight: 700; font-variant-numeric: tabular-nums; }
.t-stage { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; align-items: start; flex: 1; }
.t-cresi { width: 110px; height: 110px; margin-top: 40px; }
.t-cresi .cresi-bubble { font-size: .8125rem; max-width: 150px; left: 50%; bottom: auto; top: 100%; margin-top: 10px; }
.t-cresi .cresi-bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--white); }
.t-cresi--big .cresi-bubble, .tv-end .cresi-bubble { top: auto; bottom: 100%; margin: 0 0 6px; }
.t-cresi--big .cresi-bubble::after, .tv-end .cresi-bubble::after { top: 100%; bottom: auto; border-top-color: var(--white); border-bottom-color: transparent; }
.t-main { display: flex; flex-direction: column; gap: 14px; }
.t-main.is-in .quiz-q { animation: slidein .4s ease both; }
.t-opts { display: flex; flex-direction: column; gap: 10px; }
.t-opt { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-weight: 500; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, transform .2s; animation: slidein .4s ease both; }
.t-opt:hover, .t-opt:focus-visible { background: rgba(255,255,255,.14); border-color: var(--cyan); transform: translateX(6px); }
.t-opt-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(58,182,210,.18); color: var(--cyan-light); flex: none; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.t-opt-ic .ic { width: 22px; height: 22px; }
.t-opt:hover .t-opt-ic { transform: rotate(-12deg) scale(1.12); }
.t-opt-t { flex: 1; }
.t-opt-key { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: .75rem; opacity: .6; }
.t-opt.is-picked { background: var(--cyan); border-color: var(--cyan); color: var(--ink); animation: picked .45s cubic-bezier(.3,1.6,.5,1); }
.t-opt.is-picked .t-opt-ic { background: var(--white); color: var(--ink); }
@keyframes picked { 40% { transform: scale(1.04); } }
@keyframes slidein { from { opacity: 0; transform: translateY(12px); } }
.t-meter { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.t-meter li { display: grid; grid-template-columns: 36px 96px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: .875rem; }
.t-meter-track { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.t-meter-bar { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--c); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.t-meter-pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-result { display: flex; flex-direction: column; gap: 16px; }
.t-result-head { display: flex; align-items: center; gap: 16px; }
.t-cresi--big { width: 120px; height: 120px; margin: 0; flex: none; }
.t-result h3 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); color: var(--cyan); }
.t-mix { color: var(--on-dark); }
.t-bars { display: grid; gap: 10px; }
.t-bars a { display: grid; grid-template-columns: 52px minmax(0, 1fr) 64px; grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.06); color: inherit; text-decoration: none; transition: background .15s, transform .2s; }
.t-bars a:hover { background: rgba(255,255,255,.12); transform: translateX(4px); }
.t-bars .ic-badge { grid-row: 1 / 3; }
.t-bar-name { font-weight: 600; }
.t-bar-track { grid-column: 2; height: 12px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.t-bar-fill { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--c); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.is-result .t-bar-fill { width: var(--w); }
.t-bar-pct { grid-column: 3; grid-row: 1 / 3; text-align: right; font-family: var(--font-display); font-size: 1.625rem; font-variant-numeric: tabular-nums; }
.t-bars li:first-child .ic-badge { animation: bob 2.4s ease-in-out infinite; }
.t-texto { color: var(--on-dark); line-height: 1.55; }

/* Trivia */
.tv-head { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--muted-strong); }
.tv-n { flex: 1; }
.tv-pts, .tv-streak { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--tint); font-variant-numeric: tabular-nums; }
.tv-pts .ic { color: #E2A400; }
.tv-streak { background: #FFE8D6; color: #B4400A; animation: pop .35s; }
.tv-streak[hidden] { display: none; }
.tv-timer { height: 8px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.tv-timer span { display: block; height: 100%; width: 100%; background: var(--cyan-deep); border-radius: 4px; }
.tv-timer span.is-low { background: var(--red); animation: blink .5s infinite; }
.tv-stage { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 18px; align-items: start; flex: 1; }
.tv-cresi { width: 100px; height: 100px; margin-top: 30px; }
.tv-main { display: flex; flex-direction: column; gap: 12px; }
.tv-q { display: flex; gap: 12px; align-items: flex-start; }
.tv-main.is-in .tv-q { animation: slidein .4s ease both; }
.tv-opts { display: flex; flex-direction: column; gap: 8px; }
.tv-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px 8px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 500; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, transform .2s; animation: slidein .4s ease both; }
.tv-opt:hover:not(:disabled), .tv-opt:focus-visible { background: var(--tint); border-color: var(--cyan-deep); transform: translateX(6px); }
.tv-letter { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--white); border: 1.5px solid var(--line); font-weight: 700; flex: none; }
.tv-opt:disabled { cursor: default; }
.tv-opt.is-ok { background: #DDF5E6; border-color: #1E8E4E; color: #0E4D2A; animation: picked .45s cubic-bezier(.3,1.6,.5,1); }
.tv-opt.is-ok .tv-letter { background: #1E8E4E; border-color: #1E8E4E; color: var(--white); }
.tv-opt.is-bad { background: #FDE2DF; border-color: var(--red); color: #7A0C08; animation: c-shake .4s; }
.tv-opt.is-bad .tv-letter { background: var(--red); border-color: var(--red); color: var(--white); }
.tv-pop { position: absolute; right: 14px; top: 50%; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #1E8E4E; animation: rise 1.1s ease forwards; pointer-events: none; }
@keyframes rise { from { opacity: 1; transform: translateY(-50%); } to { opacity: 0; transform: translateY(-260%); } }
.trivia-dato { display: flex; gap: 8px; align-items: flex-start; min-height: 1.5em; line-height: 1.45; color: var(--muted-strong); }
.trivia-dato.is-ok .ic { color: #1E8E4E; } .trivia-dato.is-bad .ic { color: var(--red); }
.trivia-next { align-self: flex-start; }
.tv-end { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.tv-end .tv-cresi { margin: 0; width: 120px; height: 120px; }
.tv-end h3 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.tv-end .quiz-actions { justify-content: center; }
.tv-best { font-size: .875rem; color: var(--muted); }
.medal { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-weight: 700; animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.medal .ic { width: 24px; height: 24px; }
.medal--oro { background: #FFF1C2; color: #8A6200; }
.medal--plata { background: #E9EEF1; color: #44535A; }
.medal--bronce { background: #F7DFCB; color: #8A4B1C; }

/* Confeti e íconos voladores */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti span { position: absolute; top: -40px; color: var(--c); animation: fall linear forwards; }
.confetti .ic { width: 26px; height: 26px; stroke-width: 2.2; }
@keyframes fall { to { transform: translate(var(--dx), 620px) rotate(var(--r)); opacity: 0; } }
.fly { position: fixed; z-index: 80; width: 28px; height: 28px; color: var(--c); pointer-events: none; transition: transform .65s cubic-bezier(.5,-0.3,.6,1), opacity .65s; }
.fly .ic { width: 28px; height: 28px; stroke-width: 2.2; }

/* ---------- Bot ---------- */
.bot-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 4px 20px 4px 4px; border: 0; border-radius: 999px; background: var(--ink); color: var(--white); font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(10,34,44,.35); transition: transform .2s; }
.bot-launcher:hover { transform: translateY(-3px); }
.bot-launcher-av { width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #DFF5FA); overflow: visible; }
.bot-launcher-av .cresi-rig { transform-origin: 50% 70%; }
.bot-launcher.is-open .bot-launcher-txt { display: none; }
.bot-launcher.is-open { padding-right: 4px; }
.bot-teaser { position: fixed; right: 24px; bottom: 96px; z-index: 50; max-width: 240px; padding: 14px 36px 14px 16px; border-radius: 18px 18px 4px 18px; background: var(--white); color: var(--ink); box-shadow: 0 12px 36px rgba(10,34,44,.3); cursor: pointer; line-height: 1.35; animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
.bot-teaser[hidden] { display: none; }
.bot-teaser button { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; background: transparent; font-size: 1.25rem; cursor: pointer; color: var(--muted); }
.bot-panel { position: fixed; right: 20px; bottom: 96px; z-index: 50; width: min(390px, calc(100% - 40px)); height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--white); border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(10,34,44,.35); animation: panelin .3s cubic-bezier(.3,1.3,.5,1); transform-origin: bottom right; }
@keyframes panelin { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.bot-panel[hidden] { display: none; }
.bot-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; background: linear-gradient(135deg, var(--ink), #134456); color: var(--white); }
.bot-head-av { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #DFF5FA); flex: none; }
.bot-head div:not(.bot-head-av) { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.bot-head span { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--on-dark); }
.bot-online { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; display: inline-block; }
.bot-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--white); font-size: 1.75rem; cursor: pointer; }
.bot-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.bot-row { display: flex; gap: 8px; align-items: flex-end; animation: slidein .3s ease both; }
.bot-row--user { justify-content: flex-end; }
.bot-av { width: 32px; height: 32px; border-radius: 50%; background: #DFF5FA; flex: none; }
.bot-msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; font-size: .9375rem; }
.bot-msg a { color: inherit; font-weight: 600; }
.bot-bot { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bot-user { background: var(--cyan-deep); color: var(--white); border-bottom-right-radius: 4px; }
.bot-typing { display: flex; gap: 4px; }
.bot-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.bot-typing span:nth-child(2) { animation-delay: .15s; }
.bot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.bot-cards { display: grid; gap: 6px; margin-top: 8px; }
.bot-cards a { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12%, white); text-decoration: none; color: var(--ink); }
.bot-cards a:hover { background: color-mix(in srgb, var(--c) 22%, white); }
.bot-cards .ic { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--c); }
.bot-cards small { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.bot-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--white); }
.bot-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--cyan-deep); background: var(--white); color: var(--cyan-deep); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; animation: slidein .3s ease both; transition: background .15s, transform .15s; }
.bot-chip:hover { background: var(--tint); transform: translateY(-2px); }
.bot-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--white); }
.bot-form input { flex: 1; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); font: inherit; }
.bot-form button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--red); color: var(--white); font-size: 1.125rem; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero2-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero2::before { background: linear-gradient(180deg, rgba(10,34,44,.88), rgba(10,34,44,.95)); }
  .hero2-inner { min-height: 0; padding-top: 64px; padding-bottom: 56px; }
  .hero2-inner[data-hero] { padding-top: 48px; padding-bottom: 32px; }
  .hero2-stage { max-width: 420px; }
  .hero2-bar-inner { flex-direction: column; }
  .hero2-countdown { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); margin: 0; padding: 12px 0; flex-wrap: wrap; }
  .hero2-ticker { min-height: 52px; }
  .play-grid { grid-template-columns: minmax(0, 1fr); }
  .lightbox-body { grid-template-columns: minmax(0, 1fr); }
  .lightbox-body img { max-height: 50vh; }
}
@media (max-width: 600px) {
  .play-card { padding: 22px; min-height: 0; }
  .hero2-fact { min-height: 0; padding: 14px 16px; }
  .hero2-copy { gap: 18px; }
  .t-stage, .tv-stage { grid-template-columns: minmax(0, 1fr); }
  .t-cresi, .tv-cresi { width: 76px; height: 76px; margin: 0 auto -6px; }
  .t-stage .t-cresi .cresi-bubble, .tv-stage .t-cresi .cresi-bubble { top: 50%; bottom: auto; left: 100%; margin: 0 0 0 12px; transform: translateY(-50%); }
  .t-stage .t-cresi .cresi-bubble::after, .tv-stage .t-cresi .cresi-bubble::after { display: none; }
  .t-meter li { grid-template-columns: 32px 1fr 44px; }
  .t-meter-name { display: none; }
  .t-result-head { flex-direction: column; text-align: center; }
  .cbars li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .cb-track { grid-column: 1 / -1; grid-row: 2; }
  .cbars strong { grid-column: 2; grid-row: 1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .bot-launcher-txt { display: none; }
  .bot-launcher { padding: 4px; right: 16px; bottom: 16px; }
  .bot-panel { right: 12px; left: 12px; width: auto; bottom: 88px; }
  .bot-teaser { right: 16px; bottom: 90px; }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .feed-cap { font-size: .9375rem; padding: 32px 10px 10px; }
  .who-inner > strong { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero2-mosaic img, .hero2-badge .dot, .ic-float-item, .career-hero-ic, .play-intro-ics .ic-badge, .t-bars li:first-child .ic-badge { animation: none; }
  .cb-bar, .t-bar-fill, .t-meter-bar { transition: none; }
  .kinetic .k-ch, .kinetic.k-done em .k-ch, .hero2-stage::before { animation: none; }
  .hero2-ticker { overflow-x: auto; }
  .hero2-ticker-track { animation: none; }
}
