/* =========================
   INICIO
========================= */

.hm-section {
  padding: 88px 0;
}

/* ---------- Encabezados de sección ---------- */

.hm-head {
  max-width: 680px;
  margin-bottom: 40px;
}

.hm-head-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hm-head-row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.hm-head-row > div {
  max-width: 640px;
}

.hm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}

.hm-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  margin-bottom: 12px;
}

.hm-head p {
  color: var(--gray-600);
  font-size: 18px;
  line-height: 1.6;
}

.hm-head-center p {
  margin: 0 auto;
}

.hm-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.hm-link i,
.hm-btn i,
.hm-doc-link i,
.hm-path-cta i,
.hm-eyebrow i {
  transition: transform 0.25s ease;
}

.hm-link:hover i,
.hm-btn:hover .fa-arrow-right,
.hm-doc-link:hover i,
.hm-path:hover .hm-path-cta i,
.hm-eyebrow:hover i {
  transform: translateX(4px);
}

.hm-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 15px;
  border-radius: 10px;
}

/* ---------- Hero ---------- */

.hm-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
}

.hm-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(22, 163, 74, 0.10), transparent 70%),
    radial-gradient(500px 360px at 5% 90%, rgba(22, 163, 74, 0.07), transparent 70%),
    linear-gradient(180deg, #f6fdf8 0%, #fff 100%);
}

.hm-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
  margin-bottom: 22px;
}

.hm-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.hm-hero h1 {
  font-size: clamp(36px, 4.8vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hm-accent {
  position: relative;
  color: var(--green);
  white-space: nowrap;
}

.hm-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.14em;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.22);
  transform-origin: left;
}

.hm-lead {
  font-size: 19px;
  line-height: 1.65;
  color: var(--gray-600);
  max-width: 34em;
  margin-bottom: 30px;
}

.hm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.hm-trust {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0;
  border-top: 1px solid var(--gray-200);
  padding-top: 24px;
}

.hm-trust > div {
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--gray-200);
}

.hm-trust > div:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}

.hm-trust dt {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}

.hm-trust dd {
  font-size: 13px;
  line-height: 1.4;
  color: var(--gray-600);
  margin-top: 4px;
}

/* Imagen y tarjetas flotantes */
.hm-hero-visual {
  position: relative;
}

.hm-hero-image {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4 / 3.4;
  box-shadow: 0 30px 60px -20px rgba(17, 24, 39, 0.25);
}

.hm-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hm-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 16px;
  padding: 12px 18px 12px 12px;
  box-shadow: 0 16px 36px -12px rgba(17, 24, 39, 0.25);
  font-size: 13px;
  line-height: 1.35;
  color: var(--gray-600);
  text-decoration: none;
}

.hm-float strong {
  display: block;
  font-size: 15px;
  color: var(--gray-900);
}

.hm-float-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  flex-shrink: 0;
}

.hm-float-icon-alt {
  background: #f0fdf4;
  color: var(--green);
}

.hm-float-cert {
  left: -32px;
  bottom: 36px;
}

.hm-float-stat {
  right: -20px;
  top: 32px;
}

/* ---------- Accesos ---------- */

.hm-paths {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.hm-path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hm-path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hm-path::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hm-path:hover {
  transform: translateY(-4px);
  border-color: #bbf7d0;
  box-shadow: 0 20px 40px -16px rgba(17, 24, 39, 0.16);
}

.hm-path:hover::before {
  transform: scaleX(1);
}

.hm-path-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f0fdf4;
  color: var(--green);
  font-size: 22px;
  margin-bottom: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.hm-path:hover .hm-path-icon {
  background: var(--green);
  color: #fff;
}

.hm-path h3 {
  font-size: 21px;
}

.hm-path p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-600);
}

.hm-path-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
}

/* ---------- Respaldo oficial ---------- */

.hm-trust-band {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(74, 222, 128, 0.16), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(255, 255, 255, 0.06), transparent 70%),
    linear-gradient(160deg, #14532d 0%, #0f3d22 100%);
}

.hm-trust-band .hm-head p {
  color: #d1fae5;
}

.hm-kicker-light {
  color: #86efac;
}

.hm-docs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.hm-doc {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 26px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 26px;
  backdrop-filter: blur(4px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hm-doc:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(134, 239, 172, 0.4);
}

.hm-doc-preview {
  position: relative;
  display: block;
  align-self: start;
  aspect-ratio: 210 / 297;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.5);
  transform: rotate(-2deg);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hm-doc:hover .hm-doc-preview {
  transform: rotate(0deg) translateY(-4px) scale(1.02);
}

.hm-doc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.hm-doc-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.75);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hm-doc:hover .hm-doc-zoom {
  opacity: 1;
  transform: none;
}

.hm-doc-cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  text-decoration: none;
  color: var(--gray-900);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(160deg, var(--green), #14532d) border-box;
  border: 6px solid transparent;
}

.hm-cover-seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0fdf4;
  color: var(--green);
  font-size: 20px;
}

.hm-cover-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}

.hm-cover-sub {
  font-size: 11px;
  line-height: 1.45;
  color: var(--gray-600);
}

.hm-doc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.hm-doc-issuer {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
}

.hm-doc h3 {
  font-size: 23px;
  line-height: 1.25;
}

.hm-doc p {
  font-size: 15px;
  line-height: 1.65;
  color: #d1fae5;
}

.hm-doc p strong {
  color: #fff;
}

.hm-doc-points {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #ecfdf5;
}

.hm-doc-points i {
  color: #86efac;
  margin-right: 8px;
}

.hm-doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 10px;
}

.hm-btn-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #14532d;
  font-weight: 600;
}

.hm-btn-light:hover {
  background: #f0fdf4;
}

.hm-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bbf7d0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.hm-doc-link:hover {
  color: #fff;
}

/* ---------- Proceso ---------- */

.hm-process {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.hm-steps {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hm-steps::before {
  content: "";
  position: absolute;
  top: 52px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #bbf7d0 0 8px, transparent 8px 16px);
}

.hm-steps li {
  position: relative;
  text-align: center;
  padding: 0 8px;
}

.hm-step-num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 10px;
}

.hm-step-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #bbf7d0;
  color: var(--green);
  font-size: 24px;
  box-shadow: 0 0 0 8px var(--gray-50);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.hm-steps li:hover .hm-step-icon {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.hm-steps h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.hm-steps p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-600);
  margin: 0 auto;
}

/* ---------- CTA final ---------- */

.hm-final {
  padding-top: 0;
}

.hm-final-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  border-radius: 28px;
  padding: 56px;
  color: #fff;
  background:
    radial-gradient(500px 300px at 90% 0%, rgba(255, 255, 255, 0.14), transparent 70%),
    linear-gradient(135deg, var(--green) 0%, #15803d 55%, #14532d 100%);
  box-shadow: 0 30px 60px -24px rgba(21, 128, 61, 0.55);
}

.hm-final-box h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  margin-bottom: 10px;
}

.hm-final-box p {
  color: #dcfce7;
  font-size: 17px;
  line-height: 1.6;
}

.hm-final-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.hm-btn-ghost {
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: transparent;
}

.hm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- Animaciones del hero ---------- */

@media (prefers-reduced-motion: no-preference) {

  .hm-hero-text > * {
    animation: hm-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hm-hero-text > :nth-child(2) { animation-delay: 0.08s; }
  .hm-hero-text > :nth-child(3) { animation-delay: 0.16s; }
  .hm-hero-text > :nth-child(4) { animation-delay: 0.24s; }
  .hm-hero-text > :nth-child(5) { animation-delay: 0.32s; }

  .hm-hero-image {
    animation: hm-reveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  }

  .hm-accent::after {
    animation: hm-underline 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
  }

  .hm-float-cert {
    animation: hm-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both,
               hm-float 6s ease-in-out 1.4s infinite;
  }

  .hm-float-stat {
    animation: hm-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.9s both,
               hm-float 7s ease-in-out 1.6s infinite reverse;
  }

  .hm-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--green);
    animation: hm-ping 2s ease-out infinite;
  }
}

@keyframes hm-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hm-reveal {
  from { opacity: 0; transform: scale(0.96); clip-path: inset(6% 6% 6% 6% round 28px); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 28px); }
}

@keyframes hm-underline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes hm-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}

@keyframes hm-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}

@keyframes hm-ping {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}

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

@media (max-width: 1100px) {
  .hm-docs { grid-template-columns: 1fr; }
  .hm-float-cert { left: 16px; }
  .hm-float-stat { right: 16px; }
}

@media (max-width: 900px) {
  .hm-section { padding: 64px 0; }
  .hm-hero { padding: 40px 0 64px; }
  .hm-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hm-path-grid { grid-template-columns: 1fr; }
  .hm-steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .hm-steps::before { display: none; }
  .hm-head-row { flex-direction: column; align-items: flex-start; }
  .hm-final-box { flex-direction: column; align-items: flex-start; padding: 40px 32px; }
  .hm-final-actions { width: 100%; }
}

@media (max-width: 600px) {
  .hm-trust { grid-template-columns: repeat(3, 1fr); }
  .hm-trust > div { padding-right: 12px; margin-right: 12px; }
  .hm-trust dt { font-size: 22px; }
  .hm-trust dd { font-size: 12px; }
  .hm-trust dd br { display: none; }
  .hm-lead { font-size: 17px; }
  .hm-actions .hm-btn { flex: 1 1 100%; justify-content: center; }
  .hm-doc { grid-template-columns: 1fr; padding: 22px; }
  .hm-doc-preview { width: 140px; }
  .hm-steps { grid-template-columns: 1fr; }
  .hm-float { font-size: 12px; padding: 10px 14px 10px 10px; }
  .hm-float strong { font-size: 14px; }
  .hm-float-icon { width: 34px; height: 34px; font-size: 15px; }
  .hm-float-cert { left: 10px; bottom: 14px; }
  .hm-float-stat { right: 10px; top: 14px; }
  .hm-final-box { padding: 32px 24px; border-radius: 22px; }
}

/* Acciones de los documentos: misma posición en ambas tarjetas */
.hm-doc-actions {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
