/* Acabado visual: cabecera translúcida, estados de interacción, animaciones y fondos. */
:root { --color-fondo: #f6eff0; --ritmo-ui: 220ms; --curva-ui: cubic-bezier(.2, .65, .3, 1); }
html { scroll-padding-top: 108px; }
.hero { position: relative; isolation: isolate; background: var(--color-fondo); }
.hero__interior { position: relative; }

/* Cabecera fija al hacer scroll; su altura se reduce en escritorio. */
.saltar-contenido { z-index: 100; }
.cabecera { position: sticky; top: 0; z-index: 30; background: transparent; isolation: isolate; }
.cabecera::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgb(246 239 240 / 88%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: opacity var(--ritmo-ui) ease, height var(--ritmo-ui) var(--curva-ui), box-shadow var(--ritmo-ui) ease, border-color var(--ritmo-ui) ease;
}
.cabecera__interior { position: relative; transition: min-height var(--ritmo-ui) var(--curva-ui); }
.cabecera--desplazada::before, .cabecera.menu-abierto::before {
  opacity: 1;
  border-bottom-color: rgb(49 91 57 / 9%);
  box-shadow: 0 6px 22px rgb(37 53 43 / 4%);
}
@media (min-width: 1101px) {
  .cabecera { height: 110px; pointer-events: none; transition: height var(--ritmo-ui) var(--curva-ui); }
  .cabecera--desplazada { height: 86px; }
  .cabecera__interior { pointer-events: auto; }
  .cabecera::before { height: 110px; bottom: auto; }
  .cabecera--desplazada::before { height: 86px; }
  .cabecera--desplazada .cabecera__interior { min-height: 86px; }
}

/* Las respuestas de todos los controles comparten duración y aceleración. */
.boton, .pie__instagram { transition: background-color var(--ritmo-ui) ease, color var(--ritmo-ui) ease, transform 140ms var(--curva-ui); }
.boton:active, .menu-movil:active { transform: translateY(1px); }
.enlace, .navegacion a:not(.boton), .pie__legal a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 2px);
  background-size: 0 1px;
  transition: background-size var(--ritmo-ui) var(--curva-ui), color var(--ritmo-ui) ease;
}
.navegacion a:not(.boton), .pie__legal a { background-position: 0 calc(50% + .7em); }
.enlace { background-size: 100% 1px; background-image: linear-gradient(#315b3966, #315b3966); }
.enlace:hover, .enlace:focus-visible { background-image: linear-gradient(currentColor, currentColor); }
.navegacion a:not(.boton):hover,
.navegacion a:not(.boton):focus-visible,
.navegacion a:not(.boton)[aria-current="location"],
.pie__legal a:hover,
.pie__legal a:focus-visible {
  background-size: 100% 1px;
  text-decoration: none;
}
.navegacion a:not(.boton)[aria-current="location"] {
  color: var(--color-primario);
  font-weight: 500;
}

/* Arranca con el primer pintado y acompaña la lectura al hacer scroll sin retener contenido. */
@media (prefers-reduced-motion: no-preference) {
  .hero__interior { animation: bienvenida 1100ms cubic-bezier(.25, .65, .35, 1) both; }
  .revelable {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 480ms cubic-bezier(.22, .61, .36, 1), transform 480ms cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--retraso-revelado, 0ms);
    will-change: opacity, transform;
  }
  .revelable--visible {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bienvenida { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  html { scroll-padding-top: 100px; }
  .navegacion a:not(.boton) { background-image: none; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__interior { animation: none; }
  .boton:active, .menu-movil:active { transform: none; }
}

/* ==========================================================================
   FONDOS: gradientes suaves en azul celeste y salvia
   ========================================================================== */

body {
  background-color: var(--color-fondo);
  background-image:
    radial-gradient(ellipse 65% 520px at 82% 8%, rgb(177 228 228 / 46%), transparent 72%),
    radial-gradient(ellipse 55% 480px at 12% 34%, rgb(228 235 226 / 62%), transparent 74%),
    radial-gradient(ellipse 60% 540px at 85% 58%, rgb(177 228 228 / 34%), transparent 75%),
    radial-gradient(ellipse 58% 500px at 18% 84%, rgb(177 228 228 / 38%), transparent 72%);
  background-attachment: scroll;
}

.hero,
.servicios,
.sobre-mi,
.faq {
  background: transparent;
}

.hero {
  overflow-x: clip;
}

.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -40px -10% 0;
  background:
    radial-gradient(circle 460px at 74% 48%, rgb(177 228 228 / 52%), rgb(221 236 236 / 18%) 58%, transparent 78%),
    radial-gradient(circle 380px at 24% 26%, rgb(255 255 255 / 55%), transparent 70%);
  pointer-events: none;
}

.proceso {
  background:
    radial-gradient(circle 540px at 16% 22%, rgb(255 255 255 / 44%), transparent 72%),
    linear-gradient(
      180deg,
      rgb(220 236 236 / 0%) 0%,
      rgb(220 236 236 / 76%) 11%,
      rgb(224 239 238 / 82%) 89%,
      rgb(224 239 238 / 0%) 100%
    );
}

.contacto {
  background:
    radial-gradient(circle 540px at 84% 24%, rgb(177 228 228 / 30%), transparent 72%),
    linear-gradient(
      180deg,
      rgb(226 236 225 / 0%) 0%,
      rgb(226 236 225 / 78%) 12%,
      rgb(230 238 228 / 88%) 100%
    );
}
