/* ===== ElectroSchool ===== */
:root {
  --bg: #F5F3EE;
  --surface: #ECE9E1;
  --ink: #141414;
  --muted: #5E5B55;
  --line: rgba(20, 20, 20, .12);
  --accent: #FFD400;
  --dark: #0E0E0E;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-title: 'League Spartan', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h3 { font-size: 1.45rem; letter-spacing: -.01em; }

.eyebrow {
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--accent); }
.eyebrow--dark { color: var(--muted); }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-weight: 600; text-decoration: none; border-radius: 999px;
  padding: .75rem 1.4rem; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #ffe14d; }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn--sm { padding: .55rem 1.15rem; font-size: .95rem; }

/* ===== Header ===== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .45s var(--ease), box-shadow .45s var(--ease);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.header__logo {
  display: block; background: #fff; border-radius: 12px; padding: 5px 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}
.header__logo img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav > a:not(.btn) {
  color: #fff; text-decoration: none; font-weight: 500; font-size: .98rem;
  position: relative; transition: color .45s var(--ease);
}
.nav > a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav > a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }

.header.is-scrolled, .header.menu-open {
  background: rgba(245, 243, 238, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-scrolled .nav > a:not(.btn) { color: var(--ink); }

.menu-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.menu-toggle span {
  position: absolute; left: 11px; width: 22px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .4s var(--ease), background-color .4s var(--ease), top .4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.header.is-scrolled .menu-toggle span, .header.menu-open .menu-toggle span { background: var(--ink); }
.menu-toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ===== Muros de video ===== */
.video-wall {
  position: absolute; inset: 0; display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr); grid-template-rows: 100%; gap: 3px;
  overflow: hidden; background: var(--dark);
}
.video-wall video { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.video-wall--hero { --cols: 4; animation: drift 24s ease-in-out infinite alternate; }
.video-wall--band { --cols: 3; }
.video-wall--cta { --cols: 5; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.09) translateY(-1%); } }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; align-items: flex-end; color: #fff;
  padding: 140px 0 clamp(5rem, 12vh, 8rem);
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10, 10, 10, .92) 0%, rgba(10, 10, 10, .45) 50%, rgba(10, 10, 10, .55) 100%),
    linear-gradient(to right, rgba(10, 10, 10, .55), transparent 70%);
}
.hero__content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.7rem, 6.6vw, 5.6rem); max-width: 13ch; font-weight: 700; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 34rem; margin: 1.5rem 0 2.3rem; color: rgba(255, 255, 255, .82); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__scroll {
  position: absolute; z-index: 1; right: max(16px, calc((100vw - 1180px) / 2)); bottom: 2.5rem;
  width: 28px; height: 46px; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 999px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px;
  background: #fff; border-radius: 3px; animation: scrollHint 2s var(--ease) infinite;
}
@keyframes scrollHint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ===== Intro ===== */
.intro { padding: clamp(5rem, 11vw, 9rem) 0 clamp(4rem, 8vw, 6rem); }
.intro__statement {
  font-family: var(--font-title); font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(1.65rem, 3.3vw, 2.75rem); line-height: 1.22; max-width: 26ch;
}
.intro__statement em {
  font-style: normal;
  background: linear-gradient(transparent 60%, var(--accent) 60%, var(--accent) 92%, transparent 92%);
}
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.fact { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.fact__num { font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; }
.fact h3 { margin: .9rem 0 .5rem; }
.fact p { color: var(--muted); }

/* ===== Qué se aprende ===== */
.learn { padding: clamp(3rem, 6vw, 5rem) 0; }
.learn__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.learn__item {
  background: #fff; border-radius: var(--radius); padding: clamp(1.8rem, 3vw, 2.6rem);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.learn__item:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .07); }
.learn__item h3 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); margin-bottom: .9rem; }
.learn__item h3::after { content: ''; display: block; width: 36px; height: 3px; background: var(--accent); margin-top: 1rem; }
.learn__item p { color: var(--muted); }

/* ===== Clases ===== */
.programs { padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 8rem); }
.section-head { margin-bottom: clamp(3rem, 6vw, 4.5rem); max-width: 40rem; }
.section-head__sub { color: var(--muted); margin-top: 1rem; font-size: 1.08rem; }
.program {
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.program + .program { margin-top: clamp(4rem, 8vw, 7rem); }
.program--reverse .program__media { order: 2; }
.program__media {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface);
  max-width: 460px; width: 100%;
}
.program--reverse .program__media { justify-self: end; }
.program__media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.program:hover .program__media video { transform: scale(1.04); }
.program__label {
  display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
}
.program h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 1.1rem; max-width: 16ch; }
.program p { color: var(--muted); max-width: 34rem; font-size: 1.08rem; }
.topics { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.7rem; }
.topics li { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; font-size: .92rem; font-weight: 500; }

/* ===== Modalidades ===== */
.modes { padding: 0 0 clamp(5rem, 9vw, 8rem); }
.modes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.mode { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(2rem, 4vw, 3rem); }
.mode--accent { background: var(--accent); border-color: var(--accent); }
.mode__label { font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mode--accent .mode__label { color: rgba(20, 20, 20, .65); }
.mode h3 { font-size: clamp(2rem, 4vw, 3rem); margin: 1rem 0 .9rem; }
.mode p { color: var(--muted); max-width: 30rem; font-size: 1.05rem; }
.mode--accent p { color: rgba(20, 20, 20, .8); }
.modes__note { margin-top: 1.6rem; color: var(--muted); }

/* ===== Banda ===== */
.band {
  position: relative; overflow: hidden; color: #fff;
  min-height: 85vh; display: flex; align-items: center;
  padding: 7rem 0;
}
.band__shade { position: absolute; inset: 0; background: rgba(10, 10, 10, .62); }
.video-wall--band video { object-position: center bottom; }
.band__content { position: relative; z-index: 1; text-align: center; }
.band h2 { font-size: clamp(2.6rem, 7vw, 5.6rem); font-weight: 700; }
.band p { max-width: 36rem; margin: 1.4rem auto 0; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: rgba(255, 255, 255, .85); }

/* ===== Proyectos ===== */
.projects { padding: clamp(5rem, 9vw, 8rem) 0; overflow: hidden; }
.projects__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2.6rem; }
.projects__sub { color: var(--muted); margin-top: 1rem; max-width: 32rem; }
.projects__nav { display: flex; gap: .6rem; flex-shrink: 0; }
.arrow {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--ink); display: grid; place-items: center; cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.arrow:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.strip {
  --pad: max(16px, calc((100vw - 1180px) / 2));
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--pad); scroll-padding-inline: var(--pad);
  scrollbar-width: none; cursor: grab; user-select: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging .clip { pointer-events: none; }
.clip {
  position: relative; flex: 0 0 clamp(220px, 23vw, 290px); aspect-ratio: 9 / 16;
  border-radius: var(--radius); overflow: hidden; background: var(--surface); scroll-snap-align: start;
}
.clip video { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.clip:hover video { transform: scale(1.04); }
.clip figcaption {
  position: absolute; inset: auto 0 0; padding: 3rem 1.1rem 1rem; color: #fff; font-weight: 600;
  background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent);
}

/* ===== Cómo funciona ===== */
.how { padding: clamp(4rem, 8vw, 7rem) 0; background: var(--surface); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.steps li { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.steps__num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); font-weight: 700; font-size: .9rem;
}
.steps h3 { margin: 1.1rem 0 .5rem; }
.steps p { color: var(--muted); }

/* ===== FAQ ===== */
.faq-section { padding: clamp(5rem, 9vw, 8rem) 0; }
.faq-layout { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.section-head--left { margin-bottom: 0; position: sticky; top: 110px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  font-family: var(--font-title); font-weight: 500; font-size: clamp(1.15rem, 1.8vw, 1.35rem); letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex-shrink: 0; width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat;
  transition: transform .4s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 1.6rem; max-width: 40rem; animation: faqIn .5s var(--ease); }
.faq a { color: var(--ink); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ===== CTA ===== */
.cta {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  min-height: 75vh; display: flex; align-items: center; padding: 7rem 0;
}
.cta__shade { position: absolute; inset: 0; background: rgba(10, 10, 10, .7); }
.cta__content { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(2.8rem, 7.5vw, 6rem); font-weight: 700; }
.cta p { font-size: 1.15rem; color: rgba(255, 255, 255, .82); margin: 1.1rem 0 2.3rem; }
.cta__actions { display: flex; flex-direction: column; align-items: center; gap: 1.3rem; }
.cta__phone { color: #fff; text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, .4); padding-bottom: 2px; transition: border-color .3s; }
.cta__phone:hover { border-color: var(--accent); }

/* ===== Footer ===== */
.footer { padding: 2.5rem 0; background: #fff; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.footer__logo { height: 44px; width: auto; }

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: transform .35s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }

/* ===== Aparición al hacer scroll ===== */
[data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .video-wall--hero { --cols: 3; }
  .video-wall--hero video:nth-child(n+4) { display: none; }
  .video-wall--cta { --cols: 3; }
  .video-wall--cta video:nth-child(n+4) { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .learn__grid { grid-template-columns: 1fr; }
  .faq-layout { grid-template-columns: 1fr; }
  .section-head--left { position: static; }
}

@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); padding: 0 16px;
    max-height: 0; overflow: hidden; transition: max-height .5s var(--ease), padding .5s var(--ease);
    box-shadow: 0 1px 0 var(--line);
  }
  .nav--open { max-height: 420px; padding: .5rem 16px 1.5rem; }
  .nav > a:not(.btn) { color: var(--ink); padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav > a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1.2rem; }

  .program, .program--reverse { grid-template-columns: 1fr; gap: 2rem; }
  .program--reverse .program__media { order: 0; justify-self: start; }
  .program__media { max-width: none; aspect-ratio: 4 / 4.4; }
  .facts { grid-template-columns: 1fr; gap: 1.8rem; }
  .modes__grid { grid-template-columns: 1fr; }
  .projects__head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .header__logo img { height: 28px; }
  .video-wall--band { --cols: 2; }
  .video-wall--band video:nth-child(n+3) { display: none; }
  .hero__actions .btn { width: 100%; }
  .hero__scroll { display: none; }
  .steps { grid-template-columns: 1fr; }
  .projects__nav { display: none; }
  .clip { flex-basis: 68vw; }
  .footer__inner { flex-direction: column; text-align: center; }
}

/* Pantallas verticales: la portada muestra un video a la vez, que van pasando,
   y el CTA pasa a una cuadrícula de 2 x 2 */
@media (max-width: 1000px) and (orientation: portrait) {
  .video-wall--hero { display: block; }
  .video-wall--hero video:nth-child(n) { /* :nth-child(n) para ganarle a la regla que oculta el 4.º video */
    display: block; position: absolute; inset: 0;
    opacity: 0; transition: opacity 1.2s var(--ease);
  }
  .video-wall--hero video.is-active { opacity: 1; }
  .video-wall--cta { --cols: 2; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .video-wall--cta video:nth-child(-n+4) { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
