/* =====================================================================
   IDHA · Landing /asesoria/
   Mobile-first · Sin dependencias · Solo se animan transform/opacity
   (y colores en hover, que no recalculan layout).
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --navy-900: #04072a;
  --navy-800: #060b33;
  --navy-700: #0a1250;
  --blue-600: #0b2fa0;   /* píldoras */
  --blue-500: #1740c4;
  --yellow:   #ffd400;
  --yellow-d: #f2c200;
  --white:    #ffffff;
  --ink:      #0b1a5c;
  --wa:       #25d366;
  --wa-d:     #128c4a;

  --f-head: "Poppins", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;

  /* Una sola familia de easing en todo el sitio */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in:  cubic-bezier(.7, 0, .84, 0);
  --t-ui: .3s;
  --t-narr: .9s;

  --radius: 20px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  color: var(--white);
  background: var(--navy-800);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
figure { margin: 0; }

.wrap { width: min(100%, 1160px); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.h2 {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.h2--light { color: var(--white); }
.h2--center { text-align: center; }
.h2--caps { text-transform: uppercase; letter-spacing: .01em; }
.hl { color: var(--yellow); }

/* Encabezado de sección: antetítulo amarillo + título + barra */
.eyebrow {
  font-family: var(--f-head); font-weight: 700; color: var(--yellow);
  font-size: clamp(1.15rem, 2.8vw, 1.7rem); margin-bottom: .6rem;
}
.bar { display: block; width: 84px; height: 4px; border-radius: 4px; background: var(--yellow); margin: -.4rem 0 1.6rem; }
.sec-head { max-width: 760px; margin: 0 auto clamp(2rem, 5vw, 3rem); }
.sec-head__lead { font-size: clamp(1.02rem, 2.2vw, 1.25rem); opacity: .9; max-width: 52ch; }

/* Íconos de línea compartidos (servicios, forma de trabajar) */
.ico { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-weight: 700; font-size: 1rem;
  padding: .95rem 1.6rem; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform var(--t-ui) var(--ease-out), background-color var(--t-ui), box-shadow var(--t-ui);
}
.btn svg { width: 1.3em; height: 1.3em; }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: var(--white); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,212,0,.25); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-d); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(37,211,102,.3); }

/* ---------- 3. Revelado genérico al hacer scroll ----------
   Solo se oculta si <html> tiene la clase .js (puesta por init.js).
   Si el JS falla, todo el contenido queda visible. */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--t-narr) var(--ease-out), transform var(--t-narr) var(--ease-out);
  transition-delay: var(--d, 0s);
}

/* =====================================================================
   SECCIÓN 1 · HERO — efecto de letras
   ===================================================================== */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% 0%, #101a6b 0%, transparent 55%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  padding-block: clamp(2.5rem, 7vw, 5rem) 0;
}
.hero__glow {
  position: absolute; inset: auto -20% -40% auto; width: 60vw; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,212,0,.10), transparent 60%);
  z-index: -1; pointer-events: none;
}
.hero__grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
  grid-template-areas: "logo" "text" "photo";
}
.hero__text { grid-area: text; }
.hero__logo { grid-area: logo; justify-self: end; width: clamp(88px, 18vw, 150px); }
.hero__logo img { width: 100%; transition: transform .8s var(--ease-out); }
.hero__logo:hover img { transform: rotate(-12deg) scale(1.05); }

.hero__title {
  font-family: var(--f-body);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: .01em;
  font-size: clamp(2rem, 7.4vw, 4.4rem);
  margin-bottom: 1.6rem;
}
.hero__line { display: block; }
.hero__line--accent { color: var(--yellow); }

/* Palabras/letras generadas por JS */
.hero__title .word { display: inline-block; white-space: nowrap; }
.hero__title .char {
  display: inline-block;
  will-change: transform, opacity;
}
.js .hero__title .char {
  opacity: 0;
  transform: translateY(.9em) rotateX(-80deg) scale(.9);
  transform-origin: 50% 100%;
  filter: blur(6px);
}
.hero.is-ready .hero__title .char {
  opacity: 1; transform: none; filter: blur(0);
  transition:
    opacity .7s var(--ease-out),
    transform .9s var(--ease-out),
    filter .7s var(--ease-out);
  transition-delay: calc(var(--ci, 0) * 35ms + var(--li, 0) * 180ms);
}
/* Onda al pasar el mouse por el título (después de la entrada) */
.hero.is-done .hero__title .char { transition: transform .35s var(--ease-out), color .35s; transition-delay: 0s; }
.hero.is-done .hero__title .char.is-wave { transform: translateY(-.18em); color: var(--yellow); }
.hero.is-done .hero__line--accent .char.is-wave { color: var(--white); }

.hero__sub {
  font-weight: 700;
  color: var(--yellow);
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  line-height: 1.4;
  margin-bottom: 2rem;
}
.hero__subline { display: block; }
.js .hero__subline { opacity: 0; transform: translateX(-24px); }
.hero.is-ready .hero__subline {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(1.25s + var(--si, 0) * 120ms);
}

/* Lista de servicios del hero */
.hero-services { margin-bottom: 2rem; }
.hero-services__title {
  font-family: var(--f-head); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem); letter-spacing: .04em; margin-bottom: 1rem;
}
.hero-services__list { display: grid; gap: .9rem; }
.hero-services__item {
  display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: center;
  font-weight: 700; font-size: clamp(1rem, 2.2vw, 1.15rem); line-height: 1.25;
}
.hero-services__item .ico { width: 44px; height: 44px; color: var(--white); transition: transform .45s var(--ease-out), color var(--t-ui); }
.hero-services__item a { width: fit-content; background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 2px no-repeat; transition: background-size .4s var(--ease-out), color var(--t-ui); }
.hero-services__item:hover .ico { transform: scale(1.12) rotate(-6deg); color: var(--yellow); }
.hero-services__item:hover a { color: var(--yellow); background-size: 100% 2px; }
.js .hero-services__title, .js .hero-services__item { opacity: 0; transform: translateX(-24px); }
.hero.is-ready .hero-services__title, .hero.is-ready .hero-services__item {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(1.6s + var(--i, -1) * 120ms + 120ms);
}
@media (min-width: 700px) {
  .hero-services__list { grid-template-columns: repeat(3, auto); justify-content: start; gap: 1.4rem; }
  .hero-services__item { grid-template-columns: 40px auto; max-width: 15ch; }
  .hero-services__item .ico { width: 40px; height: 40px; }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .hero-services__list { grid-template-columns: 1fr; }
  .hero-services__item { max-width: none; }
}
.js .hero__cta { opacity: 0; transform: translateY(16px); }
.hero.is-ready .hero__cta {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-out) 2.15s, transform .6s var(--ease-out) 2.15s,
              background-color var(--t-ui), box-shadow var(--t-ui);
}

.hero__photo {
  grid-area: photo;
  margin-inline: calc(var(--gutter) * -1);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%, 0 32%);
  overflow: hidden;
}
.hero__photo img { width: 100%; height: clamp(220px, 45vw, 360px); object-fit: cover; object-position: 50% 45%; }
.js .hero__photo { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%, 100% 32%); }
.hero.is-ready .hero__photo {
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%, 0 32%);
  transition: clip-path 1.2s var(--ease-out) .9s;
}

@media (min-width: 900px) {
  .hero { padding-bottom: 0; min-height: min(92vh, 760px); display: flex; }
  .hero__grid {
    grid-template-columns: 1.15fr .85fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "text logo" "text photo";
    width: 100%;
  }
  .hero__text { padding-bottom: 4rem; align-self: center; }
  .hero__logo { align-self: start; }
  .hero__photo { align-self: end; margin-inline: 0 calc(var(--gutter) * -1); }
  .hero__photo img { height: 380px; }
}

/* =====================================================================
   SECCIÓN 2 · PROBLEMAS — cada punto aparece de a poco
   ===================================================================== */
.problems {
  background: linear-gradient(180deg, var(--navy-700) 0%, var(--navy-900) 100%);
  padding-block: clamp(3rem, 8vw, 5.5rem);
  position: relative; overflow: hidden;
}
.problems__intro { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.problems__intro .h2 { max-width: 18ch; font-size: clamp(1.8rem, 5vw, 3rem); }
.problems__lead { font-size: clamp(1.05rem, 2.3vw, 1.35rem); opacity: .9; max-width: 54ch; }
.problems__subtitle { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1.3rem; }
.problems__grid { display: grid; gap: 2.5rem; align-items: center; }

.star-note {
  display: grid; grid-template-columns: 26px 1fr; gap: .7rem; align-items: start;
  margin-top: 2.2rem; max-width: 34ch;
  color: var(--yellow); font-weight: 600; font-size: clamp(1.02rem, 2.2vw, 1.2rem); line-height: 1.4;
}
.star-note svg { width: 24px; height: 24px; margin-top: .1rem; transition: transform .6s var(--ease-out); }
.star-note:hover svg { transform: rotate(72deg) scale(1.2); }
.checklist { display: grid; gap: 1.15rem; }
.checklist__item {
  display: grid; grid-template-columns: 36px 1fr; gap: 1rem; align-items: start;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  line-height: 1.35;
}
.checklist__icon {
  width: 32px; height: 32px; margin-top: .1rem;
  fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 0;
}
/* Estado inicial (solo con JS) */
.js .checklist__item > span { opacity: 0; transform: translateX(-22px); }
.js .checklist__icon { stroke-dashoffset: 40; }
/* Activado secuencialmente por JS (.is-in con --d escalonado) */
.checklist__item.is-in > span {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out) calc(var(--d) + .25s), transform .7s var(--ease-out) calc(var(--d) + .25s);
}
.checklist__item.is-in .checklist__icon {
  stroke-dashoffset: 0; stroke: var(--yellow);
  transition: stroke-dashoffset .55s var(--ease-out) var(--d), stroke 1.2s ease calc(var(--d) + .6s);
}
.problems__photo {
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  overflow: hidden; max-width: 520px; justify-self: center; width: 100%;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.problems__photo img { width: 100%; height: clamp(220px, 40vw, 340px); object-fit: cover; }
@media (min-width: 900px) {
  .problems__grid { grid-template-columns: 1.1fr .9fr; }
  .problems__photo { align-self: end; border-radius: 50%; aspect-ratio: 1; }
  .problems__photo img { height: 100%; }
}

/* =====================================================================
   SECCIÓN 3 · BENEFICIOS — hover cambia el color de fondo
   ===================================================================== */
.benefits {
  position: relative; isolation: isolate;
  padding-block: clamp(3rem, 8vw, 5.5rem);
  background: var(--navy-900);
}
.benefits__bg {
  position: absolute; inset: 22% 0 0 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--navy-900) 0%, rgba(4,7,42,.55) 35%, rgba(4,7,42,.75) 100%),
    url("../img/enfoque.webp") center / cover no-repeat;
  filter: saturate(.8);
}
.benefits { padding-bottom: 0; }
.benefits .sec-head { max-width: 640px; }
.benefits .h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); }
.benefits__list { display: grid; gap: 1.25rem; max-width: 640px; margin-inline: auto; }

/* Franja amarilla con la frase de cierre */
.quote-band {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  background: var(--yellow); color: var(--blue-600);
  padding: clamp(1.2rem, 3vw, 1.8rem) var(--gutter);
  text-align: center;
}
.quote-band p {
  max-width: 820px; margin-inline: auto;
  font-family: var(--f-head); font-weight: 800; font-size: clamp(1.05rem, 2.6vw, 1.5rem); line-height: 1.35;
}
.quote-band span { font-size: 1.25em; line-height: 0; vertical-align: -.1em; }
.js .quote-band.reveal { transform: scaleX(.92); }
.js .quote-band.reveal.is-in { transform: none; }

.pill {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: center;
  padding: 1.3rem 1.5rem;
  border-radius: 36px;
  background: var(--blue-600);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), color .35s;
  cursor: default;
}
/* Capa de color que barre desde la izquierda: el "cambio de fondo" */
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, var(--yellow) 0%, #ffe45c 100%);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .55s var(--ease-out);
}
.pill__icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.75);
  color: var(--white);
  transition: transform .6s var(--ease-out), background-color .35s, color .35s, border-color .35s;
}
.pill__icon svg { width: 36px; height: 36px; }
.pill__title { font-family: var(--f-head); font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-weight: 700; line-height: 1.2; margin-bottom: .2rem; }
.pill__text  { font-size: clamp(.95rem, 2vw, 1.08rem); opacity: .92; }

.pill:hover, .pill.is-active { transform: translateY(-4px) scale(1.02); color: var(--ink); box-shadow: 0 24px 50px rgba(255,212,0,.25); }
.pill:hover::before, .pill.is-active::before { transform: scaleX(1); }
.pill:hover .pill__icon, .pill.is-active .pill__icon {
  transform: rotate(180deg); background: var(--ink); color: var(--yellow); border-color: var(--ink);
}
.pill:hover .pill__icon svg, .pill.is-active .pill__icon svg { transform: rotate(-180deg); transition: transform .6s var(--ease-out); }

@media (min-width: 900px) {
  .pill { padding: 1.5rem 2rem; }
  .pill__icon { width: 76px; height: 76px; }
  .pill__icon svg { width: 42px; height: 42px; }
}

/* =====================================================================
   SECCIÓN 3b · SERVICIOS — tarjetas amarillas con hover
   ===================================================================== */
.services {
  background:
    radial-gradient(70% 60% at 100% 100%, #0f1a72 0%, transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  padding-block: clamp(3rem, 8vw, 5.5rem);
  overflow: hidden;
}
.sec-head--left { margin-inline: 0; }
.services__grid { display: grid; gap: 1.25rem; }

.svc {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--yellow); color: var(--ink);
  border-radius: 28px; padding: clamp(1.4rem, 4vw, 1.9rem);
  box-shadow: 0 20px 45px rgba(0,0,0,.35);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), color .35s;
}
/* Capa azul que sube desde abajo al pasar el mouse */
.svc::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--blue-500), var(--blue-600));
  transform: translateY(101%); transition: transform .55s var(--ease-out);
}
.svc__head { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.svc__icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); color: var(--blue-600); border: 2px solid var(--blue-600);
  transition: transform .6s var(--ease-out), background-color .35s, color .35s, border-color .35s;
}
.svc__icon .ico { width: 34px; height: 34px; }
.svc__title { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.2; color: var(--blue-600); transition: color .35s; }
.svc__text { font-size: clamp(.98rem, 2vw, 1.06rem); line-height: 1.55; color: #1b2a6b; transition: color .35s; }

.svc:hover { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(23,64,196,.35); }
.svc:hover::before { transform: none; }
.svc:hover .svc__icon { transform: rotate(-10deg) scale(1.08); background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.svc:hover .svc__title { color: var(--yellow); }
.svc:hover .svc__text { color: var(--white); }

.services__photo {
  overflow: hidden; border-radius: 50% 50% 24px 24px / 38% 38% 24px 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.services__photo img { width: 100%; height: clamp(240px, 60vw, 360px); object-fit: cover; transition: transform 1.2s var(--ease-out); }
.services__photo:hover img { transform: scale(1.06); }

@media (min-width: 700px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; }
  .services__photo { border-radius: 50% 24px 24px 24px / 60% 24px 24px 24px; }
  /* La foto no define la altura de la fila: se adapta a la tarjeta vecina */
  .services__photo { position: relative; min-height: 240px; }
  .services__photo img { position: absolute; inset: 0; height: 100%; }
}
@media (min-width: 940px) {
  .services__grid { gap: 1.6rem; }
}

/* =====================================================================
   SECCIÓN 4 · PROCESO — hover en cada paso
   ===================================================================== */
.process {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  padding-block: clamp(3rem, 8vw, 5.5rem);
  overflow: hidden;
}
.process__grid { display: grid; gap: 2.5rem; align-items: center; }
.process__lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); opacity: .9; margin: -.6rem 0 2.2rem; max-width: 40ch; }

.steps { position: relative; display: grid; gap: 1.6rem; --progress: 0; }
/* Línea vertical + relleno amarillo que avanza con el scroll */
.steps::before, .steps::after {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 4px; border-radius: 4px;
}
.steps::before { background: rgba(255,212,0,.22); }
.steps::after  { background: var(--yellow); transform: scaleY(var(--progress)); transform-origin: top; }

.step {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 58px 1fr; gap: 1.2rem; align-items: center;
  padding: .55rem 1rem .55rem 0; border-radius: 999px;
  transition: background-color var(--t-ui), transform .4s var(--ease-out);
}
.step__num {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--yellow); color: var(--ink);
  font-family: var(--f-head); font-weight: 800; font-size: 1.35rem;
  box-shadow: 0 0 0 6px rgba(255,212,0,.12);
  transition: transform .45s var(--ease-out), background-color var(--t-ui), color var(--t-ui), box-shadow .45s var(--ease-out);
}
.step__title {
  font-family: var(--f-head); font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.2;
  transition: color var(--t-ui), transform .4s var(--ease-out);
}
.step:hover { background: rgba(255,255,255,.06); transform: translateX(6px); }
.step:hover .step__num {
  transform: scale(1.12) rotate(-8deg);
  background: var(--white); color: var(--blue-600);
  box-shadow: 0 0 0 10px rgba(255,212,0,.25), 0 10px 30px rgba(255,212,0,.35);
}
.step:hover .step__title { color: var(--yellow); transform: translateX(4px); }

.process__photo {
  position: relative; overflow: hidden; border-radius: var(--radius);
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path .7s var(--ease-out);
}
.process__photo img { width: 100%; height: clamp(260px, 60vw, 520px); object-fit: cover; transition: transform 1.2s var(--ease-out); }
.process__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(11,47,160,.45), transparent 60%);
  opacity: 1; transition: opacity .6s;
}
.process__photo:hover { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.process__photo:hover img { transform: scale(1.06); }
.process__photo:hover::after { opacity: 0; }

@media (min-width: 900px) {
  .process__grid { grid-template-columns: 1fr 1.05fr; }
}
.bar--process { margin-top: -.6rem; }

/* Nuestra forma de trabajar */
.values { margin-top: clamp(2.8rem, 7vw, 4.5rem); }
.values__title {
  font-family: var(--f-head); font-weight: 800; color: var(--yellow);
  font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1.6rem;
}
.values__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; }
.value { display: grid; justify-items: center; gap: .7rem; text-align: center; }
.value__icon {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(23,64,196,.35); border: 2px solid rgba(255,255,255,.75); color: var(--white);
  transition: transform .5s var(--ease-out), background-color .35s, color .35s, border-color .35s, box-shadow .5s var(--ease-out);
}
.value__icon .ico { width: 38px; height: 38px; }
.value__label { font-size: clamp(.95rem, 2vw, 1.05rem); line-height: 1.3; max-width: 14ch; transition: color .35s; }
.value:hover .value__icon {
  transform: translateY(-6px) scale(1.06); background: var(--yellow); color: var(--ink); border-color: var(--yellow);
  box-shadow: 0 14px 30px rgba(255,212,0,.3);
}
.value:hover .value__label { color: var(--yellow); }
@media (min-width: 700px) {
  .values__list { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 940px) {
  .value__icon { width: 84px; height: 84px; }
  .value__icon .ico { width: 44px; height: 44px; }
}

/* =====================================================================
   SECCIÓN 5 · AGENDA UNA CITA — tarjeta con hover / tilt
   ===================================================================== */
.appointment {
  background:
    radial-gradient(80% 70% at 10% 100%, #0f1a72 0%, transparent 60%),
    var(--navy-800);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.appointment__head { text-align: center; max-width: 760px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.appointment__question {
  font-family: var(--f-head); font-weight: 800; line-height: 1.2;
  font-size: clamp(1.6rem, 4.6vw, 2.6rem); margin-bottom: .8rem;
}
.appointment__lead { font-size: clamp(1.02rem, 2.2vw, 1.25rem); opacity: .9; max-width: 46ch; margin-inline: auto; }
.appointment__grid { display: grid; gap: 2rem; align-items: center; }

.card-yellow {
  --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden;
  color: var(--ink);
  border-radius: 28px 120px 28px 28px;
  padding: clamp(1.8rem, 5vw, 3rem);
  /* Textura de papel sin imagen externa: dos ruidos de gradiente */
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.35), transparent 40%),
    repeating-linear-gradient(115deg, rgba(0,0,0,.025) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, #ffe14a 0%, var(--yellow) 45%, var(--yellow-d) 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-radius .6s var(--ease-out);
}
.card-yellow:hover { box-shadow: 0 40px 80px rgba(255,212,0,.22); border-radius: 120px 28px 28px 28px; }
.card-yellow__cal { width: 54px; height: 54px; margin: 0 auto .8rem; display: block; color: var(--ink); transition: transform .5s var(--ease-out); }
.card-yellow:hover .card-yellow__cal { transform: rotate(-10deg) scale(1.1); }
.card-yellow__title {
  font-family: var(--f-head); font-weight: 800; text-transform: uppercase; text-align: center;
  color: var(--blue-600); font-size: clamp(1.6rem, 4.4vw, 2.3rem); line-height: 1.1; margin-bottom: .8rem;
}
.card-yellow__lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); margin-bottom: 1.5rem; color: #23306d; }

.contact { display: grid; gap: .9rem; }
.contact__link {
  display: inline-flex; align-items: center; gap: .9rem;
  font-size: clamp(1rem, 2.4vw, 1.25rem); font-weight: 500; color: #1b2a6b;
  padding: .35rem .7rem .35rem .35rem; margin-left: -.35rem; border-radius: 12px;
  transition: background-color var(--t-ui), transform var(--t-ui) var(--ease-out);
}
.contact__link svg { width: 34px; height: 34px; flex: none; color: var(--blue-600); transition: transform .4s var(--ease-out); }
.contact__link span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .4s var(--ease-out); }
.contact__link:hover { background: rgba(11,47,160,.10); transform: translateX(4px); }
.contact__link:hover svg { transform: scale(1.18) rotate(-6deg); }
.contact__link:hover span { background-size: 100% 2px; }

.appointment__photo {
  overflow: hidden; border-radius: 160px 160px 24px 24px;
  max-width: 420px; justify-self: center; width: 100%;
}
.appointment__photo img { width: 100%; height: clamp(300px, 70vw, 460px); object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; filter: saturate(.9); }
.appointment__photo:hover img { transform: scale(1.06); filter: saturate(1.1); }

@media (min-width: 900px) {
  .appointment__grid { grid-template-columns: 1.15fr .85fr; }
  .card-yellow { margin-right: -4rem; z-index: 1; }
}

/* =====================================================================
   SECCIÓN 6 · CTA WHATSAPP
   ===================================================================== */
.wa-cta {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  padding-block: clamp(3rem, 8vw, 5rem);
  border-top: 1px solid rgba(255,255,255,.06);
}
.wa-cta__inner { max-width: 640px; text-align: center; }
.wa-cta__lead { opacity: .85; margin: -.6rem 0 1.6rem; }
.wa-form { display: grid; gap: .8rem; }
.wa-form__input {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--white); border: 2px solid transparent; border-radius: 999px;
  padding: .95rem 1.4rem;
  transition: border-color var(--t-ui), box-shadow var(--t-ui);
}
.wa-form__input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,212,0,.25); }
.wa-form__input[aria-invalid="true"] { border-color: #ff6b6b; }
.wa-form__btn { width: 100%; font-size: 1.05rem; }
.wa-form__error { min-height: 1.2em; color: #ffb4b4; font-size: .9rem; }
.wa-cta__preview { font-size: .9rem; opacity: .7; margin-top: .4rem; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .wa-form { grid-template-columns: 1fr auto; }
  .wa-form__btn { width: auto; }
  .wa-form__error { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); padding-block: 1.6rem 6rem; font-size: .88rem; color: rgba(255,255,255,.7); }
.footer__inner { display: flex; flex-wrap: wrap; gap: .8rem 2rem; justify-content: space-between; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer a:hover { color: var(--yellow); }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 30px rgba(37,211,102,.45);
  transition: transform var(--t-ui) var(--ease-out), background-color var(--t-ui);
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa); animation: wa-pulse 2.4s var(--ease-out) infinite;
}
.wa-float:hover { transform: scale(1.08); background: var(--wa-d); }
@keyframes wa-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* =====================================================================
   Movimiento reducido: el contenido aparece, sin desplazamientos.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
  .js .reveal, .js .hero__title .char, .js .hero__subline, .js .hero__cta,
  .js .hero-services__title, .js .hero-services__item,
  .js .checklist__item > span { opacity: 1 !important; transform: none !important; filter: none !important; }
  .js .checklist__icon { stroke-dashoffset: 0 !important; }
  .js .hero__photo { clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%, 0 32%) !important; }
  .card-yellow { transform: none !important; }
}

/* Evita el parpadeo del título antes de dividirlo en letras */
.js .hero__line:not(.is-split) { opacity: 0; }

/* =====================================================================
   ENCABEZADO FIJO + PORTADA INSTITUCIONAL (réplica de /tesis/)
   ===================================================================== */
:root { --header-h: 64px; --inst-azul: #0d2c6e; }

/* Las anclas no quedan tapadas por el encabezado fijo */
section[id] { scroll-margin-top: var(--header-h); }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  background: rgba(13, 44, 110, .97);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: box-shadow var(--t-ui);
}
.site-header.is-scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.3); }
.site-header__inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-header__brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.site-header__logo { width: 40px; height: 40px; flex: none; }
.site-header__name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.site-header__name strong { font-family: var(--f-head); font-size: 1.1rem; letter-spacing: .05em; }
.site-header__name small { font-size: .68rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-nav__list { display: flex; align-items: center; gap: 1.6rem; }
.site-nav__link {
  position: relative; color: rgba(255,255,255,.88);
  font-size: .95rem; font-weight: 500; white-space: nowrap;
  transition: color var(--t-ui);
}
.site-nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-ui) var(--ease-out);
}
.site-nav__link:hover, .site-nav__link.is-active { color: var(--white); }
.site-nav__link:hover::after, .site-nav__link.is-active::after { transform: scaleX(1); }
.btn--sm { padding: .55rem 1.3rem; font-size: .9rem; }

.burger {
  display: none; flex-direction: column; gap: 5px; flex: none;
  background: none; border: 0; padding: .5rem; cursor: pointer;
}
.burger span {
  display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--white);
  transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--inst-azul);
    max-height: 0; overflow: hidden;
    transition: max-height .4s var(--ease-out);
  }
  .site-nav.is-open { max-height: 420px; box-shadow: 0 12px 24px rgba(0,0,0,.3); }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .site-nav__link { display: block; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .site-nav__link::after { display: none; }
  .site-nav__link.is-active { color: var(--yellow); }
  .site-nav .btn--wa { margin-top: 1rem; width: 100%; }
}
@media (max-width: 380px) {
  .site-header__name small { display: none; }
}

/* ---------- Portada institucional ---------- */
.inst-hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--header-h);
  text-align: center;
}
.inst-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("../img/fondo-encabezado.webp") center / cover no-repeat;
  animation: inst-zoom 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes inst-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.inst-hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,44,110,.5) 0%, rgba(13,44,110,.4) 50%, rgba(6,11,51,.85) 100%);
}
.inst-hero__content { display: flex; flex-direction: column; align-items: center; padding-block: 3.5rem 5rem; }
.inst-hero__logo {
  width: clamp(92px, 12vw, 130px); height: auto; margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.55));
}
.inst-hero__title {
  font-family: var(--f-head); font-weight: 800;
  font-size: clamp(1.9rem, 5.2vw, 3.4rem); line-height: 1.18;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
  max-width: 820px; margin-bottom: 1rem;
}
.inst-hero__pre {
  color: var(--yellow); font-weight: 600; text-transform: uppercase;
  letter-spacing: .15em; font-size: clamp(.78rem, 2vw, .95rem); margin-bottom: .6rem;
}
.inst-hero__sub { color: rgba(255,255,255,.85); letter-spacing: .05em; font-size: clamp(.95rem, 2vw, 1.15rem); margin-bottom: 2.2rem; }
.inst-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.inst-hero__scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); padding: .5rem; }
.inst-hero__scroll span {
  display: block; width: 18px; height: 18px;
  border-right: 2px solid rgba(255,255,255,.7); border-bottom: 2px solid rgba(255,255,255,.7);
  transform: rotate(45deg); animation: inst-bounce 1.6s ease-in-out infinite;
}
@keyframes inst-bounce { 0%,100% { transform: rotate(45deg) translateY(0); opacity: .6; } 50% { transform: rotate(45deg) translateY(6px); opacity: 1; } }

/* Entrada suave de la portada (solo con JS; sin JS todo visible) */
.js .inst-hero__content > * { opacity: 0; transform: translateY(24px); }
.anim-ok .inst-hero__content > * {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.anim-ok .inst-hero__content > :nth-child(2) { transition-delay: .12s; }
.anim-ok .inst-hero__content > :nth-child(3) { transition-delay: .26s; }
.anim-ok .inst-hero__content > :nth-child(4) { transition-delay: .36s; }
.anim-ok .inst-hero__content > :nth-child(5) { transition-delay: .5s; }

@media (max-width: 600px) {
  .inst-hero__actions { flex-direction: column; width: 100%; max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .inst-hero__bg, .inst-hero__scroll span { animation: none !important; }
  .js .inst-hero__content > * { opacity: 1 !important; transform: none !important; }
}
