/* ===== Smarthics — hoja de estilos =====
   Paleta tomada del logotipo: índigo → azul → turquesa sobre blanco.
   Tono: sobrio. La página afirma poco y lo afirma con calma. */

:root {
  --navy: #0a0e1a;
  --navy-2: #101a33;
  --indigo: #2b46c7;
  --blue: #2e7fd6;
  --teal: #35c6d4;
  --ink: #1c2333;
  --muted: #5b6478;
  --bg: #ffffff;
  --bg-alt: #f4f8fc;
  --line: #e3eaf3;
  --grad: linear-gradient(100deg, var(--indigo), var(--blue) 55%, var(--teal));
  --radius: 18px;
  --shadow: 0 10px 40px rgba(43, 70, 199, 0.10);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1140px, 92%); margin-inline: auto; }
.center { text-align: center; }
.narrow { max-width: 640px; margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.lead { color: var(--muted); font-size: 1.08rem; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ===== Botones ===== */
.btn {
  display: inline-block; font-weight: 700; font-size: 0.95rem;
  padding: 0.65rem 1.3rem; border-radius: 12px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 20px rgba(43, 70, 199, 0.35);
}
.btn--outline { border-color: var(--indigo); color: var(--indigo); }
.btn--outline:hover { background: rgba(43, 70, 199, 0.06); }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { color: var(--indigo); }
.btn--lg { padding: 0.85rem 1.7rem; font-size: 1.02rem; }

/* ===== Nav ===== */
/* Fondo sólido: los videos tienen fondo blanco y así se funden sin verse el recuadro */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.55rem 0;
}
.nav__brand { display: flex; align-items: center; }
.nav__video {
  height: 44px; width: auto; display: block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav__brand:hover .nav__video { transform: scale(1.06); }
.nav__brand:active .nav__video { transform: scale(0.96); }
.nav__actions { display: flex; align-items: center; gap: 0.5rem; }

/* ===== Hero ===== */
.hero { padding: 4.5rem 0 3rem; overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 3rem; align-items: center;
}
.hero__cta { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin-top: 1.8rem; }
.hero__copy .lead { margin-top: 1.2rem; max-width: 34rem; }
.hero__media { position: relative; }

/* Videos seamless: sin marco, sin sombra — el fondo blanco del video
   se funde con el de la página y la animación parece parte del layout */
.video-seamless {
  display: block; width: 100%; height: auto;
  background: #fff; cursor: pointer;
}
.video-seamless--cta { max-width: 460px; margin: 0 auto; }

/* ===== Secciones ===== */
.section { padding: 5rem 0; }
.section--alt { background: var(--bg-alt); }
.section h2 { margin-top: 0.2rem; }
.section .lead.center { margin-top: 0.5rem; }

/* ===== Lista de clases ===== */
.clases {
  list-style: none;
  max-width: 640px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
}
.clases li + li { border-top: 1px solid var(--line); }
.clases a, .clases__next {
  display: flex; align-items: baseline; gap: 1.2rem;
  padding: 1.05rem 1.5rem;
}
.clases a { transition: background 0.15s ease; }
.clases a:hover { background: rgba(46, 127, 214, 0.05); }
.clases a:hover .clases__title { color: var(--indigo); }
.clases__num {
  flex: none; width: 4.6rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue);
}
.clases__title { font-weight: 700; transition: color 0.15s ease; }
.clases a::after {
  content: "→"; margin-left: auto; color: var(--teal);
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.clases a:hover::after { opacity: 1; transform: none; }
.clases__grupo {
  padding: 0.55rem 1.5rem; background: var(--bg-alt);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--indigo);
}
.clases__next { color: var(--muted); }
.clases__next .clases__num { color: var(--muted); }
.clases__next .clases__title { font-weight: 500; font-style: italic; }
.section .center .btn { margin-top: 2.2rem; }
.afternote { color: var(--muted); font-size: 0.88rem; margin-top: 1.4rem; }

/* ===== Cierre de marca ===== */
.cta { padding-bottom: 5rem; }

/* ===== Footer ===== */
.footer { background: var(--navy); color: #b8c2d8; padding: 3.5rem 0 1.5rem; }
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.footer__icon { height: 44px; margin-bottom: 0.7rem; }
.footer__wordmark { height: 20px; width: auto; margin-bottom: 0.8rem; }
.footer__brand p { font-size: 0.92rem; }
.footer__col { display: grid; gap: 0.5rem; align-content: start; }
.footer__col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.3rem; }
.footer__col a { font-size: 0.92rem; transition: color 0.15s; }
.footer__col a:hover { color: #52e5f0; }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  margin-top: 2.5rem; padding-top: 1.4rem;
  font-size: 0.82rem; text-align: center;
}
.footer__bottom a { color: #b8c2d8; }
.footer__bottom a:hover { color: #52e5f0; }

/* ===== Overlay de transición a curso (loading scene) =====
   Pantalla completa en blanco con la animación al centro; al terminar,
   el video se desvanece a blanco y se navega a la página del curso
   (también blanca), así el flujo se siente continuo, sin cortes. */
.introoverlay {
  position: fixed; inset: 0; z-index: 200;
  background: #fff;
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.introoverlay.show { opacity: 1; }
.introoverlay video {
  width: min(92vw, 1100px); height: auto;
}
/* Disolución final: el video se borra desde el centro en gradiente radial,
   con un desenfoque creciente, hasta desaparecer por completo en blanco. */
@property --dis-r {
  syntax: "<percentage>";
  initial-value: 0%;
  inherits: false;
}
.introoverlay.dissolve video {
  -webkit-mask-image: radial-gradient(circle at center, transparent var(--dis-r), #000 calc(var(--dis-r) + 30%));
  mask-image: radial-gradient(circle at center, transparent var(--dis-r), #000 calc(var(--dis-r) + 30%));
  animation: intro-dissolve 0.95s ease-in forwards;
}
@keyframes intro-dissolve {
  to { --dis-r: 140%; filter: blur(16px); opacity: 0; }
}
.introoverlay[hidden] { display: none; }

/* ===== Animaciones de aparición (scroll reveal) ===== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav__video { transition: none; }
}

/* ===== Páginas legales ===== */
.legal { padding: 3.5rem 0 5rem; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.4rem; }
.legal__updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2.2rem; }
.legal h2 { font-size: 1.25rem; margin: 2.2rem 0 0.6rem; }
.legal p, .legal li { color: var(--ink); font-size: 0.98rem; }
.legal ul, .legal ol { padding-left: 1.4rem; margin: 0.6rem 0; display: grid; gap: 0.4rem; }
.legal a { color: var(--indigo); font-weight: 600; }
.legal a:hover { text-decoration: underline; }
.legal .backlink { display: inline-block; margin-bottom: 1.6rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.legal .backlink:hover { color: var(--indigo); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding-top: 2.5rem; }
  .hero__media { order: -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav__video { height: 36px; }
  .nav__actions .btn { padding: 0.5rem 1rem; font-size: 0.88rem; }
  .clases a, .clases__next { padding: 0.95rem 1.1rem; gap: 0.8rem; }
  .clases__grupo { padding: 0.5rem 1.1rem; }
  .clases__num { width: 4.2rem; }
}
