/* ==========================================================================
   Automatización e IA (automatizaciones.html) — Figma frame 162:240
   Tema oscuro con acentos verde/cian.
   ========================================================================== */

.page-ai {
  --ai-green: #4ade80;
  --ai-emerald: #10b981;
  --ai-cyan: #22d3ee;
  --ai-bg-1: #071b10;
  --ai-bg-2: #0a1f2e;
  --ai-bg-3: #081a22;
  --ai-ink: #0f1f17;
  --ai-muted: #7fa899;
  --ai-muted-2: #aebaca;
  --ai-line: rgba(34, 211, 238, .18);
  --ai-surface: rgba(255, 255, 255, .045);
  background: var(--ai-bg-2);
}
.page-ai main { background: linear-gradient(160deg, var(--ai-bg-1) 0%, var(--ai-bg-2) 55%, var(--ai-bg-3) 100%); }

/* Botones del tema IA */
.ai-btn { font-family: var(--font-alt); font-weight: var(--fw-bold); font-size: .875rem; padding: 14px 28px; border-radius: var(--r-pill); }
.ai-btn--grad { background: linear-gradient(90deg, var(--ai-emerald), var(--ai-cyan)); color: #fff; box-shadow: 0 0 18px rgba(34, 211, 238, .3); }
.ai-btn--grad:hover { filter: brightness(1.06); }
.ai-btn--outline { background: rgba(85, 192, 54, .15); border: 1px solid var(--c-green); color: var(--c-green); }
.ai-btn--outline:hover { background: rgba(85, 192, 54, .25); }
.ai-btn--lg { padding: 16px 40px; font-size: 1rem; }

.ai-eyebrow {
  display: inline-block; font-family: var(--font-alt); font-weight: var(--fw-semibold);
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--c-green);
  background: rgba(74, 222, 128, .1); padding: 5px 16px; border-radius: var(--r-pill);
}
.ai-eyebrow--emerald { color: var(--ai-emerald); background: none; padding: 0; letter-spacing: .1em; }

.ai-grad {
  background: linear-gradient(90deg, var(--ai-green), var(--ai-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(85, 192, 54, .1); border: 1px solid rgba(85, 192, 54, .18);
  color: var(--ai-green); font-family: var(--font-alt); font-weight: var(--fw-bold);
  font-size: .75rem; letter-spacing: .02em; padding: 7px 17px; border-radius: var(--r-pill);
}
.ai-chip .icon { width: 13px; height: 13px; }
.ai-chip--emerald { background: rgba(16, 185, 129, .12); border-color: rgba(74, 222, 128, .2); }

/* ----- Hero ----- */
.ai-hero { position: relative; overflow: hidden; background: linear-gradient(162deg, #071a10 24%, #0a1f2e 68%, #081a22 95%); }
.ai-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 30% 40%, rgba(16, 185, 129, .12), transparent 70%),
              radial-gradient(45% 40% at 78% 60%, rgba(34, 211, 238, .1), transparent 70%);
}
.ai-hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: 72px; min-height: 620px; }
.ai-hero__content { max-width: 540px; }
.ai-hero h1 {
  font-family: var(--font-alt); font-weight: var(--fw-extrabold);
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 3.5rem); line-height: 1.1; letter-spacing: -.025em;
  color: #fff; margin: 20px 0;
}
.ai-hero p { font-family: var(--font-alt); font-size: 1.125rem; line-height: 1.62; color: var(--ai-muted); max-width: 448px; }
.ai-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.ai-hero__visual { position: relative; justify-self: center; }
.ai-hero__visual img { width: 100%; max-width: 460px; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .5)); }
.ai-float {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(34, 211, 238, .2);
  border-radius: var(--r-md); padding: 12px 16px; backdrop-filter: blur(6px);
}
.ai-float strong { display: block; font-family: var(--font-alt); font-weight: var(--fw-bold); font-size: .75rem; color: #fff; }
.ai-float small { font-family: var(--font-alt); font-size: .625rem; color: #64748b; }
.ai-float__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; }
.ai-float__icon .icon { width: 13px; height: 13px; }
.ai-float__icon--green { background: rgba(74, 222, 128, .12); color: var(--ai-green); }
.ai-float__icon--cyan { background: rgba(34, 211, 238, .12); color: var(--ai-cyan); }
.ai-float--tl { top: 6%; left: -6%; }
.ai-float--br { bottom: 8%; right: -8%; }

/* ----- ¿Qué puedes automatizar con IA? ----- */
.ai-automation { position: relative; padding-block: 80px; background: linear-gradient(31deg, #071a10 18%, #0a1f2e 59%, #081a22 82%); }
.ai-automation__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; max-width: 1024px; margin-inline: auto; }
.ai-automation__head h2 { font-family: var(--font-alt); font-weight: var(--fw-extrabold); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem); color: #fff; margin: 16px 0; }
.ai-automation__head p { font-family: var(--font-alt); color: var(--ai-muted); line-height: 1.62; max-width: 534px; }
.ai-automation__mark { width: 84px; height: 84px; flex-shrink: 0; opacity: .9; }

.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; max-width: 1024px; margin: 40px auto 0; position: relative; }
/* Línea que conecta el centro de los iconos (icono ø40, centro a 62px del tope) */
.flow::before {
  content: ""; position: absolute; top: 60px; left: 10%; right: 10%; height: 4px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--c-green), var(--c-blue));
}
.flow__step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; padding: 0 10px; }
.flow__num { display: flex; align-items: center; justify-content: center; height: 30px; font-family: var(--font-alt); font-weight: var(--fw-extrabold); font-size: 1.375rem; color: var(--c-green); }
.flow__icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 10px 0 14px; border-radius: 50%; background: #edfaf4; color: var(--c-green-dark); position: relative; z-index: 1; }
.flow__icon .icon { width: 18px; height: 18px; }
.flow__step p { font-family: var(--font-alt); font-weight: var(--fw-bold); font-size: .75rem; line-height: 1.38; background: #fff; color: var(--ai-ink); border-radius: var(--r-md); padding: 14px 12px; width: 100%; }

.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1024px; margin: 56px auto 0; }
.benefit { background: #fff; border-radius: var(--r-md); padding: 20px; }
.benefit__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(85, 192, 54, .16); color: var(--c-green); margin-bottom: 12px; }
.benefit__icon .icon { width: 16px; height: 16px; }
.benefit h3 { font-family: var(--font-alt); font-weight: var(--fw-extrabold); font-size: .75rem; color: var(--ai-ink); }
.benefit__rule { display: block; width: 100%; height: 2px; background: var(--c-green); border-radius: var(--r-pill); margin: 10px 0; }
.benefit p { font-family: var(--font-alt); font-size: .75rem; line-height: 1.6; color: #5a7a6a; }
.ai-automation__cta { display: flex; justify-content: center; margin-top: 48px; }

/* ----- Menos tiempo en lo manual (fondo claro) ----- */
.manual { background: #fff; }
.manual__title { font-family: var(--font-alt); font-weight: var(--fw-extrabold); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem); line-height: 1.25; color: #1d293d; margin: 8px 0 0; }
.manual__lead { font-family: var(--font-alt); font-size: 1rem; line-height: 1.62; color: #62748e; max-width: 672px; margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: var(--r-pill); padding: 9px 17px; font-family: var(--font-alt); font-weight: var(--fw-semibold); font-size: .875rem; color: #314158; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .08); }
.chips .icon { width: 15px; height: 15px; color: var(--ai-emerald); }
.manual__label { font-family: var(--font-alt); font-weight: var(--fw-semibold); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #90a1b9; margin-top: 48px; }
.process-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 16px; }
.process-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; background: #fff; border: 1px solid #f1f5f9; border-radius: var(--r-md); padding: 21px 16px; font-family: var(--font-alt); font-weight: var(--fw-semibold); font-size: .75rem; color: #314158; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .08); }
.process-card__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: #ecfdf5; color: var(--ai-emerald); }
.process-card__icon .icon { width: 18px; height: 18px; }

/* ----- Emilia + IA que trabaja ----- */
.ai-emilia { background: linear-gradient(141deg, #071b10 0%, #080e20 60%, #071b10 100%); padding-block: 88px; }
.ai-emilia__inner { display: grid; grid-template-columns: 340px 1fr; gap: 72px; align-items: center; max-width: 1064px; }
.ai-emilia__name { font-family: var(--font-alt); font-weight: var(--fw-extrabold); font-size: 1.875rem; color: #fff; margin: 12px 0 16px; }
.ai-emilia__card {
  margin: 0; display: flex; flex-direction: column; align-items: center;
  border: 2px solid rgba(34, 211, 238, .15); border-radius: var(--r-lg);
  box-shadow: 0 0 60px rgba(16, 185, 129, .1); padding: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(16, 185, 129, .12), transparent 70%);
}
.ai-emilia__video {
  display: block; width: 100%; max-width: 264px; aspect-ratio: 9 / 16;
  object-fit: cover; border-radius: var(--r-md); background: #05140d;
}
.ai-emilia__video img { width: 100%; height: 100%; object-fit: cover; }
.ai-emilia__caption { margin-top: 12px; text-align: center; font-family: var(--font-alt); font-weight: var(--fw-semibold); font-size: .8125rem; color: var(--ai-muted-2); }
.ai-emilia__desc { font-family: var(--font-alt); font-size: 1.125rem; line-height: 1.62; color: #cbd5e1; }
.ai-checklist { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.ai-checklist li { display: flex; align-items: center; gap: 12px; font-family: var(--font-alt); font-weight: var(--fw-semibold); font-size: .875rem; color: #e2e8f0; }
.ai-checklist__dot { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c-green); color: #fff; flex-shrink: 0; }
.ai-checklist__dot .icon { width: 10px; height: 10px; }

.ai-work { max-width: 1064px; margin-top: 96px; text-align: left; }
.ai-work h2 { font-family: var(--font-alt); font-weight: var(--fw-extrabold); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem); color: #fff; margin: 8px 0 0; }
.ai-work__lead { font-family: var(--font-alt); font-size: 1rem; line-height: 1.62; color: var(--ai-muted-2); max-width: 672px; margin-top: 16px; }
.ai-feature-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin: 40px 0 24px; }
.ai-feature-row li { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; background: var(--ai-surface); border: 1px solid var(--ai-line); border-radius: var(--r-md); padding: 17px; font-family: var(--font-alt); font-weight: var(--fw-semibold); font-size: .75rem; color: #cad5e2; }
.ai-feature__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgba(34, 211, 238, .19); background: linear-gradient(135deg, rgba(34, 211, 238, .12), rgba(16, 185, 129, .08)); color: var(--ai-cyan); }
.ai-feature__icon .icon { width: 20px; height: 20px; }
.ai-work__quote { font-family: var(--font-alt); font-style: italic; font-size: .875rem; color: #64748b; text-align: center; }

/* ----- Casos de uso (fondo claro) ----- */
.use-cases { background: #f8fafc; text-align: center; }
.use-cases__eyebrow { font-family: var(--font-head); font-weight: var(--fw-extrabold); font-size: 1.25rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c-green); }
.use-cases__title { font-family: var(--font-alt); font-weight: var(--fw-extrabold); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem); color: #1d293d; margin: 8px 0 48px; }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1104px; margin-inline: auto; text-align: left; }
.case-card { background: #fff; border: 1px solid #f1f5f9; border-radius: var(--r-lg); padding: 25px; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .08); }
.case-card__tag { font-family: var(--font-head); font-weight: var(--fw-extrabold); font-size: 1.25rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c-green); margin-bottom: 16px; }
.case-card__before, .case-card__after { font-family: var(--font-alt); font-size: .875rem; line-height: 1.4; }
.case-card__before { color: #6c7888; }
.case-card__after { color: #1d293d; font-weight: var(--fw-semibold); }
.case-card__before span, .case-card__after span { display: block; font-weight: var(--fw-bold); font-size: .625rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.case-card__before span { color: #90a1b9; }
.case-card__after span { color: var(--ai-emerald); }
.case-card__rule { display: block; height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--ai-emerald), var(--ai-cyan)); margin: 14px 0; }

/* ----- Cierre ----- */
.ai-close { background: linear-gradient(156deg, #071b0f 0%, #071220 55%, #040c18 100%); padding-block: 96px; }
.ai-close__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; max-width: 640px; }
.ai-close__mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-md); background: rgba(16, 185, 129, .1); border: 1px solid rgba(74, 222, 128, .25); }
.ai-close__quote { font-family: var(--font-alt); font-weight: var(--fw-medium); font-style: italic; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.25rem); line-height: 1.3; color: rgba(255, 255, 255, .82); }
.ai-close__note { font-family: var(--font-alt); font-weight: var(--fw-semibold); font-size: .75rem; color: var(--ai-cyan); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .ai-hero__inner { grid-template-columns: 1fr; gap: 24px; padding-block: 48px; min-height: 0; }
  .ai-hero__visual { order: -1; max-width: 340px; }
  .ai-float--tl { left: 0; }
  .ai-float--br { right: 0; }
  .ai-automation__head { flex-direction: column; gap: 16px; }
  .ai-automation__mark { display: none; }
  .flow { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .flow::before { display: none; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-emilia__inner { grid-template-columns: 1fr; gap: 32px; }
  .ai-feature-row { grid-template-columns: repeat(3, 1fr); }
  .case-grid { grid-template-columns: 1fr; max-width: 440px; }
  .process-track { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .flow { grid-template-columns: 1fr; }
  .flow::before { display: none; }
  .benefit-grid { grid-template-columns: 1fr; }
  .ai-feature-row { grid-template-columns: repeat(2, 1fr); }
  .process-track { grid-template-columns: repeat(2, 1fr); }
  .ai-hero__actions .ai-btn { flex: 1 1 100%; text-align: center; }
}
