/* El viewport define el espacio disponible; el contenido puede crecer sin recortes. */
:root {
  --site-content-gutter: clamp(24px, 5vw, 112px);
  --screen-space: clamp(28px, 5svh, 64px);
}
html { overflow-x: clip; }
.site-header {
  width: calc(100% - 2 * var(--site-content-gutter) + 48px) !important;
  max-width: none !important;
  box-sizing: border-box;
}
main { --home-content-width: calc(100% - 2 * var(--site-content-gutter)); }

.product-main.actia-main > section {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: auto !important;
  min-height: 86.25svh !important;
  margin-top: 0 !important;
  padding-block: var(--actia-section-space) !important;
}
.product-main.actia-main > .actia-hero {
  min-height: 100svh !important;
  padding-block: 86px !important;
}
.product-main.actia-main > .actia-next {
  min-height: 0 !important;
  padding-block: calc(var(--actia-section-space) + 30px) !important;
}

@media (min-width: 1001px) {
  main {
    --type-heading: clamp(36px, min(4.1vw, 8svh), 76px);
    --type-body: clamp(16px, min(1.35vw, 2.7svh), 24px);
  }
  main .hero:where(:has(> .hero-hands-stage)).section,
  main .capability-section,
  main .intro-section,
  main .services-section.section,
  main .how-group > .faq-screen,
  main .faq-screen,
  main .contact-section .contact-inner,
  .product-main > .product-screen {
    height: auto !important;
    min-height: 100svh !important;
    padding-top: max(100px, 12svh) !important;
    padding-bottom: var(--screen-space) !important;
    margin-top: 0 !important;
    box-sizing: border-box;
    scroll-margin-top: 0;
  }
  main .hero:where(:has(> .hero-hands-stage)).section {
    --type-hero: clamp(64px, min(6.7vw, 11.5svh), 116px);
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    overflow: visible;
  }
  .hero-visual.hero-hex-field:where(.hero-hands-stage) {
    top: auto;
    height: clamp(400px, 78svh, 900px);
    min-height: 0;
    width: 100%;
    margin-left: 0;
    align-self: center;
  }
  main :where(.hero:has(> .hero-hands-stage)) .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: clamp(480px, 72svh, 740px);
    padding-top: 0;
  }
  main .hero:where(:has(> .hero-hands-stage)) h1 { font-size: clamp(62px, 4.85vw, 96px) !important; line-height: 1.02 !important; letter-spacing: -.07em; margin: 0; }
  main .hero:where(:has(> .hero-hands-stage)) h1 .hero-title-line { display: block; white-space: nowrap; }
  main .hero:where(:has(> .hero-hands-stage)) h1 .hero-title-line:not(.hero-title-accent) { color: #1e2f4d; font-family: var(--display); font-style: normal; font-weight: 800; letter-spacing: -.075em; }
  main .hero:where(:has(> .hero-hands-stage)) h1 .hero-title-accent { color: #355c7d; font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.06em; margin-top: .16em; }
  main :where(.hero:has(> .hero-hands-stage)) .hero-copy { max-width: 31em; font-size: clamp(18px, 1.35vw, 26px) !important; margin: 0; }
  main :where(.hero:has(> .hero-hands-stage)) .hero-actions .button, main :where(.hero:has(> .hero-hands-stage)) .hero-actions .text-link { font-size: clamp(17px, 1.35vw, 25px) !important; }
  main .hero:where(:has(> .hero-hands-stage)) .scroll-hint { bottom: 28px; }
  main .contact-section { padding-top: 0 !important; padding-bottom: 0 !important; }
  main .capability-section { justify-content: center; }
  main .intro-section { display: flex; flex-direction: column; justify-content: center; }
  main .services-section.process-journey { display: flex !important; align-items: center; }
  .process-journey .journey-layout { min-height: 0; }
  .process-journey .journey-copy { transform: none; }
  main .how-group > .faq-screen, main .faq-screen { display: flex; align-items: center; }
  main .faq-screen .faq-wrap { width: 100%; margin-top: 0; padding-top: 0; }
  .actia-dashboard .actia-hero-video { max-height: 72svh; }
  .consbi-galaxy .galaxy-layout { min-height: 100svh; height: auto; }
}

@media (min-width: 1001px) and (max-height: 750px) {
  main .hero:where(:has(> .hero-hands-stage)).section { --type-hero: clamp(60px, min(5.6vw, 10svh), 90px); }
  .hero-visual.hero-hex-field:where(.hero-hands-stage) { height: 66svh; }
  main :where(.hero:has(> .hero-hands-stage)) .hero-content { min-height: 70svh; }
  main .hero:where(:has(> .hero-hands-stage)) h1 { font-size: clamp(54px, 4.7vw, 74px) !important; }
}

@media (min-width: 1001px) and (max-width: 1200px) {
  main .how-group > .faq-screen .faq-heading h3 { font-size: 44px !important; }
  .process-journey .journey-layout { gap: 28px; }
}

/* Content sections follow their content instead of reserving a full screen. */
@media (min-width: 1001px) {
  main .capability-section,
  main .intro-section,
  main .services-section.section,
  main .how-group > .faq-screen,
  main .faq-screen {
    min-height: 0 !important;
    padding-top: clamp(64px, 8svh, 96px) !important;
    padding-bottom: clamp(64px, 8svh, 96px) !important;
  }
  main .capability-grid { gap: 40px !important; }
  main .capability-card { min-height: 196px !important; }
  main .capability-mockup .mockup-window { display: none; }
  main .capability-mockup .mockup-top {
    position: absolute;
    top: 9px;
    right: 11px;
    margin: 0;
    z-index: 3;
  }
  main .capability-mockup { padding-top: 27px; }
  main .mockup-build .build-laptop { width: 75%; }
  main .mockup-build .build-phone { right: 2px; }
  main .mockup-flow .flow-logo-node { width: 39px !important; height: 43px !important; flex-basis: 39px; }
  main .mockup-flow .flow-logo-node img { width: 23px; height: 23px; }
  main .mockup-data .data-rows > span { min-height: 32px; }
  main .mockup-data .data-rows strong { font-size: 9px; }
  main .mockup-app .customizer-tools { height: 26px; }
  main .mockup-app .app-preview { height: 39px; }
  /* Dar protagonismo al contenido de los mockups sin agrandar las tarjetas. */
  main .mockup-build .laptop-screen { height: 88px; }
  main .mockup-build .build-laptop { height: 102px; }
  main .mockup-build .build-laptop { top: -7px; }
  main .mockup-build .erp-heading b { font-size: 7px; }
  main .mockup-build .erp-heading > span { font-size: 6px; }
  main .mockup-build .erp-kpis strong { font-size: 9px; }
  main .mockup-build .erp-kpis small { font-size: 5px; }
  main .mockup-build .erp-kpis > span { padding-block: 4px; }
  main .mockup-build .erp-kpis strong { font-size: 11px; }
  main .mockup-build .erp-kpis small { font-size: 5.5px; }
  main .mockup-build .erp-orders > span { min-height: 12px; }
  main .mockup-build .erp-orders > span:nth-child(3) { display: none; }
  main .mockup-build .erp-orders b,
  main .mockup-build .erp-orders i { font-size: 6px; }
  main .mockup-build .build-note {
    bottom: -11px;
    width: max-content;
    max-width: calc(100% - 18px);
    min-height: 27px;
    padding: 4px 8px;
    font-size: 7px;
    white-space: nowrap;
  }
  main .mockup-build .build-phone { top: -2px; height: 119px; width: 59px; }
  main .mockup-build .phone-screen-title { font-size: 8px; margin: 6px 0 5px; }
  main .mockup-build .phone-status { font-size: 5px; font-weight: 700; color: #3b5770; }
  main .mockup-build .phone-task span { font-size: 5.5px; font-weight: 700; color: #31526d; }
  main .mockup-build .phone-button { font-size: 6px; font-weight: 800; }
  main .mockup-flow h3,
  main .mockup-data h3,
  main .mockup-app h3 { font-size: 14px; }
  main .mockup-flow .flow-logo-node small { font-size: 6px; color: #405c72; }
  main .mockup-data .data-rows strong { font-size: 11px; }
  main .mockup-app .customizer-logo { width: 19px; height: 19px; flex-basis: 19px; font-size: 10px; }
  main .mockup-app .customizer-palette i { width: 10px; height: 10px; }
  main .mockup-app .customizer-tools small { font-size: 8px; color: #405c72; }
  main .mockup-app .app-preview b { font-size: 10px; }
  main .mockup-app .app-preview small { font-size: 8px; }
}

@keyframes flowLogoChain {
  0%, 16%, 100% { transform: scale(1); box-shadow: 0 5px 12px rgba(35,61,82,.08); }
  8% { transform: scale(1.2); box-shadow: 0 8px 20px rgba(53,92,125,.2); }
}

main .mockup-flow .flow-logo-node {
  animation: flowLogoChain 5s ease-in-out infinite;
  transform-origin: center;
  position: relative;
  z-index: 1;
}
main .mockup-flow .flow-logo-node:nth-of-type(1) { animation-delay: 0s; }
main .mockup-flow .flow-logo-node:nth-of-type(2) { animation-delay: 1s; }
main .mockup-flow .flow-logo-node:nth-of-type(3) { animation-delay: 2s; }
main .mockup-flow .flow-logo-node:nth-of-type(4) { animation-delay: 3s; }
main .mockup-flow .flow-logo-node:nth-of-type(5) { animation-delay: 4s; }

@media (prefers-reduced-motion: reduce) {
  main .mockup-flow .flow-logo-node { animation: none; }
}

/* La galería necesita altura propia cuando la sección deja de ocupar todo el viewport. */
@media (min-width: 1001px) {
  main .services-section:not(.process-journey) .service-grid {
    height: clamp(440px, 50svh, 520px);
    align-self: center;
  }
  main .services-section:not(.process-journey) .vitrine-card {
    width: min(520px, 64%);
    height: clamp(380px, 43svh, 430px);
    max-height: none;
  }
}

@media (max-width: 1000px) {
  main .capability-grid { gap: 24px !important; }
}

/* En tablet y móvil manda la lectura: ninguna altura fija oculta información. */
@media (max-width: 1000px) {
  .site-header { width: calc(100% - 24px) !important; }
  :root { --site-content-gutter: 24px; }
  main .hero:where(:has(> .hero-hands-stage)).section,
  main .capability-section,
  main .intro-section,
  main .services-section.section,
  main .faq-screen:not(.actia-faq),
  main .contact-section .contact-inner,
  .product-main > .product-screen {
    height: auto !important;
    min-height: 0 !important;
    padding-top: 88px !important;
    padding-bottom: 48px !important;
    margin-top: 0 !important;
  }
  main .hero:where(:has(> .hero-hands-stage)).section { min-height: 100svh !important; }
  .actia-app-left h2 { white-space: normal; }
  main .hero:where(:has(> .hero-hands-stage)) h1 { font-size: clamp(22px, 3.2vw, 32px) !important; }
  main .hero:where(:has(> .hero-hands-stage)) h1 .hero-title-line { display: block; white-space: nowrap; }
  main .hero:where(:has(> .hero-hands-stage)) h1 .hero-title-line:not(.hero-title-accent) { color: #1e2f4d; font-family: var(--display); font-style: normal; font-weight: 800; letter-spacing: -.075em; }
  main .hero:where(:has(> .hero-hands-stage)) h1 .hero-title-accent { color: #355c7d; font-family: var(--serif); font-style: italic; font-weight: 400; }
}
@media (max-width: 680px) {
  main .hero:where(:has(> .hero-hands-stage)) h1 { font-size: clamp(18px, 5.8vw, 35px) !important; }
}
/* Doble separación después de Soluciones, antes de Cómo trabajamos. */
main #como-trabajamos > .services-section.process-journey {
  padding-top: 128px !important;
}
@media (min-width: 1001px) {
  main #como-trabajamos > .services-section.process-journey {
    padding-top: clamp(128px, 16svh, 192px) !important;
  }
}
@media (min-width: 1001px) {
  main #como-trabajamos > .process-journey,
  main #como-trabajamos > .faq-screen {
    min-height: var(--independent-section-height, 80svh) !important;
    height: auto !important;
    box-sizing: border-box;
    padding-top: clamp(64px, 8svh, 96px) !important;
    padding-bottom: clamp(64px, 8svh, 96px) !important;
    display: flex !important;
    align-items: center;
  }
}
/* Entrada breve y consecutiva de las tarjetas de El enfoque CONSBI. */
.intro-section.intro-cards-ready .principles .principle {
  opacity: 0;
  transform: translateX(72px);
  transition: opacity .38s ease-out, transform .38s cubic-bezier(.2,.75,.25,1), border-color .32s, box-shadow .32s;
}
.intro-section.intro-cards-visible .principles .principle {
  opacity: 1;
  transform: translateX(0);
}
.intro-section.intro-cards-visible .principles .principle:nth-child(2) { transition-delay: .12s; }
.intro-section.intro-cards-visible .principles .principle:nth-child(3) { transition-delay: .24s; }
.intro-section.intro-cards-visible .principles .principle:hover {
  transform: translateY(-5px) scale(1.012);
  transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  .intro-section .principles .principle { opacity: 1 !important; transform: none !important; }
}
/* Contacto: formulario alineado con el encabezado y altura ajustada al contenido. */
main .contact-section .contact-inner {
  min-height: 0 !important;
  height: auto !important;
  align-items: start !important;
  padding-block: clamp(112px, 11svh + 24px, 147.2px) !important;
}
main .contact-section .contact-form {
  align-self: start !important;
  margin-top: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}
main .contact-section .contact-copy { padding-top: 0 !important; }
/* Contacto termina al terminar su contenido, sin reservar una pantalla completa. */
main > .contact-section {
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
}
