/* ── Estilos elegibles de la página pública (s8) ──
   El HTML es uno solo; lo que cambia es el atributo `data-estilo` del <body>:
     moderno   → el diseño de siempre (sin reglas aquí, a propósito)
     vibrante  → el color de la academia es protagonista: hero a todo el ancho, formas
                 redondas, secciones con tinte. Para niños, música, danza, deportes.
     editorial → serifa grande, secciones numeradas, líneas finas, botón negro.
                 Para academias premium, profesionales, arte y diseño.
   Cada estilo redefine TOKENS (tokens.css) y retoca las formas que no salen de ellos.
   Color de marca y fuente del cuerpo los pone la academia y siguen mandando.
   El texto sobre el color usa --sobre-marca (blanco o casi negro, medido en color_marca.py).
   Va el último. */


/* ═══════════════════════════ VIBRANTE ═══════════════════════════ */

body[data-estilo="vibrante"] {
  --radio-insignia: 999px;
  --radio-boton:    999px;
  --radio-bloque:   18px;
  --radio-card:     24px;
  --radio-modal:    24px;
  --linea:        color-mix(in srgb, var(--marca) 12%, #E6E7EB);
  --fondo-suave:  color-mix(in srgb, var(--marca) 7%, #fff);
  --sombra-sm: 0 1px 2px rgba(15, 17, 21, .04), 0 10px 28px -16px color-mix(in srgb, var(--marca) 45%, transparent);
  --sombra-md: 0 28px 56px -22px color-mix(in srgb, var(--marca) 60%, transparent);
  /* El fondo a todo el ancho del hero y de las secciones sale 100vw: sin esto la barra
     de desplazamiento suma una franja y aparece scroll horizontal. */
  overflow-x: clip;
}

/* Fondo a todo el ancho detrás de un bloque que vive dentro de .contenedor-ac */
body[data-estilo="vibrante"] :is(.hero-ac, .seccion-ac:nth-of-type(odd)) {
  position: relative;
  isolation: isolate;
}
body[data-estilo="vibrante"] :is(.hero-ac, .seccion-ac:nth-of-type(odd))::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 100vw;
  margin-left: -50vw;
  z-index: -1;
}

/* ── Hero: el color de la academia de borde a borde ── */
body[data-estilo="vibrante"] .hero-ac {
  padding-top: 88px;
  padding-bottom: 112px;
  color: var(--sobre-marca);
}
body[data-estilo="vibrante"] .hero-ac::before {
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(255, 255, 255, .24), transparent 62%),
    radial-gradient(700px 360px at 0% 110%, rgba(0, 0, 0, .14), transparent 60%),
    var(--marca-degradado);
  border-radius: 0 0 clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px);
}
body[data-estilo="vibrante"] .hero-ac__titulo { color: var(--sobre-marca); }
body[data-estilo="vibrante"] .hero-ac :is(.tx-bajada, .hero-ac__eyebrow) {
  color: color-mix(in srgb, var(--sobre-marca) 84%, transparent);
}
body[data-estilo="vibrante"] .hero-ac__punto { background: var(--sobre-marca); }
body[data-estilo="vibrante"] .hero-ac .tx-etiqueta { color: color-mix(in srgb, var(--sobre-marca) 70%, transparent); }
body[data-estilo="vibrante"] .hero-ac__lateral-valor { color: var(--sobre-marca); }
body[data-estilo="vibrante"] .hero-ac__lateral {
  padding: 22px 24px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--sobre-marca) 12%, transparent);
  backdrop-filter: blur(6px);
}
body[data-estilo="vibrante"] .hero-ac .chip-ac {
  background: color-mix(in srgb, var(--sobre-marca) 16%, transparent);
  border-color: transparent;
  color: var(--sobre-marca);
}
/* Un logo con fondo blanco incrustado se vería como un parche sobre el color: va en
   su propia ficha blanca, que además sirve igual para logos transparentes. */
body[data-estilo="vibrante"] .hero-ac__logo {
  background: #fff;
  padding: 10px 14px;
  border-radius: 20px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .45);
}
/* Botones sobre el color: el principal en blanco (texto de marca, AA sobre blanco) y
   el secundario en contorno del color del texto. */
body[data-estilo="vibrante"] .hero-ac .btn-marca {
  background: #fff;
  color: var(--marca-fuerte);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5);
}
body[data-estilo="vibrante"] .hero-ac .btn-contorno {
  background: transparent;
  color: var(--sobre-marca);
  border-color: color-mix(in srgb, var(--sobre-marca) 55%, transparent);
}
body[data-estilo="vibrante"] .hero-ac .btn-contorno:hover {
  background: color-mix(in srgb, var(--sobre-marca) 12%, transparent);
}

/* ── Secciones: una sí y una no con tinte de la marca (las tarjetas quedan blancas) ── */
body[data-estilo="vibrante"] .seccion-ac:nth-of-type(odd)::before { background: var(--fondo-suave); }
body[data-estilo="vibrante"] .seccion-ac__titulo { letter-spacing: -.035em; }
body[data-estilo="vibrante"] .seccion-ac__contador {
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--marca-fuerte);
  background: var(--marca-suave);
  border-radius: 999px;
  padding: 8px 14px;
}

/* ── Tarjetas: más redondas, portada con margen interior, CTA con el color ── */
body[data-estilo="vibrante"] .card-ac { border-color: transparent; }
body[data-estilo="vibrante"] .card-ac__portada {
  margin: 10px 10px 0;
  border-radius: 18px;
  overflow: hidden;
}
body[data-estilo="vibrante"] .card-ac__cta {
  background: var(--marca-suave);
  border-color: transparent;
  color: var(--marca-fuerte);
}
body[data-estilo="vibrante"] .card-ac__sello { border-color: transparent; }
body[data-estilo="vibrante"] .profesores-ac__card { border-color: transparent; }
body[data-estilo="vibrante"] .sobre-ac__galeria img { border-color: transparent; }

@media (max-width: 720px) {
  /* navbar.css fija 8px al «Ingresar» en móvil; aquí todo botón es píldora */
  body[data-estilo="vibrante"] .btn-marca--sm { border-radius: 999px; }
  body[data-estilo="vibrante"] .hero-ac { padding-top: var(--esp-8); padding-bottom: 56px; }
  body[data-estilo="vibrante"] .hero-ac__lateral { padding: 18px; }
  body[data-estilo="vibrante"] .card-ac__portada { margin: 8px 8px 0; border-radius: 16px; }
}


/* ═══════════════════════════ EDITORIAL ═══════════════════════════ */
/* La serifa (Fraunces) se pide en el encabezado SOLO con este estilo. Georgia de respaldo. */

body[data-estilo="editorial"] {
  --serifa: "Fraunces", Georgia, "Times New Roman", serif;
  --tinta:  #0B0B0C;
  --linea:  #E2E2E0;
  --fondo-suave: #F4F4F1;
  --radio-insignia: 0;
  --radio-boton:    0;
  --radio-bloque:   0;
  --radio-card:     0;
  --radio-modal:    4px;
  --sombra-sm: none;
  --sombra-md: none;
  background: #FCFCFA;
  counter-reset: seccion-ed;
}
body[data-estilo="editorial"] :is(.tx-display, .tx-display-sm, .tx-h2, .tx-h3, .tx-titulo-card, .tx-precio, .profesores-ac__nombre) {
  font-family: var(--serifa);
  font-weight: 450;
  font-optical-sizing: auto;
  letter-spacing: -.02em;
}
body[data-estilo="editorial"] .nav-ac { background: #FCFCFA; }

/* ── Hero: titular grande (la línea fina la pone la primera sección numerada) ── */
body[data-estilo="editorial"] .hero-ac .tx-display    { font-size: clamp(44px, 7.4vw, 96px); line-height: .98; letter-spacing: -.03em; }
body[data-estilo="editorial"] .hero-ac .tx-display-sm { font-size: clamp(40px, 6vw, 76px); line-height: 1.02; }
body[data-estilo="editorial"] .hero-ac__titulo { max-width: 14ch; }
body[data-estilo="editorial"] .hero-ac__eyebrow { color: var(--tinta); letter-spacing: .14em; font-size: 12px; }
body[data-estilo="editorial"] .hero-ac__lateral { border-left: 1px solid var(--linea); padding-left: 28px; }
body[data-estilo="editorial"] .chip-ac { background: transparent; border-color: var(--linea); }

/* Botones: negro y contorno fino. El color de la academia aparece al pasar el cursor. */
body[data-estilo="editorial"] .btn-marca {
  background: var(--tinta);
  color: #fff;
  transition: background-color 140ms ease, color 140ms ease;
}
body[data-estilo="editorial"] .btn-marca:hover { background: var(--marca-degradado); color: var(--sobre-marca); }
body[data-estilo="editorial"] .btn-contorno { background: transparent; border-color: var(--tinta); }

/* ── Secciones numeradas: 01, 02… sobre una línea fina ── */
body[data-estilo="editorial"] .seccion-ac { counter-increment: seccion-ed; }
body[data-estilo="editorial"] .seccion-ac__cabecera {
  border-top: 1px solid var(--tinta);
  padding-top: var(--esp-5);
  align-items: flex-start;
}
body[data-estilo="editorial"] .seccion-ac__titulo::before {
  content: counter(seccion-ed, decimal-leading-zero);
  display: block;
  margin-bottom: var(--esp-3);
  font-family: var(--fuente-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--marca-fuerte);
}

/* ── Tarjetas sin caja: foto, texto y una línea. Se lee como una revista. ── */
body[data-estilo="editorial"] .card-ac {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--linea);
  overflow: visible;
}
body[data-estilo="editorial"] .card-ac:hover { border-bottom-color: var(--tinta); transform: none; box-shadow: none; }
body[data-estilo="editorial"] .card-ac__portada img { transition: transform 400ms ease; }
body[data-estilo="editorial"] .card-ac:hover .card-ac__portada { overflow: hidden; }
body[data-estilo="editorial"] .card-ac:hover .card-ac__portada img { transform: scale(1.03); }
body[data-estilo="editorial"] .card-ac__cuerpo { padding-left: 0; padding-right: 0; }
body[data-estilo="editorial"] .card-ac__sello { border-color: var(--tinta); color: var(--tinta); }
body[data-estilo="editorial"] .insignia--marca { background: transparent; color: var(--marca-fuerte); box-shadow: inset 0 0 0 1px currentColor; }
body[data-estilo="editorial"] .insignia--neutra { background: transparent; box-shadow: inset 0 0 0 1px var(--linea); }
body[data-estilo="editorial"] .card-ac__cta { background: transparent; border-color: var(--tinta); }
body[data-estilo="editorial"] .card-ac:hover .card-ac__cta { background: var(--tinta); border-color: var(--tinta); color: #fff; }

body[data-estilo="editorial"] .profesores-ac__card { background: transparent; border: 0; border-top: 1px solid var(--linea); padding-left: 0; padding-right: 0; }
body[data-estilo="editorial"] .profesores-ac__foto { border-radius: 0; filter: grayscale(1); }
body[data-estilo="editorial"] .sobre-ac__galeria img { border: 0; }

@media (max-width: 720px) {
  body[data-estilo="editorial"] .hero-ac__lateral { border-left: 0; border-top: 1px solid var(--linea); padding: var(--esp-5) 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-estilo="editorial"] .card-ac__portada img { transition: none; }
  body[data-estilo="editorial"] .card-ac:hover .card-ac__portada img { transform: none; }
}
