/* ==========================================================================
   Secciones de página
   Concepto: "el punto". El punto ámbar del logo es una consulta que el sistema
   de Azentra recibe, interpreta y resuelve. El recorrido lo sigue de principio a fin.
   ========================================================================== */

/* ---------- Paneles apilados ----------
   Las secciones se superponen como hojas con esquinas redondeadas: dan continuidad y profundidad. */

.section--sheet {
  --sheet-r: clamp(24px, 1rem + 2vw, 44px);
  z-index: 1;
  margin-top: calc(var(--sheet-r) * -1);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  box-shadow: 0 -24px 60px -36px rgba(5, 10, 20, 0.45);
}

.section-head--split {
  max-width: none;
}

@media (min-width: 1024px) {
  .section-head--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 5rem;
    align-items: end;
    text-align: left;
  }

  .section-head--split .eyebrow {
    grid-column: 1;
    justify-self: start;
  }

  .section-head--split .section-head__title {
    grid-column: 1;
  }

  .section-head--split .section-head__lead {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }
}

/* ---------- Lo que resolvemos: lista editorial ---------- */

.pains-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .pains-layout {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 5rem;
    align-items: start;
  }

  .pains-head {
    position: sticky;
    top: calc(var(--header-h) + 3rem);
    margin-bottom: 0;
  }
}

.pains {
  border-top: 1px solid var(--line-light);
}

.pain {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding: clamp(1.4rem, 1rem + 1vw, 2rem) 0;
  border-bottom: 1px solid var(--line-light);
}

.pain::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: var(--amber-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}

.pain:hover::before {
  transform: scaleX(1);
}

.pain__index {
  padding-top: 0.45rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  transition: color var(--dur) ease;
}

.pain:hover .pain__index {
  color: var(--amber-700);
}

.pain__title {
  font-size: clamp(1.3rem, 1rem + 1.1vw, 1.875rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  transition: transform 0.6s var(--ease-out);
}

.pain:hover .pain__title {
  transform: translateX(6px);
}

.pain__text {
  max-width: 36rem;
  margin-top: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.pain__solution {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin-top: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--cream-100);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-900);
  transition: background-color var(--dur) ease;
}

.pain__solution .icon {
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease-out);
}

.pain:hover .pain__solution {
  background: var(--amber-500);
}

.pain:hover .pain__solution .icon {
  transform: translateX(3px);
}

/* ---------- Soluciones por rubro ---------- */

.industries {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  padding: clamp(1.5rem, 0.8rem + 3.5vw, 3.5rem);
  border-radius: clamp(20px, 1rem + 1vw, 28px);
  background: var(--ink-900);
  color: var(--text-on-dark-muted);
}

.industries::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(480px circle at 100% 0%, rgba(244, 165, 36, 0.12), transparent 70%),
    linear-gradient(var(--line-dark) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(200deg, #000, transparent 55%);
  mask-image: linear-gradient(200deg, #000, transparent 55%);
}

.industries h3,
.industries h4 {
  color: var(--text-on-dark);
}

.industries__intro {
  max-width: 560px;
  margin-bottom: 2rem;
}

.industries__title {
  margin-bottom: 0.6rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  letter-spacing: -0.03em;
  color: var(--text-on-dark);
}

/* ---------- Inteligencia artificial ---------- */

.ai__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px circle at 90% 100%, rgba(244, 165, 36, 0.12), transparent 70%),
    radial-gradient(600px circle at 0% 0%, rgba(62, 102, 170, 0.16), transparent 70%);
}

.ai__statement {
  max-width: 22em;
  margin: 0.5rem 0 clamp(3.5rem, 2rem + 6vw, 6rem);
  font-size: clamp(1.75rem, 0.9rem + 3.4vw, 4rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-wrap: pretty;
}

/* Las palabras se encienden con el scroll; sin JS se muestran encendidas. */
.ai__word {
  color: rgba(246, 245, 240, 0.16);
  transition: color 0.45s ease;
}

.ai__word.is-lit,
html:not(.js) .ai__word {
  color: var(--text-on-dark);
}

.ai__word:last-child.is-lit {
  color: var(--amber-400);
}

.principles {
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .principles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.principle {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark-strong);
  font-size: var(--fs-sm);
}

.principle__icon {
  width: 22px;
  height: 22px;
  margin-bottom: 0.4rem;
  color: var(--amber-400);
}

.principle__title {
  font-size: var(--fs-base);
  letter-spacing: -0.01em;
}

/* ---------- Índice lateral del recorrido ---------- */

.rail {
  display: none;
}

@media (min-width: 1360px) and (hover: hover) {
  .rail {
    position: fixed;
    left: 24px;
    top: 50%;
    z-index: 80;
    display: block;
    transform: translateY(-50%);
  }
}

.rail__track {
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(140, 150, 170, 0.35);
}

.rail__fill {
  position: absolute;
  inset: 0 0 auto;
  height: 100%;
  background: var(--amber-500);
  transform: scaleY(0);
  transform-origin: top;
}

.rail__list {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 0;
  list-style: none;
}

.rail__link {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(140, 150, 170, 0.7);
  border-radius: 50%;
  background: var(--cream-50);
  transition:
    background-color var(--dur) ease,
    border-color var(--dur) ease,
    transform var(--dur) var(--ease-out);
}

.rail__link:hover,
.rail__link.is-active {
  border-color: var(--amber-500);
  background: var(--amber-500);
}

.rail__link.is-active {
  transform: scale(1.3);
}

.rail__label {
  position: absolute;
  left: 22px;
  top: 50%;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  background: var(--ink-900);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-on-dark);
  opacity: 0;
  transform: translate(-4px, -50%);
  transition:
    opacity var(--dur-fast) ease,
    transform var(--dur-fast) ease;
  pointer-events: none;
}

.rail__link:hover .rail__label,
.rail__link:focus-visible .rail__label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* ---------- Contacto: el núcleo vuelve para cerrar el recorrido ---------- */

.contact__core {
  position: absolute;
  left: -180px;
  bottom: -220px;
  z-index: -1;
  width: 560px;
  height: 560px;
  pointer-events: none;
}

.contact__core span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-dark-strong);
  border-radius: 50%;
}

.contact__core span:nth-child(2) { inset: 18%; border-style: dashed; animation: spin 60s linear infinite; }
.contact__core span:nth-child(3) { inset: 36%; border-color: rgba(244, 165, 36, 0.3); }

.contact__core i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 60px 20px rgba(244, 165, 36, 0.35);
  animation: core-pulse 3.2s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes core-pulse { 50% { transform: scale(1.25); box-shadow: 0 0 80px 30px rgba(244, 165, 36, 0.45); } }

/* ---------- Proceso ---------- */

.steps {
  --step-size: 56px;
  --step-gap: 2.25rem;
  position: relative;
  display: grid;
  gap: var(--step-gap);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: var(--step-size) 1fr;
  column-gap: 1.25rem;
  align-items: start;
  align-content: start;
}

/* Conectores entre etapas: base gris + trazo ámbar que se dibuja al entrar en pantalla. */
.step:not(:last-child)::before,
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: var(--step-size);
  bottom: calc(var(--step-gap) * -1);
  left: calc(var(--step-size) / 2);
  width: 1px;
  background: var(--line-light-strong);
}

.step:not(:last-child)::after {
  background: var(--amber-500);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s var(--ease-in-out);
}

.step:nth-child(2)::after { transition-delay: 0.5s; }
.step:nth-child(3)::after { transition-delay: 1s; }

.steps.is-visible .step::after,
html:not(.js) .step::after {
  transform: none;
}

.step__number {
  position: relative;
  z-index: 1;
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: var(--step-size);
  height: var(--step-size);
  border: 1px solid var(--line-light-strong);
  border-radius: 50%;
  background: var(--cream-50);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.step:first-child .step__number {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--amber-400);
}

.step__title {
  margin-top: 0.85rem;
  font-size: var(--fs-h3);
}

.step__text {
  margin-top: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

@media (min-width: 1024px) {
  .steps {
    --step-gap: 2.5rem;
    grid-template-columns: repeat(4, 1fr);
  }

  .step {
    grid-template-columns: 1fr;
  }

  .step:not(:last-child)::before,
  .step:not(:last-child)::after {
    top: calc(var(--step-size) / 2);
    bottom: auto;
    left: var(--step-size);
    right: calc(var(--step-gap) * -1);
    width: auto;
    height: 1px;
  }

  .step:not(:last-child)::after {
    transform: scaleX(0);
    transform-origin: left;
  }

  .step__number {
    grid-row: auto;
  }

  .step__title {
    margin-top: 1.5rem;
  }
}

/* ---------- Preguntas frecuentes ---------- */

.faq {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .faq {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 5rem;
    align-items: start;
  }

  .faq__head {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    margin-bottom: 0;
  }
}

.faq__head .link-arrow {
  margin-top: 1.75rem;
}

/* ---------- Contacto ---------- */

.contact__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 0% 100%, rgba(244, 165, 36, 0.12), transparent 70%),
    radial-gradient(600px circle at 100% 0%, rgba(70, 110, 180, 0.14), transparent 70%);
}

.contact__inner {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 4rem);
  align-items: center;
}

.contact__inner > * {
  min-width: 0;
}

@media (min-width: 1024px) {
  .contact__inner {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
  }
}

.contact__info .section-head__lead {
  max-width: 30rem;
}

.contact__lines {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
  margin-top: 2.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(3.5rem, 2.5rem + 3vw, 5rem) 0 2rem;
  border-top: 1px solid var(--line-dark);
  background: var(--ink-950);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-sm);
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 0.9fr 1.2fr 1.1fr;
    gap: 3rem;
  }
}

.site-footer__brand img {
  width: 128px;
}

.site-footer__tagline {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--text-on-dark);
}

.site-footer__about {
  max-width: 300px;
  margin-top: 0.4rem;
}

.site-footer__title {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}

.site-footer__col ul {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  transition: color var(--dur-fast) ease;
}

.site-footer a:hover {
  color: var(--text-on-dark);
}

.site-footer__wa {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-variant-numeric: tabular-nums;
}

.site-footer__wa .icon {
  width: 16px;
  height: 16px;
  color: var(--amber-500);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-xs);
}

/* ---------- Páginas internas (privacidad, 404) ---------- */

.page {
  padding: calc(var(--header-h) + clamp(3rem, 2rem + 4vw, 5rem)) 0 var(--section-space);
  background: var(--cream-50);
}

.page__inner {
  max-width: calc(760px + var(--gutter) * 2);
}

.page__title {
  margin-bottom: 1.5rem;
  font-size: var(--fs-h2);
  letter-spacing: -0.03em;
}

.page__lead {
  font-size: var(--fs-lg);
  color: var(--text-muted);
}

.page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.page--center {
  display: grid;
  align-items: center;
  min-height: 80vh;
  text-align: center;
}

.prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.25rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose p:last-child {
  margin: 2rem 0 0;
}
