/* ============================================================
   Academia Galois · estilos
   Colores y tipografía en :root para cambiarlos en un solo sitio.
   ============================================================ */
:root {
  --negro: #08080a;          /* fondo de la página */
  --superficie: #111216;     /* tarjetas */
  --superficie-2: #18191e;   /* tarjetas al pasar el ratón, campos */
  --linea: #25272d;          /* bordes */
  --texto: #eceef1;
  --texto-suave: #a3a7b0;
  --acento: #f4b740;
  --acento-tenue: rgba(244, 183, 64, .1);
  --tiza: rgba(255, 255, 255, .11);   /* apuntes del fondo */
  --wa: #157a3f;
  --wa-hover: #1a8c49;
  --error: #ff8a7a;

  --fuente: "Figtree", "Segoe UI", system-ui, sans-serif;
  --fuente-titulos: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --fuente-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --fuente-latex: "KaTeX_Main", "Latin Modern Roman", "CMU Serif", "Times New Roman", serif;

  --radio: 14px;
  --ancho: 1140px;
  --curva: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; background: var(--negro); color-scheme: dark; }
body {
  position: relative;
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--negro);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--fuente-titulos); font-weight: 650; letter-spacing: -.02em; line-height: 1.08; color: #fff; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--acento); }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--acento); color: var(--negro); }

main, .pie { position: relative; z-index: 1; }
.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .contenedor { padding: 0 24px; } }
.contenedor--estrecho { max-width: 820px; }
.centrado { text-align: center; margin-top: 2rem; }
.oculto { position: absolute; left: -9999px; }

.saltar { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--acento); color: var(--negro); padding: .5rem 1rem; }
.saltar:focus { left: 8px; }

/* ---------- Barra de progreso de lectura ---------- */
.progreso { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: var(--acento); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .2s var(--curva), box-shadow .2s, color .2s, border-color .2s;
  min-height: 48px;
}
.boton:hover { transform: translateY(-2px); }
.boton--grande { padding: 1rem 1.8rem; font-size: 1.125rem; min-height: 56px; }
.boton--peq { padding: .45rem 1rem; min-height: 40px; font-size: .95rem; }
.boton--wa { background: var(--wa); color: #fff; box-shadow: 0 8px 28px rgba(21, 122, 63, .35); }
.boton--wa:hover { background: var(--wa-hover); }
.boton--claro { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.boton--claro:hover { background: rgba(255, 255, 255, .06); border-color: #fff; }
.boton--primario { background: var(--acento); color: var(--negro); }
.boton--primario:hover { background: #ffc95e; }
.boton--contorno { background: transparent; color: var(--acento); border-color: var(--acento); }
.boton--contorno:hover { background: var(--acento); color: var(--negro); }
.icono { width: 1.35em; height: 1.35em; flex: none; }
.icono--grande { width: 2rem; height: 2rem; }
.enlace { font-weight: 650; color: var(--acento); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.enlace:hover { text-decoration-thickness: 2px; }

/* ---------- Barra de aviso ---------- */
.aviso-barra { position: relative; z-index: 2; background: var(--acento); color: var(--negro); font-size: .925rem; text-align: center; padding: .5rem 16px; }
.aviso-barra p { margin: 0; }
.aviso-barra a { color: var(--negro); font-weight: 700; }
.etiqueta { display: inline-block; font-family: var(--fuente-mono); background: var(--negro); color: #fff; border-radius: 999px; padding: .05rem .6rem; font-size: .75rem; font-weight: 500; margin-right: .35rem; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 50; background: rgba(8, 8, 10, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--linea); }
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; }
.logo__marca { width: 40px; height: 40px; flex: none; transition: transform .5s var(--curva); }
.logo:hover .logo__marca { transform: rotate(-72deg); }
.logo__texto { display: flex; flex-direction: column; line-height: 1; }
.logo__nombre { font-family: var(--fuente-titulos); font-weight: 800; font-size: 1.45rem; letter-spacing: .06em; }
.logo__sub { font-family: var(--fuente-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-suave); margin-top: .3rem; }
.menu { display: flex; align-items: center; gap: 1.4rem; }
.menu a:not(.boton) { color: var(--texto-suave); text-decoration: none; font-weight: 550; font-size: .975rem; transition: color .2s; }
.menu a:not(.boton):hover { color: #fff; }
.menu-boton { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-boton span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }
@media (max-width: 899px) {
  .menu-boton { display: block; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--negro); border-bottom: 1px solid var(--linea); padding: .5rem 16px 1rem; display: none;
  }
  .menu.abierto { display: flex; }
  .menu a:not(.boton) { padding: .85rem 0; border-bottom: 1px solid var(--linea); color: var(--texto); }
  .menu .boton { margin-top: 1rem; }
  .menu-boton[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-boton[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-boton[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3.5rem, 9vw, 6rem);
  background:
    radial-gradient(60% 70% at 82% 30%, rgba(244, 183, 64, .09), transparent 70%),
    radial-gradient(1px 1px at 1px 1px, rgba(255, 255, 255, .07) 1px, transparent 0) 0 0 / 28px 28px;
}
.hero__fondo { position: absolute; inset: 0; pointer-events: none; }
.hero__quintica { position: absolute; right: -6%; top: 50%; width: min(60vw, 640px); transform: translateY(-50%); color: #fff; }
.hero__quintica > svg { width: 100%; height: auto; overflow: visible; }
.quintica__gira { transform-origin: 300px 300px; transform-box: view-box; }
.quintica__trazo { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dibujar 2.4s var(--curva) forwards; }
.quintica__trazo--2 { animation-delay: .5s; animation-duration: 3s; }
.quintica__raiz { color: var(--acento); opacity: 0; animation: aparecer .8s 1.6s forwards; }
.quintica__nota { color: rgba(255, 255, 255, .4); opacity: 0; animation: aparecer 1s 2.2s forwards; }
.quintica__flecha { opacity: 0; animation: aparecer 1s 2.2s forwards; }
@keyframes dibujar { to { stroke-dashoffset: 0; } }
@keyframes aparecer { to { opacity: 1; } }
@media (max-width: 899px) { .hero__quintica { right: -40%; width: 110vw; opacity: .45; top: 38%; } }

.hero__contenido { position: relative; max-width: 800px; margin-left: max(0px, calc((100% - var(--ancho)) / 2)); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 6.6vw, 4.3rem); margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--acento); }
.hero__lema { display: inline-block; color: var(--acento); font-family: var(--fuente-mono); font-weight: 500; font-size: .95rem; letter-spacing: .04em; border-bottom: 2px solid var(--acento); margin-bottom: 1.4rem; }
.hero__niveles { font-size: clamp(1.15rem, 2.6vw, 1.45rem); color: #d6d8dd; margin-bottom: .7rem; }
.hero__online { font-size: 1.05rem; color: var(--texto-suave); margin-bottom: 2rem; }
.hero__online strong { color: #fff; font-weight: 600; }
.hero__botones { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__puntos { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--texto-suave); font-size: .975rem; }
.hero__puntos li::before { content: "✓"; color: var(--acento); font-weight: 700; margin-right: .45rem; }
@media (max-width: 480px) { .hero__botones .boton { width: 100%; } }

/* Entrada del hero al cargar */
.hero__contenido > * { opacity: 0; transform: translateY(18px); animation: entrar .9s var(--curva) forwards; }
.hero__contenido > :nth-child(2) { animation-delay: .08s; }
.hero__contenido > :nth-child(3) { animation-delay: .16s; }
.hero__contenido > :nth-child(4) { animation-delay: .24s; }
.hero__contenido > :nth-child(5) { animation-delay: .32s; }
.hero__contenido > :nth-child(6) { animation-delay: .4s; }
@keyframes entrar { to { opacity: 1; transform: none; } }

/* ---------- Apuntes de Galois (los genera main.js dentro de cada sección) ---------- */
.seccion > .contenedor { position: relative; z-index: 1; }
.apunte {
  position: absolute; z-index: 0; pointer-events: none; white-space: nowrap; font-family: var(--fuente-latex); line-height: 1.1; opacity: 0; transition: opacity 1s;
  color: var(--tiza); will-change: transform;
}
.apunte.listo { opacity: 1; }
foreignObject { overflow: visible; }
.tx { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--fuente-latex); font-style: italic; white-space: nowrap; line-height: 1; }
.tx .katex { font-size: 1em; }
.apunte .katex { font-size: 1em; }
.apunte--acento { color: rgba(244, 183, 64, .22); }
.apunte > svg { display: block; overflow: visible; }
.katex svg { max-width: none; }
.apunte--cab { top: clamp(5rem, 9vw, 7.5rem); right: 6%; }
.apunte--arriba { top: 1.2rem; }
.apunte--abajo { bottom: 1rem; }
.apunte--izq { top: 32%; left: 3%; }
.apunte--der { top: 45%; right: 3%; }
@media (max-width: 999px) { .apunte--cab { display: none; } }
@media (max-width: 1299px) { .apunte--izq, .apunte--der { display: none; } }
@media (max-width: 640px) { .apunte { font-size: 20px !important; } .apunte--arriba { top: .9rem; } .apunte--abajo { bottom: .7rem; } }

/* ---------- Aparición al hacer scroll ---------- */
.revela { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--curva), transform .8s var(--curva); transition-delay: calc(var(--d, 0) * 90ms); }
.revela.visible { opacity: 1; transform: none; }

/* ---------- Secciones ---------- */
.seccion { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; }
.seccion--suave { background: linear-gradient(180deg, rgba(255, 255, 255, .018), rgba(255, 255, 255, .03)); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.seccion--oscura { color: var(--texto-suave); }
.seccion__cabecera { max-width: 700px; margin-bottom: 2.75rem; }
.seccion__cabecera p:last-child { color: var(--texto-suave); font-size: 1.1rem; }
.antetitulo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--fuente-mono); font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--acento); margin-bottom: .75rem; }
.antetitulo::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; }
.antetitulo--claro { color: var(--acento); }

.rejilla { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .rejilla--4, .rejilla--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .rejilla--4 { grid-template-columns: repeat(4, 1fr); } .rejilla--3 { grid-template-columns: repeat(3, 1fr); } }

.tarjeta {
  position: relative; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.6rem;
  transition: border-color .3s, background-color .3s, opacity .8s var(--curva), transform .8s var(--curva);
}
.tarjeta:hover { border-color: #3a3d45; background: var(--superficie-2); }
.tarjeta p { color: var(--texto-suave); }
.tarjeta p:last-child { margin-bottom: 0; }

.nivel__simbolo { display: inline-grid; place-items: center; min-width: 3.2rem; height: 3.2rem; padding: 0 .6rem; border-radius: 12px; background: var(--acento-tenue); border: 1px solid rgba(244, 183, 64, .25); color: var(--acento); font-family: var(--fuente-mono); font-weight: 500; font-size: 1.15rem; margin-bottom: 1rem; transition: transform .4s var(--curva); }
.nivel:hover .nivel__simbolo { transform: rotate(-6deg) scale(1.06); }

.modalidad__icono { width: 2.5rem; height: 2.5rem; color: var(--acento); margin-bottom: .8rem; }
.modalidad--pronto { background: linear-gradient(160deg, var(--superficie) 55%, rgba(244, 183, 64, .08)); border-style: dashed; border-color: rgba(244, 183, 64, .55); }
.sello { font-family: var(--fuente-mono); position: absolute; top: 1.2rem; right: 1.2rem; background: var(--acento); color: var(--negro); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding: .25rem .65rem; border-radius: 999px; }
.sello--grande { position: static; display: inline-block; font-size: .8rem; margin-bottom: 1rem; }

/* ---------- Quién soy ---------- */
.yo { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 800px) { .yo { grid-template-columns: 300px 1fr; gap: 3.5rem; } }
.yo__foto { width: min(100%, 300px); aspect-ratio: 1; border-radius: 24px; overflow: hidden; border: 1px solid var(--linea); background: radial-gradient(circle at 50% 40%, rgba(244, 183, 64, .12), var(--superficie) 70%); display: grid; place-items: center; }
.yo__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yo__marca { width: 55%; height: auto; }
.yo__texto p:not(.antetitulo) { color: var(--texto-suave); font-size: 1.1rem; max-width: 60ch; }
.yo__texto strong { color: var(--texto); }
.yo__datos { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.yo__datos li { font-family: var(--fuente-mono); font-size: .8rem; letter-spacing: .04em; color: var(--acento); border: 1px solid rgba(244, 183, 64, .35); border-radius: 999px; padding: .35rem .85rem; }

/* ---------- Zonas / mapa ---------- */
.zonas { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .zonas { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.mapa { height: 420px; border-radius: var(--radio); overflow: hidden; border: 1px solid var(--linea); background: var(--superficie); z-index: 0; }
@media (max-width: 640px) { .mapa { height: 340px; } }
.mapa .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.4); }
.mapa .leaflet-control-attribution { background: rgba(8, 8, 10, .8); color: var(--texto-suave); }
.mapa .leaflet-control-attribution a { color: var(--texto); }
.mapa .leaflet-bar a { background: var(--superficie-2); color: #fff; border-color: var(--linea); }
.mapa__cargando { display: grid; place-items: center; height: 100%; margin: 0; color: var(--texto-suave); }
.distritos { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1rem; }
.distritos li { display: flex; align-items: center; gap: .5rem; font-weight: 550; }
.distritos li::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 3px rgba(244, 183, 64, .18); flex: none; }
.zonas__lista h3 { font-size: 1.15rem; }
.nota { background: var(--acento-tenue); border-left: 3px solid var(--acento); border-radius: 10px; padding: 1.1rem 1.2rem; }
.nota p { margin-bottom: .8rem; }
.leaflet-tooltip.etiqueta-distrito { background: var(--negro); color: #fff; border: 1px solid rgba(244, 183, 64, .5); border-radius: 6px; font-family: var(--fuente); font-weight: 600; font-size: .78rem; box-shadow: none; padding: 2px 7px; }
.leaflet-tooltip.etiqueta-distrito::before { display: none; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--superficie-2); color: var(--texto); }

/* ---------- Precios ---------- */
.precios { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .precios { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .precios { grid-template-columns: repeat(3, 1fr); } }
.precio { display: flex; flex-direction: column; }
.precio h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.precio--destacado h3 { padding-right: 7.5rem; }
.precio__desc { font-size: .975rem; }
.tarjeta .precio__cifra { font-family: var(--fuente-titulos); font-size: 2.8rem; font-weight: 700; letter-spacing: -.03em; color: #fff; line-height: 1; margin: .5rem 0 .3rem; }
.precio__cifra small { font-family: var(--fuente); font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--texto-suave); margin-left: .25rem; }
.tarjeta .precio__cifra--falta { color: var(--error); font-size: 1.6rem; }
.precio__ahorro { display: inline-block; align-self: flex-start; background: rgba(46, 184, 104, .14); color: #6fdc9b; font-weight: 700; font-size: .9rem; padding: .2rem .65rem; border-radius: 999px; margin-bottom: .6rem; }
.precio__opciones { margin: .6rem 0 .2rem !important; display: grid; gap: .55rem; }
.precio__opciones li { padding: 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; }
.precio__opciones li::before { display: none; }
.precio__opcion { min-width: 5.6rem; font-family: var(--fuente-mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-suave); }
.precio__opciones .precio__cifra { margin: 0; font-family: var(--fuente-titulos); font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; color: #fff; line-height: 1; }
.precio__opciones .precio__ahorro { margin: 0; }
.precio ul { list-style: none; padding: 0; margin: .8rem 0 1.4rem; color: var(--texto-suave); font-size: .975rem; }
.precio li { padding: .25rem 0 .25rem 1.6rem; position: relative; }
.precio li::before { content: "✓"; position: absolute; left: 0; color: var(--acento); font-weight: 800; }
.precio .boton { margin-top: auto; width: 100%; }
.precio--destacado { border: 1px solid var(--acento); background: linear-gradient(170deg, rgba(244, 183, 64, .09), var(--superficie) 45%); box-shadow: 0 0 0 1px rgba(244, 183, 64, .25), 0 20px 60px -20px rgba(244, 183, 64, .35); }
.precio--destacado:hover { border-color: var(--acento); }
.precios__nota { margin-top: 1.4rem; color: var(--texto-suave); font-size: .925rem; text-align: center; }

/* ---------- Pasos ---------- */
.pasos { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .pasos { grid-template-columns: repeat(3, 1fr); } }
.paso { position: relative; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.6rem; }
.paso p { color: var(--texto-suave); margin: 0; }
.paso__num { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--acento); color: var(--acento); font-family: var(--fuente-mono); font-size: 1.2rem; font-weight: 500; margin-bottom: 1rem; }

/* ---------- Galois ---------- */
.galois { position: relative; overflow: hidden; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); background: radial-gradient(70% 80% at 80% 50%, rgba(244, 183, 64, .06), transparent 70%); }
.galois__fila { display: grid; gap: 2.5rem; position: relative; z-index: 1; }
@media (min-width: 900px) { .galois__fila { grid-template-columns: 1.15fr 1fr; align-items: center; } }
.galois__texto p { max-width: 62ch; color: var(--texto-suave); }
.galois__retrato { display: flex; align-items: flex-end; gap: 1rem; margin: 0 0 1.6rem; }
.galois__retrato img { width: 120px; height: auto; border-radius: 12px; border: 1px solid var(--linea); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); transform: rotate(-2deg); }
.galois__retrato figcaption { font-family: var(--fuente-latex); font-style: italic; font-size: 1.3rem; line-height: 1.15; color: var(--texto); }
.galois__retrato figcaption span { display: block; margin-top: .35rem; font-family: var(--fuente-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); }
.galois__texto em { color: var(--texto); }
.galois__lema { font-size: 1.2rem; color: #fff !important; border-left: 3px solid var(--acento); padding-left: 1rem; margin-top: 1.5rem; }
.galois__lema strong { color: var(--acento); }
.galois__diagrama { margin: 0; padding: 1.5rem 1.25rem 1.25rem; border: 1px solid var(--linea); border-radius: var(--radio); background: rgba(17, 18, 22, .85); }
.galois__diagrama > svg { width: 100%; height: auto; display: block; }
.corr__titulo { font-family: var(--fuente-mono); font-size: 13px; letter-spacing: .12em; fill: var(--texto-suave); text-transform: uppercase; }
.corr__nodo { color: #fff; }
.corr__nodo--g { color: var(--acento); }
.corr__linea { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1.5; stroke-linecap: round; }
.corr__flecha { fill: none; stroke: var(--acento); stroke-width: 1.5; stroke-dasharray: 4 5; }
.corr__etq { color: var(--acento); }
.galois__diagrama figcaption { margin-top: 1rem; font-size: .9rem; color: var(--texto-suave); }
.galois__cita { margin: 1.4rem 0 0; padding-top: 1.2rem; border-top: 1px dashed var(--linea); }
.galois__cita p { font-family: var(--fuente-latex); font-style: italic; font-size: 1.8rem; line-height: 1.1; color: var(--acento); margin-bottom: .3rem; }
.galois__cita footer { color: var(--texto-suave); font-size: .875rem; }

/* ---------- Opiniones ---------- */
.opiniones { display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .opiniones { grid-template-columns: repeat(3, 1fr); } }
.opinion { margin: 0; }
.opinion__estrellas { color: var(--acento); letter-spacing: .1em; margin-bottom: .6rem; }
.opinion blockquote { margin: 0 0 1rem; color: var(--texto); }
.opinion figcaption { font-weight: 700; color: #fff; }
.opinion figcaption span { display: block; font-weight: 400; color: var(--texto-suave); font-size: .925rem; }
.opiniones__vacio { text-align: center; max-width: 560px; margin: 0 auto; padding: 2.4rem 1.5rem; border: 1px dashed #3a3d45; border-radius: var(--radio); background: var(--superficie); }
.opiniones__titulo { font-family: var(--fuente-titulos); font-weight: 650; font-size: 1.5rem; color: #fff; margin-bottom: .4rem; }
.opiniones__vacio p:last-child { color: var(--texto-suave); margin: 0; }

/* ---------- FAQ ---------- */
.faq details { background: var(--superficie); border: 1px solid var(--linea); border-radius: 12px; margin-bottom: .75rem; transition: border-color .3s, opacity .8s var(--curva), transform .8s var(--curva); }
.faq details[open] { border-color: rgba(244, 183, 64, .45); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.25rem; font-weight: 650; color: #fff; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-family: var(--fuente-mono); font-size: 1.3rem; font-weight: 400; color: var(--acento); transition: transform .3s var(--curva); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 1.25rem 1.2rem; margin: 0; color: var(--texto-suave); }

/* ---------- Próximamente ---------- */
.pronto { display: grid; gap: 2rem; background: var(--superficie); border: 1px dashed rgba(244, 183, 64, .6); border-radius: 20px; padding: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 900px) { .pronto { grid-template-columns: 1fr 1fr; align-items: center; } }
.pronto__texto p { color: var(--texto-suave); font-size: 1.1rem; }
.formulario { display: grid; gap: 1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .35rem; }
.campo input[type="text"], .campo select { width: 100%; font: inherit; padding: .75rem .9rem; border: 1px solid #3a3d45; border-radius: 10px; background: var(--negro); color: var(--texto); min-height: 48px; }
.campo input:focus, .campo select:focus { border-color: var(--acento); outline: 3px solid rgba(244, 183, 64, .2); outline-offset: 0; }
.opcional { font-weight: 400; color: var(--texto-suave); }
.campo--check { display: flex; gap: .65rem; align-items: flex-start; }
.campo--check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; accent-color: var(--acento); }
.campo--check label { font-weight: 400; font-size: .95rem; color: var(--texto-suave); margin: 0; }
.formulario__estado { margin: 0; font-weight: 600; min-height: 1.5em; }
.formulario__estado.ok { color: #6fdc9b; }
.formulario__estado.error { color: var(--error); }

/* ---------- Contacto ---------- */
.contacto { display: grid; gap: 1rem; }
@media (min-width: 800px) { .contacto { grid-template-columns: repeat(3, 1fr); } }
.contacto__item { display: flex; gap: 1rem; align-items: center; padding: 1.3rem 1.4rem; border-radius: var(--radio); background: var(--superficie); border: 1px solid var(--linea); color: #fff; text-decoration: none; transition: border-color .3s, background-color .3s, opacity .8s var(--curva), transform .8s var(--curva); overflow-wrap: anywhere; }
.contacto__item:hover { border-color: var(--acento); background: var(--superficie-2); }
.contacto__item .icono { color: var(--acento); }
.contacto__item strong { display: block; }
.contacto__item span span { color: var(--texto-suave); }

/* ---------- Pie ---------- */
.pie { background: #050506; border-top: 1px solid var(--linea); color: var(--texto-suave); padding: 2.5rem 0 6rem; font-size: .95rem; }
.pie__fila { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.pie__marca { font-family: var(--fuente-titulos); font-weight: 800; letter-spacing: .06em; font-size: 1.5rem; color: #fff; margin-bottom: .5rem; line-height: 1; }
.pie__marca span { display: block; font-family: var(--fuente-mono); font-weight: 400; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-suave); margin-top: .35rem; }
.pie__titular { margin: 0; }
.pie__enlaces { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; }
.pie a { color: var(--texto); }
.pie__copy { margin-top: 1.5rem; font-size: .875rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); transition: transform .2s var(--curva), background-color .2s; }
.wa-flotante:hover { transform: scale(1.07); background: var(--wa-hover); }
.wa-flotante svg { width: 32px; height: 32px; }
@media (min-width: 900px) { .wa-flotante { right: 24px; bottom: 24px; } }

/* ---------- Páginas legales ---------- */
.legal { padding: 3rem 0 4rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--texto-suave); }
.legal strong { color: var(--texto); }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.legal th, .legal td { text-align: left; border: 1px solid var(--linea); padding: .6rem .75rem; vertical-align: top; }
.legal th { background: var(--superficie-2); color: #fff; }
.legal .tabla { overflow-x: auto; }
.marcador { background: var(--acento-tenue); color: var(--acento); padding: 0 .25rem; border-radius: 4px; }

/* El retraso escalonado de la aparición manda sobre las transiciones de cada tarjeta */
.revela { transition-delay: calc(var(--d, 0) * 90ms); }

/* ---------- Menos movimiento si el usuario lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .revela { opacity: 1; transform: none; }
}
