/* HUI accessibility refinements for the canonical ui-base v0.1. */
:root {
  --muted: #8AAAD8;
  --focus: #00C2FF;
  --focus-halo: #06080F;
  --ui-border: #8AAAD8;
  --ui-surface: #0F1628;
  --ui-text: #E8EEF8;
  --ui-danger: #FF6B6B;
  --ui-success: #84E004;
}
.hui-official-logo { display:block; width:min(220px, 48vw); height:auto; }
.nav-brand .hui-official-logo { width:min(190px, 48vw); }
.nav-logo .hui-official-logo { width:min(220px, 42vw); }
.panel-capabilities-title { margin-bottom:1rem; color:var(--text); font-size:1.125rem; }
.panel-capabilities { display:grid; gap:.75rem; padding-left:1.25rem; color:var(--text-2); }
.panel-capabilities li { padding-left:.25rem; }
.calc-field input[type="range"] { width:100%; min-height:44px; height:44px; touch-action:pan-y; cursor:pointer; }
.calc-assumptions { margin-top:1rem; color:var(--text-2); font-size:14px; }
.calc-loading { color:var(--text-2); font-size:16px; }
.calc-field-error { margin-top:.5rem; color:var(--ui-danger); font-size:16px; }
.calc-form-status { margin-top:.5rem; color:var(--text-2); font-size:16px; }
.calc-form-alternatives { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:.75rem; }
.calc-form-alternatives a, footer a, .flinks a, .social-link, .nav-lang { min-height:44px; }
.calc-form-alternatives a, footer a, .flinks a { display:inline-flex; align-items:center; padding:.5rem .25rem; }
.calc-cta-form input[aria-invalid="true"] { border-color:var(--ui-danger); }
.nav-lang, .hamburger { font:inherit; font-size:16px; min-width:44px; min-height:44px; }
.mobile-menu .nav-lang { display:inline-flex; align-items:center; align-self:flex-start; background:transparent; color:var(--text-2); border:1px solid var(--border-2); border-radius:6px; padding:6px 10px; }
.hamburger { align-items:center; justify-content:center; border:0; background:transparent; }
.nav .nav-cta { color:#fff; }
.beta-form label.ui-visually-hidden, .access-form label.ui-visually-hidden { position:absolute; }
.beta-form input[aria-invalid="true"], .access-form input[aria-invalid="true"] { border-color:var(--ui-danger); }
@media (max-width:768px) {
  body p, body li, body label, body .sub, body .lead, body .description,
  body .calc-footer p, body .calc-metric-lbl, body .calc-metric-sub,
  body .panel-row, body footer, body .beta-msg, body .access-msg {
    font-size:16px;
  }
  body small, body .eyebrow, body .last-update, body .nav-lang,
  body .calc-assumptions, body .calc-field-error, body .calc-form-status {
    font-size:14px;
  }
  .mobile-menu a, .mobile-menu .nav-lang { min-height:44px; }
}

/* Decorative transitions and pills must not create a second horizontal canvas on narrow screens. */
html, body { max-width: 100%; }
@media (max-width: 768px) {
  .container, .services-grid, .why-grid, .process-visual, .service-card, .service-tags { min-width: 0; max-width: 100%; }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .process-visual.slide-right { transform: translateX(0); }
  .service-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
  .tag-pill { max-width: 100%; white-space: normal; }
}

@media (max-width: 480px) {
  .calc-cta-form { display: grid; grid-template-columns: minmax(0, 1fr); }
  .calc-cta-form input, .calc-cta-form button { width: 100%; min-width: 0; }
}

/* Mobile reading and control sizes. Metadata stays compact; service content remains readable. */
@media (max-width: 768px) {
  body p, body li, body label, body a[href], body button, body h3, body h4, body strong,
  body .tag-pill, body .btn-primary, body .btn-secondary, body .cta-inline,
  body .li-follow-btn, body .calc-assumptions, body .calc-field label,
  body .service-card p, body .diff-text p, body .pv-content p, body .section-sub,
  body .li-slim-text span, body .footer-col h4, body .footer-brand p {
    font-size: 16px;
  }
  body .hero-eyebrow, body .section-eyebrow, body .pv-header, body .pv-num,
  body .pv-step-badge, body .li-stats .lbl, body small, body .last-update {
    font-size: 14px;
  }
}

/* Higher-specificity mobile type overrides for legacy component rules. */
@media (max-width: 768px) {
  body :is(p, li, label, a[href], button, h3, h4, strong, .tag-pill, .btn-primary,
    .btn-secondary, .cta-inline, .li-follow-btn, .calc-assumptions, .platform-tagline,
    .calc-field label span, .footer-col h4, .footer-brand p, .calc-cta-form input) {
    font-size: 16px !important;
  }
  body :is(.hero-eyebrow, .section-eyebrow, .pv-header, .pv-num, .pv-step-badge,
    .lbl, small, .last-update, .popular) {
    font-size: 14px !important;
  }
}

@media (max-width: 768px) {
  .nav-logo { min-height: 44px; }
  .cta-inline { display: inline-flex; align-items: center; min-height: 44px; }
  .social-link { min-width: 44px; }
  #hui-cookie-banner p { margin-bottom: .5rem; }
  #hui-cookie-banner .cookie-policy-link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .25rem; }
}

/* Revisión UX 2026-10-23: hidden es un estado real y el consentimiento cabe sin recorte. */
[hidden] { display:none !important; }
#hui-cookie-banner .hui-btn-reject { color:var(--muted); }
#hui-cookie-banner p { min-width:0; }
#hui-cookie-banner .hui-cookie-btns { flex-wrap:wrap; max-width:100%; }
@media(max-width:360px){
  #hui-cookie-banner .hui-cookie-btns { flex-direction:column; width:100%; }
  #hui-cookie-banner .hui-cookie-btns button { width:100%; min-width:0; }
}

/* Los enlaces largos de las páginas legales deben ajustarse, no quedar recortados. */
footer a,.flinks a { max-width:100%;overflow-wrap:anywhere; }

a[href*="linkedin.com/company/"] { overflow-wrap:anywhere; }

@media(max-width:600px){
  #hui-cookie-banner { display:grid;grid-template-columns:minmax(0,1fr);gap:8px; }
  #hui-cookie-banner p { width:100%; }
  #hui-cookie-banner .hui-cookie-btns { width:100%; }
}

/* [UX-A11Y] Language controls inherit the dark navigation surface, not UA gray. */
.nav-lang { background:transparent; color:var(--muted); display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px; }

/* [UX-A11Y] The measured interactive target includes inline legal/support links. */
body a:not(.skip-link),body button,body [role="button"] { min-width:44px;min-height:44px; }
body a:not(.skip-link):not(:where(nav a, header a)) { display:inline-flex;align-items:center;vertical-align:middle;max-width:100%;overflow-wrap:anywhere; }
.nav-links a, .nav-dd-menu a { display:flex; align-items:center; }
.pv-num,.badge-active { color:var(--muted) !important; }

.error-code { color:var(--muted) !important; }

#hui-wa-fab { background:#087d3d; }
.social-link.wa:hover { background:#087d3d; }

/* P5: compact secondary headers wrap into two rows without squeezing controls. */
@media(max-width:600px){
  .nav:has(> .nav-brand) { height:auto; min-height:64px; flex-wrap:wrap; gap:8px; padding-block:8px; }
  .nav:has(> .nav-brand) .nav-brand { flex:1 1 100%; }
  .nav:has(> .nav-brand) + main { padding-top:160px; }
  .nav:has(.nav-inner > a[href="/"]:last-child) .nav-inner { height:auto; min-height:68px; flex-wrap:wrap; gap:8px; padding-block:8px; }
  .nav:has(.nav-inner > a[href="/"]:last-child) .nav-logo { flex:1 1 calc(100% - 60px); min-width:0; }
  .nav:has(.nav-inner > a[href="/"]:last-child) .nav-logo-text { min-width:0; }
  .nav:has(.nav-inner > a[href="/"]:last-child) .brand-tag { overflow-wrap:anywhere; }
  .nav:has(.nav-inner > a[href="/"]:last-child) .nav-inner > a:last-child { margin-left:0 !important; }
}

@media(max-width:400px){
  .nav:has(.nav-inner > a[href="/"]:last-child) .brand-tag { display:none; }
}
.nav .nav-inner > a[href="/"]:last-child { white-space:nowrap; }
