/* =========================================================
   Nutrigym Balance – estilos
   Paleta tomada del logo (bordó) + tinta cálida + rubor de sus historias.
   Tipos: Bricolage Grotesque (títulos) + Figtree (texto).
   ========================================================= */

:root {
  --bordo: #9B1B2E;
  --bordo-oscuro: #74121F;
  --bordo-claro: #E9A1AB;
  --tinta: #1C1416;
  --texto: #3B3133;
  --texto-suave: #6B5D60;
  --fondo: #FCF8F8;
  --rubor: #F3E1E2;
  --linea: #E7D3D5;
  --blanco: #FFFFFF;

  --serif: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif; /* fuente de títulos */
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;

  --ancho: 1180px;
  --margen: clamp(1.25rem, 4vw, 2.5rem);
  --espacio-seccion: clamp(4.5rem, 10vw, 8rem);
  --radio: 18px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { color: var(--tinta); margin: 0; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.06; }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0; max-width: 62ch; }

a { color: inherit; }

:where(a, button, summary) { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--bordo);
  outline-offset: 3px;
  border-radius: 4px;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: var(--margen);
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--tinta);
  color: var(--blanco);
  border-radius: 8px;
}
.saltar:focus { top: 1rem; }

/* ---------- Botones y enlaces ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--blanco);
  background: var(--bordo);
  border-radius: 999px;
  transition: background-color .2s ease, transform .2s ease;
}
.boton:hover { background: var(--bordo-oscuro); }
.boton:active { transform: scale(.97); }

.boton--chico { min-height: 2.6rem; padding: 0 1.25rem; font-size: 1rem; }

/* Botón con ícono adelante (por ejemplo, WhatsApp) */
.boton--icono { gap: .6rem; }
.boton--icono svg { width: 1.3rem; height: 1.3rem; flex: none; }

.boton--wa { gap: .6rem; background: #1FA855; }
.boton--wa:hover { background: #178A45; }
.boton--wa svg { width: 1.3rem; height: 1.3rem; flex: none; }

.boton--claro { background: var(--blanco); color: var(--bordo); }

/* Botón secundario sobre fondos oscuros: misma forma que el principal, en vidrio */
.boton--vidrio {
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
}
.boton--vidrio:hover { background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1.5px var(--blanco); }
.boton--claro:hover { background: var(--rubor); }

.enlace {
  font-weight: 600;
  color: var(--bordo);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .3em;
}
.enlace:hover { color: var(--bordo-oscuro); text-decoration-thickness: 2.5px; }

.etiqueta {
  display: inline-block;
  padding: .2rem .7rem;
  font-weight: 700;
  font-size: .875rem;
  color: var(--bordo);
  background: var(--rubor);
  border-radius: 999px;
}

/* ---------- Encabezado ---------- */

/* Barra flotante tipo píldora, separada de los bordes */
.encabezado {
  position: fixed;
  top: .9rem;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}

/* Barra de vidrio oscuro semitransparente: deja ver lo que hay detrás, desenfocado */
.encabezado__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 880px;
  margin-inline: auto;
  min-height: 3.6rem;
  padding: .4rem .45rem .4rem .6rem;
  background: rgba(28, 20, 22, .55);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  box-shadow: 0 12px 32px -14px rgba(28, 20, 22, .55);
  pointer-events: auto;
  transition: box-shadow .25s ease, background-color .25s ease;
}
.encabezado.con-scroll .encabezado__fila {
  background: rgba(28, 20, 22, .68);
  box-shadow: 0 16px 40px -14px rgba(28, 20, 22, .6);
}

.marca {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blanco);
}
/* El logo tiene una figura oscura: va sobre un círculo claro para que se vea */
.marca img {
  width: 2.5rem;
  height: 2.5rem;
  padding: .3rem;
  background: var(--fondo);
  border-radius: 50%;
}

.nav ul { display: flex; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.nav { position: relative; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: rgba(255, 255, 255, .72); transition: color .3s ease; }
.nav a:hover { color: var(--blanco); }
.nav a[aria-current="location"] { color: var(--blanco); }

/* Barrita que se desliza hasta la sección en la que estás */
.nav__indicador {
  position: absolute;
  left: 0;
  bottom: -.55rem;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: #E3263D;
  opacity: 0;
  pointer-events: none;
  transition:
    transform .7s cubic-bezier(.65, 0, .35, 1),
    width .7s cubic-bezier(.65, 0, .35, 1),
    opacity .4s ease;
}
.nav__indicador.visible { opacity: 1; }

/* ---------- Menú de celular (tres rayitas) ---------- */
.menu-boton { display: none; }

/* ---------- Hero (foto de fondo a la derecha, fundida con el fondo oscuro) ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(88vh, 780px);
  padding-block: clamp(7rem, 11vw, 9rem) clamp(4rem, 8vw, 6rem);
  background: var(--tinta);
  color: #E9DFE0;
  overflow: hidden;
}

.hero__fondo {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(52%, 760px);
}
.hero__fondo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
/* La misma foto, ampliada y desenfocada, cubre todo el fondo del hero */
.hero__desenfoque {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  object-position: center 30%;
  filter: blur(42px) saturate(1.15) brightness(.62);
}

/* La foto nítida se funde con el desenfoque, sin bordes ni bloques de color */
.hero__fondo {
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%), linear-gradient(0deg, transparent 0%, #000 18%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%), linear-gradient(0deg, transparent 0%, #000 18%);
  mask-composite: intersect;
}

/* Velo oscuro solo del lado del texto, para que se lea bien */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(28, 20, 22, .72) 0%, rgba(28, 20, 22, .45) 40%, rgba(28, 20, 22, 0) 65%);
  pointer-events: none;
}

.hero__contenido { position: relative; z-index: 2; }

.hero__insignia {
  position: absolute;
  z-index: 2;
  right: 4%;
  bottom: 24%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.15rem .75rem .75rem;
  background: rgba(252, 248, 248, .96);
  border-radius: 14px;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .55);
}
.hero__insignia-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 4.25rem;
  padding: .3rem .4rem;
  background: var(--blanco);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--linea);
}
.hero__insignia-logo img { width: 100%; height: auto; }
.hero__insignia .credencial__icono {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  color: var(--bordo);
  background: var(--rubor);
  border-radius: 50%;
}
.hero__insignia .credencial__icono svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero__insignia p { display: flex; flex-direction: column; line-height: 1.25; }
.hero__insignia strong { color: var(--tinta); font-size: .9375rem; }
.hero__insignia p span { font-size: .8125rem; color: var(--texto-suave); }
.hero__texto { max-width: 620px; }

.hero h1 { color: var(--blanco); font-size: clamp(2.6rem, 5.6vw, 4.6rem); }

.hero__firma {
  font-weight: 700;
  color: var(--bordo-claro);
  margin-bottom: 1.25rem;
}

.hero__bajada {
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  color: #CDBFC1;
  max-width: 48ch;
}

.hero__acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2.25rem;
}

.enlace--claro { color: var(--blanco); }
.enlace--claro:hover { color: var(--bordo-claro); }

.hero__modalidades {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  margin: 2.75rem 0 0;
  padding: 1.25rem 0 0;
  list-style: none;
  color: #CDBFC1;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
/* Texto plano con un ícono chico al lado, sin recuadro, para no repetir la forma de los botones */
.hero__modalidades li {
  display: flex;
  align-items: center;
  gap: .55rem;
  cursor: default;
  transition: color .3s ease;
}
.hero__modalidad-icono svg { transition: transform .4s cubic-bezier(.2, .8, .2, 1), filter .4s ease; }
.hero__modalidad-icono rect { transition: fill .4s ease; }

@media (hover: hover) and (pointer: fine) {
  .hero__modalidades li:hover { color: var(--blanco); }

  /* Pin: rebota como si marcara el lugar en un mapa */
  .hero__modalidades li:first-child:hover svg {
    animation: pin-rebote .8s cubic-bezier(.3, 0, .2, 1);
    filter: drop-shadow(0 0 6px rgba(233, 161, 171, .7));
  }

  /* Notebook: se "prende" la pantalla y se levanta apenas */
  .hero__modalidades li:last-child:hover svg {
    transform: translateY(-2px) scale(1.12);
    filter: drop-shadow(0 0 6px rgba(233, 161, 171, .7));
  }
  .hero__modalidades li:last-child:hover rect { fill: rgba(233, 161, 171, .45); }
}

/* Se disparan al cargar la página y al pasar por esa parte (la clase la pone el JS) */
.hero__modalidades li.animar:first-child svg { animation: pin-rebote .8s cubic-bezier(.3, 0, .2, 1); }
.hero__modalidades li.animar:last-child svg { animation: compu-prende .9s cubic-bezier(.2, .8, .2, 1); }
.hero__modalidades li.animar:last-child rect { animation: pantalla-prende .9s ease; }

@keyframes compu-prende {
  0%, 100% { transform: none; filter: none; }
  40% { transform: translateY(-3px) scale(1.15); filter: drop-shadow(0 0 6px rgba(233, 161, 171, .7)); }
}
@keyframes pantalla-prende {
  0%, 100% { fill: transparent; }
  40% { fill: rgba(233, 161, 171, .55); }
}

@keyframes pin-rebote {
  0% { transform: translateY(0); }
  30% { transform: translateY(-7px); }
  55% { transform: translateY(0) scaleY(.88); }
  75% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}
.hero__modalidades strong { color: var(--blanco); }
.hero__modalidad-icono {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--bordo-claro);
}
.hero__modalidad-icono svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Único momento animado: la foto aparece al cargar */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__fondo img { animation: aparecer 1.2s cubic-bezier(.2, .8, .2, 1) both; }
  .js .hero__insignia { animation: subir .8s cubic-bezier(.2, .8, .2, 1) .7s both; }

  /* Entrada escalonada del texto del hero: todo termina en menos de un segundo */
  .js .hero__texto > * { animation: subir .55s cubic-bezier(.2, .8, .2, 1) both; }
  .js .hero__texto > :nth-child(1) { animation-delay: .05s; }
  .js .hero__texto > :nth-child(2) { animation-delay: .13s; }
  .js .hero__texto > :nth-child(3) { animation-delay: .21s; }
  .js .hero__texto > :nth-child(4) { animation-delay: .29s; }
  .js .hero__texto > :nth-child(5) { animation-delay: .37s; }
}
@keyframes aparecer { from { opacity: 0; transform: scale(1.04); } }
@keyframes subir { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Secciones ---------- */

.seccion { padding-block: var(--espacio-seccion); }

.seccion__cabecera {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 1.5rem 4rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.seccion__cabecera p { color: var(--texto-suave); max-width: 42ch; }

/* ---------- Servicios ---------- */

/* Sección oscura con tres tarjetas altas: la foto ocupa toda la tarjeta
   y el texto va encima con un degradé. En escritorio el detalle aparece al pasar el mouse. */
.servicios-seccion { background: var(--tinta); color: #E9DFE0; }
.servicios-seccion h2 { color: var(--blanco); }
.servicios-seccion .seccion__cabecera p { color: #BFB1B3; }

.servicios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.servicio {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 36rem;
  overflow: hidden;
  border-radius: 24px;
  background: #2A2023;
}
.servicio > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2, .8, .2, 1);
}
.servicio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(28, 20, 22, .96) 0%, rgba(28, 20, 22, .75) 35%, rgba(28, 20, 22, .1) 65%, rgba(28, 20, 22, 0) 100%);
  transition: background-color .5s ease;
}

.servicio__cuerpo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 1.75rem;
}
.servicio__cuerpo .etiqueta { background: var(--blanco); }
.servicio__cuerpo h3 {
  margin-top: .85rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.3vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--blanco);
}

/* El detalle: descripción, qué incluye y botón */
.servicio__extra { display: grid; grid-template-rows: 1fr; width: 100%; }
.servicio__extra > div { min-height: 0; overflow: hidden; }
.servicio__extra p { margin-top: .85rem; color: #E9DFE0; font-size: 1rem; }
.servicio__extra .incluye { flex-direction: column; gap: .4rem; margin: 1rem 0 1.5rem; color: #CDBFC1; }
.servicio__extra .incluye li::before { background: var(--bordo-claro); }
.servicio__extra .boton { width: 100%; }

/* En escritorio el detalle está plegado y se despliega al pasar el mouse (o con el teclado) */
@media (hover: hover) and (pointer: fine) {
  /* Al salir el mouse: primero se desvanece el contenido de a partes (de abajo hacia arriba)
     y después se pliega el recuadro, todo con calma */
  .servicio__extra {
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
      grid-template-rows .8s cubic-bezier(.4, 0, .2, 1) .15s,
      opacity .6s ease .25s;
  }
  .servicio__extra p,
  .servicio__extra .incluye,
  .servicio__extra .boton {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .6s cubic-bezier(.4, 0, .2, 1);
  }
  .servicio__extra .boton { transition-delay: 0s; }
  .servicio__extra .incluye { transition-delay: .08s; }
  .servicio__extra p { transition-delay: .16s; }

  /* Al entrar se despliega más despacio y el contenido aparece de a partes */
  .servicio:hover .servicio__extra,
  .servicio:focus-within .servicio__extra {
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows .9s cubic-bezier(.2, .8, .2, 1), opacity .6s ease;
  }
  .servicio:hover .servicio__extra p,
  .servicio:hover .servicio__extra .incluye,
  .servicio:hover .servicio__extra .boton,
  .servicio:focus-within .servicio__extra p,
  .servicio:focus-within .servicio__extra .incluye,
  .servicio:focus-within .servicio__extra .boton {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
  }
  .servicio:hover .servicio__extra p,
  .servicio:focus-within .servicio__extra p { transition-delay: .2s; }
  .servicio:hover .servicio__extra .incluye,
  .servicio:focus-within .servicio__extra .incluye { transition-delay: .35s; }
  .servicio:hover .servicio__extra .boton,
  .servicio:focus-within .servicio__extra .boton { transition-delay: .5s; }
  .servicio:hover > img,
  .servicio:focus-within > img { transform: scale(1.06); }
  .servicio:hover::before,
  .servicio:focus-within::before { background-color: rgba(28, 20, 22, .35); }
}

.incluye { margin-bottom: 1.75rem; }

.incluye {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: .9375rem;
  color: var(--texto-suave);
}
.incluye li { display: flex; align-items: center; gap: .55rem; }
.incluye li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bordo);
}


/* ---------- Sobre mí ---------- */

/* Fondo con manchas suaves de color para que las tarjetas de vidrio se noten */
.sobre-mi {
  background:
    radial-gradient(circle at 85% 78%, rgba(233, 161, 171, .55), transparent 40%),
    radial-gradient(circle at 55% 35%, rgba(155, 27, 46, .1), transparent 38%),
    radial-gradient(circle at 10% 10%, rgba(243, 225, 226, .9), transparent 45%),
    var(--fondo);
}

.sobre-mi__grilla {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

/* En escritorio la foto ocupa todo el alto de la sección. El encuadre está anclado
   a la izquierda para que el recorte se coma solo la pared vacía de la derecha. */
/* En escritorio la foto va desde el título hasta casi el final de las tarjetas */
.sobre-mi__foto {
  position: relative;
  align-self: stretch;
  min-height: 30rem;
  margin: 0;
  /* En pantallas anchas la foto sale un poco del contenedor hacia la izquierda
     (como máximo 4rem) para ganar ancho sin desbalancear la sección */
  margin-left: max(-4rem, min(0px, calc((var(--ancho) - 100vw) / 2 + 1rem)));
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(28, 20, 22, .1),
    0 18px 36px -10px rgba(116, 18, 31, .35),
    0 45px 80px -25px rgba(28, 20, 22, .5);
  transition: box-shadow .5s ease;
}
/* El recorte se lleva la pared vacía; el diploma y ella quedan completos */
.sobre-mi__foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 22% 75%;
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}

.sobre-mi__texto h2 { margin-bottom: 1.75rem; }
.sobre-mi__texto > p + p { margin-top: 1.1rem; }

.formacion__titulo {
  margin-top: 2.25rem;
  margin-bottom: .5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--bordo);
}

.formacion { display: grid; gap: .75rem; }

/* Tarjetas de vidrio: translúcidas, con desenfoque detrás, brillo que sigue al mouse
   y una leve inclinación 3D al pasar por encima */
.credencial {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .95rem 1.1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .38));
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .85),
    0 14px 34px -22px rgba(116, 18, 31, .45);
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition:
    transform .45s cubic-bezier(.2, .8, .2, 1),
    box-shadow .45s ease;
}
.credencial p { max-width: none; }

/* Puntitos decorativos arriba a la derecha */
.credencial::before {
  content: "";
  position: absolute;
  top: .9rem;
  right: .9rem;
  width: 14px;
  height: 9px;
  background: radial-gradient(circle, rgba(116, 18, 31, .35) 1.3px, transparent 1.6px) 0 0 / 5px 4.5px;
  pointer-events: none;
}

/* Brillo que sigue al mouse */
.credencial::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .7), transparent 45%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

/* Logos de las instituciones */
.credencial__logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 4.75rem;
  padding: .35rem .45rem;
  background: var(--blanco);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--linea);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.credencial__logo img { width: 100%; height: auto; }

/* AMAIP: su logo es blanco sobre negro, así que va en un recuadro oscuro */
.credencial__logo--amaip {
  width: 4.5rem;
  padding: .3rem .45rem;
  background: #1A1C1E;
  box-shadow: none;
}

.credencial__nombre { font-size: .9375rem; font-weight: 700; line-height: 1.3; color: var(--tinta); transition: color .35s ease; }
.credencial__detalle { margin-top: .2rem; font-size: .8125rem; line-height: 1.45; color: var(--texto-suave); }

/* Tarjeta destacada: el título de grado (borde bordó y título en bordó) */
.credencial--titulo {
  align-items: center;
  padding: 1.1rem 1.25rem;
  box-shadow:
    inset 0 0 0 2px rgba(155, 27, 46, .8),
    0 14px 34px -22px rgba(116, 18, 31, .45);
}
.credencial--titulo .credencial__nombre {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.15;
  color: var(--bordo);
}
.credencial--titulo .credencial__detalle { font-size: .9375rem; }

@media (hover: hover) and (pointer: fine) {
  .credencial:hover {
    --ty: -5px;
    box-shadow:
      inset 0 0 0 1.5px rgba(155, 27, 46, .55),
      0 24px 44px -22px rgba(116, 18, 31, .55);
  }
  .credencial:hover::after { opacity: 1; }
  .credencial:hover .credencial__nombre { color: var(--bordo); }
  .credencial:hover .credencial__logo { transform: scale(1.06); }

  .sobre-mi__foto:hover {
    box-shadow:
      0 4px 10px rgba(28, 20, 22, .12),
      0 26px 50px -12px rgba(116, 18, 31, .45),
      0 60px 100px -30px rgba(28, 20, 22, .6);
  }
  .sobre-mi__foto:hover img { transform: scale(1.06); }
}

/* Certificaciones: tres tarjetas chicas en fila */
.credenciales {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.credenciales .credencial { flex-direction: column; gap: .6rem; }

/* ---------- Cómo trabajo ---------- */


/* ---------- Preguntas ---------- */

.preguntas__grilla {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 2rem clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}

.pregunta { position: relative; border-bottom: 1px solid var(--linea); }
.pregunta:first-child { border-top: 1px solid var(--linea); }
.pregunta h3 { margin: 0; font: inherit; }

.pregunta__titulo {
  position: relative;
  display: block;
  width: 100%;
  padding: 1.35rem 3rem 1.35rem 0;
  font: inherit;
  font-weight: 600;
  font-size: 1.125rem;
  text-align: left;
  color: var(--tinta);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .25s ease;
}
.pregunta__titulo::before,
.pregunta__titulo::after {
  content: "";
  position: absolute;
  right: .5rem;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--bordo);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.pregunta__titulo::after { transform: rotate(90deg); }
.pregunta__titulo[aria-expanded="true"]::after { transform: rotate(0deg); }
.pregunta__titulo:hover { color: var(--bordo); }

/* La respuesta se despliega con la fila de la grilla: suave también en celular */
.pregunta__respuesta {
  display: grid;
  grid-template-rows: 0fr;
}
.pregunta__respuesta > div { min-height: 0; overflow: hidden; contain: paint; }
.pregunta__respuesta p {
  padding: 0 3rem 1.5rem 0;
  color: var(--texto);
}
.pregunta.abierta .pregunta__respuesta { grid-template-rows: 1fr; }



/* ---------- Barrita de los carruseles (solo celular) ---------- */
.carrusel-progreso { display: none; }
@media (max-width: 960px) {
  /* El área táctil es más alta que la línea visible, para que sea fácil agarrarla con el dedo */
  .carrusel-progreso {
    display: flex;
    align-items: center;
    width: 55%;
    height: 28px;
    margin: .75rem auto 0;
    cursor: grab;
    touch-action: none;
  }
  .carrusel-progreso[hidden] { display: none; }
  .carrusel-progreso.arrastrando { cursor: grabbing; }
  .carrusel-progreso__riel {
    position: relative;
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(155, 27, 46, .18);
    transition: height .2s ease;
  }
  .carrusel-progreso.arrastrando .carrusel-progreso__riel { height: 8px; }
  .carrusel-progreso__pulgar {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 5px;
    background: var(--bordo);
  }
  /* En la sección oscura de servicios, la barrita va en claro */
  .servicios-seccion .carrusel-progreso__riel { background: rgba(255, 255, 255, .18); }
  .servicios-seccion .carrusel-progreso__pulgar { background: var(--bordo-claro); }
}

/* ---------- Testimonios ---------- */

.testimonios { background: var(--rubor); }
.testimonios .seccion__cabecera p { color: var(--texto); }

/* En escritorio, columnas tipo mosaico: cada tarjeta ocupa su alto natural */
/* Escritorio: 3 columnas parejas. Arriba un mensaje en cada columna;
   abajo, dos fotos que ocupan exactamente el alto de los dos mensajes de la derecha */
.testimonios__lista {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 1.25rem;
  align-items: stretch;
}
.testimonios__lista .testimonio { margin: 0; }
.t-1 { grid-column: 1; grid-row: 1; }
.t-2 { grid-column: 2; grid-row: 1; }
.t-3 { grid-column: 3; grid-row: 1; }
.t-foto1 { grid-column: 1; grid-row: 2 / 4; }
.t-foto2 { grid-column: 2; grid-row: 2 / 4; }
.t-4 { grid-column: 3; grid-row: 2; }
.t-5 { grid-column: 3; grid-row: 3; }
/* Las capturas quedan centradas si su tarjeta es más alta que el mensaje */
.testimonio--captura { display: flex; align-items: center; }
/* Las fotos mantienen su proporción; los mensajes de la derecha se estiran para acompañarlas */
.testimonios__lista .testimonio--foto { align-self: start; }
.testimonio {
  break-inside: avoid;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 36px -24px rgba(116, 18, 31, .45);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s ease;
}

/* Tarjeta con la captura del mensaje, sobre fondo oscuro como el chat original */
.testimonio--captura { padding: .9rem; background: #141012; }
.testimonio--captura img { width: 100%; height: auto; border-radius: 14px; }

/* Tarjeta de foto */
.testimonio--foto { position: relative; background: var(--tinta); }
/* Las dos fotos con la misma proporción, así quedan del mismo tamaño */
.testimonio--foto img { width: 100%; height: auto; aspect-ratio: 912 / 1300; object-fit: cover; object-position: center 40%; }
.testimonio--foto figcaption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: 3rem 1.1rem 1rem;
  background: linear-gradient(0deg, rgba(28, 20, 22, .9), rgba(28, 20, 22, 0));
  color: var(--blanco);
}
.testimonio__leyenda { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.testimonio__usuario { font-size: .875rem; color: rgba(255, 255, 255, .8); }

@media (hover: hover) and (pointer: fine) {
  .testimonio:hover { transform: translateY(-4px); box-shadow: 0 26px 44px -24px rgba(116, 18, 31, .55); }
}

.testimonios__mas { margin-top: 1.5rem; text-align: center; max-width: none; }

/* ---------- Redes ---------- */

.redes__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 5rem);
  text-align: center;
  color: #E9DFE0;
  background:
    radial-gradient(circle at 85% 10%, rgba(233, 161, 171, .22), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(155, 27, 46, .55), transparent 50%),
    linear-gradient(135deg, var(--tinta) 0%, #3A1A20 55%, var(--bordo-oscuro) 100%);
  border-radius: 32px;
  box-shadow: 0 40px 70px -40px rgba(28, 20, 22, .65);
}
.redes__panel h2 { color: var(--blanco); }
.redes__panel > p { margin: 1rem auto 0; max-width: 48ch; color: #CDBFC1; }

.redes__lista {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 820px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  padding: 0;
  list-style: none;
}

/* Cada red con el color de su marca */
.red {
  --color: 255, 255, 255;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 1.6rem 1rem 1.4rem;
  text-decoration: none;
  color: var(--blanco);
  background: rgba(var(--color), .16);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(var(--color), .45);
  transition:
    transform .4s cubic-bezier(.2, .8, .2, 1),
    box-shadow .4s ease,
    background-color .4s ease;
}
.red--instagram { --color: 225, 48, 108; }
.red--whatsapp { --color: 37, 211, 102; }

.red svg {
  width: 2rem;
  height: 2rem;
  margin-bottom: .35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.red--whatsapp svg { fill: currentColor; stroke: none; }
.red__nombre { font-weight: 700; }
.red__usuario { font-size: .875rem; color: rgba(255, 255, 255, .7); }

/* Brillo que cruza la tarjeta al pasar el mouse */
.red::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.red:hover,
.red:focus-visible {
  transform: translateY(-6px);
  background: rgba(var(--color), .3);
  box-shadow:
    inset 0 0 0 1px rgba(var(--color), .9),
    0 0 0 4px rgba(var(--color), .12),
    0 18px 40px -10px rgba(var(--color), .55);
}
.red:hover::after,
.red:focus-visible::after { transform: translateX(120%); }
.red:hover svg,
.red:focus-visible svg { transform: scale(1.12) rotate(-4deg); }
.red:active { transform: translateY(-2px) scale(.98); }

/* ---------- Pie ---------- */

.pie {
  position: relative;
  padding-block: clamp(3.5rem, 6vw, 4.5rem) 2rem;
  background: var(--tinta);
  color: #CDBFC1;
  font-size: .9375rem;
  border-radius: 32px 32px 0 0;
}
.pie p { max-width: none; }

.pie__arriba {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.pie__logo {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  text-decoration: none;
}
.pie__logo-img {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  background: var(--fondo);
  border-radius: 12px;
}
.pie__logo-img img { width: 2.1rem; height: 2.1rem; }
.pie__nombre {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--blanco);
}

.pie__titulo {
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--bordo-claro);
  margin-bottom: .75rem;
}
.pie__datos > p { line-height: 1.7; color: #E9DFE0; }

.pie__redes {
  display: flex;
  gap: .6rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.pie__redes a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--blanco);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  transition: background-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.pie__redes a:hover {
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
  transform: translateY(-2px);
}
.pie__redes svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.pie__redes a[aria-label="WhatsApp"] svg { fill: currentColor; stroke: none; }

.pie__abajo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-top: 1.5rem;
  font-size: .875rem;
  color: #9E8F92;
}
.pie__abajo a { color: var(--blanco); font-weight: 700; text-decoration: none; }
.pie__abajo a:hover { text-decoration: underline; }

/* ---------- Página de política de privacidad ---------- */

.pie__abajo a.pie__legal-link { margin-left: .75rem; font-weight: 500; color: #CDBFC1; text-decoration: underline; text-underline-offset: .25em; }
.pie__abajo a.pie__legal-link:hover { color: var(--blanco); }

.legal { padding-block: clamp(8rem, 12vw, 10rem) clamp(4rem, 8vw, 6rem); }
.legal__contenedor { max-width: 760px; }
.legal__fecha { font-size: .875rem; font-weight: 600; color: var(--bordo); margin-bottom: .75rem; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 1.25rem; }
.legal__intro { font-size: 1.125rem; color: var(--texto-suave); margin-bottom: 1rem; }
.legal h2 {
  margin: 2.5rem 0 .75rem;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  letter-spacing: -0.02em;
}
.legal p + p { margin-top: .85rem; }
.legal ul { margin: .85rem 0; padding-left: 1.25rem; }
.legal li { margin-bottom: .45rem; }
.legal li::marker { color: var(--bordo); }
.legal a:not(.boton):not(.enlace) { color: var(--bordo); }
.legal__nota {
  margin-top: 1.25rem !important;
  padding: 1rem 1.25rem;
  font-size: .875rem;
  color: var(--texto-suave);
  background: var(--rubor);
  border-radius: 14px;
}
.legal__volver { margin-top: 3rem !important; }

.pie--simple { padding-block: 0 1.75rem; }
.pagina-legal .boton--chico { white-space: nowrap; }
@media (max-width: 520px) {
  .pagina-legal .marca span { display: none; }
}
.pie--simple .pie__abajo { padding-top: 1.75rem; }

/* ---------- Botón flotante de WhatsApp ---------- */

.wa-flotante {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--blanco);
  background: #1FA855;
  border-radius: 50%;
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, .35);
  transition: transform .2s ease;
}
.wa-flotante svg { width: 1.9rem; height: 1.9rem; }
.wa-flotante:hover { transform: scale(1.06); }
.wa-flotante:active { transform: scale(.96); }

/* ---------- Responsive ---------- */

/* En notebooks chicas, tablet y celular la foto va en proporción fija, sin estirarse */
@media (max-width: 1200px) {
  .sobre-mi__foto { align-self: center; min-height: 0; margin: 0; }
  .sobre-mi__foto img { position: static; height: auto; aspect-ratio: 15 / 16; object-position: center 85%; }
}

@media (max-width: 960px) {

  /* Barra en celular: nombre en dos líneas, "Escribime" y las tres rayitas */
  .encabezado__fila {
    position: relative;
    gap: .6rem;
    background: rgba(28, 20, 22, .9);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .encabezado.con-scroll .encabezado__fila { background: rgba(28, 20, 22, .94); }
  .marca { margin-right: auto; }
  .marca__texto { display: flex; flex-direction: column; font-size: 1rem; line-height: 1.05; }
  .menu-boton {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    background: rgba(255, 255, 255, .08);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
  }
  .menu-boton span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--blanco);
    border-radius: 2px;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
  }
  .menu-abierto .menu-boton span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-abierto .menu-boton span:nth-child(2) { opacity: 0; }
  .menu-abierto .menu-boton span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    display: block;
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    padding: .75rem;
    background: rgba(28, 20, 22, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 24px;
    box-shadow: 0 20px 40px -18px rgba(28, 20, 22, .6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s;
  }
  .menu-abierto .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
  }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: .9rem 1rem; font-size: 1.15rem; border-radius: 14px; color: var(--blanco); }
  .nav a[aria-current="location"] { background: rgba(255, 255, 255, .08); }
  .nav__indicador { display: none; }

  /* Servicios en celular: carrusel que se desliza de costado */
  .servicios {
    display: flex;
    gap: .9rem;
    max-width: none;
    margin-inline: calc(var(--margen) * -1);
    padding: 0 var(--margen) .5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--margen);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .servicios::-webkit-scrollbar { display: none; }
  .servicio { flex: 0 0 86%; scroll-snap-align: start; }
  .servicio__extra .boton { width: 100%; min-height: 3rem; padding: 0 1rem; font-size: 1rem; white-space: nowrap; }

  /* El detalle de cada tarjeta aparece cuando la tarjeta entra en pantalla */
  .js .servicio__extra p,
  .js .servicio__extra .incluye,
  .js .servicio__extra .boton {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
  }
  .js .servicio.activa .servicio__extra p,
  .js .servicio.activa .servicio__extra .incluye,
  .js .servicio.activa .servicio__extra .boton { opacity: 1; transform: none; }
  .js .servicio.activa .servicio__extra p { transition-delay: .15s; }
  .js .servicio.activa .servicio__extra .incluye { transition-delay: .3s; }
  .js .servicio.activa .servicio__extra .boton { transition-delay: .45s; }

  /* Testimonios en celular: carrusel. Cada deslizada muestra mensajes apilados
     o una foto sola (la ubicación de cada tarjeta se define abajo) */
  .testimonios__lista {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    grid-template-rows: repeat(3, auto);
    column-gap: .9rem;
    row-gap: .75rem;
    align-items: start;
    margin-inline: calc(var(--margen) * -1);
    padding: 0 var(--margen) .5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--margen);
    scrollbar-width: none;
  }
  .testimonios__lista::-webkit-scrollbar { display: none; }
  .testimonios__lista .testimonio { margin: 0; scroll-snap-align: start; }
  .t-3 { grid-column: 1; grid-row: 1; }
  .t-4 { grid-column: 1; grid-row: 2; }
  .t-5 { grid-column: 1; grid-row: 3; }
  .t-foto1 { grid-column: 2; grid-row: 1 / 4; }
  .t-1 { grid-column: 3; grid-row: 1; }
  .t-2 { grid-column: 3; grid-row: 2; }
  /* Las fotos ocupan exactamente el alto de los mensajes apilados de al lado */
  .testimonios__lista .t-foto1, .testimonios__lista .t-foto2 { align-self: stretch; }
  .testimonios__lista .testimonio--foto img {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }
  .t-foto2 { grid-column: 4; grid-row: 1 / 4; }

  /* Redes en celular: tres cuadraditos en fila */
  .redes__lista { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .red {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    gap: .45rem;
    padding: .75rem .4rem;
    text-align: center;
  }
  .red svg { width: 1.9rem; height: 1.9rem; margin: 0; }
  .red__nombre { font-size: .875rem; line-height: 1.15; }
  .red__usuario { display: none; }

  /* La foto arranca debajo de la barra, así la cara no queda tapada */
  .hero { display: block; min-height: 0; padding-top: 4.75rem; }
  .hero__fondo { position: relative; width: 100%; height: min(70vh, 540px); }
  .hero__fondo img { object-position: center 10%; }
  .hero__fondo {
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 40%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 40%);
  }
  .hero::before { background: linear-gradient(0deg, rgba(28, 20, 22, .7) 0%, rgba(28, 20, 22, .3) 45%, rgba(28, 20, 22, 0) 70%); }
  .hero__contenido { margin-top: -5rem; }
  /* En celular la tarjeta va abajo a la derecha de la foto, chica, para no tapar la cara */
  .hero__insignia {
    top: auto;
    left: auto;
    right: var(--margen);
    bottom: 6.5rem;
    gap: .55rem;
    padding: .45rem .75rem .45rem .45rem;
  }
  .hero__insignia-logo { width: 3.25rem; }
  .hero__insignia strong { font-size: .8125rem; }
  .hero__insignia p span { font-size: .6875rem; }

  .seccion__cabecera,
  .sobre-mi__grilla,
  .preguntas__grilla { grid-template-columns: 1fr; }

  .servicio { min-height: 40rem; }
  .servicio::before { background: linear-gradient(0deg, rgba(28, 20, 22, .97) 0%, rgba(28, 20, 22, .88) 50%, rgba(28, 20, 22, .2) 78%, rgba(28, 20, 22, 0) 100%); }

  .sobre-mi__foto { align-self: start; max-width: 460px; }
  .encabezado { top: .6rem; }
  .encabezado__fila { padding-left: .5rem; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .marca span { font-size: 1.05rem; white-space: nowrap; }
  .credenciales { grid-template-columns: 1fr; }
  .credenciales .credencial { flex-direction: row; gap: 1rem; }
  .credencial__logo { width: 4.5rem; }
  .servicio__cuerpo { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav__indicador { transition: opacity .2s ease !important; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Aparición al hacer scroll ---------- */
/* Solo se activa con JS y si la persona no pidió reducir el movimiento */
@media (prefers-reduced-motion: no-preference) {
  .js .revelar {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity .8s ease,
      transform .8s cubic-bezier(.2, .8, .2, 1);
    transition-delay: var(--retraso, 0ms);
  }
  .js .revelar.visible {
    opacity: 1;
    transform: none;
  }
}
