/* Fondo ambiental de Botía: escenario (foco cónico cálido desde arriba, viñeta de bordes); Mente Maestra con calor rojo desde abajo; ansiedad marino con una luz azul que respira. Solo #fondo y sus pseudo-elementos. Medidas en vmax para que escale en pantallas anchas. */
#fondo {
  /* viñeta suave en los bordes + color base */
  background:
    radial-gradient(ellipse 85vmax 70vmax at 50% 42%, transparent 55%, light-dark(rgb(120 100 40 / 0.16), rgb(0 0 0 / 0.55))),
    var(--sup-0);
}

/* Brillo dorado tenue como colchón de luz arriba y brasa cálida en la esquina baja */
#fondo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 52vmax 24vmax at 50% -6%, light-dark(color-mix(in srgb, var(--acento) 55%, transparent), color-mix(in srgb, var(--acento) 30%, transparent)), transparent 72%),
    radial-gradient(ellipse 34vmax 20vmax at 100% 100%, light-dark(color-mix(in srgb, var(--acento-2) 28%, transparent), color-mix(in srgb, var(--acento-2) 16%, transparent)), transparent 72%);
}

/* Foco cónico de luz cálida desde arriba, con caída hacia abajo, que oscila apenas un par de grados */
#fondo::after {
  content: "";
  position: absolute;
  inset: -4% -10% 0;
  background: conic-gradient(from 150deg at 50% -3%, transparent 0deg, light-dark(color-mix(in srgb, var(--acento) 42%, transparent), color-mix(in srgb, var(--acento-2) 34%, transparent)) 30deg, transparent 60deg, transparent 360deg);
  -webkit-mask-image: linear-gradient(180deg, var(--texto), transparent 72%);
  mask-image: linear-gradient(180deg, var(--texto), transparent 72%);
  transform-origin: 50% 0;
  will-change: transform;
  animation: botia-foco 18s ease-in-out infinite alternate;
}
@keyframes botia-foco {
  from { transform: rotate(-1.6deg); }
  to { transform: rotate(1.6deg); }
}

/* Mente Maestra: del negro al rojo oscuro de la submarca (#000000 → #A42C20) */
[data-marca="mente-maestra"] #fondo::before {
  background:
    radial-gradient(ellipse 60vmax 30vmax at 50% 112%, light-dark(color-mix(in srgb, var(--acento) 40%, transparent), color-mix(in srgb, var(--acento) 46%, rgb(164 44 32))), transparent 74%),
    radial-gradient(ellipse 36vmax 20vmax at 0% 0%, light-dark(color-mix(in srgb, var(--acento) 18%, transparent), color-mix(in srgb, var(--acento) 14%, transparent)), transparent 72%);
}

/* Supera tu Ansiedad: marino con una luz azul que respira muy despacio (sin foco cónico) */
[data-marca="ansiedad"] #fondo::before {
  inset: -10%;
  background:
    radial-gradient(ellipse 34vmax 24vmax at 50% 40%, light-dark(color-mix(in srgb, var(--acento-2) 55%, transparent), color-mix(in srgb, var(--acento-2) 52%, transparent)), transparent 72%),
    radial-gradient(ellipse 46vmax 26vmax at 50% 110%, light-dark(color-mix(in srgb, var(--acento) 30%, transparent), color-mix(in srgb, var(--acento) 22%, transparent)), transparent 72%);
  will-change: transform, opacity;
  animation: ansiedad-respira 11s ease-in-out infinite;
}
[data-marca="ansiedad"] #fondo::after {
  inset: 0;
  background: radial-gradient(ellipse 80vmax 50vmax at 50% 30%, light-dark(rgb(255 255 255 / 0.5), rgb(193 204 217 / 0.07)), transparent 100%);
  -webkit-mask-image: none;
  mask-image: none;
  animation: none;
  transform: none;
}
@keyframes ansiedad-respira {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.14); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #fondo::after { animation: none; }
  [data-marca="ansiedad"] #fondo::before { animation: none; opacity: 0.8; }
}
