/* KAuth — paleta: negro grafito #202329, azul cobalto #245BDE, blanco #FFFFFF */
:root {
  --graphite: #202329;
  --graphite-2: #2b2f37;
  --graphite-3: #3a3f49;
  --cobalt: #245bde;
  --cobalt-dark: #1a47b3;
  --cobalt-light: #6f98ee;
  --cobalt-tint: #eef3fd;
  --white: #ffffff;
  --soft: #f5f7fa;
  --muted: #5d6573;
  --line: #e1e5ec;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--graphite); background: var(--white); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: clamp(32px, 4.2vw, 48px); }
h3 { font-size: 22px; }
p { margin-bottom: 20px; }
:focus-visible { outline: 3px solid var(--cobalt-light); outline-offset: 3px; }
.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 22px; line-height: 1.5; }
.eyebrow.blue { color: var(--cobalt); }
.skip { position: fixed; z-index: 100; top: -100px; left: 16px; background: var(--white); color: var(--graphite); padding: 12px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

/* Botones */
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 52px; padding: 14px 24px; background: var(--cobalt); color: var(--white); border: 0; border-radius: var(--radius); font-weight: 700; font-size: 15px; transition: background .2s, transform .2s; }
.button:hover { background: var(--cobalt-dark); }
.button.light { background: var(--white); color: var(--graphite); }
.button.light:hover { background: var(--cobalt-tint); }

/* Header */
.header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { width: min(1200px, calc(100% - 48px)); height: 72px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo img { height: 48px; width: 48px; }
nav { display: flex; align-items: center; gap: 36px; font-size: 15px; font-weight: 600; }
nav a { position: relative; padding-block: 6px; }
nav a:not(.nav-contact):hover { color: var(--cobalt); }
.nav-contact { background: var(--graphite); color: var(--white); padding: 10px 22px; border-radius: var(--radius); transition: background .2s; }
.nav-contact:hover { background: var(--cobalt); }
.menu-toggle { display: none; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--graphite); }

/* Hero / carrusel */
.hero { background: var(--graphite); color: var(--white); }
.carousel { position: relative; }
.slides { position: relative; height: clamp(520px, 70vh, 640px); overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
img.slide-bg { transform: scale(1.04); transition: transform 7s ease-out; }
.slide.is-active img.slide-bg { transform: scale(1); }
.brand-bg { background: radial-gradient(900px 500px at 82% 45%, rgba(36, 91, 222, .45), transparent 70%), linear-gradient(135deg, var(--graphite) 0%, #181a1f 100%); }
.shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(32, 35, 41, .95) 0%, rgba(32, 35, 41, .78) 45%, rgba(36, 91, 222, .18) 100%); }
.shade-light { background: linear-gradient(90deg, rgba(32, 35, 41, .92) 0%, rgba(32, 35, 41, .55) 34%, rgba(32, 35, 41, 0) 52%); }
.slide-bg[src*="hero-sap-2"] { object-position: 78% center; }
.hero-inner { position: relative; z-index: 2; width: min(1200px, calc(100% - 48px)); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 56px; }
.hero-copy { max-width: 600px; }
.hero .eyebrow { color: var(--cobalt-light); }
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); letter-spacing: -.035em; margin-bottom: 26px; }
.hero h1 span { color: var(--cobalt-light); }
.hero h2 { font-size: clamp(34px, 4.8vw, 60px); letter-spacing: -.03em; margin-bottom: 24px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: #d3d8e2; max-width: 500px; margin-bottom: 32px; }
.brand-visual { flex: 0 1 460px; }
.brand-visual img { width: 100%; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }
.carousel-bar { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; width: min(1200px, calc(100% - 48px)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; border-top: 1px solid rgba(255, 255, 255, .14); }
.slide-count { font-size: 13px; color: #aeb6c6; letter-spacing: .08em; }
.slide-count b { color: var(--white); font-size: 16px; }
.carousel-dots { display: flex; gap: 4px; }
.dot { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.dot::before { content: ""; width: 9px; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .35); transition: width .3s, background .3s; }
.dot.is-active::before { width: 28px; background: var(--cobalt-light); }
.carousel-controls { display: flex; align-items: center; gap: 10px; }
.carousel-controls button { width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: var(--white); border-radius: var(--radius); font-size: 18px; transition: background .2s; }
.carousel-controls button:hover { background: var(--cobalt); border-color: var(--cobalt); }
.carousel-controls #rotation { width: auto; padding: 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* Video (se muestra solo si se configura en config.js) */
.video-section[hidden] { display: none; }
.video-frame video { width: 100%; max-height: 640px; background: #000; border-radius: var(--radius); }

/* Servicios */
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; margin-bottom: 52px; }
.section-heading h2 { margin: 0; }
.section-heading > p { max-width: 460px; color: var(--muted); margin: 0; }
.section-heading strong { color: var(--graphite); }
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-grid li { display: flex; }
.service-grid a { display: flex; flex-direction: column; width: 100%; padding: 28px 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s, box-shadow .2s, background .2s; }
.service-grid a:hover { border-color: var(--cobalt); transform: translateY(-3px); box-shadow: 0 16px 36px rgba(32, 35, 41, .1); }
.num { font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--cobalt); margin-bottom: 40px; }
.service-grid h3 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 12px; }
.service-grid p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-bottom: 24px; }
.more { margin-top: auto; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--cobalt); }
.service-grid .more-card { grid-column: span 2; }
.service-grid .more-card a { background: var(--graphite); border-color: var(--graphite); color: var(--white); }
.service-grid .more-card p { color: #c5ccd9; max-width: 460px; }
.service-grid .more-card .num, .service-grid .more-card .more { color: var(--cobalt-light); }
.service-grid .more-card a:hover { background: var(--cobalt); border-color: var(--cobalt); }
.service-grid .more-card a:hover .num, .service-grid .more-card a:hover .more { color: var(--white); }

/* La consultora */
.about { background: var(--graphite); color: var(--white); }
.about .eyebrow { color: var(--cobalt-light); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about h2 { margin: 0; }
.large { font-size: clamp(20px, 2.2vw, 25px); line-height: 1.45; letter-spacing: -.01em; }
.about-copy > p:not(.large) { color: #c5ccd9; }
.text-link { display: inline-flex; gap: 14px; margin-top: 12px; font-weight: 700; color: var(--cobalt-light); }
.text-link:hover { color: var(--white); }

.trust { list-style: none; margin: 28px 0 24px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; }
.trust li { border-top: 2px solid var(--cobalt); padding-top: 14px; }
.trust strong { display: block; font-size: 16px; margin-bottom: 6px; }
.trust span { display: block; font-size: 14px; line-height: 1.55; color: #c5ccd9; }

/* Redes (sin vincular todavía) */
.social { display: flex; gap: 10px; }
.social-link { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius); color: var(--white); transition: background .2s, border-color .2s, color .2s; }
.social-link svg { width: 18px; height: 18px; fill: currentColor; }
.social-link[aria-disabled="true"] { opacity: .55; cursor: default; }
.social-link:not([aria-disabled="true"]):hover { background: var(--cobalt); border-color: var(--cobalt); }
.social-dark { margin-top: 24px; }
.social-dark .social-link { color: var(--graphite); border-color: #ccd2dd; }
.social-dark .social-link:not([aria-disabled="true"]):hover { color: var(--white); }

/* Contacto */
.contact { background: var(--white); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.25fr; gap: 80px; }
.contact-copy > p:not(.eyebrow) { color: var(--muted); max-width: 340px; }
.contact-details { margin-top: 36px; }
.contact-details a { display: block; padding-block: 20px; border-top: 1px solid var(--line); transition: color .2s; }
.contact-details a:last-child { border-bottom: 1px solid var(--line); }
.contact-details a:hover strong { color: var(--cobalt); }
.contact-details span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.contact-details strong { font-size: 18px; word-break: break-word; }
form { display: flex; flex-direction: column; padding: 36px; background: var(--soft); border-radius: var(--radius); border: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row > div { min-width: 0; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.req { color: var(--cobalt); }
input, select, textarea { display: block; width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid #ccd2dd; background: var(--white); color: var(--graphite); font-size: 15px; border-radius: var(--radius); margin-bottom: 20px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(36, 91, 222, .18); }
input:user-invalid, textarea:user-invalid { border-color: #b3261e; }
textarea { resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: #8a92a1; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.consent input { width: 18px; height: 18px; flex-shrink: 0; padding: 0; margin: 2px 0 0; accent-color: var(--cobalt); }
.form-note { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.send { width: 100%; justify-content: center; }
.send:disabled { cursor: wait; opacity: .7; }
#form-status { font-size: 14px; margin: 14px 0 0; min-height: 22px; }
#form-status.error { color: #b3261e; }
#form-status.success { color: #1b6b3a; }
.honey { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(100%); }

/* Portal de empleo */
.careers { background: var(--cobalt); color: var(--white); padding-block: 56px; }
.careers .eyebrow { color: #cfdcfb; margin-bottom: 14px; }
.careers h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0; }
.careers-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }

/* Footer */
.footer { background: var(--graphite); color: var(--white); padding-top: 52px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-bottom: 40px; }
.footer-brand img { height: 44px; width: auto; }
.footer-brand p { margin: 12px 0 0; color: #aeb6c6; font-size: 14px; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.footer-contact a:hover, .to-top:hover { color: var(--cobalt-light); }
.to-top { font-size: 14px; font-weight: 700; }
.credits { border-top: 1px solid var(--graphite-3); padding-block: 20px 28px; font-size: 12px; color: #8f98a9; }
.credits a { text-decoration: underline; text-underline-offset: 2px; }

/* Responsive */
@media (max-width: 1050px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading, .about-grid { gap: 40px; }
  .contact-grid { gap: 40px; }
  .brand-visual { flex-basis: 340px; }
}
@media (max-width: 820px) {
  .header-inner, .wrap, .hero-inner, .carousel-bar { width: calc(100% - 40px); }
  .header-inner { height: 68px; }
  .logo img { height: 42px; width: 42px; }
  .menu-toggle { display: flex; }
  nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); padding: 20px; flex-direction: column; align-items: stretch; gap: 6px; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(32, 35, 41, .12); }
  nav.is-open { display: flex; }
  nav a { padding: 12px 4px; }
  .nav-contact { text-align: center; margin-top: 8px; }
  .slides { height: 640px; }
  .shade-light { background: linear-gradient(90deg, rgba(32, 35, 41, .92) 0%, rgba(32, 35, 41, .55) 34%, rgba(32, 35, 41, 0) 52%); }
.slide-bg[src*="hero-sap-2"] { object-position: 78% center; }
.hero-inner { flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px; padding-bottom: 72px; }
  .brand-visual { flex: none; width: 100%; max-width: 360px; order: -1; }
  .hero .lead { margin-bottom: 24px; }
  .section-heading, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .section-heading { margin-bottom: 32px; }
  form { padding: 24px 20px; }
  .careers-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-grid .more-card { grid-column: auto; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .carousel-bar { display: grid; grid-template-columns: auto auto; height: 96px; padding-block: 8px; }
  .carousel-dots { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .carousel-controls { justify-self: end; }
  .slides { height: 680px; }
  .num { margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
