/* Estilos compartidos por todas las páginas.
   El diseño vive en estilos inline dentro de cada *.dc.html; aquí solo hay lo que
   inline no puede expresar: breakpoints, foco, menú móvil, banner de cookies y
   estados de formulario. Las reglas responsivas usan !important para ganarle a
   los estilos inline. */

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { overflow-x: clip; }
img, picture, svg { max-width: 100%; }
button { font: inherit; }

/* ---------- Accesibilidad ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 1000; padding: 12px 18px;
  border-radius: 10px; background: #F0F1F7; color: #101228 !important; font-weight: 600;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid #EA5A65 !important; outline-offset: 3px !important; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px !important; }
main:focus { outline: none; }
.link-button {
  appearance: none; background: none; border: 0; padding: 0; margin: 0;
  font: inherit; cursor: pointer; text-align: left;
}
.link-button:hover { color: #F0F1F7 !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-delay: 0s !important;
    animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
  }
}

/* ---------- Header y menú móvil ---------- */
.nav-mobile { display: none; position: static; }
.nav-mobile > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(169,174,212,0.28); color: #F0F1F7;
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.burger { display: grid; gap: 5px; width: 20px; }
.burger > span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.nav-mobile[open] .burger > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile[open] .burger > span:nth-child(2) { opacity: 0; }
.nav-mobile[open] .burger > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-panel {
  position: absolute; top: 100%; left: 0; right: 0; display: grid;
  padding: 8px 20px 24px; background: #101228;
  border-bottom: 1px solid rgba(169,174,212,0.14);
  box-shadow: 0 24px 40px rgba(0,0,0,0.35);
  max-height: calc(100vh - 80px); overflow-y: auto;
}
.nav-mobile-panel > a {
  display: flex; align-items: center; min-height: 52px; font-size: 17px;
  border-bottom: 1px solid rgba(169,174,212,0.10);
}
.nav-mobile-panel > a.nav-mobile-cta {
  justify-content: center; margin-top: 18px; border: 0; border-radius: 999px;
  background: #D5303D; color: #FFFFFF; font-weight: 600;
}
.nav-mobile-panel > a.nav-mobile-cta:hover { background: #BF2732; color: #FFFFFF; }

@media (max-width: 1023px) {
  .nav-desktop { display: none !important; }
  .nav-mobile { display: block; }
  .site-header { gap: 12px !important; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 520px) {
  .header-cta { display: none !important; }
}

/* Objetivos táctiles de al menos 24px (WCAG 2.5.8) sin cambiar el aspecto */
.nav-desktop > a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-links { gap: 0 !important; }
.footer-links > *, .footer-bottom a, .footer-bottom .link-button { display: inline-flex; align-items: center; min-height: 32px; }
.toc a { display: inline-block; padding: 3px 0; }

/* ---------- Layout responsivo (clases añadidas en las fuentes) ---------- */
@media (max-width: 1023px) {
  .r-g4 { grid-template-columns: repeat(2, 1fr) !important; }
  .r-g6 { grid-template-columns: repeat(3, 1fr) !important; }
  .fs-70 { font-size: 56px !important; }
  .fs-68 { font-size: 54px !important; }
  .fs-60 { font-size: 50px !important; }
  .fs-56 { font-size: 46px !important; }
  .fs-52 { font-size: 44px !important; }
}
@media (max-width: 900px) {
  .r-stack { grid-template-columns: 1fr !important; gap: 44px !important; }
  .r-g3 { grid-template-columns: 1fr !important; }
  .r-span { grid-column: auto !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 36px 24px !important; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .r-px, .r-sec { padding-left: 20px !important; padding-right: 20px !important; }
  .r-sec { padding-top: 64px !important; padding-bottom: 64px !important; }
  .site-header { padding-top: 12px !important; padding-bottom: 12px !important; }
  .r-g6 { grid-template-columns: repeat(2, 1fr) !important; }
  .fs-70 { font-size: 44px !important; }
  .fs-68 { font-size: 42px !important; }
  .fs-60 { font-size: 40px !important; }
  .fs-56 { font-size: 36px !important; }
  .fs-52 { font-size: 36px !important; }
  .fs-46 { font-size: 34px !important; }
  .fs-44 { font-size: 32px !important; }
  .fs-42 { font-size: 31px !important; }
  .fs-34 { font-size: 28px !important; }
  .footer-links a, .footer-bottom a, .footer-bottom .link-button { min-height: 40px; }
}
@media (max-width: 560px) {
  .r-stack-sm, .r-g4 { grid-template-columns: 1fr !important; }
  .contact-value { text-align: left !important; }
}
@media (max-width: 400px) {
  .r-g6 { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .fs-70 { font-size: 38px !important; }
  .fs-60, .fs-68 { font-size: 36px !important; }
}

/* ---------- Formularios ---------- */
.field-error { margin: 0; font-size: 13.5px; line-height: 1.4; color: #F59AA1; }
.field-error::before { content: "⚠ "; }
[aria-invalid="true"] { border-color: #EA5A65 !important; }
button[disabled] { cursor: progress; opacity: .7; }

/* ---------- Banner y preferencias de cookies ---------- */
.cc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900;
  max-width: 760px; margin: 0 auto; padding: 20px 22px;
  display: grid; gap: 14px; grid-template-columns: 1fr auto; align-items: center;
  border: 1px solid rgba(169,174,212,0.22); border-radius: 16px;
  background: #1A1D3A; color: #F0F1F7; box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  font-family: 'Cabin', Helvetica, sans-serif;
}
.cc-banner p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #A9AED4; }
.cc-banner a, .cc-dialog a { color: #F0F1F7; text-decoration: underline; text-underline-offset: 3px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc-btn {
  appearance: none; min-height: 44px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1.2 'Cabin', Helvetica, sans-serif; border: 1px solid rgba(169,174,212,0.4);
  background: transparent; color: #F0F1F7;
}
.cc-btn:hover { border-color: #F0F1F7; }
.cc-btn-primary { background: #F0F1F7; color: #101228; border-color: #F0F1F7; }
.cc-btn-primary:hover { background: #FFFFFF; }
.cc-btn-link { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding-inline: 8px; }
@media (max-width: 640px) {
  .cc-banner { grid-template-columns: 1fr; left: 12px; right: 12px; bottom: 12px; }
  .cc-actions { justify-content: stretch; }
  .cc-actions .cc-btn { flex: 1 1 auto; }
}
.cc-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  border: 1px solid rgba(169,174,212,0.22); border-radius: 18px;
  background: #1A1D3A; color: #F0F1F7; font-family: 'Cabin', Helvetica, sans-serif;
}
.cc-dialog::backdrop { background: rgba(8,9,22,0.7); }
.cc-dialog form { display: grid; gap: 18px; padding: 26px; }
.cc-dialog h2 { margin: 0; font: 600 22px/1.2 'Exo', sans-serif; }
.cc-dialog p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #A9AED4; }
.cc-cat { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px; border-radius: 12px; background: #22264A; }
.cc-cat label { font-weight: 600; font-size: 15.5px; }
.cc-cat p { grid-column: 1 / -1; font-size: 13.5px; }
.cc-cat input { width: 22px; height: 22px; accent-color: #D5303D; }
.cc-dialog .cc-actions { justify-content: flex-end; }

/* Franja de logos de clientes: pausa al pasar el cursor (WCAG 2.2.2) */
.logo-marquee:hover { animation-play-state: paused !important; }
