/* ============================================================
   Calculadora de ROI de la IA — estilos (consistentes con la web)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  --bg: #05060d;
  --bg-alt: #0a0c18;
  --surface: #10121f;
  --surface-2: #161932;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef0ff;
  --text-muted: #9ea3c9;
  --text-soft: #c5c9e8;

  --purple: #7c3aed;
  --blue: #3b82f6;
  --teal: #14e0d1;

  --gradient: linear-gradient(135deg, #7c3aed 0%, #5b2fe0 35%, #3b82f6 70%, #14e0d1 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(20,224,209,0.18));

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-glow: 0 20px 60px -20px rgba(124, 58, 237, 0.45);
  --shadow-card: 0 8px 30px -12px rgba(0, 0, 0, 0.6);

  --container: 1040px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124,58,237,0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(20,224,209,0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(5, 6, 13, 0.72); border-bottom: 1px solid var(--border);
}
.nav__inner { max-width: 1180px; margin-inline: auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.nav__brand { font-weight: 700; letter-spacing: -0.01em; }
.nav__back { color: var(--text-muted); font-size: 0.9rem; }
.nav__back:hover { color: var(--text); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 16px 40px -14px rgba(124, 58, 237, 0.7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 22px 48px -14px rgba(124, 58, 237, 0.85); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost { background: rgba(255,255,255,0.04); border: 1px solid var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.28); }
.btn--full { width: 100%; }

/* ---------- Header ---------- */
.head { padding: 56px 0 32px; text-align: center; max-width: 760px; margin-inline: auto; }
.kicker {
  display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--gradient-soft); border: 1px solid var(--border-strong); color: var(--text-soft);
}
.head h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
.head__lead { margin-top: 18px; color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Layout calculadora ---------- */
.calc { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: start; padding-bottom: 8px; }
.calc__title { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.calc__hint { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }

/* ---------- Tareas ---------- */
.tasks { display: grid; gap: 12px; }
.task {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.task:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.task--on { border-color: rgba(124,58,237,0.6); background: var(--gradient-soft); }
.task__cb { position: absolute; opacity: 0; pointer-events: none; }
.task__box {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px;
  border: 1.5px solid var(--border-strong); background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: transparent; transition: all 0.2s var(--ease);
}
.task--on .task__box { background: var(--gradient); border-color: transparent; color: #fff; }
.task__icon { flex-shrink: 0; font-size: 1.2rem; }
.task__label { flex: 1; font-size: 0.96rem; font-weight: 500; }
.task__hrs { flex-shrink: 0; font-size: 0.82rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.task--on .task__hrs { color: var(--text-soft); }

/* ---------- Panel derecho ---------- */
.calc__panel { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.panel-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; color: var(--text-soft); font-weight: 500; }
.field__help { color: var(--text-muted); cursor: help; }
.field input {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; color: var(--text); font-size: 1rem; font-family: inherit;
  transition: border-color 0.2s var(--ease);
}
.field input:focus { outline: none; border-color: var(--purple); }
.field__note { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.field__note strong { color: var(--text-soft); }

/* ---------- Resultado ---------- */
.result {
  padding: 28px 24px; border-radius: var(--radius-lg); text-align: center;
  border: 1px solid var(--border-strong);
  background: radial-gradient(120% 130% at 50% 0%, rgba(124,58,237,0.16), transparent 60%), var(--surface);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.result--on { border-color: rgba(124,58,237,0.55); box-shadow: var(--shadow-glow); }
.result__tag { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.result__roi {
  font-size: clamp(2.6rem, 7vw, 3.6rem); font-weight: 900; line-height: 1.05; margin: 6px 0 4px;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; font-variant-numeric: tabular-nums;
}
.result__roi-label { font-size: 0.92rem; color: var(--text-soft); margin-bottom: 22px; }
.result__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric { padding: 14px 12px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); }
.metric__num { display: block; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric__label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.result__disclaimer { font-size: 0.74rem; color: var(--text-muted); margin-top: 18px; line-height: 1.4; }

/* ---------- Lead magnet ---------- */
.lead {
  margin-top: 40px; padding: 32px; border: 1px solid rgba(124,58,237,0.45); border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124,58,237,0.12) 0%, transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(20,224,209,0.10) 0%, transparent 55%),
    var(--surface);
}
.lead__badge {
  display: inline-block; margin-bottom: 14px; padding: 5px 13px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  background: rgba(124,58,237,0.16); border: 1px solid rgba(124,58,237,0.4); color: var(--text-soft);
}
.lead h3 { font-size: 1.3rem; margin-bottom: 6px; }
.lead p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 22px; }
.lead__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead__consent { font-size: 0.8rem; color: var(--text-muted); margin-top: 14px; text-align: center; }
.lead__consent a { color: var(--text-soft); text-decoration: underline; }
.hidden-field { position: absolute; left: -9999px; }

.lead-ok { display: none; padding: 8px 4px; color: var(--text); text-align: center; }
.lead-ok__check {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700;
  color: #05060d; background: linear-gradient(135deg, #14e0d1, #3b82f6);
}
.lead-ok h4 { font-size: 1.25rem; margin-bottom: 6px; }
.lead-ok p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 14px; }
.lead-ok__pass {
  display: inline-block; margin: 0 auto 22px; padding: 12px 26px; border-radius: var(--radius-sm);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.3rem; font-weight: 700;
  letter-spacing: 0.12em; color: var(--text);
  background: var(--bg-alt); border: 1px dashed rgba(20,224,209,0.55);
}
.lead-ok__hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 14px; margin-bottom: 0; }

/* ---------- CTA formación ---------- */
.r-cta {
  margin-top: 28px; padding: 32px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--gradient-soft);
}
.r-cta h3 { font-size: 1.3rem; margin-bottom: 8px; }
.r-cta p { color: var(--text-soft); font-size: 0.96rem; max-width: 560px; margin: 0 auto 20px; }
.r-cta__buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Fuentes ---------- */
.sources {
  margin-top: 28px; padding: 28px 32px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface);
}
.sources h3 { font-size: 1.1rem; margin-bottom: 8px; }
.sources > p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 16px; }
.sources ul { list-style: none; display: grid; gap: 10px; }
.sources li {
  position: relative; padding-left: 22px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5;
}
.sources li::before { content: "▸"; position: absolute; left: 0; color: var(--teal); }
.sources strong { color: var(--text-soft); }
.sources em { color: var(--text-muted); }

/* ---------- Footer ---------- */
.foot { text-align: center; padding: 48px 0; margin-top: 24px; color: var(--text-muted); font-size: 0.88rem; border-top: 1px solid var(--border); }
.foot a { color: var(--text-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .calc__panel { position: static; }
}
@media (max-width: 560px) {
  .lead__grid { grid-template-columns: 1fr; }
  .result__grid { grid-template-columns: 1fr; }
  .task__hrs { display: none; }
}
