/* =================================================================
   MegiasTeam — Landing premium
   Dirección: "sala de edición" — dark, glassmorphism, etalonaje.
   ================================================================= */

:root {
  /* Color */
  --bg:        #08080C;
  --bg-2:      #0D0D15;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.16);

  --text:    #F3F1FB;
  --muted:   #9D9BB8;
  --faint:   #6E6C86;

  --violet:  #8B5CFF;
  --pink:    #FF5CAA;
  --cyan:    #4DE3FF;
  --gold:    #FFCE5C;

  --grad: linear-gradient(110deg, var(--violet) 0%, var(--pink) 55%, #FF9A5C 100%);
  --grad-soft: linear-gradient(120deg, rgba(139,92,255,.16), rgba(255,92,170,.12));

  /* Type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1180px;
  --pad: clamp(1.1rem, 4vw, 2.4rem);
  --radius: 20px;
  --radius-sm: 13px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Fondo global con halos de color fijos */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(139,92,255,.18), transparent 60%),
    radial-gradient(50% 45% at 5% 15%, rgba(255,92,170,.12), transparent 60%),
    var(--bg);
}

/* Grano sutil premium */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { position: relative; padding-block: clamp(4.5rem, 11vw, 9rem); }
.grad-text {
  background: var(--grad);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: grad-shift 7s linear infinite;
}
@keyframes grad-shift { to { background-position: 220% center; } }

/* ---------- Tipografía base ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .74rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: 1.1rem;
}
.tc {
  color: var(--cyan);
  border: 1px solid rgba(77,227,255,.32);
  border-radius: 5px;
  padding: .12em .45em;
  font-size: .82em;
  background: rgba(77,227,255,.06);
}
.sec-head { max-width: 680px; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.sec-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.04; letter-spacing: -0.02em;
}
.sec-lead { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); margin-top: 1.1rem; max-width: 56ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  font-size: .82rem;
  padding: .95rem 1.9rem;
  border-radius: 100px;
  cursor: pointer; border: 0;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
  position: relative; white-space: normal; text-wrap: balance; text-align: center; line-height: 1.25;
}
.btn-primary {
  color: #fff;
  background: var(--grad);
  background-size: 160% 160%;
  box-shadow: 0 10px 34px -10px rgba(255,92,170,.55), inset 0 0 0 1px rgba(255,255,255,.14);
  position: relative; overflow: hidden; isolation: isolate;
}
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -130%; z-index: -1;
  width: 70%; height: 100%; transform: skewX(-18deg);
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.4), transparent);
  animation: btn-shine 4s var(--ease) infinite;
}
@keyframes btn-shine { 0%, 55% { left: -130%; } 100% { left: 145%; } }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -10px rgba(255,92,170,.7), inset 0 0 0 1px rgba(255,255,255,.2); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn-xl { padding: 1.25rem 3rem; font-size: 1rem; }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* CTA de sección (botones repartidos por la página) */
.sec-cta { display: flex; justify-content: center; margin-top: clamp(2.2rem, 5vw, 3.4rem); }
.sec-cta-left { justify-content: flex-start; margin-top: 2rem; }

/* Barra de progreso de scroll (línea de tiempo de la página) */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--grad); z-index: 100;
  box-shadow: 0 0 14px rgba(255,92,170,.6);
}

/* ---------- Glass base ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* =================================================================
   HEADER
   ================================================================= */
.site-head {
  position: sticky; top: 0; z-index: 50;
  padding-block: .9rem;
  background: rgba(8,8,12,.55);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.site-head.scrolled { border-bottom-color: var(--line); background: rgba(8,8,12,.8); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 40px; width: auto; }
.hero-logo { width: clamp(150px, 22vw, 212px); height: auto; margin: 0 auto 1.7rem; display: block; filter: drop-shadow(0 8px 30px rgba(77,227,255,.22)); }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.site-head .btn-ghost { padding: .6rem 1.3rem; font-size: .76rem; }

/* =================================================================
   HERO
   ================================================================= */
.hero { position: relative; padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(3.5rem, 8vw, 6rem); overflow: hidden; }
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 1080px; }
.hero-title, .hero-sub { max-width: 880px; margin-inline: auto; }
.hero-aura { position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: 1; filter: blur(70px); pointer-events: none; }
.blob { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.blob-1 { width: 46vw; height: 46vw; max-width: 560px; max-height: 560px; top: -8%; left: 8%; background: radial-gradient(circle, var(--violet), transparent 68%); }
.blob-2 { width: 40vw; height: 40vw; max-width: 480px; max-height: 480px; top: 4%; right: 6%; background: radial-gradient(circle, var(--pink), transparent 68%); }
.blob-3 { width: 34vw; height: 34vw; max-width: 420px; max-height: 420px; bottom: -14%; left: 38%; background: radial-gradient(circle, rgba(77,227,255,.7), transparent 68%); }

.hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.0; letter-spacing: -0.03em;
  margin-block: .3rem 1.3rem;
}
.hero-title.reveal { filter: blur(12px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }
.hero-title.in-view { filter: blur(0); }
/* Secuencia de entrada del hero */
.hero-inner .reveal:nth-child(1) { transition-delay: .05s; }
.hero-inner .reveal:nth-child(2) { transition-delay: .15s; }
.hero-inner .reveal:nth-child(3) { transition-delay: .28s; }
.hero-inner .reveal:nth-child(4) { transition-delay: .42s; }
.hero-inner .reveal:nth-child(5) { transition-delay: .55s; }
.hero-sub { color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.3rem); max-width: 52ch; margin-inline: auto; }
.hero-cta { margin-top: 2.1rem; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.hero-cta-note { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; }

/* Vídeo */
.video-wrap { margin-top: clamp(3rem, 6vw, 5rem); }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-2);
  background: #050509;
  box-shadow: 0 40px 120px -40px rgba(139,92,255,.5), inset 0 0 0 1px rgba(255,255,255,.05);
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Facade del vídeo: portada ligera que carga el reproductor al pulsar */
.video-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0;
  cursor: pointer; background: transparent; color: var(--text); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
}
.facade-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(8,8,12,.2), rgba(8,8,12,.72)),
    radial-gradient(70% 90% at 50% 38%, rgba(139,92,255,.42), transparent 70%),
    #0a0a12;
  background-size: cover; background-position: center;
  transition: transform .6s var(--ease);
  /* Portada con un fotograma real: añade poster.jpg junto al index y descomenta:
  background-image:
    linear-gradient(180deg, rgba(8,8,12,.2), rgba(8,8,12,.72)),
    url("poster.jpg"); */
}
.facade-glow { position: absolute; inset: 0; z-index: 1; background: radial-gradient(42% 52% at 50% 50%, rgba(255,92,170,.18), transparent 70%); }
.facade-play {
  position: relative; z-index: 2;
  width: clamp(64px, 9vw, 92px); aspect-ratio: 1; border-radius: 50%;
  background: var(--grad); display: grid; place-items: center;
  animation: facade-pulse 2.6s var(--ease) infinite;
}
.facade-play::after { content: ""; border-left: clamp(20px,2.6vw,26px) solid #fff; border-top: clamp(13px,1.7vw,17px) solid transparent; border-bottom: clamp(13px,1.7vw,17px) solid transparent; margin-left: 6px; }
.facade-label { position: relative; z-index: 2; font-family: var(--display); font-weight: 600; font-size: clamp(1rem,1.6vw,1.2rem); margin-top: .4rem; }
.facade-sub { position: relative; z-index: 2; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.video-facade:hover .facade-bg { transform: scale(1.04); }
.video-facade:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; }
@keyframes facade-pulse {
  0%   { box-shadow: 0 16px 50px -10px rgba(255,92,170,.6), 0 0 0 0 rgba(255,92,170,.45); }
  70%  { box-shadow: 0 16px 50px -10px rgba(255,92,170,.6), 0 0 0 26px rgba(255,92,170,0); }
  100% { box-shadow: 0 16px 50px -10px rgba(255,92,170,.6), 0 0 0 0 rgba(255,92,170,0); }
}
.video-cap { margin-top: .9rem; font-family: var(--mono); font-size: .74rem; color: var(--faint); letter-spacing: .06em; display: flex; align-items: center; gap: .5rem; justify-content: center; }
.video-cap .tc { color: var(--pink); border-color: rgba(255,92,170,.3); background: rgba(255,92,170,.06); }

/* =================================================================
   MODO LIMPIO durante la reproducción del vídeo
   (se congelan efectos para que el vídeo fluya; vuelven al pausar/salir)
   ================================================================= */
body.video-playing .grain { display: none; }
body.video-playing .hero-aura { display: none; }   /* los halos blur son la capa más cara que queda */
body.video-playing .cal-track,
body.video-playing .cal-live,
body.video-playing .grad-text,
body.video-playing .btn-primary::before,
body.video-playing .blob,
body.video-playing .facade-play { animation-play-state: paused !important; }
/* Quitar clip/sombra/filtros sobre el cuadro mantiene la vía rápida por hardware */
body.video-playing .video-frame { border-radius: 0; box-shadow: none; }
body.video-playing .site-head { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* El reproductor incrustado llena su cuadro y se aísla en su propia capa */
.video-frame { contain: layout paint; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; transform: translateZ(0); backface-visibility: hidden; }

/* =================================================================
   GRIDS GENÉRICOS
   ================================================================= */
.grid { display: grid; gap: 1.1rem; }

/* SECCIÓN 2 — Comunidad */
.grid-community { grid-template-columns: repeat(3, 1fr); }
.card { padding: 1.7rem; transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease); }
.card:hover { transform: translateY(-5px); border-color: var(--line-2); background: var(--surface-2); }
.card .ic { font-size: 1.4rem; color: var(--cyan); display: inline-block; margin-bottom: .9rem; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .96rem; }

/* SECCIÓN 3 — Profesores */
.grid-faculty { grid-template-columns: repeat(3, 1fr); }
.prof { padding: 1.7rem; transition: transform .4s var(--ease), border-color .4s var(--ease); position: relative; overflow: hidden; }
.prof::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.prof:hover { transform: translateY(-5px); border-color: var(--line-2); }
.prof:hover::after { transform: scaleX(1); }
.prof-top { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.1rem; }
.prof-tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: var(--cyan); border: 1px solid rgba(77,227,255,.28); border-radius: 5px; padding: .2em .5em; align-self: flex-start; }
.prof-tag-gold { color: var(--gold); border-color: rgba(255,206,92,.35); background: rgba(255,206,92,.06); }
.prof-name { font-family: var(--display); font-weight: 700; font-size: 1.9rem; letter-spacing: -.02em; }
.prof-founder { background: linear-gradient(150deg, rgba(255,206,92,.08), var(--surface)); border-color: rgba(255,206,92,.22); }
.prof-founder::after { background: linear-gradient(110deg, var(--gold), #FF9A5C); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { font-size: .82rem; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 100px; padding: .35em .85em; }
.chips-lg li { font-size: .9rem; padding: .45em 1em; }

/* =================================================================
   SECCIÓN 4 — Calendario
   ================================================================= */
.cal-stat { display: inline-flex; align-items: center; gap: 1.1rem; padding: .9rem 1.7rem; border-radius: 100px; background: var(--grad-soft); border: 1px solid var(--line-2); margin-bottom: clamp(2rem,4vw,3rem); }
.cal-stat-num { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem,6vw,3.8rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cal-stat-label { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; }

/* Tira de película que se desliza sola */
.cal-strip {
  position: relative; overflow: hidden; padding: .85rem 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
/* perforaciones tipo película arriba y abajo */
.cal-strip::before, .cal-strip::after {
  content: ""; position: absolute; left: 0; right: 0; height: 7px; z-index: 3;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 7px, transparent 7px 22px);
}
.cal-strip::before { top: 0; }
.cal-strip::after { bottom: 0; }
.cal-track { display: flex; gap: 1rem; width: max-content; padding: .35rem .5rem; animation: cal-slide 36s linear infinite; }
.cal-strip:hover .cal-track { animation-play-state: paused; }
.cal-cell {
  flex: 0 0 auto; width: 188px; min-height: 124px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; justify-content: center;
  backdrop-filter: blur(10px);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.cal-cell:hover { border-color: var(--violet); background: var(--grad-soft); transform: translateY(-3px); }
.cal-live { font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; color: #FF6B6B; animation: live-pulse 1.7s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes cal-slide { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.cal-dow { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.cal-topic { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.cal-note { margin-top: clamp(1.4rem,3vw,2rem); font-family: var(--mono); font-size: .8rem; color: var(--faint); }

/* =================================================================
   SECCIÓN 5 — Bolsa de trabajo
   ================================================================= */
.jobs-shell { position: relative; padding: clamp(2rem, 5vw, 4rem); overflow: hidden; border-color: var(--line-2); }
.jobs-aura { position: absolute; inset: auto -10% -40% auto; width: 60%; height: 120%; background: radial-gradient(circle, rgba(139,92,255,.35), transparent 65%); filter: blur(40px); pointer-events: none; }
.jobs-content { position: relative; z-index: 2; }
.jobs-title { font-family: var(--display); font-weight: 700; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.03; letter-spacing: -.02em; margin-bottom: 1.1rem; }
.jobs-lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 60ch; }
.jobs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin: 2.2rem 0; max-width: 760px; }
.job-point { display: flex; gap: .8rem; align-items: flex-start; }
.job-ic { color: var(--pink); font-size: 1rem; line-height: 1.7; }
.job-point p { color: var(--text); font-size: 1.02rem; }
.jobs-highlight { display: inline-flex; align-items: center; gap: 1rem; padding: 1.1rem 1.8rem; border-radius: 100px; background: var(--grad-soft); border: 1px solid var(--line-2); }
.jh-num { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.jh-label { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* =================================================================
   SECCIÓN 6 — Casos de éxito
   ================================================================= */
.grid-cases { grid-template-columns: repeat(3, 1fr); gap: 1.3rem; align-items: start; }
.case { padding: 1.9rem; transition: transform .4s var(--ease), border-color .4s var(--ease); }
.case:hover { transform: translateY(-5px); border-color: var(--line-2); }
.case-name { font-family: var(--display); font-weight: 700; font-size: 1.55rem; }
.case-tag { display: inline-block; font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; color: var(--cyan); border: 1px solid rgba(77,227,255,.3); background: rgba(77,227,255,.06); border-radius: 5px; padding: .25em .6em; margin-bottom: .7rem; }
.case-meta { color: var(--faint); font-size: .88rem; margin-bottom: 1rem; }
.case-amount { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 5vw, 3.1rem); letter-spacing: -.02em; line-height: 1; }
.case-amount .counter { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.case-chips { margin-top: .95rem; }
.case-chips li { font-size: .76rem; }
.case-bar { margin-top: 1.1rem; height: 7px; border-radius: 100px; background: rgba(255,255,255,.06); overflow: hidden; }
.case-bar span { display: block; height: 100%; width: 0; border-radius: 100px; background: var(--grad); transition: width 1.4s var(--ease); }
.case.in-view .case-bar span { width: var(--w); }

/* Flecha desplegable del testimonio */
.case-toggle {
  margin-top: 1.2rem; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: transparent; border: 0; cursor: pointer;
  color: var(--cyan); font-family: var(--mono); font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase;
}
.case-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
.case-arrow {
  width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .4s var(--ease);
  animation: arrow-bounce 1.8s var(--ease) infinite;
}
.case-toggle[aria-expanded="true"] .case-arrow { transform: rotate(225deg); animation: none; }
@keyframes arrow-bounce { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(3px) rotate(45deg); } }

/* Reel vertical colapsable (se despliega hacia abajo / se esconde hacia arriba) */
.case-reel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.case-reel.open { grid-template-rows: 1fr; }
.reel-inner { overflow: hidden; min-height: 0; }
.reel-frame {
  position: relative; width: min(220px, 72%); margin: 1.2rem auto 0;
  aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  background: #050509; border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -24px rgba(139,92,255,.5);
  contain: layout paint;
}
.reel-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; transform: translateZ(0); backface-visibility: hidden; }
.reel-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 1rem; color: var(--faint); font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  background: radial-gradient(70% 70% at 50% 40%, rgba(139,92,255,.18), transparent 70%);
}

/* =================================================================
   SECCIÓN 7 — Eventos
   ================================================================= */
.event-card { display: grid; grid-template-columns: 0.85fr 1.15fr; overflow: hidden; }
.event-poster {
  position: relative; min-height: 320px;
  background-image:
    linear-gradient(180deg, rgba(8,8,12,.15) 0%, rgba(8,8,12,.2) 45%, rgba(8,8,12,.62) 100%),
    url("evento.jpg");
  background-size: cover; background-position: center;
}
.event-poster-tag {
  position: absolute; left: 1.3rem; bottom: 1.3rem;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  color: #fff; display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(8,8,12,.5); border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px; padding: .4em .9em; backdrop-filter: blur(8px);
}
.event-poster-tag .tc { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.1); }
.event-body { padding: clamp(1.6rem, 3.5vw, 2.6rem); display: flex; flex-direction: column; gap: 1.1rem; justify-content: center; }
.event-body h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.02em; }
.event-body p { color: var(--muted); }

/* =================================================================
   SECCIÓN 8 — Cierre
   ================================================================= */
.section-close { text-align: center; overflow: hidden; padding-block: clamp(5rem, 12vw, 10rem); }
.close-aura { position: absolute; inset: 0; background: radial-gradient(50% 70% at 50% 50%, rgba(139,92,255,.25), transparent 65%); pointer-events: none; }
.close-inner { position: relative; z-index: 2; max-width: 760px; }
.close-inner .eyebrow { justify-content: center; }
.close-title { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1.04; letter-spacing: -.03em; }
.close-lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); margin: 1.4rem auto 2.4rem; max-width: 58ch; }
.close-note { margin-top: 1.3rem; font-family: var(--mono); font-size: .8rem; color: var(--faint); }

/* =================================================================
   FOOTER
   ================================================================= */
.site-foot { border-top: 1px solid var(--line); padding-block: 2.2rem; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot-word { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.foot-copy { font-family: var(--mono); font-size: .76rem; color: var(--faint); }

/* =================================================================
   ANIMACIONES DE SCROLL
   ================================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
/* stagger ligero dentro de grids */
.grid .reveal:nth-child(2) { transition-delay: .06s; }
.grid .reveal:nth-child(3) { transition-delay: .12s; }
.grid .reveal:nth-child(4) { transition-delay: .18s; }
.grid .reveal:nth-child(5) { transition-delay: .24s; }
.grid .reveal:nth-child(6) { transition-delay: .3s; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 980px) {
  .grid-community, .grid-faculty { grid-template-columns: repeat(2, 1fr); }
  .prof-founder { grid-column: span 2; }
  .grid-cases { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .jobs-grid { grid-template-columns: 1fr; }
  .grid-cases { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .event-card { grid-template-columns: 1fr; }
  .event-poster { min-height: 200px; }
  .cal-stat { flex-direction: column; gap: .4rem; text-align: center; }
  .cal-stat-label { text-align: center; }
}
@media (max-width: 540px) {
  .grid-community, .grid-faculty { grid-template-columns: 1fr; }
  .prof-founder { grid-column: auto; }
  .hero-cta { width: 100%; }
  .btn-primary, .btn-xl { width: 100%; }
  .foot-inner { flex-direction: column; text-align: center; gap: .6rem; }
}

/* Ultrawide: el contenido no se estira sin control */
@media (min-width: 1600px) {
  :root { --maxw: 1280px; }
}

/* =================================================================
   ACCESIBILIDAD / MOVIMIENTO REDUCIDO
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
