/* Base común del sitio (rediseño): tokens, tipografía, botones, cabecera y pie.
   Se carga después de styles.css en todas las páginas con body.site */

.site {
  --indigo: #4f46e5;
  --indigo-deep: #3f37c9;
  --navy: #082b6e;
  --navy-2: #1b3569;
  --blue: #3896f0;
  --mist: #f4f5ff;
  --ink: #0a1f45;
  --ink-soft: #4a5578;
  --line: #e3e6f3;
  --wa: #1fa855;
  --absence: #f0b429;

  --font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;

  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:where(.site) h1,
:where(.site) h2,
:where(.site) h3 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
}

:where(.site) p {
  margin: 0;
}

.site a:focus-visible,
.site button:focus-visible,
.site summary:focus-visible,
.site input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.h-wrap {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}

.h-section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

.h-section-tint {
  background: var(--mist);
}

.h-head {
  max-width: 720px;
  margin: 0 auto clamp(2.2rem, 5vw, 3.5rem);
  text-align: center;
}

.h-head h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.08;
}

.h-head p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

/* Botones */
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.h-btn-primary {
  background: var(--indigo);
  color: #fff;
}

.h-btn-primary:hover {
  background: var(--indigo-deep);
}

.h-btn-outline {
  border-color: #c9cdf0;
  color: var(--ink);
  background: #fff;
}

.h-btn-outline:hover {
  border-color: var(--indigo);
}

.h-btn-sm {
  min-height: 40px;
  padding: 0 1.1rem;
  font-size: 0.94rem;
}

.h-link {
  color: var(--indigo);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.h-link:hover {
  color: var(--indigo-deep);
}

/* Cabecera */
html {
  scroll-padding-top: 88px;
}

.h-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}

.h-header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 72px;
}

.h-brand img {
  display: block;
  height: 30px;
  width: auto;
}

.h-header-inner {
  position: relative;
}

.h-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.h-nav {
  margin-right: auto;
}

.h-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h-menu-item.has-simple {
  position: relative;
}

.h-menu-mobile {
  display: none;
}

.h-menu-btn,
.h-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 40px;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  font-size: 0.97rem;
  white-space: nowrap;
  cursor: pointer;
}

.h-menu-btn:hover,
.h-menu-link:hover,
.h-menu-link.active,
.h-menu-item.is-open > .h-menu-btn {
  background: var(--mist);
}

.h-menu-item.is-open > .h-menu-btn {
  color: var(--indigo);
}

.h-chev {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

.h-menu-item.is-open .h-chev {
  transform: rotate(180deg);
}

/* Panel desplegable */
.h-mega {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  grid-template-columns: 320px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 70px -30px rgba(8, 43, 110, 0.35);
  overflow: hidden;
}

.h-menu-item.is-open > .h-mega {
  display: grid;
}

.h-mega-simple {
  top: calc(100% + 12px);
  left: 0;
  right: auto;
  width: 560px;
  grid-template-columns: 1fr;
}

.h-mega-side {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.h-mega-cats {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0 0 1rem;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.h-mega-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.h-mega-cat svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-mega-cat:hover {
  background: var(--mist);
}

.h-mega-cat[aria-expanded="true"] {
  background: var(--mist);
  color: var(--indigo);
}

.h-mega-featured {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 14px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.h-mega-featured:hover {
  background: var(--mist);
}

.h-mega-featured svg {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 0.1rem;
  fill: none;
  stroke: var(--wa);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-mega-featured strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.h-mega-featured em {
  margin-left: 0.3rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
}

.h-mega-main {
  padding: 1.5rem 1.75rem;
  background: var(--mist);
}

.h-mega-simple .h-mega-panel {
  padding: 1.25rem;
}

.h-mega-title {
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.h-mega-main .h-mega-title {
  display: none;
}

.h-mega-panel ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h-mega-simple .h-mega-panel ul {
  grid-template-columns: 1fr;
}

.h-mega-panel a:not(.h-mega-more) {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.h-mega-panel a:not(.h-mega-more):hover {
  background: #fff;
}

.h-mega-simple .h-mega-panel a:not(.h-mega-more):hover {
  background: var(--mist);
}

.h-mega-panel a svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.05rem;
  fill: none;
  stroke: var(--indigo);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-mega-panel strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 600;
}

.h-mega-more {
  display: inline-block;
  margin: 1.2rem 0 0 0.8rem;
  color: var(--indigo);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.h-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.h-login {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.97rem;
  white-space: nowrap;
}

.h-login:hover {
  color: var(--indigo);
}

.h-menu-toggle {
  display: none;
  margin-left: auto;
  min-height: 40px;
  padding: 0 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

/* Pie */
.h-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.h-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}

.h-footer-brand img {
  height: 28px;
  width: auto;
}

.h-footer-brand p {
  margin-top: 1rem;
  max-width: 32ch;
  color: var(--ink-soft);
}

.h-footer h2 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 0.9rem;
}

.h-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.h-footer ul a {
  color: var(--ink-soft);
}

.h-footer ul a:hover {
  color: var(--indigo);
}

.h-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.h-footer-bottom a:hover {
  color: var(--indigo);
}

/* Responsive */
@media (max-width: 1080px) {
  .h-nav {
    display: none;
  }

  .h-menu-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: 0;
  }

  .h-header-actions {
    margin-left: auto;
  }

  .h-nav.open {
    display: block;
    position: absolute;
    top: 72px;
    left: -16px;
    right: -16px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 0.5rem 16px 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(8, 43, 110, 0.25);
  }

  .h-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .h-menu-item {
    border-bottom: 1px solid var(--line);
  }

  .h-menu-mobile {
    display: block;
  }

  .h-menu-btn,
  .h-menu-link {
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 0 0.25rem;
    border-radius: 0;
    font-size: 1.05rem;
    font-weight: 600;
  }

  .h-menu-btn:hover,
  .h-menu-link:hover,
  .h-menu-item.is-open > .h-menu-btn {
    background: none;
  }

  .h-mega,
  .h-mega-simple {
    position: static;
    width: auto;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .h-mega-side {
    order: 2;
    padding: 0 0 1rem;
  }

  .h-mega-cats {
    display: none;
  }

  .h-mega-featured {
    margin-top: 0;
    background: var(--mist);
  }

  .h-mega-main,
  .h-mega-simple .h-mega-panel {
    padding: 0 0 0.75rem;
    background: none;
  }

  .h-mega-panel[hidden] {
    display: block;
  }

  .h-mega-main .h-mega-title {
    display: block;
    margin: 0.75rem 0 0.25rem 0.25rem;
  }

  .h-mega-panel ul {
    grid-template-columns: 1fr;
  }

  .h-mega-panel a:not(.h-mega-more) {
    padding: 0.6rem 0.25rem;
  }

  .h-mega-more {
    display: none;
  }
}

@media (max-width: 960px) {
  .h-footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .h-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .h-header-actions .h-login {
    display: none;
  }

  .h-brand img {
    height: 24px;
  }

  .h-header-inner {
    gap: 0.5rem;
  }

  .h-header-actions .h-btn-sm {
    padding: 0 0.9rem;
    font-size: 0.88rem;
  }

  .h-menu-toggle {
    padding: 0 0.8rem;
  }

  .h-head {
    text-align: left;
  }

  .h-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* La cabecera ya lleva "Pedir una demo": fuera el botón flotante duplicado */
.site .floating-demo-btn {
  display: none;
}

.site .floating-whatsapp-btn {
  bottom: 1rem;
}

/* Componentes compartidos entre la home y las páginas interiores */
.h-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--indigo);
  font-weight: 700;
  font-size: 0.78rem;
}

.h-hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.h-checks {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.h-checks li {
  position: relative;
  padding-left: 1.8rem;
}

.h-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--indigo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* Mini interfaces de cada pestaña */
.h-mock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 20px 50px -28px rgba(10, 31, 69, 0.35);
  padding: 1.1rem;
  font-size: 0.9rem;
}

.h-mock-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.h-mock-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.h-mock-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid #eef0f8;
}

.h-mock-list small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.h-pill {
  flex: none;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--mist);
  color: var(--indigo);
}

.h-pill.is-ok {
  background: #e3f6ea;
  color: #187a3e;
}

.h-pill.is-warn {
  background: #fdf0cf;
  color: #8a5d00;
}

.h-mock-actions {
  display: flex;
  gap: 0.4rem;
}

.h-mock-actions span {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
}

.h-mock-actions span:last-child {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}

.h-shifts {
  display: grid;
  grid-template-columns: 70px repeat(5, 1fr);
  gap: 4px;
  font-size: 0.76rem;
}

.h-shifts > span {
  padding: 0.45rem 0.3rem;
  border-radius: 6px;
  text-align: center;
}

.h-shifts .is-head {
  color: var(--ink-soft);
  font-weight: 600;
}

.h-shifts .is-name {
  text-align: left;
  font-weight: 600;
}

.h-shifts .m { background: #e6e8ff; color: var(--indigo-deep); }
.h-shifts .t { background: #dcecff; color: #0f5fc4; }
.h-shifts .o { background: #f4f5fa; color: #8a93b2; }
.h-shifts .gap { background: #fff4e0; color: #8a5d00; outline: 1.5px dashed #f0b429; outline-offset: -1.5px; }

.h-bars {
  display: grid;
  gap: 0.7rem;
}

.h-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.h-bar-label span:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.h-bar {
  height: 10px;
  border-radius: 999px;
  background: #eef0f8;
  overflow: hidden;
}

.h-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: var(--blue);
}

/* WhatsApp */
.h-wa {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--r-lg);
  background: var(--navy);
  color: #dfe5f5;
}

.h-wa h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.06;
}

.h-wa-copy > p {
  margin-top: 1rem;
  font-size: 1.08rem;
  color: #c3cbe3;
}

.h-wa .h-checks li::before {
  background-color: var(--wa);
}

.h-wa .h-btn-primary {
  background: #fff;
  color: var(--navy);
}

.h-wa .h-btn-primary:hover {
  background: #e8ebff;
}

.h-chat {
  max-width: 380px;
  margin-inline: auto;
  width: 100%;
  padding: 1rem;
  border-radius: 22px;
  background: #e9e1d6;
  color: #1c2533;
  font-size: 0.9rem;
  line-height: 1.4;
  display: grid;
  gap: 0.5rem;
}

.h-chat-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: -1rem -1rem 0.4rem;
  padding: 0.8rem 1rem;
  border-radius: 22px 22px 0 0;
  background: #075e54;
  color: #fff;
  font-weight: 600;
}

.h-chat-head small {
  display: block;
  font-weight: 400;
  opacity: 0.8;
  font-size: 0.75rem;
}

.h-chat-head .h-avatar {
  background: #fff;
}

.h-msg {
  max-width: 82%;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.h-msg time {
  display: block;
  text-align: right;
  font-size: 0.68rem;
  color: #7a8394;
  margin-top: 0.15rem;
}

.h-msg.is-me {
  justify-self: end;
  background: #d9fdd3;
}

/* Ley */
.h-law {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.h-law h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.h-law-copy > p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.h-law-copy .h-link {
  display: inline-block;
  margin-top: 1.2rem;
}

.h-law-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.h-law-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.h-law-list strong {
  display: block;
  font-size: 1.05rem;
}

.h-law-list span {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Calculadora */
.h-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.h-calc-form {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.h-field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.h-calc-input {
  width: 100%;
  max-width: 220px;
  min-height: 52px;
  padding: 0 1rem;
  border: 1.5px solid #c9cdf0;
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.h-calc-input:focus {
  border-color: var(--indigo);
}

.h-modules {
  margin: 1.8rem 0 0;
  padding: 0;
  border: 0;
}

.h-modules legend {
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding: 0;
}

.h-module {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid #eef0f8;
  cursor: pointer;
}

.h-module input {
  width: 20px;
  height: 20px;
  accent-color: var(--indigo);
}

.h-module span {
  font-weight: 500;
}

.h-module small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 400;
}

.h-module em {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.85rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.h-module.is-base {
  cursor: default;
}

.h-calc-result {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--navy);
  color: #c3cbe3;
}

.h-calc-result .h-total-label {
  font-size: 0.95rem;
}

.h-calc-result .h-total {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.h-calc-result .h-total-unit {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.h-calc-result ul {
  list-style: none;
  margin: 1.5rem 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.h-calc-result .h-btn {
  margin-top: auto;
  background: #fff;
  color: var(--navy);
}

.h-calc-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #95a0c2;
}

/* Puesta en marcha */
.h-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: step;
}

.h-steps li {
  counter-increment: step;
  padding-top: 1.4rem;
  border-top: 3px solid var(--indigo);
}

.h-steps li::before {
  content: "Paso " counter(step);
  display: block;
  color: var(--indigo);
  font-weight: 600;
  font-size: 0.9rem;
}

.h-steps h3 {
  margin-top: 0.4rem;
  font-size: 1.2rem;
}

.h-steps p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.h-integrations {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  color: var(--ink-soft);
}

.h-integrations strong {
  color: var(--ink);
}

/* Preguntas */
.h-faq {
  max-width: 820px;
  margin-inline: auto;
}

.h-faq details {
  border-bottom: 1px solid var(--line);
}

.h-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 0;
  font-weight: 600;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
}

.h-faq summary::-webkit-details-marker {
  display: none;
}

.h-faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--indigo);
  transition: transform 0.2s ease;
}

.h-faq details[open] summary::after {
  transform: rotate(45deg);
}

.h-faq details p {
  padding: 0 2rem 1.4rem 0;
  color: var(--ink-soft);
}

.h-faq-more {
  margin-top: 2rem;
  text-align: center;
}

/* CTA final */
.h-final {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: var(--r-lg);
  background: var(--indigo);
  color: #fff;
  text-align: center;
}

.h-final::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 80% 0%, rgba(31, 134, 255, 0.55), transparent 70%);
  pointer-events: none;
}

.h-final > * {
  position: relative;
}

.h-final h2 {
  color: #fff;
  max-width: 22ch;
  margin-inline: auto;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.04;
}

.h-final p {
  max-width: 52ch;
  margin: 1rem auto 0;
  color: #e0e0ff;
  font-size: 1.1rem;
}

.h-final .h-hero-actions .h-btn-primary {
  background: #fff;
  color: var(--indigo);
}

.h-final .h-hero-actions .h-btn-primary:hover {
  background: #eef0ff;
}

.h-final .h-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.h-final .h-btn-outline:hover {
  border-color: #fff;
}

/* Responsive de los componentes compartidos */
@media (max-width: 960px) {
  .h-wa,
  .h-law,
  .h-calc {
    grid-template-columns: 1fr;
  }

  .h-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2rem;
  }
}

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

  .h-module {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 0.2rem;
  }

  .h-module em {
    grid-column: 2;
  }
}

/* Movimiento suave. Todo queda desactivado con "reducir movimiento" */
:root {
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.h-header {
  transition: box-shadow 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}

.h-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(8, 43, 110, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
  .h-btn:active,
  .h-tab:active,
  .h-menu-btn:active {
    transform: scale(0.98);
  }

  html {
    scroll-behavior: smooth;
    interpolate-size: allow-keywords;
  }

  /* Cambio de página con fundido (Chrome y Edge); la cabecera se queda quieta */
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.28s;
    animation-timing-function: var(--ease-soft);
  }

  .h-header {
    view-transition-name: site-header;
  }

  .h-btn,
  .h-tab {
    transition: background-color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft), transform 0.12s var(--ease-soft);
  }

  /* Aparición al entrar en pantalla: motion.js añade .is-in */
  .js-motion :is([data-reveal], .h-hero h1, .h-hero-lead, .h-hero .h-hero-actions, .h-hero-proof, .p-hero h1, .p-hero .p-lead, .p-hero .p-actions, .p-hero .p-note, .p-hero-visual, .p-hero .p-panel-dark, .p-message h1) {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.7s var(--ease-soft) var(--reveal-delay, 0s),
      transform 0.7s var(--ease-soft) var(--reveal-delay, 0s);
    /* Si el script fallara, el contenido aparece igualmente a los 2,5 s */
    animation: reveal-fallback 0s 2.5s forwards;
  }

  html.js-motion :is([data-reveal], .h-hero h1, .h-hero-lead, .h-hero .h-hero-actions, .h-hero-proof, .p-hero h1, .p-hero .p-lead, .p-hero .p-actions, .p-hero .p-note, .p-hero-visual, .p-hero .p-panel-dark, .p-message h1).is-in {
    opacity: 1;
    transform: none;
    animation: none;
  }

  /* Desplegables del menú */
  .h-menu-item.is-open > .h-mega {
    animation: soft-drop 0.22s var(--ease-soft);
  }

  .h-mega-panel:not([hidden]) {
    animation: soft-fade 0.25s var(--ease-soft);
  }

  .h-chev,
  .h-faq summary::after {
    transition: transform 0.25s var(--ease-soft);
  }

  /* Pestañas de la home */
  .h-panel:not([hidden]) {
    animation: soft-rise 0.35s var(--ease-soft);
  }

  /* Preguntas: altura animada donde el navegador lo permite */
  .h-faq details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.3s var(--ease-soft), content-visibility 0.3s allow-discrete;
  }

  .h-faq details[open]::details-content {
    block-size: auto;
  }

  .h-faq details[open] p {
    animation: soft-fade 0.35s var(--ease-soft);
  }

  /* Tarjetas que son enlace o contienen uno principal */
  .blog-card,
  .h-mega-featured,
  .h-mega-panel a {
    transition: background-color 0.2s var(--ease-soft), transform 0.25s var(--ease-soft), box-shadow 0.25s var(--ease-soft);
  }

  .p-blog-grid .blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -28px rgba(8, 43, 110, 0.45);
  }

  .h-link,
  .h-nav a,
  .h-login,
  .h-footer a {
    transition: color 0.2s var(--ease-soft);
  }
}

@keyframes reveal-fallback {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes soft-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes soft-fade {
  from {
    opacity: 0;
  }
}

@keyframes soft-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
