/* =====================================================================
   Nexus IA Agency — glass-utilidades.css
   Estilos propios de cotizador.html, legal.html y 404.html con lenguaje de
   vidrio. Reponen lo que daban styles.css / refinements.css (wizard, resultado,
   legal, error, botones, utilidades) ahora que esas hojas ya no se cargan.
   Se carga DESPUÉS de glass.css. Usa solo tokens de glass.css.
   ===================================================================== */

/* ---------- Utilidades ---------- */
.nexus-site .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes glass-fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Héroes compactos de página interior */
.nexus-site .quote-hero,
.nexus-site .legal-hero { padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(24px, 3.5vw, 44px); }
.nexus-site .quote-hero h1,
.nexus-site .legal-hero h1 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.05; max-width: 20ch; margin: 22px auto 20px; }
.nexus-site .quote-hero .hero-intro,
.nexus-site .legal-hero .hero-intro { max-width: 680px; }
.nexus-site .breadcrumbs { padding-top: 22px; padding-bottom: 0; font-size: 13px; }

/* Botones: estado deshabilitado (el cotizador lo usa en "Siguiente") */
.nexus-site .site-btn { cursor: pointer; border: 1px solid transparent; }
.nexus-site .site-btn-secondary { border-color: var(--glass-border); }
.nexus-site .site-btn:disabled { cursor: not-allowed; background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text-muted); box-shadow: none; transform: none; }
.nexus-site .site-btn:disabled:hover { background: color-mix(in srgb, var(--text) 10%, transparent); transform: none; }

/* ======================== COTIZADOR ======================== */
.quote-shell { max-width: calc(940px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) var(--section-y); }
.nexus-site.quote-page .wizard { max-width: 940px; margin: 0 auto; padding: clamp(22px, 4.2vw, 52px); border-radius: var(--radius-xl); box-shadow: var(--glass-shadow-lg); }
.quote-noscript { max-width: 680px; margin: 0 auto 24px; }
.quote-noscript a, .nexus-site .wizard a:not(.site-btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Progreso */
.wizard-progress { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.wizard-progress .bar { flex: 1; height: 8px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--border-strong) 35%, transparent); overflow: hidden; }
.wizard-progress .bar .fill { width: 0; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .5s var(--ease-out); }
.wizard-progress .step-label { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* Pasos */
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: glass-fadein .45s var(--ease-out); }
.nexus-site .wizard-step h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; letter-spacing: -.03em; font-weight: 750; }
.nexus-site .wizard-step h2:focus { outline: none; }
.nexus-site .step-sub { max-width: 68ch; margin: 0 0 24px; font-size: 16px; line-height: 1.7; color: var(--text-secondary); }
.nexus-site.quote-page .quote-selection { min-height: 26px; margin: 0 0 14px; font-size: 14.5px; }
.nexus-site .result-empty { margin: 0 0 18px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); font-size: 15px; line-height: 1.6; text-align: center; }
.nexus-site .result-empty[hidden] { display: none; }

/* Tarjetas de servicio */
.nexus-site.quote-page .choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 8px; }
.nexus-site.quote-page .choice-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  width: 100%; min-height: 0; padding: 18px 50px 18px 18px; text-align: left; cursor: pointer; color: var(--text);
  background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1.5px solid var(--border); border-radius: var(--radius-md);
  box-shadow: none; font: inherit;
}
.nexus-site.quote-page .choice-card .emoji { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--accent); }
.nexus-site.quote-page .choice-card .emoji .material-symbols-outlined { font-size: 25px; }
.nexus-site.quote-page .choice-card strong { display: block; font-size: 16px; line-height: 1.3; font-weight: 700; margin: 2px 0 4px; }
.nexus-site.quote-page .choice-card .desc { display: block; margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.nexus-site.quote-page .choice-card .check { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 24px; height: 24px; margin: 0; border: 2px solid var(--border-strong); border-radius: 50%; background: transparent; color: transparent; font-size: 13px; font-weight: 700; line-height: 1; }
.nexus-site.quote-page .choice-card[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.nexus-site.quote-page .choice-card[aria-pressed="true"] .emoji { background: var(--accent); color: var(--on-accent); }
.nexus-site.quote-page .choice-card[aria-pressed="true"] .check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) {
  .nexus-site.quote-page .choice-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); transform: translateY(-2px); }
  .nexus-site.quote-page .radio-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
}

/* Presupuesto */
.budget-display { margin: 8px 0 28px; text-align: center; }
.nexus-site.quote-page .budget-display .amount { font-family: var(--font-display); font-size: clamp(46px, 8vw, 76px); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--accent); -webkit-text-fill-color: var(--accent); }
.range-slider { display: block; width: 100%; height: 44px; margin: 10px 0 2px; padding: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.range-slider::-webkit-slider-runnable-track { height: 8px; border-radius: var(--radius-pill); background: var(--border-strong); }
.range-slider::-moz-range-track { height: 8px; border-radius: var(--radius-pill); background: var(--border-strong); }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: var(--accent); border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 6px 16px -4px color-mix(in srgb, var(--accent) 70%, transparent); }
.range-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 6px 16px -4px color-mix(in srgb, var(--accent) 70%, transparent); }
.range-slider:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-pill); }
.range-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }

/* Forma de pago */
.radio-group { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.nexus-site.quote-page .radio-card {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 14px 18px; text-align: left; cursor: pointer; color: var(--text);
  background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1.5px solid var(--border); border-radius: var(--radius-md); font: inherit;
}
.nexus-site.quote-page .radio-card strong { font-size: 15.5px; font-weight: 650; line-height: 1.4; }
.radio-card .dot { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid var(--border-strong); border-radius: 50%; }
.nexus-site.quote-page .radio-card[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.radio-card[aria-pressed="true"] .dot { border-color: var(--accent); }
.radio-card[aria-pressed="true"] .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* Navegación del wizard */
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: clamp(24px, 3vw, 36px); }

/* Resultado (el HTML lo genera cotizador.js) */
.nexus-site .result-summary { margin-bottom: 20px; padding: clamp(20px, 3.2vw, 34px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 78%, transparent); }
.nexus-site .result-summary h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.nexus-site .result-line { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 15.5px; line-height: 1.5; }
.nexus-site .result-line > div { min-width: 0; }
.nexus-site .result-line > div:last-child { flex: 0 1 44%; text-align: right; }
.nexus-site .result-line .svc { display: block; font-weight: 700; }
.nexus-site .result-line .plan { display: block; margin-top: 2px; font-size: 14px; color: var(--text-secondary); }
.nexus-site .result-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-top: 8px; padding-top: 18px; border-top: 2px solid var(--border-strong); }
.nexus-site .result-total .lbl { font-size: 15px; color: var(--text-secondary); }
.nexus-site .result-total .val { font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.nexus-site .result-discount { margin: 12px 0 0; font-size: 14px; font-weight: 650; line-height: 1.5; text-align: right; }
.nexus-site .result-summary .step-sub { margin: 14px 0 0; font-size: 14.5px; }
#resultado > .step-sub { margin-top: 0; }

/* ======================== LEGAL ======================== */
.legal-layout { display: grid; grid-template-columns: minmax(190px, 240px) minmax(0, calc(72ch + 2 * clamp(24px, 4vw, 48px))); gap: clamp(24px, 3.5vw, 48px); justify-content: center; align-items: start; max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.nexus-site .legal-nav { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: var(--glass-bg); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); }
.legal-nav-title { padding: 4px 12px 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
.nexus-site .legal-nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; color: var(--text); transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.nexus-site .legal-nav a:hover { background: var(--hover-tint); color: var(--accent); }
.legal-body { display: grid; gap: 24px; }
.nexus-site .legal-section { scroll-margin-top: 110px; padding: clamp(24px, 4vw, 48px); border-radius: var(--radius-lg); }
.nexus-site .legal-section:target { border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border)); }
.nexus-site .legal-section h2 { margin: 0 0 18px; font-size: clamp(25px, 2.8vw, 34px); line-height: 1.1; letter-spacing: -.03em; font-weight: 750; }
.nexus-site .legal-section h3 { margin: 30px 0 8px; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; font-weight: 700; color: var(--text); }
.nexus-site .legal-section p,
.nexus-site .legal-section li { max-width: 72ch; font-size: 16.5px; line-height: 1.8; color: var(--text-secondary); }
.nexus-site .legal-section p { margin: 0 0 14px; }
.nexus-site .legal-section ul { margin: 0 0 14px; padding-left: 22px; list-style: disc; }
.nexus-site .legal-section li { margin: 0 0 8px; padding-left: 4px; }
.nexus-site .legal-section li::marker { color: var(--accent); }
.nexus-site .legal-section strong { color: var(--text); font-weight: 700; }
.legal-main .site-section { padding-top: clamp(40px, 5vw, 72px); }

/* ======================== 404 ======================== */
.error-page { display: grid; place-items: center; min-height: min(70vh, 640px); padding: clamp(40px, 8vw, 110px) var(--gutter); }
.nexus-site .error-panel { width: min(100%, 700px); padding: clamp(32px, 6vw, 68px); border-radius: var(--radius-xl); text-align: center; }
.error-code { font-family: var(--font-display); font-size: clamp(88px, 17vw, 160px); font-weight: 750; line-height: 1; letter-spacing: -.05em; color: var(--accent); }
.nexus-site .error-panel h1 { margin: 10px 0 16px; font-size: clamp(27px, 4vw, 42px); line-height: 1.1; letter-spacing: -.03em; }
.error-panel .hero-intro { max-width: 520px; }
.error-panel .hero-actions { justify-content: center; margin: 30px 0 0; }

/* ======================== Responsivo ======================== */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .nexus-site .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 10px; }
  .legal-nav-title { flex: 0 0 100%; padding-bottom: 2px; }
  .nexus-site .legal-nav a { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 640px) {
  .nexus-site.quote-page .choice-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .nexus-site.quote-page .choice-card { min-height: 0; padding: 16px 48px 16px 16px; gap: 12px; }
  .nexus-site.quote-page .choice-card .emoji { width: 44px; height: 44px; font-size: 22px; }
  .nexus-site.quote-page .choice-card .desc { font-size: 14px; line-height: 1.5; }
  .nexus-site.quote-page .choice-card .check { top: 14px; right: 14px; width: 24px; height: 24px; }
  .wizard-nav { flex-direction: column-reverse; align-items: stretch; }
  .wizard-nav .site-btn { width: 100%; }
  .wizard-nav > span { display: none; }
  .nexus-site .result-line { flex-direction: column; gap: 6px; }
  .nexus-site .result-line > div:last-child { flex-basis: auto; text-align: left; }
  .nexus-site .result-discount { text-align: left; }
  .nexus-site .legal-section p, .nexus-site .legal-section li { font-size: 16px; }
  .error-panel .hero-actions { flex-direction: column; align-items: stretch; }
  .nexus-site .error-panel { background: var(--glass-bg-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nexus-site .legal-section, .nexus-site.quote-page .wizard { background: var(--glass-bg-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wizard-step.active { animation: none; }
}
