/* Sobtree — tema claro (noviembre de 2026).
   Se carga después de styles.css: cambia los tokens a fondo blanco, navy y un solo azul de acento,
   corrige los colores fijos que asumían fondo oscuro y añade la portada de una pantalla con agentes,
   los paneles (servicios, contacto, artículos) y el formulario reutilizable. Guía: DESIGN.md. */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F6F9FE;
  --bg-deep: #EEF3FC;
  --panel: #FFFFFF;
  --panel-2: #E3ECFD;
  --line: #DCE6F7;
  --line-strong: #C3D2EF;
  --white: #050F2C;          /* texto principal (el nombre viene del tema oscuro) */
  --text-2: #3E5079;
  --text-3: #52648C;
  --accent: #6AA2FF;         /* marca gráfica: punto, líneas, nodos. No para texto sobre blanco */
  --accent-2: #2F6BD8;       /* acento cuando es texto: 4,98:1 sobre blanco */
  --accent-rgb: 106, 162, 255;
  --ok: #11805A;
  --err: #B42318;
  --navy: #050F2C;
  --navy-2: #1A3F8C;
  --mist: #EEF3FC;
  --display: "Outfit", "Open Sans", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(5, 15, 44, .05), 0 10px 30px -12px rgba(5, 15, 44, .18);
  --shadow-lg: 0 30px 70px -30px rgba(5, 15, 44, .45);
}

body { background: var(--bg); color: var(--navy); }
h1, h2, h3, .page-title, .section h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--accent-2); }
.skip { background: var(--navy); color: #fff; }
.dot-accent { color: var(--accent); }

/* Botones: navy sobre blanco */
.btn-primary, .btn-ink { background: var(--navy); color: #fff; }
.btn-primary:hover, .btn-ink:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); }
.btn { font-family: var(--display); font-weight: 600; }

/* Cabecera mínima */
.site-header { background: rgba(255, 255, 255, .9); }
.site-header.scrolled { border-bottom-color: var(--line); }
.brand { color: var(--navy); }
.brand-word { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
.brand-bar { background: rgba(5, 15, 44, .2); }
.brand-tag { color: var(--text-2); }
.nav { gap: 28px; }
.nav a { color: var(--text-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--navy); }
.site-header .header-cta { margin-left: 4px; }
.site-header.is-home { position: absolute; left: 0; right: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
@media (max-width: 760px) {
  .header-inner { height: 64px; gap: 12px; }
  .brand-word { font-size: 23px; }
  .brand-bar, .brand-tag { display: none; }
  .nav { display: flex; gap: 16px; font-size: 14px; }
  .nav .nav-servicios { display: none; }
  .site-header .header-cta { display: none; }
}

/* Pie */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); }
.footer-grid a:not(.brand) { color: var(--text-2); }
.footer-grid a:not(.brand):hover, .footer-bottom a:hover { color: var(--navy); }
.footer-h { color: var(--navy); }
.trademark { color: var(--text-3); }

/* Formularios comunes */
.contact { background: #fff; border-color: var(--line); box-shadow: var(--shadow); }
.contact label { color: var(--navy); }
.contact input:not([type="checkbox"]), .contact select, .contact textarea { color: var(--navy); background-color: #fff; border-color: var(--line-strong); }
.contact select { background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); }
.contact select option { background: #fff; color: var(--navy); }
.contact input:focus, .contact select:focus, .contact textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .25); }
.contact [aria-invalid="true"] { border-color: var(--err) !important; }
.consent { color: var(--text-2); }
.consent a, .contact-mail a { color: var(--accent-2); }
.consent.invalid span, .form-status.err, .nl-status.err, .nl-consent.invalid span { color: var(--err); }
.consent input { accent-color: var(--navy); }
.nl-row input[aria-invalid="true"] { border-color: var(--err); }
.form-status.ok { color: var(--ok); }

/* Tarjetas y piezas que tenían bordes o fondos para tema oscuro */
.card, .newsletter, .post-card, .calc-q, .flow-node { border-color: var(--line); }
.newsletter, .calc-q { background: var(--bg-alt); }
.post-card { background: #fff; box-shadow: var(--shadow); }
.faq summary::after { border-color: var(--navy); }
.tabs button:hover { color: var(--navy); border-color: var(--navy); }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.uc-kpis li, .ask-chips button { background: var(--mist); }
.cmp .cmp-us { color: var(--navy); }
input[type="range"]::-webkit-slider-thumb { background: #fff; }
.contrata-impacto { border-color: var(--line-strong); background: var(--mist); }
.contrata-impacto-icono { background: var(--navy); }
#contrata-semanas .semana.completa { background: var(--bg-alt); }
.line-tag, .res-k, .res-off, .res-payback strong { color: var(--accent-2); }
.badge { background: #E1F7EE; border-color: #A7E3C8; color: #0B5E41; }
.ases-tag { color: var(--accent-2); }
.mobile-nav, .menu-toggle { display: none !important; }

/* ================= Portada de una pantalla ================= */
.home { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; background: #fff; }
.home-dots { position: absolute; inset: 0; background-image: radial-gradient(#C9D7F2 1px, transparent 1.2px); background-size: 28px 28px; opacity: .6; pointer-events: none; }
.home-inner { position: relative; max-width: 1440px; margin: 0 auto; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 32px; align-items: center; padding: 96px clamp(24px, 6vw, 96px) 72px; box-sizing: border-box; }
.home-copy { display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 5; }
.home-eyebrow { font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.home h1 { font-size: clamp(44px, 5.4vw, 78px); line-height: 1.02; letter-spacing: -0.02em; margin: 0; }
.home h1 em { font-style: normal; color: var(--accent-2); }
.home-lead { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--text-2); margin: 0; max-width: 34em; }
.home-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.home-cta { font-size: 19px; padding: 20px 30px; box-shadow: 0 12px 32px rgba(5, 15, 44, .18); }
.home-cta svg { width: 18px; height: 18px; display: inline-block; }
.link-more { font-weight: 600; font-size: 15px; color: var(--accent-2); text-decoration: underline; text-underline-offset: 4px; padding: 10px 4px; }
.link-more:hover { color: var(--navy); }
.home-bottom { position: absolute; left: clamp(24px, 4vw, 56px); right: clamp(24px, 4vw, 56px); bottom: 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; font-size: 13px; color: var(--text-2); z-index: 6; }
.home-legal { position: relative; }
.home-legal summary { cursor: pointer; list-style: none; padding: 10px 0; }
.home-legal summary::-webkit-details-marker { display: none; }
.home-legal div { position: absolute; bottom: 40px; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); white-space: nowrap; }
.home-legal a { color: var(--text-2); }
.home-hint { display: inline-flex; align-items: center; gap: 8px; }
.home-hint i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: hb 1.4s infinite; }

/* Escena de agentes: lienzo fijo de 800 × 720 que se escala */
.scene-wrap { position: relative; width: 100%; aspect-ratio: 800 / 720; max-height: calc(100svh - 150px); justify-self: center; }
.scene { position: absolute; left: 50%; top: 50%; width: 800px; height: 720px; transform: translate(-50%, -50%) scale(var(--s, 1)); transform-origin: center; }
.scene-lines { position: absolute; inset: 0; }
.scene-core { position: absolute; left: 340px; top: 310px; width: 120px; text-align: center; }
.scene-core b { display: block; font-family: var(--display); font-weight: 600; font-size: 15px; }
.scene-core span { font-size: 11px; color: var(--text-2); }
.st { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; box-sizing: border-box; z-index: 3; }
.st-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.st-s { font-size: 11px; font-weight: 600; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.st-s i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blinkst 1.4s infinite; }
.st small { font-size: 10px; color: var(--text-2); font-weight: 600; }
.pk { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); z-index: 2; animation: go 2.6s linear infinite; }
.ag { position: absolute; left: 0; top: 0; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; z-index: 6; border: 0; padding: 0; cursor: pointer; offset-rotate: 0deg; animation: trip 7s ease-in-out infinite; }
.ag::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); animation: ring 1.8s infinite; }
.ag b { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--navy); background: var(--mist); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.ag svg { width: 38px; height: 38px; display: block; }
.ag:hover, .ag:focus-visible { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .35); }
.eye { transform-box: fill-box; transform-origin: center; animation: eyeb 4s infinite; }
.kan { position: absolute; left: 4px; top: 8px; width: 60px; height: 28px; border-radius: 7px; background: #fff; border: 1px solid var(--accent); font-size: 9px; padding: 4px 6px; box-sizing: border-box; animation: kan 6s ease-in-out infinite; line-height: 1.25; }
.bub { font-size: 11px; line-height: 1.35; border-radius: 10px; padding: 7px 9px; }
.ln { height: 7px; border-radius: 4px; background: #C3D2EF; animation: write 5s ease-out infinite; margin: 7px 0; }
.ck { width: 16px; height: 16px; border-radius: 50%; background: var(--mist); flex: none; overflow: hidden; }
.ck i { width: 16px; height: 16px; border-radius: 50%; background: var(--ok); display: block; transform: scale(0); }
.row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin: 7px 0; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 76px; }
.bars i { width: 22px; border-radius: 5px 5px 0 0; animation: bar 4s ease-in-out infinite; }
.pill { background: var(--mist); border-radius: 999px; padding: 3px 8px; }
.ag-info { position: absolute; right: clamp(24px, 4vw, 56px); bottom: 64px; width: min(360px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 20px; box-sizing: border-box; z-index: 30; animation: infin .35s var(--ease); }
.ag-info[hidden] { display: none; }
.ag-info-h { display: flex; align-items: center; gap: 12px; }
.ag-info-av { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; flex: none; }
.ag-info-av svg { width: 34px; height: 34px; }
.ag-info h2 { font-size: 19px; margin: 0; }
.ag-info p { margin: 0; font-size: 12px; color: var(--text-2); }
.ag-info ul { margin: 14px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ag-info li { font-size: 14px; line-height: 1.4; padding-left: 20px; position: relative; }
.ag-info li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ag-info-x { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--navy); }
.ag-info a { font-weight: 600; font-size: 14px; color: var(--accent-2); }
.home.paused .scene *, .home.paused .home-hint i { animation-play-state: paused !important; }

@keyframes go { from { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { offset-distance: 100%; opacity: 0; } }
@keyframes trip { 0%, 18% { offset-distance: 0%; } 45%, 63% { offset-distance: 100%; } 90%, 100% { offset-distance: 0%; } }
@keyframes orbit { to { offset-distance: 100%; } }
@keyframes blinkst { 50% { opacity: .25; } }
@keyframes ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes kan { 0%, 20% { transform: translateX(0); } 35%, 55% { transform: translateX(68px); } 70%, 90% { transform: translateX(136px); } 100% { transform: translateX(0); } }
@keyframes kanm { 0%, 25% { transform: translateX(0); } 45%, 75% { transform: translateX(52px); } 100% { transform: translateX(0); } }
@keyframes fadein { 0%, 30% { opacity: 0; transform: translateY(6px); } 40%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes typing { 0%, 30% { opacity: 1; } 35%, 100% { opacity: 0; } }
@keyframes write { 0% { width: 0; } 60%, 95% { width: var(--w); } 100% { width: 0; } }
@keyframes bar { 0%, 100% { height: var(--h0); } 50% { height: var(--h1); } }
@keyframes c1 { 0%, 22% { transform: scale(0); } 28%, 95% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes c2 { 0%, 44% { transform: scale(0); } 50%, 95% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes c3 { 0%, 66% { transform: scale(0); } 72%, 95% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes eyeb { 0%, 90%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes hb { 50% { transform: scale(1.6); opacity: .4; } }
@keyframes infin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Móvil: la escena pasa arriba, en versión compacta (órbita), y el botón queda a mano */
.scene-m { display: none; }
@media (max-width: 900px) {
  .home-inner { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding: 70px 16px 64px; }
  .scene-wrap { display: none; }
  .scene-m { display: block; position: relative; width: 100%; max-width: 390px; height: 300px; margin: 0 auto; order: -1; }
  .home-copy { gap: 12px; }
  .home h1 { font-size: clamp(38px, 11vw, 48px); }
  .home-eyebrow { font-size: 11px; }
  .home-lead { font-size: 16px; }
  .home-actions { align-items: stretch; margin-top: 6px; }
  .home-cta { justify-content: center; font-size: 18px; padding: 19px 20px; }
  .link-more { align-self: center; }
  .home-bottom { bottom: 6px; }
  .home-hint { display: none; }
  .ag-info { left: 0; right: 0; bottom: 0; width: auto; border-radius: 24px 24px 0 0; position: fixed; padding: 22px 20px 30px; }
}
.mc { position: absolute; width: 118px; height: 70px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px 10px; box-sizing: border-box; font-size: 10px; z-index: 2; }
.mc b { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }
.mc b i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: blinkst 1.4s infinite; margin-top: 4px; }
.agm { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; z-index: 4; border: 0; padding: 0; cursor: pointer; offset-path: path('M75 150 A120 92 0 1 1 315 150 A120 92 0 1 1 75 150'); offset-rotate: 0deg; animation: orbit 26s linear infinite; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .3); }
.agm svg { width: 34px; height: 34px; }
.scene-m-in { position: absolute; left: 50%; top: 0; width: 390px; height: 300px; margin-left: -195px; }
@media (max-width: 370px) { .scene-m-in { transform: scale(.9); transform-origin: top center; } }

@media (prefers-reduced-motion: reduce) {
  .scene *, .scene-m *, .home-hint i { animation: none !important; }
}

/* ================= Páginas con formato de panel ================= */
.panel-page { background: var(--bg-alt); padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); }
.panel { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 48px); }
.panel-wide { max-width: 980px; }
.panel-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); text-decoration: none; padding: 8px 0; margin-bottom: 8px; }
.panel-back:hover { color: var(--navy); }
.panel-back svg { width: 16px; height: 16px; }
.panel-eyebrow { font-family: var(--display); font-weight: 500; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.panel h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin: 8px 0 12px; }
.panel-lead { font-size: 17px; line-height: 1.55; color: var(--text-2); margin: 0 0 24px; }
.panel h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 36px 0 12px; }
.panel h3 { font-size: 19px; margin: 0; }
.panel p + p { margin-top: 12px; }
.panel ul.ticks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.panel ul.ticks li { position: relative; padding-left: 28px; line-height: 1.5; }
.panel ul.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #E1F7EE; }
.panel ul.ticks li::after { content: ""; position: absolute; left: 6px; top: 9px; width: 7px; height: 4px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.svc-list { display: grid; gap: 16px; margin-top: 8px; }
.svc { border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; transition: border-color .2s, box-shadow .2s; }
.svc:hover { border-color: var(--accent); box-shadow: 0 14px 34px -18px rgba(47, 107, 216, .5); }
.svc-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--mist); display: grid; place-items: center; color: var(--navy-2); }
.svc-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svc h2 { font-size: 21px; margin: 0; }
.svc p { margin: 6px 0 12px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.svc-tags li { font-size: 12px; font-weight: 600; color: var(--navy-2); background: var(--mist); border-radius: 999px; padding: 4px 10px; }
.svc .btn { padding: 13px 20px; font-size: 15px; }
.svc-main { border-color: var(--navy); }
.panel-note { margin-top: 24px; font-size: 14px; color: var(--text-2); }
.panel-note a { color: var(--accent-2); font-weight: 600; }
.panel .faqs { margin-top: 8px; }
.panel .contact { box-shadow: none; padding: 0; border: 0; margin-top: 8px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--mist); border-radius: 999px; padding: 5px; margin: 0 0 20px; }
.seg a { display: grid; place-items: center; min-height: 44px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--text-2); text-decoration: none; text-align: center; padding: 0 10px; }
.seg a[aria-current="page"] { background: var(--navy); color: #fff; }

/* Artículos con formato de panel */
.alist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.acard { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: 18px; padding: 14px; text-decoration: none; color: var(--navy); transition: border-color .2s, box-shadow .2s; }
.acard:hover { border-color: var(--accent); box-shadow: 0 14px 34px -18px rgba(47, 107, 216, .5); }
.acard .cover { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.ameta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.ameta span { background: var(--mist); color: var(--navy-2); border-radius: 999px; padding: 3px 9px; letter-spacing: 0; text-transform: none; }
.acard h2 { font-size: 19px; line-height: 1.25; margin: 6px 0 4px; }
.acard p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
@media (max-width: 560px) {
  .acard { grid-template-columns: minmax(0, 1fr); }
  .acard .cover { display: none; }
  .svc { grid-template-columns: minmax(0, 1fr); }
  .svc-ic { display: none; }
  .panel { border-radius: 22px; }
}

/* Combinaciones que con los tokens claros quedaban texto navy sobre navy */
.hl { color: var(--accent-2); }
.chip input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.calc-n { background: var(--navy); color: #fff; }
.res-save { color: #fff; }
.res-save .res-k { color: #9CC2FF; }
.res-save .res-sub { color: #D4DEF4; }
.steps li:first-child .step-n { color: #fff; background: var(--navy); }
.msg.user { background: var(--navy); color: #fff; }
.how:hover { background: var(--navy); color: #fff; }
.consent input, .area input, .semana input, .nl-consent input { accent-color: var(--navy); }
.cover { background: var(--navy); }
/* Texto en acento dentro de titulares: azul-texto (el azul del punto no llega a 3:1 sobre blanco) */
h1 .dot-accent, h2 .dot-accent, .page-title .dot-accent { color: var(--accent-2); }

/* ===== Ajustes (5-nov-2026, tarde) ===== */
/* Portada: el pie ya no se corta. La portada ocupa la pantalla visible (dvh) y, si no cabe, deja hacer scroll
   en lugar de recortar: el pie va en el flujo, debajo del contenido. */
.home { min-height: 100vh; min-height: 100dvh; overflow: visible; overflow-x: clip; display: flex; flex-direction: column; }
.home-inner { flex: 1; min-height: 0; width: 100%; padding-bottom: 12px; }
.home-bottom { position: relative; left: auto; right: auto; bottom: auto; padding: 8px clamp(24px, 4vw, 56px) max(14px, env(safe-area-inset-bottom)); box-sizing: border-box; width: 100%; }
.scene-wrap { max-height: calc(100dvh - 190px); }
.link-demo { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: none; padding: 8px 4px; }
.link-demo svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-2); stroke-width: 2; }
.link-demo svg path { fill: var(--accent-2); stroke: none; }
.link-demo:hover { color: var(--accent-2); }
@media (max-width: 900px) {
  .home-inner { padding: 64px 16px 8px; }
  .home-actions { gap: 2px; }
  .link-more, .link-demo { align-self: center; padding: 8px; }
  .home-bottom { padding: 6px 16px max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) and (max-height: 760px) {
  .scene-m { height: 250px; }
  .scene-m-in { transform: scale(.84); transform-origin: top center; }
  .home h1 { font-size: 38px; }
  .home-lead { font-size: 15px; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .home-inner { padding-top: 84px; }
  .home h1 { font-size: clamp(40px, 4.6vw, 64px); }
  .home-copy { gap: 16px; }
}

/* Demo */
.demo-video { margin: 8px 0 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.demo-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #fff; }
.demo-video video.is-vertical { aspect-ratio: 9 / 16; max-height: 78vh; margin: 0 auto; width: auto; max-width: 100%; }
.demo-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Otros servicios, más compacto */
.panel { padding: clamp(20px, 3vw, 36px); }
.panel h1 { font-size: clamp(24px, 3vw, 34px); margin: 6px 0 8px; }
.panel-lead { font-size: 15.5px; margin-bottom: 16px; }
.panel h2 { font-size: clamp(20px, 2vw, 24px); margin: 28px 0 10px; }
.svc-list { gap: 10px; }
.svc { padding: 14px 16px; gap: 12px; grid-template-columns: 40px minmax(0, 1fr); border-radius: 16px; }
.svc-ic { width: 40px; height: 40px; border-radius: 12px; }
.svc-ic svg { width: 20px; height: 20px; }
.svc h2 { font-size: 18px; margin: 0; }
.svc p { font-size: 14px; line-height: 1.5; margin: 4px 0 8px; }
.svc-tags { margin: 0 0 10px; gap: 5px; }
.svc-tags li { font-size: 11px; padding: 3px 8px; }
.svc .btn { padding: 10px 16px; font-size: 14px; }
.panel .faq summary { font-size: 15.5px; padding: 14px 40px 14px 0; }
.panel .faq summary::after { top: 19px; }
.panel .faq[open] summary::after { top: 23px; }
.panel .faq p { font-size: 14.5px; padding-bottom: 14px; }

/* Contratar, más compacto (solo estilos; la página y su lógica no cambian) */
main.contrata-page { background: var(--bg-alt); padding: clamp(16px, 3vw, 32px) 0 clamp(28px, 4vw, 48px); }
main.contrata-page .contrata-wrap { max-width: 720px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: clamp(18px, 3vw, 32px); }
main.contrata-page .contrata-heading { margin-bottom: .75rem; }
main.contrata-page .contrata-heading h1 { font-size: clamp(24px, 3vw, 32px); margin: .15rem 0 .35rem; }
main.contrata-page .contrata-heading .section-sub { font-size: 15px; margin-top: 0; }
main.contrata-page .eyebrow { font-size: 12.5px; }
main.contrata-page .contrata-resumen { margin: .75rem 0; padding: .8rem 1rem; gap: .9rem; border-color: var(--line); border-radius: 16px; background: var(--bg-alt); }
main.contrata-page .contrata-resumen p { margin-bottom: .35rem; font-size: 14px; line-height: 1.45; }
main.contrata-page .contrata-resumen .fine { font-size: 12.5px; color: var(--text-2); }
main.contrata-page .contrata-resumen .contrata-total { font-size: clamp(24px, 3vw, 30px); }
main.contrata-page .contrata-resumen-precio { padding-right: .9rem; border-right-color: var(--line); }
main.contrata-page .contrata-precio { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin: .6rem 0; font-size: 14px; color: var(--text-2); }
main.contrata-page .contrata-precio .contrata-total { font-size: 18px; font-weight: 700; color: var(--navy); }
main.contrata-page #contrata-form { padding: 16px; margin-top: .5rem; border-radius: 16px; box-shadow: none; }
main.contrata-page .semanas { gap: 6px; }
main.contrata-page .semana { padding: 8px 12px; min-height: 40px; font-size: 14px; border-radius: 12px; }
main.contrata-page .contrata-paso-titulo { font-size: 18px; margin-bottom: .6rem; }
main.contrata-page .contrata-impacto { margin: 12px 0; padding: 12px; gap: 10px; grid-template-columns: 32px minmax(0, 1fr); }
main.contrata-page .contrata-impacto-icono { width: 32px; height: 32px; font-size: 18px; border-radius: 9px; }
main.contrata-page .contrata-impacto-titulo { font-size: 15px; }
main.contrata-page .contrata-impacto-cuerpo p { font-size: 13.5px; margin-bottom: 4px; }
main.contrata-page .btn { padding: 13px 20px; font-size: 15px; }
main.contrata-page .contrata-status:not(:empty) { font-size: 14px; padding: .6rem .8rem; }
@media (max-width: 640px) {
  main.contrata-page .contrata-wrap { border-radius: 18px; }
  main.contrata-page .contrata-resumen { padding: .75rem; gap: .6rem; }
  main.contrata-page .contrata-resumen-precio { padding-bottom: .6rem; }
}
/* Enlaces secundarios de la portada: una sola línea de texto discreto con iconos pequeños, sin aspecto de botón. */
.home-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin-top: 4px; }
.home-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--navy); text-decoration: none; padding: 8px 0; min-height: 24px; white-space: nowrap; }
.home-links a:first-child { color: #3E5079; font-weight: 500; }
.home-links a:hover, .home-links a:focus-visible { color: var(--accent-2); }
.home-links svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-links svg .f { fill: var(--accent-2); stroke: none; }
@media (max-width: 900px) {
  .home-links { justify-content: center; gap: 0 14px; }
}
@media (max-width: 380px) {
  .home-links { gap: 0 12px; }
  .home-links a { font-size: 13.5px; gap: 5px; }
  .home-links svg { width: 16px; height: 16px; }
}
@media (max-width: 560px) {
  .svc { grid-template-columns: minmax(0, 1fr); }
  .svc-ic { display: none; }
}

/* Selector de idioma (ES / EN) en la cabecera. */
.nav .nav-lang { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 28px; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; letter-spacing: .04em; color: var(--navy); }
.nav .nav-lang:hover { border-color: var(--navy); }

/* Cabecera compacta de los paneles (servicios, CRM a medida, IA a medida…): lo importante se ve sin bajar (D-162). */
.panel-page { padding-top: clamp(12px, 2.5vw, 32px); }
.panel { padding: clamp(18px, 2.6vw, 32px); }
.panel-back { padding: 2px 0; margin-bottom: 6px; font-size: 13.5px; }
.seg { padding: 4px; margin-bottom: 14px; }
.seg a { min-height: 40px; font-size: 14px; }
.panel-eyebrow { font-size: 11px; }
.panel h1 { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.15; margin: 4px 0 6px; }
.panel-lead { font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
.seg + .panel-eyebrow { display: none; } /* la pestaña activa ya dice qué servicio es */
.panel ul.ticks li { font-size: 15px; }
@media (max-width: 640px) {
  .panel-page { padding: 8px 0 32px; }
  .panel { padding: 16px; border-radius: 18px; }
  .panel h1 { font-size: 20px; }
  .panel-lead { font-size: 14.5px; }
}

/* Márgenes (noviembre de 2026): nada pegado a los bordes, ni en móviles pequeños ni en pantallas grandes. */
/* Pie de la portada alineado con la cabecera (mismo ancho máximo que .wrap) en pantallas anchas. */
@media (min-width: 901px) {
  .home-bottom { padding-left: max(clamp(24px, 4vw, 56px), calc((100% - var(--wrap, 1280px)) / 2 + 32px)); padding-right: max(clamp(24px, 4vw, 56px), calc((100% - var(--wrap, 1280px)) / 2 + 32px)); }
}
/* Entre 761 y 1080 px el menú no desaparece (el botón de menú móvil no se usa en este tema). */
@media (min-width: 761px) and (max-width: 1080px) {
  .nav { display: flex; gap: 18px; font-size: 14px; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .site-header:not(.is-home) .nav .nav-servicios { display: none; }
}
/* Móviles estrechos (≤ 360 px): la cabecera cabe sin scroll lateral. */
@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .brand-word { font-size: 21px; }
  .nav { gap: 12px; font-size: 13px; }
  .nav .nav-lang { min-width: 32px; padding: 2px 6px; }
}
/* Escena de la portada en móviles muy estrechos: con aire a los lados. */
@media (max-width: 340px) { .scene-m-in { transform: scale(.78); transform-origin: top center; } }

/* Enlace «En vivo» de la cabecera (D-204) */
.nav .nav-vivo { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.nav .nav-vivo .ev-dot { width: 7px; height: 7px; border-radius: 50%; background: #18A957; flex: none; }
@media (max-width: 440px) {
  .nav { gap: 11px; font-size: 13.5px; }
  .nav .nav-vivo .ev-dot { display: none; }
}
