/* Corpin · diseño corporativo
   Sobrio y sin animaciones: sin transiciones, sin movimiento, sin efectos. */

:root {
  --ink: #14233a;
  --text: #2b3544;
  --muted: #566274;
  --line: #d6dce4;
  --soft: #f3f5f8;
  --tint: #e6edf5;
  --white: #ffffff;
  --brand: #355b83;
  --brand-dark: #28496b;
  --navy: #14233a;
  --max: 1120px;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 3px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Tipografía */
h1, h2 { font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.3rem); line-height: 1.12; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.3vw, 2.3rem); line-height: 1.2; }
h3 { font-family: var(--sans); font-size: 1.2rem; line-height: 1.3; font-weight: 700; color: var(--ink); }
.kicker { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.lead { font-size: 1.25rem; line-height: 1.55; color: var(--text); max-width: 48ch; }
.note { font-size: 0.9375rem; color: var(--muted); }

/* Iconos y números */
.ico { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 4px; background: var(--tint); color: var(--brand); }
.ico svg { width: 26px; height: 26px; }
.idx { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }

/* Botones */
.button {
  display: inline-block;
  padding: 14px 26px;
  border: 1px solid var(--brand);
  border-radius: 3px;
  background: var(--brand);
  color: #fff;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.button-ghost { background: transparent; color: var(--brand); }
.button-ghost:hover { background: var(--soft); color: var(--brand-dark); border-color: var(--brand-dark); }
.button-small { padding: 9px 18px; font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 700 1.375rem/1 var(--sans); letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.main-nav { display: flex; gap: 32px; margin-left: auto; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9688rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--brand); color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: 20px; }
.language-switch { display: flex; gap: 4px; font-size: 0.875rem; font-weight: 700; }
.language-switch span, .language-switch a { padding: 4px 8px; border-radius: 3px; text-decoration: none; }
.language-switch span { background: var(--soft); color: var(--ink); }
.language-switch a { color: var(--muted); }
.language-switch a:hover { color: var(--brand); }
.menu-toggle { display: none; padding: 9px 16px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); font: 600 0.9375rem/1 var(--sans); cursor: pointer; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--white); }
.mobile-nav .wrap { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 12px; }
.mobile-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.mobile-nav a:last-child { border-bottom: 0; }

/* Bloques oscuros (portada y cabecera de servicios) */
.dark { background-color: var(--navy); background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px); background-size: 26px 26px; color: #d3dce8; border-bottom: 4px solid var(--brand); }
.dark h1 { color: #fff; }
.dark .kicker { color: #9fb7d1; }
.dark .lead { color: #d3dce8; }
.dark .button { background: #fff; border-color: #fff; color: var(--navy); }
.dark .button:hover { background: #e7edf4; border-color: #e7edf4; color: var(--navy); }
.dark .button-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.dark .button-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; color: #fff; }
.dark :focus-visible { outline-color: #fff; }

/* Portada */
.hero { padding: 88px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 22px; }

/* Esquema de servicios en la cabecera */
.diagram { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; }
.diagram-hub { position: relative; display: grid; place-items: center; width: 104px; height: 104px; background: #fff; border-radius: 4px; }
.diagram-hub::after { content: ""; position: absolute; top: 50%; left: 100%; width: 28px; height: 1px; background: rgba(255, 255, 255, 0.45); }
.diagram-nodes { position: relative; display: grid; gap: 16px; margin-left: 56px; }
.diagram-nodes::before { content: ""; position: absolute; left: -28px; top: 44px; bottom: 44px; width: 1px; background: rgba(255, 255, 255, 0.45); }
.diagram-nodes li { position: relative; }
.diagram-nodes li::before { content: ""; position: absolute; top: 50%; left: -28px; width: 28px; height: 1px; background: rgba(255, 255, 255, 0.45); }
.diagram-nodes a { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px 20px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 4px; color: #fff; text-decoration: none; }
.diagram-nodes a:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.diagram-nodes .ico { background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; }
.diagram-nodes strong { display: block; font-size: 1.0625rem; line-height: 1.3; }
.diagram-nodes small { display: block; margin-top: 3px; font-size: 0.9063rem; line-height: 1.4; color: #b4c3d6; }

/* Secciones */
.section { padding: 88px 0; }
.section-alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { margin-bottom: 44px; }
.sec-head h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 18px; background: var(--brand); }

/* Servicios (portada) */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.service { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 32px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 3px; }
.service h3 { font-size: 1.4rem; margin-top: 8px; }
.service p { color: var(--text); }
.more { margin-top: auto; padding-top: 10px; font-weight: 700; text-decoration: none; }
.more::after { content: " →"; }
.more:hover { text-decoration: underline; }

/* Pasos (línea de tiempo) */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { position: relative; padding-right: 28px; }
.steps li::after { content: ""; position: absolute; top: 20px; left: 52px; right: 12px; height: 1px; background: #aebacb; }
.steps li:last-child::after { display: none; }
.steps .idx { margin-bottom: 20px; }
.steps h3 { margin-bottom: 6px; }
.steps p { font-size: 1rem; color: var(--text); }

/* Ejemplos (esquema a mano / con Corpin) */
.cases { display: grid; gap: 16px; }
.case { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px 28px; background: var(--white); border: 1px solid var(--line); border-radius: 3px; }
.flows { display: grid; gap: 14px; }
.flow { display: flex; align-items: center; gap: 18px; }
.flow-label { flex: none; width: 88px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.flow:last-child .flow-label { color: var(--brand); }
.chain { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 30px; }
.chain li { position: relative; padding: 8px 14px; font-size: 0.9375rem; line-height: 1.3; border-radius: 3px; border: 1px solid var(--line); background: var(--soft); color: var(--muted); }
.chain li + li::before { content: "→"; position: absolute; left: -22px; top: 50%; margin-top: -0.7em; line-height: 1.4; color: var(--muted); }
.chain.corpin li { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.cases + .note { margin-top: 20px; }

/* Principios */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.principles li { display: flex; flex-direction: column; gap: 6px; padding: 28px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 3px; }
.principles .ico { margin-bottom: 12px; }
.principles h3 { font-size: 1.125rem; }
.principles p { font-size: 1rem; color: var(--muted); }

/* Contacto */
.contact { background: var(--navy); color: #d7dee8; }
.contact h2 { color: #fff; }
.contact h2::after { display: none; }
.contact .kicker { color: #9fb7d1; }
.contact p { color: #d7dee8; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.contact h2 + p { margin-top: 14px; max-width: 54ch; font-size: 1.125rem; }
.contact .button { background: #fff; color: var(--navy); border-color: #fff; }
.contact .button:hover { background: #e7edf4; border-color: #e7edf4; color: var(--navy); }
.contact-address { color: #fff; font-weight: 600; }
.contact-address:hover { color: #fff; }
.contact-notes { border-left: 1px solid #3b4d66; padding-left: 32px; display: grid; gap: 14px; font-size: 0.9688rem; }
.contact-notes a { color: #fff; }
.contact :focus-visible { outline-color: #fff; }

/* Cabecera de página interior */
.page-hero { padding: 40px 0 72px; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 44px; font-size: 0.9063rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.dark .crumbs, .dark .crumbs a { color: #9fb7d1; }
.dark .crumbs a:hover { color: #fff; }
.summary { background: var(--white); border-radius: 4px; padding: 28px 28px 22px; color: var(--text); }
.summary h2 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }
.summary ol { margin-top: 8px; }
.summary li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.summary li:last-child { border-bottom: 0; }
.summary strong { display: block; color: var(--ink); line-height: 1.3; }
.summary small { display: block; margin-top: 2px; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.summary .note { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.875rem; }

/* Elementos de servicio */
.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.items.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.items.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.items li { display: flex; flex-direction: column; gap: 8px; padding: 28px; background: var(--soft); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 3px; }
.items .idx { margin-bottom: 10px; }
.items p { font-size: 1rem; }

/* Preguntas frecuentes (desplegables nativos, sin animación) */
.qa-list { max-width: 860px; border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.0625rem; line-height: 1.4; color: var(--ink); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; font-size: 1.1rem; font-weight: 400; color: var(--brand); }
.qa[open] summary::after { content: "−"; }
.qa summary:hover { color: var(--brand); }
.qa p { padding: 0 52px 22px 0; max-width: 70ch; }

.related-wrap { padding-top: 0; padding-bottom: 88px; }
.related { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 28px 32px; background: var(--soft); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 3px; }
.related h2 { font-size: 1.5rem; }
.related h2::after { display: none; }
.related .button { flex: none; }

/* Textos legales */
.page-hero.legal-hero { padding-bottom: 48px; background: var(--soft); border-bottom: 1px solid var(--line); }
.legal-hero .lead { max-width: 60ch; }
.legal-body { max-width: 780px; }
.legal-copy section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-copy section:first-child { border-top: 0; padding-top: 0; }
.legal-copy h2 { font-family: var(--sans); font-size: 1.25rem; font-weight: 700; letter-spacing: 0; margin-bottom: 10px; }
.legal-copy h2::after { display: none; }
.legal-copy p + p { margin-top: 12px; }
.legal-copy ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; margin-top: 10px; }
.legal-updated { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }
.back-link { margin-top: 40px; }

/* Pie */
.site-footer { background: #0e1a2b; color: #c3cedc; padding: 56px 0 28px; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer-about p { margin-top: 16px; max-width: 38ch; font-size: 0.9688rem; }
.footer-about p + p { margin-top: 10px; }
.site-footer h2 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #8fa5bf; margin-bottom: 14px; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid #2a3b55; font-size: 0.875rem; color: #8fa5bf; }

/* Diálogo de contacto */
.email-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 32px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--text); }
.email-dialog::backdrop { background: rgba(20, 35, 58, 0.55); }
.email-dialog h2 { font-size: 1.5rem; }
.email-dialog h2::after { display: none; }
.email-dialog p { margin-top: 10px; font-size: 1rem; }
.email-dialog .kicker { margin: 0 0 8px; }
.email-dialog-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.email-dialog-close:hover { color: var(--ink); }
.contact-notice { padding: 12px 14px; background: var(--soft); border-left: 3px solid var(--brand); font-size: 0.9375rem !important; }
.email-dialog-actions { display: grid; gap: 10px; margin-top: 20px; }
.email-option { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); text-decoration: none; font-weight: 600; }
.email-option:hover { border-color: var(--brand); color: var(--ink); background: var(--soft); }
.email-option small { display: block; font-weight: 400; font-size: 0.875rem; color: var(--muted); }
.email-copy-label { display: block; margin-top: 22px; font-size: 0.9375rem; color: var(--muted); }
.email-copy-row { display: flex; gap: 8px; margin-top: 8px; }
.email-copy-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; font: inherit; color: var(--ink); background: var(--white); }
.email-copy-row button { padding: 10px 16px; border: 1px solid var(--brand); border-radius: 3px; background: var(--brand); color: #fff; font: 600 0.9375rem var(--sans); cursor: pointer; }
.email-copy-row button:hover { background: var(--brand-dark); }
.email-copy-row button[hidden] { display: none; }
.copy-status { min-height: 1.4em; font-size: 0.9375rem !important; color: var(--muted); }

/* Adaptación a pantallas pequeñas */
@media (max-width: 1000px) {
  .service-grid, .items, .items.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 900px) {
  .main-nav, .nav-cta { display: none; }
  .js .menu-toggle { display: inline-block; }
  .js .mobile-nav.open { display: block; }
  html:not(.js) .mobile-nav { display: block; }
  .hero { padding: 56px 0 64px; }
  .hero-grid, .page-hero-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1, .page-hero h1 { max-width: none; }
  .diagram { display: block; }
  .diagram-hub, .diagram-nodes::before, .diagram-nodes li::before { display: none; }
  .diagram-nodes { margin-left: 0; }
  .contact-notes { border-left: 0; padding-left: 0; border-top: 1px solid #3b4d66; padding-top: 28px; }
  .section { padding: 60px 0; }
  .sec-head { margin-bottom: 32px; }
  .related { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-about { grid-column: 1 / -1; }
  /* Línea de tiempo en vertical */
  .steps, .steps-3 { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding: 0 0 28px 60px; min-height: 40px; }
  .steps li:last-child { padding-bottom: 0; }
  .steps .idx { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after { top: 44px; bottom: 4px; left: 20px; right: auto; width: 1px; height: auto; }
  .steps h3 { padding-top: 8px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .service-grid, .items, .items.cols-4, .items.cols-2, .principles { grid-template-columns: minmax(0, 1fr); }
  .service, .items li, .principles li { padding: 24px 22px; }
  .flow { flex-direction: column; align-items: flex-start; gap: 8px; }
  .flow-label { width: auto; }
  .chain { flex-direction: column; align-items: stretch; gap: 22px; width: 100%; }
  .chain li + li::before { content: "↓"; left: 14px; top: -22px; margin-top: 0; }
  .case { padding: 22px 20px; }
  .qa p { padding-right: 0; }
  .email-dialog { padding: 24px 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 4px; }
  .actions .button { width: 100%; }
}

/* Impresión */
@media print {
  .site-header, .email-dialog, .menu-toggle, .contact, .site-footer .footer-grid nav { display: none !important; }
  .section, .hero, .page-hero { padding: 24px 0; }
  .dark { background: #fff; color: var(--text); }
  .dark h1 { color: var(--ink); }
}
