/* Ascend.IA · base común a todas las secciones.
   Rojo = lo que hace la IA. Verde = lo que hace una persona. Solo tema oscuro.
   El rojo, solo en acentos pequeños y botones: nunca en grandes superficies.
   Excon (títulos, variable 100-900) + Supreme (texto).
   Los estilos de cada sección van en css/sections/<id>.css y todos sus selectores empiezan por #<id>. */

/* ---------- Tokens ---------- */
:root {
  --ink: #07080f;
  --surface: #10131f;
  --surface-2: #161a2a;
  --surface-3: #1e2336;
  --line-soft: rgba(238, 240, 247, 0.06);
  --line: rgba(238, 240, 247, 0.08);
  --line-2: rgba(238, 240, 247, 0.16);
  --text: #eef0f7;
  --text-2: #a5abbf;
  --text-3: #7c839e;

  --ai: #ef3a1d;            /* lo hace la IA */
  --ai-2: #f7553a;
  --ai-ink: #1c0401;        /* texto sobre rojo */
  --ai-soft: rgba(239, 58, 29, 0.14);
  --human: #7ddb8c;         /* lo hace una persona */
  --human-ink: #061a0b;     /* texto sobre verde */
  --human-soft: rgba(125, 219, 140, 0.14);
  --ink-red: #170a09;       /* la franja del vídeo: tinta tintada de rojo */
  --error: #ff8a9c;
  --accent: var(--ai);      /* alias antiguo */
  --focus: var(--ai);       /* color del anillo de foco */

  --font-display: "Excon", "Arial", system-ui, sans-serif;
  --font-text: "Supreme", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --fs-h1: clamp(2.625rem, 1.25rem + 5.6vw, 6rem);      /* 42 · 64 · 96 */
  /* Jerarquía: 64 px solo para los tres titulares que cuentan la oferta (Qué hacemos, Niveles por sus precios y
     «Pide tu propuesta»). El resto de titulares de sección, a 40 px. */
  --fs-h2-xl: clamp(2.25rem, 1.4rem + 3.1vw, 4rem);     /* 36 · 48 · 64 */
  --fs-h2: clamp(1.75rem, 1.3rem + 1.25vw, 2.5rem);     /* 28 · 32 · 40 */
  --fs-h3: clamp(1.375rem, 1.1rem + 1.1vw, 2rem);
  --fs-lead: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --header-h: 72px;
  --sec-y: clamp(52px, 5.2vw, 76px);
  --dock-room: 96px;        /* lo que tapa la barra fija abajo (escritorio) */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
  /* Lo que recibe el foco con el teclado nunca queda debajo de la barra fija (WCAG 2.4.11). */
  scroll-padding-bottom: 24px;
  /* Hueco de la barra de desplazamiento siempre reservado: al frenar la página en el vídeo no salta de lado. */
  scrollbar-gutter: stable;
  background: var(--ink);
}
html.is-past-hero { scroll-padding-bottom: var(--dock-room); }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, video, canvas { display: block; max-width: 100%; }
/* Los lienzos del polvo sobresalen de su caja a propósito: sin el tope de ancho, si no se recortan por la derecha. */
canvas[class$="-dust"], canvas.polvo-fijo, canvas.sparks { max-width: none; }
/* …y lo que sobresale por los lados lo recorta su sección (clip no crea barra de desplazamiento). */
.sec, .site-footer { overflow-x: clip; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--ai); color: var(--ai-ink); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
/* Destinos de los enlaces internos: reciben el foco (para que el siguiente Tab siga desde ahí) sin anillo. */
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--ai); color: var(--ai-ink); font-weight: 700; text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Contenedores y secciones ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  /* En un iPhone apaisado, la muesca no tapa el principio del texto. */
  padding-inline: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right));
}

/* Cada <section> de index.html lleva .sec y un tono de fondo. El ritmo: tinta, superficie y, una vez, la franja del vídeo.
   La franja («orange» por historia) ya no es roja a sangre: tinta tintada de rojo con un velo rojo muy suave,
   texto claro y el rojo solo en los acentos. Contraste: texto 14:1 y rojo 4,2:1 en lo más claro del velo. */
.sec { position: relative; padding-block: var(--sec-y); }
.sec[data-tone="ink"] { background: var(--ink); }
.sec[data-tone="surface"] { background: var(--surface); }
.sec[data-tone="surface-2"] { background: var(--surface-2); }
.sec[data-tone="orange"] {
  background:
    radial-gradient(110% 85% at 80% 35%, rgba(239, 58, 29, 0.16), rgba(239, 58, 29, 0) 62%),
    radial-gradient(70% 60% at 0% 100%, rgba(239, 58, 29, 0.06), rgba(239, 58, 29, 0) 70%),
    var(--ink-red);
  color: var(--text);
}
.sec-hero { padding-block: 0; }

/* Hueco del fondo del inicio (se elige aparte): a pantalla completa detrás del texto. */
[data-hero-bg] { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Cabecera de sección opcional: titular + subtítulo. */
.sec-head { display: grid; gap: clamp(12px, 1.6vw, 20px); margin-bottom: clamp(32px, 4vw, 56px); }

/* Rejilla de 12 columnas: a partir de 1024 px. Por debajo, una columna. */
.grid-12 { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 40px) clamp(16px, 2.4vw, 32px); }
@media (min-width: 1024px) {
  .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .col-3 { grid-column: span 3; }
  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }
  .col-9 { grid-column: span 9; }
  .col-12 { grid-column: 1 / -1; }
}

/* Marcador mientras la sección no está hecha. Se borra con el partial. */
.sec-placeholder {
  padding: 24px; border-radius: var(--radius-md);
  outline: 1px dashed var(--line-2); outline-offset: -1px;
  font-size: var(--fs-small); color: var(--text-3);
}

/* ---------- Tipografía ---------- */
h1, .h1, h2, .h2, h3, .h3 { font-family: var(--font-display); text-wrap: balance; }
h1, .h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }
.h2-xl { font-size: var(--fs-h2-xl); line-height: 1.02; letter-spacing: -0.03em; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.lead { max-width: 46ch; font-size: var(--fs-lead); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.small { font-size: var(--fs-small); line-height: 1.5; color: var(--text-2); }

.ai { color: var(--ai); }          /* texto de lo que hace la IA */
.human { color: var(--human); }    /* texto de lo que hace una persona */
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }


/* ---------- Botones ---------- */
.btn {
  --btn-h: 52px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--btn-h); padding: 0 24px; border: 0; border-radius: 999px;
  font-family: var(--font-text); font-size: 1rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.16s var(--ease-out), translate 0.3s var(--ease-out), background-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), opacity 0.2s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.btn-sm { --btn-h: 44px; padding: 0 18px; font-size: 0.9375rem; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--ai); color: var(--ai-ink); }                         /* «Pedir propuesta» */
.btn-secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ink { background: var(--ink); color: var(--text); }                             /* sobre la franja del vídeo */
.btn-ink .icon-play { color: var(--ai); }
.btn-outline-ink { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px rgba(238, 240, 247, 0.32); }

/* Acción de texto («Volver a empezar», «Repetir», «Copiar correo»…) */
.btn-text {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px;
  font-weight: 500; color: inherit; text-decoration: underline; text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-color 0.25s var(--ease-out), transform 0.16s var(--ease-out), color 0.25s var(--ease-out);
}
.btn-text:active { transform: scale(0.97); }

/* Enlace con subrayado que crece */
.link {
  color: inherit; text-decoration: none; padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease-out), color 0.25s var(--ease-out);
}

.btn-arrow { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: translate 0.3s var(--ease-out); }
.icon-play { flex: none; width: 14px; height: 14px; fill: currentColor; }
.btn-meta { font-weight: 500; opacity: 0.6; }   /* «4 min» junto a «Ver el vídeo» */

/* ---------- Chips (opciones, equipos, eventos) ---------- */
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; line-height: 1.1; color: var(--text-2); white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.16s var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip[aria-checked="true"], .chip[aria-pressed="true"], .chip[aria-selected="true"], .chip.is-on {
  background: var(--text); color: var(--ink); box-shadow: none;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* En móvil, una sola fila que se desliza, con imán y fundido en el borde derecho. */
@media (max-width: 767px) {
  .chip-scroll {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 6px calc(var(--gutter) + 24px) 6px var(--gutter); margin-block: -4px;
    scroll-padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
  }
  .chip-scroll::-webkit-scrollbar { display: none; }
  .chip-scroll > * { flex: none; scroll-snap-align: start; }
}

/* ---------- Piezas de animación comunes ---------- */
/* Cursor que parpadea: verde cuando escribe una persona, rojo cuando escribe la IA. */
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: currentColor; animation: blink 1s steps(1) infinite; }
.caret-human { background: var(--human); }
.caret-ai { background: var(--ai); }
/* Tachado que se dibuja: añade .is-struck. Color con --strike. */
.strike {
  background: linear-gradient(var(--strike, currentColor), var(--strike, currentColor)) 0 55% / 0% 1.5px no-repeat;
  transition: background-size 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.strike.is-struck { background-size: 100% 1.5px; color: var(--text-3); }
/* Bucles CSS en pausa fuera de pantalla (pauseOffscreen en core/motion.js pone .is-offscreen). */
.is-offscreen, .is-offscreen * { animation-play-state: paused !important; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 90;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  /* Mismo borde que .container: el logo cae en la vertical del texto de todas las secciones. */
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2), env(safe-area-inset-left), env(safe-area-inset-right));
  transition: transform 0.4s var(--ease-out), background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.site-header.is-solid {
  /* Sin desenfoque de fondo: al hacer scroll era lo más caro de pintar (sobre todo encima del vídeo). */
  background: rgba(7, 8, 15, 0.94);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
/* Escondida al bajar, pero si algo de dentro recibe el foco, vuelve. */
.site-header:focus-within { transform: none; }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }

/* ---------- Logotipo «Alcance» ----------
   Trazados de web/lab/logo-pro/l2 sin tocar: el estático, en el <symbol id="logo-alcance"> de index.html
   (<use>); el de la cabecera, entero en línea para animarlo (js/core/logo.js). Se mide por la altura. */
.logo { display: block; height: 20px; width: auto; flex: none; }   /* 20 px, como en la hoja del logotipo */
.logo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* La cabecera lo espera escondido hasta su primer fotograma. Sin JS o con movimiento reducido se ve siempre;
   si el JS fallara, aparece solo a los 2,6 s. */
@media (prefers-reduced-motion: no-preference) {
  .js .logo-anim:not(.is-on) { visibility: hidden; animation: logo-failsafe 0s 2.6s forwards; }
}
@keyframes logo-failsafe { to { visibility: visible; } }
.header-actions { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
.header-video {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 0.9375rem; font-weight: 500; color: var(--text); text-decoration: none;
  transition: color 0.25s var(--ease-out), transform 0.16s var(--ease-out);
}
.header-video:active { transform: scale(0.97); }
.header-video .icon-play { color: var(--ai); }
.header-video-min { color: var(--text-3); }
.header-cta {
  transition: transform 0.16s var(--ease-out), translate 0.3s var(--ease-out), background-color 0.25s var(--ease-out),
    opacity 0.2s var(--ease-out), visibility 0s;
}
/* Cuando sube la barra, el botón de la cabecera se apaga: nunca hay dos «Pedir propuesta» fijos. */
.is-past-hero .header-cta { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s var(--ease-out), visibility 0s 0.2s; }

/* ---------- Barra fija ---------- */
.dock {
  position: fixed; left: 50%; bottom: 18px; z-index: 85;
  display: flex; align-items: center; gap: 6px;
  max-width: calc(100vw - var(--gutter) * 2);
  padding: 6px; border-radius: 999px;
  background: rgba(16, 19, 31, 0.97);   /* opaca y sin desenfoque: no pesa al hacer scroll */
  box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 48px -24px rgba(0, 0, 0, 0.9);
  /* Escondida sin visibility: hidden, para que el teclado llegue a ella; al recibir el foco, sube. */
  transform: translate(-50%, calc(100% + 32px)); opacity: 0; pointer-events: none;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.is-past-hero .dock:not(.is-away) {
  transform: translate(-50%, 0); opacity: 1; pointer-events: auto;
}
/* Con el teclado, la barra sube aunque esté apartada. Solo con el foco de teclado (:focus-visible): tras elegir
   público con el ratón el foco se queda en «Para:», y con :focus-within la barra ya no se apartaba en el formulario
   ni en el pie (tapaba «Preferencias de cookies»). Reglas aparte: un :has() no admitido anularía toda la lista. */
.dock:has(:focus-visible) { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
@supports not selector(:has(*)) {
  .dock:focus-within { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
}
.no-js .dock { display: none; }
.dock-current { display: none; }
.dock-links { position: relative; display: flex; gap: 2px; }
.dock-links a {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-2); text-decoration: none; white-space: nowrap;
  transition: color 0.25s var(--ease-out), transform 0.16s var(--ease-out);
}
.dock-links a:active { transform: scale(0.97); }
.dock-links a.is-active { color: var(--text); }
.dock-ink { position: absolute; top: 0; left: 0; height: 100%; width: 0; border-radius: 999px; background: var(--surface-3); opacity: 0; }
.dock-team {
  display: inline-flex; align-items: center; gap: 4px; min-height: 42px; padding: 0 14px; border-radius: 999px;
  font-size: 0.875rem; color: var(--text-2); white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.16s var(--ease-out);
}
.dock-team b { color: var(--human); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.dock-team:active { transform: scale(0.97); }
.dock-team.is-flash { box-shadow: inset 0 0 0 1px var(--human); color: var(--text); }
.dock-teams {
  position: absolute; right: 6px; bottom: calc(100% + 10px);
  display: grid; gap: 4px; min-width: 240px; padding: 8px;
  border-radius: 18px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 48px -24px rgba(0, 0, 0, 0.9);
  transform-origin: 85% 100%;
}
.dock-teams .chip { justify-content: flex-start; border-radius: 12px; box-shadow: none; }
.dock-teams .chip[aria-checked="true"] { background: var(--human-soft); color: var(--text); }
.dock-cta { flex: none; }
.dock-progress {
  position: absolute; left: 22px; right: 22px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--ai); transform-origin: left; transform: scaleX(0); opacity: 0.8; pointer-events: none;
}

/* Aviso «Página adaptada a Ventas» */
.team-toast {
  position: fixed; left: 50%; bottom: 88px; z-index: 86;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--human), 0 16px 32px -16px rgba(0, 0, 0, 0.9);
  font-size: var(--fs-small); white-space: nowrap; pointer-events: none;
  transform: translate(-50%, 8px); opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s 0.3s;
}
.team-toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s; }

/* ---------- Cursor (solo con ratón) ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor { position: fixed; top: 0; left: 0; z-index: 120; display: grid; place-items: center; width: 0; height: 0; pointer-events: none; }
}
.cursor-ring { display: none; }   /* sin círculo junto al ratón (05-11) */
.cursor-text { position: absolute; white-space: nowrap; font-size: 0.8125rem; font-weight: 700; color: var(--ai-ink); opacity: 0; transform: scale(0.8); transition: opacity 0.25s var(--ease-out), transform 0.4s var(--ease-out); }
.cursor.is-hidden .cursor-ring { opacity: 0; }
.cursor.is-code .cursor-ring { opacity: 0; }
.cursor.is-code .cursor-text { opacity: 1; transform: translate(calc(50% + 14px), 18px); padding: 4px 8px; border-radius: 6px; background: var(--ai); color: var(--ai-ink); font-weight: 500; font-size: 0.75rem; }

/* ---------- Modo «Verla por dentro» (lo enciende Contacto con .xray en <html>) ---------- */
.xray-panel {
  position: fixed; right: var(--gutter); bottom: 24px; z-index: 95;
  width: min(320px, calc(100vw - var(--gutter) * 2)); padding: 20px;
  border-radius: 16px; background: rgba(16, 19, 31, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(239, 58, 29, 0.5); font-size: var(--fs-small);
}
.xray-panel-title { color: var(--ai); font-weight: 700; margin-bottom: 12px; }
.xray-panel dl { display: grid; gap: 8px; }
.xray-panel dl div { display: flex; justify-content: space-between; gap: 16px; }
.xray-panel dt { color: var(--text-2); }
.xray-close { margin-top: 12px; }
html.xray main *:not(canvas):not(svg *) { outline: 1px solid rgba(239, 58, 29, 0.22); outline-offset: -1px; }
html.xray [data-section] { outline: 1px dashed rgba(239, 58, 29, 0.7) !important; }
html.xray [data-section]::before {
  content: "<section> " attr(data-section); position: absolute; top: 8px; left: 8px; z-index: 5;
  padding: 3px 8px; border-radius: 4px; background: var(--ai); color: var(--ai-ink); font-size: 0.75rem; font-weight: 700;
}

/* ---------- Pie ---------- */
.site-footer { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); background: var(--ink); border-top: 1px solid var(--line-soft); font-size: var(--fs-small); color: var(--text-2); }

/* ---------- Solo con ratón ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { translate: 0 -1px; background: var(--ai-2); }
  .btn:hover .btn-arrow { translate: 3px 0; }
  .btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--text-2); }
  .btn-ink:hover { translate: 0 -1px; }
  .btn-outline-ink:hover { background: rgba(238, 240, 247, 0.06); box-shadow: inset 0 0 0 1.5px var(--text); }
  .btn-text:hover { text-decoration-color: currentColor; }
  .link:hover { background-size: 100% 1px; }
  .chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--text-3); }
  .chip[aria-checked="true"]:hover, .chip[aria-pressed="true"]:hover, .chip[aria-selected="true"]:hover, .chip.is-on:hover { color: var(--ink); box-shadow: none; }
  .header-video:hover { color: var(--text-2); }
  .dock-links a:hover { color: var(--text); }
  .dock-team:hover { box-shadow: inset 0 0 0 1px var(--text-3); color: var(--text); }
  .dock-teams .chip:hover { background: var(--surface-3); box-shadow: none; }
}

/* ---------- Tableta y móvil ---------- */
@media (max-width: 1023px) {
  /* Barra: sección actual (abre la lista) · equipo · «Pedir propuesta», en la zona del pulgar. */
  .dock {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: none; justify-content: space-between; border-radius: 20px;
    transform: translateY(calc(100% + 24px));
  }
  .is-past-hero .dock:not(.is-away) { transform: none; }
  .dock:has(:focus-visible) { transform: none; }
  @supports not selector(:has(*)) { .dock:focus-within { transform: none; } }
  html.is-past-hero { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .dock-current {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; max-width: 46%;
    min-height: 46px; padding: 0 12px; border-radius: 14px;
    font-size: 0.9375rem; font-weight: 700;
    transition: transform 0.16s var(--ease-out);
  }
  .dock-current:active { transform: scale(0.97); }
  .dock-current span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dock-current svg { flex: none; width: 14px; stroke: var(--text-2); stroke-width: 1.8; fill: none; transition: transform 0.3s var(--ease-out); }
  .dock-current[aria-expanded="true"] svg { transform: rotate(180deg); }
  .dock-links {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 10px);
    display: none; flex-direction: column; gap: 2px; padding: 8px;
    border-radius: 18px; background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 48px -24px rgba(0, 0, 0, 0.9);
  }
  .dock.is-open .dock-links { display: flex; }
  .dock-links a { min-height: 48px; padding: 0 14px; font-size: 1rem; border-radius: 12px; }
  .dock-links a.is-active { background: var(--surface-3); }
  .dock-ink { display: none; }
  /* El equipo mide lo que su nombre; la sección actual se queda el sitio que sobra. */
  .dock-current { flex: 1 1 auto; max-width: none; justify-content: flex-start; }
  .dock-team { flex: 0 0 auto; min-width: 0; justify-content: center; min-height: 46px; padding: 0 12px; border-radius: 14px; }
  .dock-teams { left: 0; right: 0; min-width: 0; }
  .dock-cta { --btn-h: 46px; border-radius: 14px; }
  .team-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .header-video { display: none; }
}

@media (max-width: 599px) {
  /* Botones largos («Quiero esto con las tareas de mi equipo»): a dos líneas antes que salirse de la pantalla. */
  .btn { white-space: normal; text-align: center; padding-block: 8px; }
  .dock-cta { white-space: nowrap; }
  .dock { gap: 4px; padding: 5px; }
  .dock-team-k { display: none; }
  .dock-current { padding: 0 10px; font-size: 0.875rem; }
  .dock-team { padding: 0 10px; font-size: 0.875rem; }
  .dock-cta { padding: 0 14px; font-size: 0.875rem; }
  .dock-cta .btn-arrow { display: none; }
}

/* ---------- Móvil apaisado: cabecera y barra más bajas ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --header-h: 56px; }
  .is-past-hero .site-header { transform: translateY(-100%); }
  .is-past-hero .site-header:focus-within { transform: none; }
  .dock { bottom: calc(8px + env(safe-area-inset-bottom)); padding: 4px; }
  .dock-current, .dock-team { min-height: 40px; }
  .dock-cta { --btn-h: 40px; }
  html.is-past-hero { scroll-padding-bottom: 72px; }
}

/* ---------- Movimiento reducido: estados finales, sin bucles ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Motas sueltas (core/sparks.js): polvo de los botones, del formulario y del inicio ---------- */
.sparks { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

/* ---------- Aviso de cookies (js/cookies.js): abajo a la derecha (no tapa los botones del inicio);
   en móvil, de lado a lado. Con el lenguaje de la landing: tinta, la A de Alcance, Excon y botones redondos.
   En la página principal se forma con polvo y se deshace en polvo (js/core/polvo-fijo.js). ---------- */
.cookies {
  position: fixed; right: var(--gutter); bottom: 20px; z-index: 110;
  width: min(460px, calc(100vw - var(--gutter) * 2));
  display: grid; gap: 12px; padding: 22px 22px 20px;
  border-radius: var(--radius-lg); background: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 1px rgba(7, 8, 15, 0.6), 0 30px 70px -24px rgba(0, 0, 0, 0.85);
  color: var(--text);
  opacity: 0; translate: 0 16px;
  transition: opacity 0.4s var(--ease-out), translate 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.cookies.is-in { opacity: 1; translate: 0 0; }
.cookies.is-dust { transition: none; }   /* con polvo, ya en su sitio: lo forma el polvo */
.cookies-head { display: flex; align-items: center; gap: 12px; }
.cookies-mark { flex: none; width: auto; height: 26px; }
.cookies-title {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
}
.cookies-text { font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.cookies-text .link { color: var(--text); white-space: nowrap; }
.cookies-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
.cookies-btn {
  min-height: 44px; padding: 0 12px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 700; color: var(--text); white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.16s var(--ease-out);
}
.cookies-btn.is-main { background: var(--text); color: var(--ink); box-shadow: none; }
.cookies-btn:active { transform: scale(0.97); }
.cookies-btn:focus-visible { outline: 2px solid var(--human); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .cookies-btn:not(.is-main):hover { box-shadow: inset 0 0 0 1px var(--text-3); background: rgba(238, 240, 247, 0.06); }
  .cookies-btn.is-main:hover { background: #fff; }
}
@media (max-width: 599px) {
  .cookies { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px 16px 16px; }
  .cookies-actions { grid-template-columns: 1fr 1fr; }
  .cookies-btn.is-main { grid-column: 1 / -1; order: -1; }
}
/* Mientras el aviso está abierto, la barra fija espera debajo. */
html.has-cookies .dock { opacity: 0; pointer-events: none; }
