@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  /* Paleta "Future Tech" */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --ink: #0f172a;       /* Texto casi negro */
  --muted: #64748b;     /* Gris azulado elegante */
  --brand: #0f766e;     /* Teal profundo */
  --brand-light: #14b8a6;
  --accent: #f97316;    /* Naranja para llamadas a la acción */
  --accent-glow: rgba(249, 115, 22, 0.4);
  --border: #e2e8f0;
  
  /* Efectos */
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- FONDO AURORA (Animación de fondo) --- */
.aurora-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
  background: radial-gradient(circle at top left, #fff 0%, #f1f5f9 100%);
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5;
  animation: floatOrb 15s infinite alternate ease-in-out;
}
.orb-1 { width: 600px; height: 600px; background: rgba(20, 184, 166, 0.1); top: -20%; left: -10%; }
.orb-2 { width: 500px; height: 500px; background: rgba(249, 115, 22, 0.08); bottom: -10%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: rgba(99, 102, 241, 0.08); top: 40%; left: 30%; animation-duration: 20s; }

@keyframes floatOrb { from { transform: translate(0,0); } to { transform: translate(40px, 60px); } }

/* --- TIPOGRAFÍA --- */
h1, h2, h3, .logo { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.02em; color: var(--ink); }
a { text-decoration: none; color: inherit; transition: all 0.2s; }

/* --- HEADER / NAV --- */
.topbar {
  padding: 18px 0; position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 30px -22px rgba(15, 23, 42, 0.35);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-transform: uppercase; }
.logo__mark {
  width: 36px; height: 36px; background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white; border-radius: 8px; display: grid; place-items: center;
}

.nav {
  display: flex;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.nav a:hover {
  color: var(--brand);
  background: rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}
.nav a:focus-visible { outline: 3px solid rgba(20, 184, 166, 0.35); outline-offset: 2px; }

.topbar-actions { display: flex; gap: 12px; }

/* --- BOTONES --- */
.button {
  padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 12px 24px -16px rgba(15, 23, 42, 0.4);
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1); }
.button--primary { background: var(--ink); color: white; }
.button--primary:hover { background: #000; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); }
.button--ghost {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.button--ghost:hover { border-color: var(--ink); background: #ffffff; }
.button--accent { background: var(--accent); color: white; }
.button--accent:hover { box-shadow: 0 10px 25px -5px var(--accent-glow); }
.button:focus-visible { outline: 3px solid rgba(20, 184, 166, 0.35); outline-offset: 2px; }

/* --- HERO SECTION --- */
.hero { padding: 100px 0 60px; text-align: center; }
.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4.5rem); line-height: 1.1; margin: 24px 0;
  background: linear-gradient(135deg, var(--ink) 0%, #475569 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.25rem; color: var(--muted); max-width: 700px; margin: 0 auto 32px; }
.hero-keywords {
  font-size: 0.95rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -16px;
}
.hero__cta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.badge {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--brand);
  padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.05em; display: inline-block;
}

/* --- PAGE HERO (Otras páginas marketing) --- */
.page-hero { padding: 90px 0 50px; }
.page-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  line-height: 1.1;
  margin: 16px 0;
  background: linear-gradient(135deg, var(--ink) 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-hero .hero__cta { justify-content: flex-start; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 680px; }
.hero-panel {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.hero-panel--call h3 { margin-top: 0; }
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.metric {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.metric strong { color: var(--ink); font-size: 1.1rem; }
.list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.list li { display: flex; gap: 10px; }
.list li::before { content: "•"; color: var(--brand); font-weight: 700; }
.grid { display: grid; gap: 30px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.section--alt { background: var(--bg-soft); }
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}
.cta {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.cta h2 { margin-top: 0; }

/* --- PRO SECTIONS --- */
.pro-band {
  position: relative;
  padding: 36px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 118, 110, 0.25));
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.pro-band::before {
  content: "";
  position: absolute;
  inset: -20% 40% 0 -10%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.25), transparent 60%);
}
.pro-band > * { position: relative; z-index: 1; }
.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: center;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.stat-card {
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.stat-card strong { font-size: 1.5rem; color: var(--ink); }
.stat-card.dark {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.2);
  color: #cbd5f5;
}
.stat-card.dark strong { color: #e2e8f0; }
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.timeline li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 6px;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
}

/* --- PHONE FLEET --- */
.phone-fleet {
  position: relative;
  height: 320px;
}
.phone-fleet__device {
  position: absolute;
  width: 140px;
  height: 220px;
  border-radius: 22px;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 25px 50px rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
  color: #e2e8f0;
  --rot: 0deg;
  --lift: -12px;
  transform: translateY(0) rotate(var(--rot));
  animation: floatPhone 5.5s ease-in-out infinite;
}
.phone-fleet__device::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4));
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.phone-fleet__device::after {
  content: "";
  position: absolute;
  bottom: 16px;
  width: 40%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}
.phone-fleet__device span {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
}
.pf-1 { left: 0; top: 40px; animation-delay: 0s; --rot: -4deg; }
.pf-2 { left: 90px; top: 0; animation-delay: -1s; --rot: 3deg; }
.pf-3 { right: 40px; top: 30px; animation-delay: -2s; --rot: -2deg; }
.pf-4 { right: 0; top: 90px; animation-delay: -3s; --rot: 4deg; }
.pf-glow {
  position: absolute;
  inset: 40% 0 0 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 60%);
  filter: blur(24px);
}
.phone-badge {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #e2e8f0;
}

/* --- TICKET WALL --- */
.ticket-wall { display: grid; gap: 12px; }
.ticket {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  animation: slideTicket 4.5s ease-in-out infinite;
}
.ticket:nth-child(2) { animation-delay: -1.2s; }
.ticket:nth-child(3) { animation-delay: -2.4s; }
.ticket:nth-child(4) { animation-delay: -3.6s; }
.ticket-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: #bbf7d0;
  font-size: 0.75rem;
}

/* --- ROUTE MAP --- */
.route-map {
  position: relative;
  height: 260px;
  border-radius: 18px;
  background: linear-gradient(160deg, #0f172a, #1e3a8a);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.route-path {
  position: absolute;
  inset: 18px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
}
.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  position: absolute;
  top: 30px;
  left: 30px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
  animation: routeMove 5s linear infinite;
}
.route-pin {
  position: absolute;
  bottom: 24px;
  right: 30px;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: #f97316;
  transform: rotate(-45deg);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
}
.route-pin::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
}

/* --- COST BARS --- */
.bar-chart { display: grid; gap: 10px; }
.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 999px;
  animation: barGlow 2.8s ease infinite;
}
.bar--80 span { width: 80%; }
.bar--65 span { width: 65%; }
.bar--50 span { width: 50%; }
.bar--90 span { width: 90%; }

@keyframes floatPhone {
  0% { transform: translateY(0) rotate(var(--rot)); }
  50% { transform: translateY(var(--lift)) rotate(var(--rot)); }
  100% { transform: translateY(0) rotate(var(--rot)); }
}
@keyframes slideTicket {
  0% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(6px); opacity: 0.9; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes routeMove {
  0% { transform: translate(0, 0); }
  50% { transform: translate(140px, 120px); }
  100% { transform: translate(0, 0); }
}
@keyframes barGlow {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

/* --- ROBOT --- */
.robot-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-xl);
}
.robot {
  width: 200px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
  place-items: center;
  position: relative;
  animation: floatRobot 6s ease-in-out infinite;
}
.robot-antenna {
  width: 10px;
  height: 28px;
  background: linear-gradient(180deg, #94a3b8, #0f172a);
  border-radius: 99px;
  position: relative;
}
.robot-antenna::after {
  content: "";
  width: 18px;
  height: 18px;
  background: #22d3ee;
  border-radius: 50%;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.6);
}
.robot-head {
  width: 160px;
  height: 90px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}
.robot-eye {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
}
.robot-mouth {
  position: absolute;
  bottom: 14px;
  width: 60px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
}
.robot-body {
  width: 180px;
  height: 120px;
  background: linear-gradient(160deg, #0f172a, #0b1220);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  position: relative;
  display: grid;
  place-items: center;
}
.robot-panel {
  display: flex;
  gap: 10px;
}
.robot-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}
.robot-arm {
  position: absolute;
  width: 40px;
  height: 10px;
  background: #1f2937;
  border-radius: 999px;
  top: 40%;
}
.robot-arm--left { left: -20px; transform: rotate(-10deg); }
.robot-arm--right { right: -20px; transform: rotate(10deg); }

/* --- MAP --- */
.map-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.map-embed {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 320px;
  display: block;
  position: relative;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}
.map-embed--img img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
  object-fit: cover;
}
.map-overlay {
  position: absolute;
  bottom: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes floatRobot {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* --- SHOWCASE / MOCKSHOTS --- */
.showcase { position: relative; }
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.mockshot {
  background: #0f172a;
  color: white;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}
.mockshot--wide { grid-column: span 2; }
.mockshot__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #cbd5f5;
  margin-bottom: 12px;
  font-weight: 700;
}
.mockshot__frame {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.mockshot__bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
}
.mockshot__row {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
}
.mockshot__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.7rem;
  color: #e2e8f0;
  width: fit-content;
}
.mockshot--kitchen { background: linear-gradient(145deg, #0f172a 0%, #064e3b 100%); }
.mockshot--delivery { background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 100%); }
.mockshot--apps { background: linear-gradient(145deg, #0f172a 0%, #0f766e 100%); }
.mockshot--costs { background: linear-gradient(145deg, #0f172a 0%, #7c2d12 100%); }

/* --- COSTES --- */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.cost-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.cost-card--highlight {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), #ffffff);
  box-shadow: 0 18px 36px -20px rgba(16, 185, 129, 0.45);
}
.cost-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 10px;
}
.cost-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.cost-total {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

/* --- PRICING / OFFER --- */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.pricing-card { position: relative; }
.pricing-card.highlight {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 18px 40px -22px rgba(15, 118, 110, 0.5);
}
.pill {
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--accent);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.price-tag {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 12px 0;
}
.price-tag span { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.breakdown {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

/* --- ANIMACIÓN: CAOS TELEFÓNICO (Index) --- */
.chaos-visual {
  background: #0f172a; border-radius: 24px; overflow: hidden;
  padding: 60px 20px; color: white; margin: 60px 0; position: relative;
  box-shadow: var(--shadow-xl);
}
.chaos-visual::before {
  content: "";
  position: absolute;
  inset: -20% 0 0 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(20, 184, 166, 0.18), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(249, 115, 22, 0.16), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.12), transparent 45%);
  opacity: 0.7;
}
.chaos-visual > * { position: relative; z-index: 1; }
.chaos-visual--expanded { padding: 80px 24px; }
.chaos-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: center; max-width: 900px; margin: 0 auto; }
.chaos-grid--expanded { max-width: 1100px; align-items: stretch; }
.chaos-side { text-align: center; }
.chaos-title { color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; font-weight: 700; margin-bottom: 20px; }

/* Saturación real (cola + móviles sonando) */
.chaos-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.queue-panel,
.ringing-panel,
.busy-panel,
.message-panel {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.panel-pill--danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}
.panel-meta { color: #cbd5f5; font-size: 0.75rem; }
.queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  margin-top: 8px;
  color: #e2e8f0;
  font-size: 0.85rem;
}
.queue-item.urgent {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
}
.busy-phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.busy-phone {
  background: #0b1220;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 14px;
  padding: 12px 8px;
  display: grid;
  gap: 6px;
  place-items: center;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #cbd5f5;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.8);
}
.busy-emoji { font-size: 1.4rem; }
.busy-phone--active {
  border-color: rgba(16, 185, 129, 0.6);
  color: #bbf7d0;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.35), rgba(15, 23, 42, 0.9));
}
.busy-phone--blocked {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}
.busy-phone--blocked::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  opacity: 0;
  animation: ringPulse 1.6s infinite;
}
.busy-delay-1::after { animation-delay: 0.2s; }
.busy-delay-2::after { animation-delay: 0.5s; }
.busy-note {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-size: 0.78rem;
}
.message-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.55));
}
.ringing-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ring-phone {
  --delay: 0s;
  width: 64px;
  height: 96px;
  border-radius: 14px;
  background: #0b1220;
  border: 2px solid #334155;
  display: grid;
  place-items: center;
  color: #fbbf24;
  font-size: 1.4rem;
  position: relative;
  animation: ringTilt 0.7s infinite;
  animation-delay: var(--delay);
}
.ring-phone::before,
.ring-phone::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  opacity: 0;
  animation: ringPulse 1.6s infinite;
  animation-delay: var(--delay);
}
.ring-phone::after { inset: -14px; animation-delay: calc(var(--delay) + 0.6s); }
.ring-delay-1 { --delay: 0s; }
.ring-delay-2 { --delay: 0.2s; }
.ring-delay-3 { --delay: 0.4s; }
.missed-title {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #fca5a5;
  font-weight: 700;
  margin-bottom: 6px;
}
.missed-item,
.message-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.85rem;
  color: #fecaca;
  border-bottom: 1px dashed rgba(248, 113, 113, 0.25);
}
.missed-item:last-child,
.message-item:last-child { border-bottom: none; }
.missed-dot { width: 6px; height: 6px; background: #f87171; border-radius: 50%; }
.chaos-note { margin-top: 20px; font-weight: 700; }
.chaos-note--bad { color: #fca5a5; }

/* Teléfonos temblando */
.phone-stack { position: relative; height: 240px; width: 100%; display: flex; justify-content: center; align-items: center; }
.phone-card {
  position: absolute; width: 140px; height: 80px; background: #334155; border: 2px solid #475569;
  border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 0.9rem; color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.ph-1 { transform: translateY(-60px) rotate(-5deg); z-index: 1; border-color: #ef4444; color: #ef4444; background: #1e293b; }
.ph-2 { transform: translateY(0px) rotate(5deg); z-index: 2; border-color: #f59e0b; color: #f59e0b; background: #1e293b; }
.ph-3 { transform: translateY(60px) rotate(-3deg); z-index: 3; background: #cbd5e1; color: #0f172a; }

.shaking { animation: shake 0.6s infinite; }
@keyframes shake { 
  0% { transform: translate(1px, 1px) rotate(0deg); }
  25% { transform: translate(-2px, -2px) rotate(-1deg); } 
  50% { transform: translate(2px, 1px) rotate(1deg); } 
  75% { transform: translate(-1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -1px) rotate(-1deg); }
}
@keyframes ringTilt {
  0% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
  100% { transform: rotate(-2deg); }
}
@keyframes ringPulse {
  0% { opacity: 0; transform: scale(0.9); }
  40% { opacity: 0.6; }
  100% { opacity: 0; transform: scale(1.2); }
}

/* Pantalla Zestia (Orden) */
.zestia-ui {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 20px; backdrop-filter: blur(10px);
  text-align: left; font-size: 0.85rem;
}
.zestia-ui--queue {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(2, 6, 23, 0.65));
  border: 1px solid rgba(94, 234, 212, 0.2);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.z-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}
.z-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #bbf7d0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.z-queue { display: grid; gap: 8px; }
.z-queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}
.z-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5f5;
  font-size: 0.8rem;
}
.z-meta { color: #94a3b8; }
.z-row { display: flex; justify-content: space-between; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.z-row:last-child { border-bottom: none; }
.z-status-ok { color: #4ade80; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.z-status-ok::before { content:""; width:6px; height:6px; background:#4ade80; border-radius:50%; }

.vs-pill { background: rgba(255,255,255,0.1); padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: 0.8rem; }

/* --- LOGIN GLASS (Login Page) --- */
body.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: radial-gradient(circle at center, #f8fafc 0%, #e2e8f0 100%);
}
.login-glass {
  width: min(400px, 90%); background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 24px;
  padding: 40px; box-shadow: 0 40px 80px -20px rgba(0,0,0,0.15);
  text-align: center;
}
.login-glass h1 { margin: 10px 0 30px; font-size: 1.8rem; }
.login-glass input {
  width: 100%; padding: 14px; margin-bottom: 16px; border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1); background: rgba(255,255,255,0.5);
  transition: all 0.2s; font-size: 1rem;
}
.login-glass input:focus { outline: none; background: white; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2); }
.login-glass .button { width: 100%; margin-top: 10px; padding: 14px; font-size: 1.05rem; }

/* --- PORTAL / ADMIN (Para que no se rompa el backend) --- */
.portal-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.portal-nav { background: #fff; border-right: 1px solid var(--border); padding: 24px; }
.portal-link { display: block; padding: 10px; color: var(--muted); border-radius: 8px; margin-bottom: 4px; }
.portal-link:hover { background: var(--bg-soft); color: var(--ink); }
.portal-main { padding: 40px; }
.portal-header { margin-bottom: 32px; }
.portal-card { background: white; padding: 24px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.portal-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.portal-table th, .portal-table td { padding: 14px; text-align: left; border-bottom: 1px solid var(--border); }

/* --- UTILIDADES --- */
.container { width: min(1200px, 100%); margin: 0 auto; padding: 0 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card {
  background: white; padding: 32px; border-radius: 20px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); border-color: var(--brand-light); }
.section { padding: 80px 0; }
.section-alt { background: var(--bg-soft); }
.text-center { text-align: center; }
.alert { padding: 12px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; text-align: left; }
.alert--bad { background: #fee2e2; color: #b91c1c; }

/* --- MOBILE --- */
@media (max-width: 768px) {
  .topbar__inner { flex-direction: column; gap: 16px; }
  .nav {
    width: 100%;
    overflow-x: auto;
    padding: 8px;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.9);
  }
  .chaos-grid { grid-template-columns: 1fr; gap: 40px; }
  .chaos-split { grid-template-columns: 1fr; }
  .busy-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero { padding: 70px 0 40px; }
  .page-hero .hero__cta { justify-content: center; }
  .mockshot--wide { grid-column: span 1; }
  .pro-band { padding: 24px; }
  .phone-fleet { height: 260px; }
  .phone-fleet__device { width: 120px; height: 190px; }
  .route-map { height: 220px; }
  .robot { width: 160px; }
  .map-embed { min-height: 240px; }
  .portal-layout { grid-template-columns: 1fr; }
  .portal-nav { display: none; } /* Simplificado para móvil */
  .hero h1 { font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
