/* Portada de Inversiones Hernández RD. Cargar después de styles.css. */

/* 1. Espaciado */
.ih-home .wrap { max-width: 1224px; padding-inline: 32px; }
.ih-home main > section { padding-block: 80px; }
.ih-home main > section[id]:not(#inicio) { scroll-margin-top: 88px; }
.ih-home .hero { padding-block: 88px 72px; }
.ih-home .hero-sub { margin-top: 24px; }
.ih-home .hero-ctas { gap: 12px; margin-top: 28px; }
.ih-home .hero-note { margin-top: 16px; }
.ih-home .section-head { margin-bottom: 32px; }
.ih-home .section-head p { margin-top: 12px; }
.ih-home .about-copy { margin-top: 16px; }
.ih-home .about-copy p { margin-bottom: 20px; }
.ih-home .pre-cta-links { margin-top: 20px; }
.ih-home .contact-row { gap: 12px; padding-block: 20px; }
.ih-home .foot-grid { gap: 32px; }

/* 2. Color */
.ih-home {
  --bg: #f7f8fa;
  --bg-alt: #eef1f5;
  --card: #fff;
  --ink: #142138;
  --ink-soft: #45536a;
  --muted: #59677b;
  --primary: #0754ce;
  --primary-deep: #063fa0;
  --text-accent: var(--primary);
  --accent: var(--primary);
  --line: #d6dde6;
  --line-soft: #e4e8ee;
  --button-fill: #0754ce;
  --button-hover: #063fa0;
  --shadow: 0 8px 28px #1421380d;
}
[data-theme="dark"] .ih-home {
  --bg: #101725;
  --bg-alt: #151f30;
  --card: #1a2638;
  --ink: #f0f3f9;
  --ink-soft: #c2cddd;
  --muted: #a9b7cd;
  --primary: #9dc2ff;
  --primary-deep: #d1e2ff;
  --line: #36445a;
  --line-soft: #2a374c;
  --button-fill: #0754ce;
  --button-hover: #0648b1;
  --shadow: none;
}
.ih-home header { background: var(--bg); border-color: var(--line); backdrop-filter: none; }
.ih-home .brand-name { color: var(--ink); }
.ih-home .hero { background: var(--bg); }
.ih-home #como-funciona { background: var(--bg-alt); }
.ih-home #contacto { background-image: none; }
.ih-home .btn-primary,
.ih-home .privacy-banner .btn-primary { background: var(--button-fill); color: #fff; }
.ih-home .btn-primary:hover,
.ih-home .privacy-banner .btn-primary:hover { background: var(--button-hover); color: #fff; }
.ih-home .btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.ih-home .btn-ghost:hover { background: var(--bg-alt); border-color: var(--line); color: var(--ink); }
.ih-home .foot-col h4 { color: #e9eff9; }

/* 3. Iconos */
.ih-home .action-icon,
.ih-home .faq-icon,
.ih-home .contact-row .ic .icon,
.ih-home .theme-toggle .icon,
.ih-home .menu-toggle .icon {
  width: 18px; height: 18px; flex: none; stroke-width: 1.5;
}
.ih-home .contact-row .ic .icon { color: var(--muted); }
.ih-home .faq-q .plus { display: grid; place-items: center; transform: none; }
.ih-home .faq-minus,
.ih-home .faq-item.open .faq-icon { display: none; }
.ih-home .faq-item.open .faq-minus { display: block; }
.ih-home .faq-item.open .plus { transform: none; }

/* 4. Texto: titulares, acciones y nombres de modalidades en el HTML. */

/* 5. Tipografía */
.ih-home { --display: var(--body-font); font-variant-numeric: tabular-nums; }
.ih-home :is(h1, h2, h3, h4) { font-weight: 600; }
.ih-home .hero h1 {
  max-width: 11ch; font-size: clamp(48px, 5vw, 72px); line-height: 1.03;
  letter-spacing: -.045em; font-weight: 550;
}
.ih-home .hero-city { position: relative; isolation: isolate; white-space: nowrap; }
.ih-home .hero-city::after {
  position: absolute; inset: auto 0 .08em; z-index: -1;
  height: .18em; border-radius: .08em; content: "";
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  transform-origin: left;
}
.ih-home .hero-sub { max-width: 41ch; font-size: 18px; line-height: 1.6; }
.ih-home .hero-note { max-width: none; color: var(--muted); font-size: 13px; }
.ih-home :is(.section-head, .about-grid, .clarity-panel, .pre-cta-card) h2 {
  font-size: clamp(28px, 3.1vw, 40px); line-height: 1.15; letter-spacing: -.035em;
}
.ih-home .section-head p { font-size: 16px; }
.ih-home .hero-locality,
.ih-home .brand-kicker,
.ih-home .foot-col h4 {
  font-family: var(--body-font); letter-spacing: 0; text-transform: none;
}
.ih-home .hero-locality { color: var(--muted); font-size: 14px; font-weight: 500; margin: 0 0 16px; }
.ih-home .hero-locality::before { content: none; }
.ih-home .brand-kicker { font-size: 11px; font-weight: 500; }
.ih-home .brand-name { font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
.ih-home .btn, .ih-home .navlinks a { font-weight: 550; }

/* 6. Composición */
.ih-home .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.ih-home .process-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 64px; }
.ih-home .process-grid .section-head { margin: 0; }
.ih-home .process-grid .btn { margin-top: 20px; }
.ih-home .process-media { margin: 24px 0 0; }
.ih-home .process-media figcaption { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.ih-home .process-media figcaption span { color: var(--muted); font-weight: 400; }
.ih-home .process-video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  border: 1px solid var(--line); border-radius: 12px; background: #0b1934;
}
@media screen and (max-height: 720px) {
  .ih-home .process-grid > .section-head { position: static; }
}
.ih-home .process-list { list-style: none; margin: 0; padding: 0; }
.ih-home .process-list li {
  position: relative; border-top: 1px solid var(--line);
  padding: 20px 0 20px 44px;
}
.ih-home .process-number {
  position: absolute; inset: 20px auto auto 0;
  color: var(--muted); font-size: 14px; font-weight: 550;
}
.ih-home .process-list h3 { font-size: 20px; line-height: 1.35; letter-spacing: -.015em; }
.ih-home .process-list p { margin-top: 4px; color: var(--ink-soft); }
.ih-home .process-list small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.ih-home .process-note { padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.ih-home .req-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.ih-home .req-item {
  display: block; padding: 20px 0; border: 0; border-top: 1px solid var(--line);
  border-radius: 0; background: transparent;
}
.ih-home .req-item h3 { font-size: 18px; }
.ih-home .clarity-panel { padding: 24px; align-items: center; }
.ih-home .learn-home .section-head { margin-bottom: 0; }
.ih-home .about-grid { gap: 48px; }
.ih-home .pre-cta-card { gap: 32px; }

/* 7. Detalles */
.ih-home :is(.btn, .brand-intro-replay, .theme-toggle, .menu-toggle, .top-float) { border-radius: 8px; }
.ih-home :is(.clarity-panel, .brand-intro, .pre-cta-card) { border-radius: 12px; box-shadow: none; }
.ih-home .pre-cta-card { padding: 32px; }
.ih-home :is(.clarity-panel, .pre-cta-card) { border-color: var(--line); }
.ih-home :focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.ih-home .faq-q { min-height: 48px; font-weight: 550; }
.ih-home .faq-item:not(.open) .faq-a { display: none; }
.ih-home .faq-item.open .faq-a { max-height: none; }
.ih-home .wa-float { background: #166a48; box-shadow: 0 4px 12px #10172526; border-radius: 12px; }
.ih-home .wa-float:hover { background: #115138; }

/* 8. Vista de las condiciones publicadas */
.ih-home .payment-preview {
  overflow: hidden; min-width: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); scroll-margin-top: 104px;
}
.ih-home .preview-head {
  padding: 28px 24px 24px; background: var(--card); border-top: 4px solid var(--primary);
}
.ih-home .preview-head h2 { margin-bottom: 8px; font-size: 24px; letter-spacing: -.025em; }
.ih-home .preview-head p { color: var(--muted); font-size: 14px; }
.ih-home .preview-head strong { color: var(--ink); font-weight: 600; }
.ih-home .payment-preview table { width: 100%; border-collapse: collapse; }
.ih-home .payment-preview :is(th, td) {
  padding: 16px 12px; border-top: 1px solid var(--line-soft); font-size: 15px; text-align: right;
}
.ih-home .payment-preview thead th {
  padding-block: 12px; background: var(--bg-alt); color: var(--ink-soft); font-size: 13px; font-weight: 500;
}
.ih-home .payment-preview th:first-child { padding-left: 24px; text-align: left; font-weight: 550; }
.ih-home .payment-preview :is(th, td):last-child { padding-right: 24px; }
.ih-home .payment-preview td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.ih-home .payment-preview tbody th { padding-block: 0; }
.ih-home .payment-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  color: var(--primary); text-decoration: underline; text-underline-offset: 3px;
}
.ih-home .payment-link span { text-decoration: none; }
.ih-home .preview-note { padding: 16px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* 9. Movimiento */
.ih-home :is(.btn, .top-float, .wa-float, .faq-a) {
  animation: none;
  transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}
.ih-home { transition: none; }
.ih-home :is(.btn, .top-float, .wa-float):hover { transform: none; }
.ih-home .btn:hover { box-shadow: none; }
.ih-home :is(.btn, .top-float, .wa-float):active { transform: none; }

@media screen and (prefers-reduced-motion: no-preference) {
  .ih-home .hero-copy h1 { animation: ih-title-mask 360ms var(--ih-ease) backwards; }
  .ih-home .hero-city::after { animation: ih-title-marker 300ms var(--ih-ease) 180ms backwards; }
  .ih-home .hero-copy :is(.hero-sub, .hero-ctas, .hero-note),
  .ih-home .payment-preview {
    animation: ih-hero-offset 320ms var(--ih-ease) var(--ih-hero-delay) backwards;
  }
  .ih-home .hero-sub { --ih-hero-delay: 65ms; --ih-hero-offset: 10px; }
  .ih-home .hero-ctas { --ih-hero-delay: 110ms; --ih-hero-offset: 12px; }
  .ih-home .hero-note { --ih-hero-delay: 155ms; --ih-hero-offset: 8px; }
  .ih-home .payment-preview { --ih-hero-delay: 100ms; --ih-hero-offset: 14px; }
}
@keyframes ih-title-mask {
  from { clip-path: inset(0 0 100% 0); transform: translateY(12px); }
  to { clip-path: inset(0); transform: translateY(0); }
}
@keyframes ih-title-marker {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes ih-hero-offset {
  from { opacity: .45; transform: translateY(var(--ih-hero-offset)); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .ih-home .hero-grid, .ih-home .process-grid { gap: 32px; }
  .ih-home .hero { padding-block: 64px; }
  .ih-home .hero h1 { font-size: clamp(40px, 6vw, 58px); }
}
@media (max-width: 760px) {
  .ih-home .wrap { padding-inline: 20px; }
  .ih-home main > section { padding-block: 48px; }
  .ih-home .hero-grid, .ih-home .process-grid, .ih-home .about-grid { grid-template-columns: 1fr; }
  .ih-home .hero-grid, .ih-home .process-grid, .ih-home .about-grid { gap: 24px; }
  .ih-home .hero h1 { max-width: 13ch; }
  .ih-home .hero-ctas { margin-top: 24px; }
  .ih-home .section-head { margin-bottom: 24px; }
  .ih-home .req-list { grid-template-columns: 1fr; }
  .ih-home .pre-cta-card { padding: 20px; gap: 24px; }
}

.ih-home .ih-header-whatsapp { display: none; }
@media screen and (max-width: 980px) {
  .ih-home:has(.privacy-banner:not([hidden])) .wa-float,
  .ih-home:has(.privacy-banner:not([hidden])) .top-float { visibility: hidden; }
  .ih-home:has(.privacy-banner:not([hidden])) .ih-header-whatsapp {
    display: inline-flex;
  }
  .ih-home .ih-header-whatsapp {
    width: 44px; height: 44px; flex: none; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px;
    background: #166a48; color: #fff;
  }
  .ih-home .ih-header-whatsapp .icon { width: 22px; height: 22px; }
}
@media screen and (max-width: 980px) and (max-height: 480px) {
  .ih-home .wa-float { visibility: hidden; }
  .ih-home .ih-header-whatsapp { display: inline-flex; }
}
@media screen and (max-width: 370px) {
  body.ih-home > header .brand .mark { width: 32px; height: 32px; }
  body.ih-home > header .brand-name { font-size: 16px; }
}
@media (max-width: 420px) {
  .ih-home .brand-name { font-size: 18px; }
  .ih-home .preview-head, .ih-home .preview-note { padding-inline: 12px; }
  .ih-home .payment-preview :is(th, td) { padding-inline: 8px; font-size: 13px; }
  .ih-home .payment-preview th:first-child { padding-left: 12px; }
  .ih-home .payment-preview :is(th, td):last-child { padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ih-home,
  .ih-home :is(.btn, .top-float, .wa-float, .faq-a) { transition: none; }
}

@media screen and (max-width: 1200px) {
  body.ih-home .wrap {
    padding-inline: max(20px, var(--ih-safe-left)) max(20px, var(--ih-safe-right));
  }
}

@media screen and (min-width: 720px) and (max-width: 980px) {
  .ih-home .hero-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 24px; }
  .ih-home .hero h1 { font-size: clamp(36px, 5.4vw, 54px); }
  .ih-home .hero-ctas .btn { white-space: normal; justify-content: center; }
  .ih-home .payment-preview :is(th, td) { padding-inline: 10px; }
  .ih-home .payment-preview th:first-child { padding-left: 16px; }
  .ih-home .payment-preview :is(th, td):last-child { padding-right: 16px; }
}

@media screen and (max-width: 719px) {
  .ih-home .hero { padding-block: 36px 48px; }
  .ih-home .hero h1 { font-size: clamp(34px, 9vw, 48px); }
  .ih-home .hero-ctas .btn {
    min-height: 48px; align-items: center; justify-content: center; text-align: center;
  }
  .ih-home .hero-sub { font-size: 16px; }
  .ih-home .payment-preview :is(th, td) { overflow-wrap: normal; }
}

@media screen and (max-width: 360px) {
  .ih-home .hero-ctas .btn { flex-basis: 100%; }
  .ih-home .payment-preview :is(th, td) { padding-inline: 6px; }
  .ih-home .payment-preview th:first-child { padding-left: 10px; }
  .ih-home .payment-preview :is(th, td):last-child { padding-right: 10px; }
}

@media screen and (max-width: 980px) and (orientation: landscape) and (max-height: 520px) {
  .ih-home .hero { padding-block: 32px 48px; }
}
