/* XCENDE · capa legal: tema del banner de cookies, pie con los enlaces legales y páginas legales.
   Todo va acotado a sus propias clases (.cc-*, .site-foot, .legal-*): no toca el hero ni los apartados. */

/* ---------- banner de cookies con la marca XCENDE (los tres botones, idénticos) ---------- */
:root {
  --cc-font: var(--font-text);
  --cc-font-title: var(--font-display);
  --cc-title-stretch: 125%;
  --cc-title-weight: 800;
  --cc-title-transform: uppercase;
  --cc-bg: var(--surface-2);
  --cc-ink: var(--ink);
  --cc-ink-2: var(--ink-2);
  --cc-line: var(--line);
  --cc-btn-bg: transparent;
  --cc-btn-ink: var(--ink);
  --cc-btn-border: var(--ink);
  --cc-btn-bg-hover: var(--ink);
  --cc-btn-ink-hover: var(--surface-2);
  --cc-switch-on: var(--ink);
  --cc-switch-off: var(--line-strong);
  --cc-focus: var(--accent);
  --cc-radius: var(--r-card);
  --cc-btn-radius: var(--r-pill);
  --cc-veil: rgba(10, 10, 11, .55);
  --cc-shadow: none;
  --cc-gap: 16px;
}
.cc-banner { max-width: 520px; padding: 28px; }
.cc-title { font-size: 20px; letter-spacing: .02em; }
@media (max-width: 560px) { .cc-banner { padding: 16px; } .cc-banner .cc-title { font-size: 16px; } }
.cc-body { font-size: 15px; }
.cc-btn { font-weight: 600; font-size: 15px; transition: background-color .5s var(--ease), color .5s var(--ease); }
.cc-fab { border-color: var(--line-strong); }
@media (min-width: 900px) { .cc-banner { left: var(--gutter); bottom: 32px; } .cc-fab { left: 24px; bottom: 24px; } }

/* ---------- marca de la cabecera de las páginas legales ---------- */
.site-foot__brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-height: 44px; }
.site-foot__brand svg { width: 32px; height: 32px; flex: none; }
.site-foot__brand span { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 18px; letter-spacing: .03em; }

/* ---------- PIE · «La cima»: el final del ascenso (todas las páginas) ----------
   Mejora progresiva: sin JS es un pie normal. pie.js añade .telon a <html> en escritorio
   (si el pie cabe en la pantalla y no hay movimiento reducido): la web se levanta y lo descubre. */
.pie {
  --pie-ink: var(--ink-inverse);
  --pie-2: rgba(244, 243, 240, .82);
  --pie-3: rgba(244, 243, 240, .5);           /* 4.9:1 sobre #111 */
  --pie-clave: #8FA2FF;                       /* Cobalto claro: 7.9:1 sobre #111 */
  --pie-filete: #2A2A2A;
  position: relative;
  background: var(--surface-inverse); color: var(--pie-ink);
  font-family: var(--font-text);
  overflow: hidden;
}
.telon main, .telon .legal-top { position: relative; z-index: 1; background: var(--surface-2); }
.telon .pie { position: sticky; bottom: 0; z-index: 0; }

.pie__in { padding: 72px var(--gutter) 0; }
.pie__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 48px; }
.pie__frase {
  font-family: var(--font-display); font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(36px, 4.05vw, 64px); line-height: .96; letter-spacing: .005em;
}
.pie__frase span { display: block; }
.pie__clave { color: var(--pie-clave); }
.pie__cta { flex: none; }

.pie__cols { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 48px; max-width: 980px; }
.pie__k { margin-bottom: 14px; font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: .28em; text-transform: uppercase; color: var(--pie-3); }
.pie__col ul { margin: 0; padding: 0; list-style: none; }
.pie__a, .pie__dato { display: inline-flex; align-items: center; min-height: 32px; font: 500 15px/1.3 var(--font-text); color: var(--pie-2); }
.pie__a {
  padding: 0; border: 0; cursor: pointer; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(100% - 8px) / 0 1px;
  transition: background-size 400ms var(--ease), color 400ms var(--ease), transform 200ms var(--ease);
}
.pie__a:hover, .pie__a:focus-visible, .pie__a[aria-current="page"] { color: var(--pie-ink); background-size: 100% 1px; }
.pie__a:hover, .pie__a:focus-visible { transform: translateY(-2px); transition-delay: 0ms, 0ms, 400ms; }
.pie a:focus-visible, .pie button:focus-visible { outline: 2px solid var(--pie-clave); outline-offset: 3px; border-radius: 4px; }
.pie .pendiente { font-size: .85em; }

/* La palabra gigante, con la línea del logo en su base */
.pie__marca {
  --f: calc(100cqi / 5.94);                   /* XCENDE (5.46 em) + hueco + subida (0.42 em) = todo el ancho */
  --t: max(3px, calc(var(--f) * .032));
  --gap: calc(var(--f) * .07);
  position: relative;
  display: flex; align-items: flex-end; gap: calc(var(--f) * .06);
  margin: 48px 24px 0; padding-bottom: calc(var(--gap) + var(--t));
  container-type: inline-size;
}
.pie__palabra {
  font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: var(--f);
  line-height: 1; margin: -.13em 0 -.17em; white-space: nowrap; color: rgba(244, 243, 240, .92);
}
.pie__palabra span { display: inline-block; }
.pie__recta {
  position: absolute; left: 0; right: calc(var(--f) * .42 - var(--t) * .289); bottom: calc(var(--t) / 2);   /* llega hasta la bisectriz del inglete */
  height: var(--t); background: var(--pie-ink);
  transform-origin: left; transform: scaleX(var(--recta, 1));
}
.pie__sube { position: absolute; right: 0; bottom: var(--t); width: calc(var(--f) * .42); height: calc(var(--f) * .7); overflow: visible; }
.pie__sube polyline { fill: none; stroke: var(--accent); stroke-width: 4.6; stroke-dasharray: 1; }   /* 4.6 unidades = var(--t) a esta escala */
.pie__sube-l { stroke-linejoin: miter; stroke-dashoffset: calc(1 - min(1, var(--sube, 1) * 1.6)); }
.pie__sube-f { stroke-linecap: square; stroke-dashoffset: calc(1 - max(0, var(--sube, 1) * 2.5 - 1.5)); }
@media (hover: hover) {
  .pie__palabra:hover span { animation: ola 360ms var(--ease) both; }
  .pie__palabra:hover span:nth-child(2) { animation-delay: 45ms; }
  .pie__palabra:hover span:nth-child(3) { animation-delay: 90ms; }
  .pie__palabra:hover span:nth-child(4) { animation-delay: 135ms; }
  .pie__palabra:hover span:nth-child(5) { animation-delay: 180ms; }
  .pie__palabra:hover span:nth-child(6) { animation-delay: 225ms; }
}
@keyframes ola { 50% { transform: translateY(-.04em); } }

/* Barra final: el botón fijo de cookies queda dentro de su hueco, a la izquierda */
.pie__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px;
  min-height: 96px; margin-top: 20px; padding: 12px var(--gutter) 12px 96px;
  border-top: 1px solid var(--pie-filete); font-size: 13px; line-height: 1.5; color: var(--pie-3);
}
.pie__arriba { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--pie-2); font-weight: 500; text-decoration: none; transition: color 400ms var(--ease); }
.pie__arriba svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; transition: transform 400ms var(--ease); }
.pie__arriba:hover, .pie__arriba:focus-visible { color: var(--pie-ink); }
.pie__arriba:hover svg, .pie__arriba:focus-visible svg { transform: translateY(-4px); }

/* Mientras se ve el pie, el contacto flotante se aparta (el pie ya tiene su botón) */
.pie-visible .flota.is-on { opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 400ms var(--ease), transform 400ms var(--ease), visibility 0s linear 400ms; }
/* El botón fijo de cookies tiene su hueco en la barra final: mientras el pie pasa por debajo
   se aparta para no tapar nada (el pie ya ofrece «Configurar cookies») y vuelve al llegar a la barra */
.cc-fab { transition: opacity 300ms var(--ease), visibility 0s; }
.pie-visible:not(.pie-bar) .cc-fab { opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease), visibility 0s linear 300ms; }
.pie-medio .indice { --i-ink: var(--ink-inverse); --i-mute: rgba(244, 243, 240, .45); }

@media (max-width: 900px) {
  .pie__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pie__in { padding-top: 64px; }
  .pie__top { flex-direction: column; align-items: stretch; }
  .pie__cta { align-self: flex-start; }
  .pie__cols { grid-template-columns: 1fr; gap: 28px; margin-top: 48px; }
  .pie__a, .pie__dato { min-height: 44px; }
  .pie__marca { margin: 56px 16px 0; }
  .pie__bar { min-height: 80px; margin-top: 20px; padding-left: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .pie__a, .pie__arriba, .pie__arriba svg { transition: none; }
  .pie__palabra:hover span { animation: none; }
}

/* ---------- páginas legales ---------- */
.legal-page { margin: 0; background: var(--surface-2); color: var(--ink); font-family: var(--font-text); }
.legal-top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter); min-height: var(--nav-h); border-bottom: 1px solid var(--line);
}
.legal-top .site-foot__brand span { font-size: 16px; }
.legal-top__back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--ink); border-radius: var(--r-pill);
  font: 600 15px/1 var(--font-text); color: var(--ink); text-decoration: none; transition: background-color .5s var(--ease), color .5s var(--ease); }
.legal-top__back:hover { background: var(--ink); color: var(--surface-2); }
.legal-top a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.legal { max-width: 760px; margin: 0 auto; padding: 96px var(--gutter) var(--section); }
.legal__head { margin-bottom: 56px; }
.legal h1 {
  margin: 0; font-family: var(--font-display); font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(36px, 6vw, 64px); line-height: 1.02; letter-spacing: -.005em;
}
.legal h1::after { content: "."; }
.legal__updated { margin: 20px 0 0; font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.legal section { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--line); }
.legal h2 { margin: 0 0 16px; font-family: var(--font-display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: 22px; line-height: 1.15; letter-spacing: .01em; }
.legal h3 { margin: 28px 0 10px; font-size: 17px; font-weight: 600; }
.legal p, .legal li, .legal td, .legal th, .legal dd, .legal dt { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.legal p { margin: 0 0 14px; }
.legal ul, .legal ol { margin: 0 0 14px; padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.legal a:hover { color: var(--accent); }
.legal a:focus-visible, .legal button:focus-visible, .legal [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.legal__data { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.legal__data > div { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.legal__data dt { font-weight: 600; color: var(--ink); }
.legal__data dd { margin: 0; }
.legal__scroll { overflow-x: auto; }
.legal__table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.legal__table th, .legal__table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal__table th { font-weight: 600; color: var(--ink); }
.legal__table thead th { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.legal__btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; border: 1px solid var(--ink); border-radius: var(--r-pill);
  background: transparent; color: var(--ink); font: 600 15px/1 var(--font-text); cursor: pointer; transition: background-color .5s var(--ease), color .5s var(--ease); }
.legal__btn:hover { background: var(--ink); color: var(--surface-2); }
.pendiente { padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--ink); font-weight: 600; font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 720px) {
  .legal { padding-top: 56px; }
  .legal__data > div { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-top__back, .legal__btn, .cc-btn { transition: none; }
}
