/* ==========================================================================
   EquiPay · Página de inicio (landing).
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + clamp(48px, 7vw, 88px)) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(1200px 600px at 85% 10%, rgb(15 118 110 / 0.35), transparent 60%),
    linear-gradient(160deg, var(--primary-700) 0%, var(--primary-800) 60%, var(--primary-900) 100%);
  color: var(--primary-100);
}

/* La cabecera es clara; sobre el hero la dejamos translúcida oscura hasta hacer scroll. */
.site-header:not(.is-scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header:not(.is-scrolled) .brand__name {
  color: var(--white);
}

.site-header:not(.is-scrolled) .brand__tag {
  color: var(--primary-200);
}

.site-header .brand__mark--light,
.site-header:not(.is-scrolled) .brand__mark--dark {
  display: none;
}

.site-header:not(.is-scrolled) .brand__mark--light {
  display: block;
}

.site-header:not(.is-scrolled) .nav__link {
  color: var(--primary-100);
}

.site-header:not(.is-scrolled) .nav__link:hover {
  background: rgb(255 255 255 / 0.08);
  color: var(--white);
}

.site-header:not(.is-scrolled) .btn--ghost {
  border-color: rgb(255 255 255 / 0.3);
  background: transparent;
  color: var(--white);
}

.site-header:not(.is-scrolled) .lang-switch {
  border-color: rgb(255 255 255 / 0.25);
  background: rgb(255 255 255 / 0.06);
}

.site-header:not(.is-scrolled) .lang-switch__btn {
  color: var(--primary-100);
}

.site-header:not(.is-scrolled) .lang-switch__btn[aria-pressed='true'] {
  background: var(--white);
  color: var(--primary-700);
}

.site-header:not(.is-scrolled) .menu-toggle {
  border-color: rgb(255 255 255 / 0.25);
  background: transparent;
}

.site-header:not(.is-scrolled) .menu-toggle__bars,
.site-header:not(.is-scrolled) .menu-toggle__bars::before,
.site-header:not(.is-scrolled) .menu-toggle__bars::after {
  background: var(--white);
}

.site-header:not(.is-scrolled) .menu-toggle[aria-expanded='true'] .menu-toggle__bars {
  background: transparent;
}

@media (max-width: 920px) {
  /* El menú desplegable es blanco: sus enlaces vuelven al color oscuro. */
  .site-header:not(.is-scrolled) .nav__link {
    color: var(--neutral-700);
  }

  .site-header:not(.is-scrolled) .nav__link:hover {
    background: var(--primary-50);
    color: var(--primary-700);
  }
}

.hero__glow {
  position: absolute;
  right: -180px;
  bottom: -220px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: rgb(15 118 110 / 0.25);
  filter: blur(10px);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.05);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--primary-100);
}

.hero__title {
  margin-top: 22px;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 800;
  line-height: 1.06;
  color: var(--white);
}

.hero__title > span {
  display: block;
}

.hero__title-accent {
  color: var(--tertiary-400);
}

.hero__lead {
  max-width: 560px;
  margin-top: 22px;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  color: var(--primary-100);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__trust {
  display: grid;
  gap: 10px;
  margin-top: 32px;
  font-size: 0.93rem;
  color: var(--primary-100);
}

.hero__trust li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__trust li::before {
  content: '';
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--tertiary-400);
}

.hero__sample-note {
  position: relative;
  margin-top: 28px;
  font-size: 0.76rem;
  text-align: right;
  color: var(--primary-300);
}

/* ---------- Vista previa del producto ---------- */
.hero__visual {
  position: relative;
  padding: 24px 0 32px;
}

.mock {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--neutral-800);
  box-shadow: var(--shadow-lg);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.6s var(--ease);
}

.hero__visual:hover .mock {
  transform: perspective(1400px) rotateY(0) rotateX(0);
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}

.mock__bar > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neutral-200);
}

.mock__url {
  flex: 1;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--white);
  font-size: 0.72rem;
  color: var(--neutral-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock__body {
  padding: 20px 20px 52px;
}

.mock__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mock__company {
  font-weight: 700;
  color: var(--primary-700);
}

.mock__meta {
  font-size: 0.76rem;
  color: var(--neutral-500);
}

.mock__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.mock__kpi {
  padding: 12px;
  border: 1px solid var(--neutral-100);
  border-radius: 12px;
  background: var(--surface);
}

.mock__kpi-label {
  display: block;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--neutral-500);
}

.mock__kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
  color: var(--primary-700);
}

.mock__kpi--alert {
  border-color: var(--tertiary-200);
  background: var(--tertiary-50);
}

.mock__kpi--alert strong {
  color: var(--tertiary-700);
}

.mock__chart {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--neutral-100);
  border-radius: 12px;
}

.mock__chart-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--neutral-600);
}

.mock__bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  height: 120px;
  margin-top: 12px;
}

.mock__group {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding-bottom: 18px;
}

.mock__group i,
.mock__group b {
  display: block;
  width: 34%;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  transform-origin: bottom;
  animation: grow 1.2s var(--ease) both;
}

.mock__group i {
  background: var(--chart-1);
}

.mock__group b {
  background: var(--chart-2);
  animation-delay: 0.1s;
}

.mock__group em {
  position: absolute;
  bottom: 0;
  font-size: 0.64rem;
  font-style: normal;
  color: var(--neutral-500);
  white-space: nowrap;
}

.mock__legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--neutral-600);
}

.mock__legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mock__legend i,
.mock__legend b {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--chart-1);
}

.mock__legend b {
  background: var(--chart-2);
}

.mock__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.mock__steps > span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--neutral-100);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--neutral-500);
}

.mock__steps .is-done {
  background: var(--secondary-50);
  color: var(--secondary-700);
}

.mock__steps .is-current {
  background: var(--primary-700);
  color: var(--white);
}

.mock-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--white);
  font-size: 0.78rem;
  color: var(--neutral-700);
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

.mock-float strong {
  display: block;
  color: var(--primary-700);
}

.mock-float--seal {
  left: -28px;
  bottom: 6px;
}

.mock-float--log {
  right: -12px;
  top: 0;
  animation-delay: -3s;
  font-weight: 600;
}

.mock-float--log svg {
  width: 18px;
  height: 18px;
  color: var(--secondary-600);
}

.seal-mini {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--tertiary-500);
  border-radius: 50%;
  background: var(--primary-700);
}

@keyframes grow {
  from {
    transform: scaleY(0);
  }
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    max-width: 560px;
    margin-inline: auto;
  }

  .mock {
    transform: none;
  }
}

@media (max-width: 560px) {
  .mock-float--seal {
    left: 8px;
    bottom: -4px;
  }

  .mock-float--log {
    right: 8px;
    top: 4px;
  }

  .mock__kpi strong {
    font-size: 1rem;
  }

  .hero__ctas .btn {
    width: 100%;
  }

  .hero__sample-note {
    text-align: left;
  }
}

/* ---------- Ley 21.828 ---------- */
.law__shape {
  position: absolute;
  left: -160px;
  top: -160px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: rgb(201 162 39 / 0.08);
}

.law__shape--alt {
  left: auto;
  right: -160px;
  top: auto;
  bottom: -200px;
  background: rgb(15 118 110 / 0.22);
}

.law {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.law__list {
  display: grid;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.law__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgb(171 204 210 / 0.14);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.04);
  color: var(--white);
  font-weight: 500;
}

.law__list li > span:first-child {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tertiary-500);
  color: var(--primary-900);
  font-size: 0.85rem;
  font-weight: 800;
}

.law__facts {
  margin-top: 20px;
  font-size: 0.92rem;
  color: var(--primary-200);
}

.checker {
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--neutral-800);
  box-shadow: var(--shadow-lg);
}

.checker__title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-700) !important;
}

.checker__lead {
  margin-top: 6px;
  color: var(--neutral-600);
}

.checker__form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.checker__result {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.checker__result[data-state='yes'] {
  border: 1px solid var(--tertiary-200);
  background: var(--tertiary-50);
  color: var(--tertiary-700);
}

.checker__result[data-state='no'] {
  border: 1px solid var(--secondary-100);
  background: var(--secondary-50);
  color: var(--secondary-700);
}

.checker__result[data-state='error'] {
  border: 1px solid #f5c2c2;
  background: var(--danger-50);
  color: var(--danger-600);
}

.checker__note {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--neutral-500);
}

@media (max-width: 960px) {
  .law {
    grid-template-columns: 1fr;
  }
}

/* ---------- Pasos ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px;
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.step::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-600), var(--tertiary-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.step:hover::after {
  transform: scaleX(1);
}

.step__num {
  display: inline-block;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary-100);
}

.step__title {
  margin-top: 14px;
  font-size: 1.1rem;
  font-weight: 700;
}

.step__text {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--neutral-600);
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Calculadora ---------- */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.formula {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 22px;
  border: 1px dashed var(--primary-200);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 700;
  color: var(--primary-700);
}

.formula__frac {
  display: inline-grid;
  text-align: center;
}

.formula__frac > span:first-child {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--primary-700);
}

.formula__frac > span:last-child {
  padding-top: 4px;
}

.calc__outcomes {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.calc__outcomes li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  color: var(--neutral-600);
}

.calc__panel {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.calc__form {
  display: grid;
  gap: 16px;
}

.gauge {
  margin-top: 26px;
}

.gauge__value {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  color: var(--primary-700);
  font-variant-numeric: tabular-nums;
}

.gauge__track {
  position: relative;
  height: 12px;
  margin-top: 18px;
  margin-bottom: 30px;
  border-radius: 999px;
  background: var(--neutral-100);
}

.gauge__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--secondary-500);
  transition: width 0.5s var(--ease), background 0.3s;
}

.gauge[data-state='alert'] .gauge__fill {
  background: var(--tertiary-500);
}

.gauge[data-state='alert'] .gauge__value {
  color: var(--tertiary-700);
}

.gauge__threshold {
  position: absolute;
  top: -6px;
  left: var(--pos);
  height: 24px;
  border-left: 2px dashed var(--primary-700);
}

.gauge__threshold span {
  position: absolute;
  top: 28px;
  left: 0;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-700);
  white-space: nowrap;
}

.gauge__msg {
  font-weight: 600;
  color: var(--neutral-700);
}

.calc__note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--neutral-100);
  font-size: 0.8rem;
  color: var(--neutral-500);
}

@media (max-width: 960px) {
  .calc {
    grid-template-columns: 1fr;
  }
}

/* ---------- Entregables ---------- */
.deliverable {
  position: relative;
  height: 100%;
  padding: 26px;
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--white), var(--neutral-50));
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.deliverable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.deliverable__type {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--primary-700);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.deliverable__type--pdf {
  background: #b42318;
}

.deliverable__type--xls {
  background: #107c41;
}

.deliverable__type--ppt {
  background: #c43e1c;
}

.deliverable__type--seal {
  background: var(--tertiary-500);
  color: var(--primary-900);
}

.deliverable h3 {
  margin-top: 16px;
  font-size: 1.08rem;
  font-weight: 700;
}

.deliverable p {
  margin-top: 6px;
  font-size: 0.93rem;
  color: var(--neutral-600);
}

.deliverable--seal {
  border-color: var(--tertiary-200);
  background: linear-gradient(180deg, var(--white), var(--tertiary-50));
}

/* ---------- Seguridad ---------- */
.security {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.security__list {
  margin-top: 28px;
  color: var(--neutral-700);
}

@media (max-width: 960px) {
  .security {
    grid-template-columns: 1fr;
  }
}

/* ---------- Para quién ---------- */
.audience__card {
  height: 100%;
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--cream);
}

.audience__card:nth-child(2) {
  background: var(--primary-50);
}

.audience__card h3 {
  font-size: 1.4rem;
  font-weight: 800;
}

.audience__card p {
  margin-top: 10px;
  margin-bottom: 22px;
  color: var(--neutral-600);
}

/* ---------- Planes ---------- */
.plans {
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.plan__name {
  font-size: 1.3rem;
  font-weight: 800;
}

.plan__desc {
  margin-top: 8px;
  color: var(--neutral-600);
}

.plan__list {
  flex: 1;
  margin: 24px 0 28px;
  font-size: 0.95rem;
}

.plan--featured {
  border-color: var(--primary-700);
  background: var(--primary-700);
  color: var(--primary-100);
  box-shadow: var(--shadow-lg);
}

.plan--featured .plan__name {
  color: var(--white);
}

.plan--featured .plan__desc {
  color: var(--primary-200);
}

.plan--featured .check-list li::before {
  background-color: rgb(95 208 192 / 0.14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235FD0C0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5'/%3E%3C/svg%3E");
}

.plan__flag {
  position: absolute;
  top: -13px;
  left: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--tertiary-500);
  color: var(--primary-900);
  font-size: 0.74rem;
  font-weight: 800;
}

/* ---------- Contacto ---------- */
.cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.cta__list {
  margin-top: 28px;
  color: var(--primary-100);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--neutral-800);
  box-shadow: var(--shadow-lg);
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--neutral-600);
  cursor: pointer;
}

.contact-form__consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--secondary-600);
}

.contact-form__hint {
  font-size: 0.78rem;
  text-align: center;
  color: var(--neutral-500);
}

@media (max-width: 960px) {
  .cta__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .contact-form__row {
    grid-template-columns: 1fr;
  }
}
