/* TalleIA · sistema visual "Vidrio grafito": fondo grafito, paneles de vidrio ahumado, plata y blancos.
   Contrastes sobre el vidrio más claro (peor caso): --texto ≥ 7:1 · --texto-2 y --texto-3 ≥ 4,5:1 · --acento ≥ 6:1.
   Sobre plata (#dfe2e7) el texto va en --tinta-plata (#121316): 14:1. */
:root {
  --fondo: #111214;
  --fondo-pie: #0b0c0e;
  --texto: #f4f5f7;
  --texto-2: #c6cad3;
  --texto-3: #a9aeb8;
  --borde: rgba(255, 255, 255, .13);
  --borde-fuerte: rgba(255, 255, 255, .24);
  --acento: #9db7ff;       /* enlaces y foco: azul claro */
  --acento-2: #c4b5fd;     /* violeta claro */
  --tinta-plata: #121316;  /* texto sobre plata */
  --plata: linear-gradient(180deg, #ffffff 0%, #dfe2e7 45%, #aab0ba 100%);
  /* Tornasolado oscuro (negro → gris → azul → rosa) para los botones principales. Texto blanco ≥ 5:1 en cada tono */
  --tornasol: linear-gradient(115deg, #15161a 0%, #4a5060 20%, #3d5aa8 42%, #7e5584 62%, #3a4258 80%, #15161a 100%);

  /* Vidrio: tinte de humo (mantiene el contraste aunque detrás haya brillo) + reflejo blanco */
  --vidrio: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04) 60%), rgba(22, 23, 26, .58);
  --vidrio-claro: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06) 60%), rgba(26, 27, 31, .62);
  --vidrio-interior: rgba(255, 255, 255, .05);  /* elementos dentro de un panel: sin desenfoque propio */
  --vidrio-brillo: inset 0 1px 0 rgba(255, 255, 255, .2);
  --desenfoque: blur(20px) saturate(140%);
  --sombra: 0 24px 60px -26px rgba(0, 0, 0, .8);

  /* Estados (sobre fondo oscuro) */
  --exito: #6ee7b7;
  --exito-fondo: rgba(110, 231, 183, .12);
  --aviso: #fcd27b;
  --aviso-fondo: rgba(252, 210, 123, .12);
  --error: #ff9b8f;
  --error-fondo: rgba(255, 155, 143, .12);

  --fuente-titulo: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --fuente: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-1: clamp(2.6rem, 1.6rem + 4.2vw, 4.6rem);
  --t-2: clamp(1.9rem, 1.4rem + 2.1vw, 3rem);
  --t-3: 1.2rem;

  --radio: 14px;
  --radio-grande: 22px;
  --ancho: 1160px;
  --margen: clamp(16px, 4vw, 32px);
  --seccion: clamp(72px, 9vw, 112px);
  --suave: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 1rem/1.6 var(--fuente); -webkit-font-smoothing: antialiased; overflow-x: clip; }
/* Luces suaves de fondo (azul y violeta) para que el vidrio tenga algo que desenfocar */
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(55% 45% at 88% 4%, rgba(91, 132, 255, .2), transparent 70%),
              radial-gradient(45% 40% at 4% 38%, rgba(154, 114, 255, .16), transparent 70%),
              radial-gradient(50% 40% at 70% 96%, rgba(110, 160, 255, .12), transparent 70%),
              radial-gradient(120% 90% at 50% 0%, #1d1f23 0%, var(--fondo) 60%); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: var(--acento); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visualmente-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margen); }

:focus-visible { outline: 2px solid var(--texto); outline-offset: 3px; border-radius: 8px; }
.saltar { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--plata); color: var(--tinta-plata); padding: 10px 16px; border-radius: var(--radio); font-weight: 600; text-decoration: none; }
.saltar:focus { top: 12px; }

/* Figuras 3D de fondo (js/ui/figuras.js): detrás del contenido; la capa lejana va desenfocada (profundidad de campo) */
.figuras { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.figuras--listo { opacity: 1; }
.figuras__capa { position: absolute; inset: 0; width: 100%; height: 100%; }
.figuras__capa--lejos { filter: blur(7px) saturate(1.1); opacity: .85; }

/* Superficies de vidrio: un solo lugar para todos los paneles de la página */
.cabecera__fila, .menu-movil, .demo__producto, .demo__asistente, .cifras__caja, .paso, .telefono-video, .asistente,
.beneficio, .vista, .plan, .acordeon details, .contacto__caja, .etiqueta--vidrio {
  background: var(--vidrio); border: 1px solid var(--borde);
  backdrop-filter: var(--desenfoque); -webkit-backdrop-filter: var(--desenfoque);
  box-shadow: var(--vidrio-brillo), var(--sombra);
}

/* Tipografía */
.t-1, .t-2, h3 { font-family: var(--fuente-titulo); font-weight: 700; letter-spacing: -0.025em; color: var(--texto); }
.t-1 { font-size: var(--t-1); line-height: 1.02; text-wrap: balance; }
.t-1 em { font-style: normal; background: var(--plata); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t-2 { font-size: var(--t-2); line-height: 1.08; text-wrap: balance; }
h3 { font-size: var(--t-3); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.bajada { font-size: 1.125rem; color: var(--texto-2); max-width: 40em; text-wrap: pretty; }
.etiqueta { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); }
.etiqueta--vidrio { padding: 6px 12px; border-radius: 999px; box-shadow: var(--vidrio-brillo); }
.punto { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }

/* Logo: «TalleIA», con IA en plata */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texto); }
.logo__marca { width: 30px; height: 30px; flex-shrink: 0; }
.logo__nombre { font: 700 1.3rem/1 var(--fuente-titulo); letter-spacing: -0.02em; }
.logo__nombre span { color: #d3d7de; } /* plata sólida: con degradado la «I» parecía un «!» */

/* Cabecera: barra de vidrio flotante */
.cabecera { position: sticky; top: 14px; z-index: 50; padding: 0 var(--margen); margin-top: 14px; }
.cabecera__fila { max-width: calc(var(--ancho) - 2 * var(--margen)); margin: 0 auto; height: 60px; padding: 0 10px 0 18px; border-radius: 18px; display: flex; align-items: center; gap: 22px; transition: background-color .25s; }
.cabecera.con-fondo .cabecera__fila { background: var(--vidrio-claro); }
.cabecera__puntos { display: flex; gap: 7px; }
.cabecera__puntos i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.cabecera__nav { margin-left: auto; }
.cabecera__nav ul { display: flex; gap: 4px; }
.cabecera__nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--texto-2); font-weight: 500; font-size: .84rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; transition: color .2s, background-color .2s; }
.cabecera__nav a:hover { color: var(--texto); background: rgba(255, 255, 255, .07); }
.cabecera__nav a[aria-current="true"] { color: var(--texto); background: rgba(255, 255, 255, .1); }
.cabecera__menu { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--borde-fuerte); background: rgba(255, 255, 255, .06); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.cabecera__menu i { width: 18px; height: 2px; border-radius: 2px; background: var(--texto); transition: transform .25s var(--suave), opacity .2s; }
.cabecera__menu[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(6px) rotate(45deg); }
.cabecera__menu[aria-expanded="true"] i:nth-of-type(2) { opacity: 0; }
.cabecera__menu[aria-expanded="true"] i:nth-of-type(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-movil { max-width: calc(var(--ancho) - 2 * var(--margen)); margin: 8px auto 0; padding: 8px 18px 18px; border-radius: 18px; display: grid; gap: 12px; }
.menu-movil a:not(.boton) { display: block; padding: 14px 4px; border-bottom: 1px solid var(--borde); color: var(--texto); font-weight: 600; font-size: 1.1rem; text-decoration: none; }

/* Campos */
.campo { display: grid; gap: 6px; align-content: start; margin: 0; padding: 0; border: 0; min-width: 0; }
.campo label, .campo legend { font-size: .9rem; font-weight: 600; padding: 0; color: var(--texto); }
.campo input:not([type="checkbox"]):not([type="radio"]), .campo select, .campo textarea { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--borde-fuerte); background: rgba(255, 255, 255, .06); color: var(--texto); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.campo select option { background: #1b1c20; color: var(--texto); }
.campo textarea { resize: vertical; min-height: 96px; }
.campo input::placeholder, .campo textarea::placeholder { color: var(--texto-3); }
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: rgba(255, 255, 255, .4); }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: none; border-color: var(--texto); background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 4px rgba(157, 183, 255, .25); }
.campo [aria-invalid="true"] { border-color: var(--error) !important; box-shadow: 0 0 0 4px var(--error-fondo) !important; }
.campo :disabled { opacity: .55; cursor: not-allowed; }
.ayuda { font-size: .85rem; color: var(--texto-2); }
.error { font-size: .85rem; font-weight: 500; color: var(--error); display: flex; gap: 6px; }
.error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--error); color: var(--tinta-plata); font-size: .7rem; font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.opcional { font-weight: 400; color: var(--texto-2); }
.casilla { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; line-height: 1.45; cursor: pointer; }
.campo .casilla { font-weight: 400; }
.casilla input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #dfe2e7; flex-shrink: 0; }
.estado { color: var(--texto-2); font-size: .95rem; }

/* Pie */
.pie { background: linear-gradient(180deg, transparent, var(--fondo-pie) 40%); border-top: 1px solid var(--borde); color: var(--texto-2); padding: 72px 0 28px; font-size: .95rem; margin-top: 40px; }
.pie__grilla { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--borde); }
.pie__marca { display: grid; gap: 14px; align-content: start; }
.pie h2 { font: 600 .8rem var(--fuente); letter-spacing: .08em; text-transform: uppercase; color: var(--texto); margin: 0 0 14px; }
.pie ul { display: grid; gap: 10px; }
.pie a:not(.logo) { color: var(--texto-2); text-decoration: none; }
.pie a:not(.logo):hover { color: var(--texto); text-decoration: underline; }
.pie__base { padding-top: 24px; font-size: .85rem; color: var(--texto-3); }

@media (max-width: 960px) {
  .cabecera__nav, .cabecera .cabecera__cta, .cabecera__puntos { display: none; }
  .cabecera__menu { display: flex; }
  .pie__grilla { grid-template-columns: 1fr 1fr; }
  .pie__marca, #privacidad { grid-column: 1 / -1; }
}
@media (min-width: 961px) { .menu-movil { display: none !important; } }
@media (max-width: 520px) { .pie__grilla { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
