:root {
  --purple-950: #211032;
  --purple-900: #2e1a47;
  --purple-800: #432064;
  --purple-700: #5e2d91;
  --purple-600: #7142a5;
  --purple-500: #7b4bb7;
  --purple-200: #d9c9f0;
  --purple-100: #ede6f8;
  --purple-50: #f6f3fb;
  --yellow: #f2b705;
  --yellow-soft: #fcefc9;
  --ink: #343140;
  --muted: #6e6385;
  --line: #e5dff0;
  --white: #ffffff;
  --success: #247a58;
  --warning: #a96b00;
  --danger: #a63d58;
  --shadow: 0 18px 50px rgba(46, 26, 71, 0.1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--purple-50);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--purple-950);
  background: var(--yellow);
  border-radius: 8px;
  font-weight: 800;
}

.skip-link:focus { top: 16px; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 800;
  border-bottom: 1px solid rgba(94, 45, 145, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 900;
  color: var(--purple-900);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--yellow);
  background: var(--purple-700);
  border-radius: 9px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.8);
  font-size: 20px;
}

.brand small {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a {
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.desktop-nav a:hover, .desktop-nav a[aria-current="page"] {
  color: var(--purple-700);
  background: var(--purple-50);
}

.nav-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.nav-cta, .button-primary {
  color: var(--white);
  background: var(--purple-700);
  box-shadow: 0 8px 22px rgba(94, 45, 145, .18);
}

.nav-cta:hover, .button-primary:hover {
  background: var(--purple-800);
  transform: translateY(-1px);
}

.button-secondary {
  color: var(--purple-700);
  border-color: var(--purple-200);
  background: var(--white);
}

.button-secondary:hover { background: var(--purple-50); }

.button-quiet {
  min-height: 38px;
  padding-inline: 12px;
  color: var(--purple-700);
  border-color: var(--line);
  background: var(--white);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--purple-900);
  background: var(--white);
  font-size: 20px;
}

.mobile-nav {
  display: none;
  padding: 10px 20px 20px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.mobile-nav.is-open { display: grid; gap: 6px; }
.mobile-nav a { padding: 12px; text-decoration: none; font-weight: 700; border-radius: 8px; }
.mobile-nav a:hover { background: var(--purple-50); color: var(--purple-700); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--purple-700);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "★";
  color: var(--yellow);
  font-size: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  background:
    radial-gradient(circle at 86% 15%, rgba(123,75,183,.18), transparent 26%),
    linear-gradient(135deg, #fff 0%, var(--purple-50) 58%, #eee7f8 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -260px;
  width: 540px;
  height: 540px;
  border: 90px solid rgba(94,45,145,.05);
  border-radius: 50%;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  align-items: center;
  gap: 64px;
}

.hero h1, .balamo-hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--purple-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6vw, 76px);
  line-height: .99;
  letter-spacing: -.045em;
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-proof li::before { content: "✓"; margin-right: 7px; color: var(--success); }

.territory-card {
  position: relative;
  padding: 28px;
  color: var(--white);
  background: linear-gradient(155deg, var(--purple-900), var(--purple-700));
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 80px rgba(46,26,71,.26);
}

.territory-card::before {
  content: "★";
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--yellow);
  font-size: 32px;
}

.territory-card h2 { margin: 8px 0 20px; font-size: 25px; letter-spacing: -.03em; }
.territory-card p { margin: 0; color: rgba(255,255,255,.72); font-size: 14px; }

.mini-bars { display: grid; gap: 13px; margin-top: 26px; }
.mini-bar-header { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; font-weight: 700; }
.mini-track { height: 8px; overflow: hidden; margin-top: 7px; background: rgba(255,255,255,.13); border-radius: 999px; }
.mini-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), #ffd95e); border-radius: inherit; }

.demo-notice {
  border-block: 1px solid #eadca7;
  color: #735600;
  background: var(--yellow-soft);
}

.demo-notice .container {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.section { padding: 82px 0; }
.section-white { background: var(--white); }
.section-purple { color: var(--white); background: var(--purple-900); }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  color: var(--purple-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.section-heading p { max-width: 560px; margin: 10px 0 0; color: var(--muted); }
.section-purple .section-heading h2, .section-purple .section-heading p { color: var(--white); }

.solution-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.solution-card { position: relative; overflow: hidden; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 16px 42px rgba(46, 26, 71, .08); }
.solution-card-map { background: linear-gradient(150deg, #fff, var(--purple-50)); }
.solution-card-trainer { color: var(--white); border-color: transparent; background: linear-gradient(145deg, var(--purple-900), var(--purple-700)); }
.solution-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 24px; color: var(--purple-700); background: var(--yellow-soft); border-radius: 15px; font-size: 27px; font-weight: 900; }
.solution-kicker { margin: 0 0 5px; color: var(--purple-700); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.solution-card-trainer .solution-kicker { color: var(--yellow); }
.solution-card h3 { margin: 0 0 13px; color: var(--purple-900); font-family: Georgia, serif; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.03em; }
.solution-card-trainer h3 { color: var(--white); }
.solution-card > p:not(.solution-kicker) { margin: 0; color: var(--muted); font-size: 15px; }
.solution-card-trainer > p:not(.solution-kicker) { color: rgba(255,255,255,.76); }
.feature-list { display: grid; gap: 10px; margin: 22px 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 24px; font-size: 14px; font-weight: 650; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.solution-card-trainer .feature-list li::before { color: var(--yellow); }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--purple-700); font-weight: 900; text-decoration: none; }
.solution-card-trainer .text-link { color: var(--yellow); }
.text-link:hover { text-decoration: underline; }

.intelligence-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); background: var(--line); border-radius: var(--radius-md); }
.intelligence-strip > div { padding: 18px; background: var(--white); }
.intelligence-label { display: block; margin-bottom: 6px; color: var(--purple-700); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.intelligence-strip strong { color: var(--purple-900); font-size: 13px; }

.filters-card, .panel, .kpi-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 9px 30px rgba(46, 26, 71, .055);
}

.filters-card { padding: 18px; margin-bottom: 18px; }
.filters-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.filters-top h3 { margin: 0; color: var(--purple-900); font-size: 16px; }
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.field select {
  width: 100%;
  min-height: 43px;
  padding: 0 34px 0 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
.field select:disabled { color: #aaa3b3; background: #f4f1f6; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { padding: 18px; }
.kpi-label { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.kpi-value { display: block; margin-top: 6px; color: var(--purple-900); font-size: clamp(26px, 3vw, 36px); font-weight: 900; letter-spacing: -.04em; }
.kpi-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.kpi-detail.positive { color: var(--success); font-weight: 800; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr); gap: 18px; }
.panel { overflow: hidden; }
.panel-header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; color: var(--purple-900); font-size: 16px; }
.panel-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 18px; }

#electoral-map { height: 520px; background: #ebe6f2; }
.leaflet-container { font-family: inherit; }
.leaflet-tooltip { border: 0; border-radius: 9px; box-shadow: var(--shadow); font-size: 12px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; }

.ai-chat-panel { display: flex; flex-direction: column; min-width: 0; background: var(--white); }
.chat-header { justify-content: flex-start; flex-shrink: 0; }
.chat-agent-avatar, .chat-message-avatar { display: grid; place-items: center; flex: 0 0 auto; color: var(--white); background: linear-gradient(145deg, var(--purple-600), var(--purple-900)); font-size: 10px; font-weight: 900; }
.chat-agent-avatar { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 8px 18px rgba(94,45,145,.2); }
.chat-agent-name { display: flex; align-items: center; gap: 7px; }
.chat-online-dot { width: 7px; height: 7px; background: #32a775; border: 2px solid #d8f3e7; border-radius: 50%; box-sizing: content-box; }
.chat-messages { min-height: 250px; flex: 1; display: flex; flex-direction: column; gap: 13px; overflow-y: auto; padding: 18px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--purple-200) transparent; }
.chat-message { display: flex; align-items: flex-end; gap: 8px; }
.chat-message p { max-width: 88%; margin: 0; padding: 11px 13px; border-radius: 14px; font-size: 12px; line-height: 1.45; }
.chat-message-avatar { width: 25px; height: 25px; border-radius: 8px; font-size: 8px; }
.chat-message-assistant p { color: var(--purple-900); background: var(--purple-50); border-bottom-left-radius: 4px; }
.chat-message-user { justify-content: flex-end; }
.chat-message-user p { color: var(--white); background: var(--purple-700); border-bottom-right-radius: 4px; }
.chat-context-notice { align-self: center; padding: 5px 10px; color: var(--muted); background: #f3f0f5; border-radius: 999px; font-size: 10px; text-align: center; }
.chat-typing { display: flex; align-items: center; gap: 4px; min-width: 52px; height: 38px; padding: 0 13px; background: var(--purple-50); border-radius: 14px 14px 14px 4px; }
.chat-typing i { width: 5px; height: 5px; background: var(--purple-500); border-radius: 50%; animation: chat-pulse 1s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-pulse { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-suggestions { flex-shrink: 0; padding: 11px 14px; border-top: 1px solid var(--line); }
.chat-suggestions > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.quick-questions { display: flex; flex-wrap: wrap; gap: 6px; }
.question-chip { padding: 7px 9px; color: var(--purple-700); border: 1px solid var(--purple-200); background: var(--white); border-radius: 999px; font-size: 10px; font-weight: 800; }
.question-chip:hover { color: var(--white); background: var(--purple-700); border-color: var(--purple-700); }
.chat-composer { flex-shrink: 0; display: flex; gap: 8px; padding: 10px 14px 6px; border-top: 1px solid var(--line); }
.chat-composer input { min-width: 0; flex: 1; height: 42px; padding: 0 13px; color: var(--ink); border: 1px solid var(--line); background: var(--purple-50); border-radius: 12px; font-size: 12px; }
.chat-composer input::placeholder { color: #938a9e; }
.chat-composer input:focus { border-color: var(--purple-500); outline: 3px solid rgba(111,60,160,.13); }
.chat-composer button { width: 42px; height: 42px; flex: 0 0 auto; color: var(--white); border: 0; background: var(--purple-700); border-radius: 12px; font-size: 20px; font-weight: 800; }
.chat-composer button:hover { background: var(--purple-900); }
.chat-composer button:disabled, .chat-composer input:disabled { cursor: wait; opacity: .6; }
.chat-disclaimer { flex-shrink: 0; margin: 0; padding: 0 14px 10px; color: var(--muted); font-size: 9px; text-align: center; }

.macrozone-panel { margin-top: 18px; background: linear-gradient(135deg, #fff 0%, #fff 68%, #faf7fd 100%); }
.macrozone-header { min-height: 76px; }
.panel-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.dashboard-badge { display: inline-flex; padding: 4px 7px; color: var(--purple-700); background: var(--purple-100); border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.macrozone-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.macrozone-metric { padding: 7px 10px; color: var(--purple-900); background: var(--yellow-soft); border-radius: 9px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.macrozone-reset { min-height: 34px; padding: 8px 11px; font-size: 10px; white-space: nowrap; }
.macrozone-content { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; padding: 18px; }
.macrozone-chart-wrap { min-width: 0; height: 310px; padding: 4px 10px 0; border: 1px solid var(--line); background: rgba(255,255,255,.78); border-radius: 14px; }
.macrozone-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: stretch; }
.macrozone-stat { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 15px; color: inherit; border: 1px solid var(--line); background: var(--white); border-radius: 14px; box-shadow: 0 8px 24px rgba(46,26,71,.05); text-align: left; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.macrozone-stat:hover { transform: translateY(-2px); border-color: var(--purple-200); box-shadow: 0 12px 28px rgba(46,26,71,.1); }
.macrozone-stat.is-selected { border-color: var(--purple-700); box-shadow: 0 0 0 2px rgba(94,45,145,.12), 0 12px 28px rgba(46,26,71,.1); }
.macrozone-stat > div { display: flex; align-items: center; gap: 7px; }
.macrozone-dot { width: 8px; height: 8px; flex: 0 0 auto; background: var(--macrozone-color); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--macrozone-color) 16%, transparent); }
.macrozone-stat strong { color: var(--purple-900); font-size: 12px; }
.macrozone-stat b { display: block; margin-top: 11px; color: var(--purple-900); font-size: clamp(20px, 2.2vw, 28px); line-height: 1; letter-spacing: -.03em; }
.macrozone-stat small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.chart-wrap { height: 300px; }

.table-panel { margin-top: 18px; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); background: var(--purple-50); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:hover { background: #fbf9fd; }
.status-pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.status-fuerte { color: #fff; background: var(--purple-700); }
.status-competitiva { color: #56370a; background: var(--yellow-soft); }
.status-recuperacion { color: #78425a; background: #f5dbe5; }
.status-baja-presencia { color: #5c5662; background: #ece9ee; }
.table-pagination { min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 12px 18px; background: #fff; }
.rows-per-page { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.rows-per-page select { min-width: 70px; padding: 8px 30px 8px 10px; color: var(--purple-900); border: 1px solid var(--line); background: var(--white); border-radius: 8px; font: inherit; font-weight: 800; cursor: pointer; }
.rows-per-page select:focus-visible, .pagination-button:focus-visible { outline: 3px solid rgba(111,60,160,.22); outline-offset: 2px; }
.table-range { margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pagination-controls, .pagination-pages { display: flex; align-items: center; gap: 6px; }
.pagination-controls { justify-self: end; }
.pagination-button { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 9px; color: var(--purple-700); border: 1px solid var(--line); background: var(--white); border-radius: 8px; font-size: 12px; font-weight: 800; }
.pagination-button:hover:not(:disabled), .pagination-button.is-active { color: var(--white); border-color: var(--purple-700); background: var(--purple-700); }
.pagination-button:disabled { color: #aaa4ad; background: #f6f4f7; cursor: not-allowed; }
.pagination-direction { min-width: auto; }
.pagination-ellipsis { min-width: 18px; color: var(--muted); text-align: center; }

.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.method-card { padding: 24px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-md); background: rgba(255,255,255,.06); }
.method-number { color: var(--yellow); font-family: Georgia, serif; font-size: 30px; font-weight: 900; }
.method-card h3 { margin: 12px 0 8px; font-size: 19px; }
.method-card p { margin: 0; color: rgba(255,255,255,.7); font-size: 14px; }

.voice-studio-demo { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 10px; padding: 10px; color: var(--white); background: #0d0c10; border: 1px solid #252229; border-radius: 28px; box-shadow: 0 28px 80px rgba(28,18,38,.2); }
.voice-call-stage { position: relative; min-height: 620px; display: flex; flex-direction: column; align-items: center; overflow: hidden; padding: 22px 28px 18px; background: radial-gradient(circle at 50% 38%, rgba(105,67,137,.3), transparent 28%), linear-gradient(150deg, #17141c, #0e0d11 68%); border: 1px solid rgba(255,255,255,.08); border-radius: 21px; }
.voice-call-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .4; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 80%); }
.voice-call-header { position: relative; z-index: 2; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.voice-call-header > div { display: flex; align-items: center; gap: 8px; }
.voice-call-header strong { font-size: 11px; }
.voice-call-header small { color: rgba(255,255,255,.52); font-size: 10px; font-variant-numeric: tabular-nums; }
.voice-live-dot { width: 7px; height: 7px; background: #54d49b; border-radius: 50%; box-shadow: 0 0 0 4px rgba(84,212,155,.12); animation: voice-status-pulse 1.8s ease-in-out infinite; }
.voice-text-button { padding: 8px 11px; color: rgba(255,255,255,.76); border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); border-radius: 10px; font-size: 10px; font-weight: 800; }
.voice-text-button:hover { color: var(--white); background: rgba(255,255,255,.1); }
.voice-avatar-scene { position: relative; width: 244px; height: 244px; display: grid; place-items: center; margin: 48px auto 22px; }
.voice-avatar-orbit, .voice-avatar-orbit i { position: absolute; inset: 0; border: 1px solid rgba(190,151,220,.2); border-radius: 50%; }
.voice-avatar-orbit i:nth-child(1) { inset: 15px; }
.voice-avatar-orbit i:nth-child(2) { inset: 32px; }
.voice-avatar-orbit i:nth-child(3) { inset: 48px; }
.is-speaking .voice-avatar-orbit { animation: voice-orbit-pulse 2.4s ease-out infinite; }
.is-speaking .voice-avatar-orbit i:nth-child(2) { animation: voice-orbit-pulse 2.4s .45s ease-out infinite; }
.voice-avatar-frame { position: relative; z-index: 2; width: 154px; height: 154px; overflow: hidden; border: 3px solid rgba(255,255,255,.88); border-radius: 50%; box-shadow: 0 0 0 9px rgba(118,72,153,.18), 0 20px 50px rgba(0,0,0,.42); }
.voice-avatar-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.is-speaking .voice-avatar-frame img { animation: voice-avatar-breathe 3s ease-in-out infinite; }
.voice-avatar-status { position: absolute; right: 10px; bottom: 14px; z-index: 3; width: 15px; height: 15px; background: #54d49b; border: 3px solid #17141c; border-radius: 50%; }
.voice-conversation-status { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; text-align: center; }
.voice-conversation-status strong { font-size: 13px; }
.voice-conversation-status span { color: #bda9ca; font-size: 10px; }
.studio-voice-wave { position: relative; z-index: 2; height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.studio-voice-wave span { width: 3px; height: 9px; background: linear-gradient(to top, #8d62ba, #f0d8ff); border-radius: 99px; transform-origin: center; }
.is-speaking .studio-voice-wave span { animation: studio-wave 1.05s ease-in-out infinite; }
.studio-voice-wave span:nth-child(2n) { animation-delay: -.22s; }
.studio-voice-wave span:nth-child(3n) { animation-delay: -.47s; }
.studio-voice-wave span:nth-child(4n) { animation-delay: -.68s; }
.voice-call-controls { position: relative; z-index: 2; display: flex; gap: 12px; margin-top: auto; }
.voice-agent-widget { width: min(100%, 520px); min-height: 76px; display: grid; align-items: center; padding: 10px; overflow: visible; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); border-radius: 18px; box-shadow: 0 14px 32px rgba(0,0,0,.24); backdrop-filter: blur(12px); }
.voice-agent-widget elevenlabs-convai { --el-bg-color: #1b1820; --el-text-color: #fff; --el-border-color: #3b3342; --el-border-radius: 16px; --el-btn-color: #6d35a1; --el-btn-text-color: #fff; --el-btn-radius: 12px; --el-focus-color: #f2b705; position: absolute !important; right: 50% !important; bottom: 10px !important; z-index: 10; width: 100%; max-width: 100%; display: block; color-scheme: dark; transform: translateX(50%); }
.voice-control { min-width: 82px; display: grid; justify-items: center; gap: 5px; color: rgba(255,255,255,.75); border: 0; background: transparent; }
.voice-control > span { width: 46px; height: 46px; display: grid; place-items: center; color: var(--white); border: 1px solid rgba(255,255,255,.14); background: #252229; border-radius: 50%; font-size: 18px; }
.voice-control small { font-size: 9px; font-weight: 800; }
.voice-control:hover > span, .voice-control[aria-pressed="true"] > span { background: var(--purple-700); border-color: var(--purple-500); }
.voice-control-end > span { background: #b9405e; border-color: #cf5a75; font-size: 26px; }
.voice-simulation-note { position: relative; z-index: 2; margin: 10px 0 0; color: rgba(255,255,255,.35); font-size: 8px; }
.voice-evaluation-panel { display: flex; flex-direction: column; padding: 22px; color: var(--ink); background: #f7f5f8; border-radius: 21px; }
.voice-evaluation-panel > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid #e3dee7; }
.voice-evaluation-panel > header span:first-child { display: block; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.voice-evaluation-panel > header strong { display: block; margin-top: 3px; color: var(--purple-900); font-size: 14px; }
.evaluation-live { padding: 5px 7px; color: #247a58; background: #dff4ea; border-radius: 99px; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.voice-score-overview { display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 16px; padding: 22px 0; }
.voice-score-dial { --score-angle: 302deg; width: 100px; height: 100px; display: grid; place-items: center; background: conic-gradient(var(--purple-700) var(--score-angle), #e5e0e8 0); border-radius: 50%; }
.voice-score-dial::before { content: ""; grid-area: 1 / 1; width: 78px; height: 78px; background: #f7f5f8; border-radius: 50%; }
.voice-score-dial > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.voice-score-dial strong { color: var(--purple-900); font-size: 27px; line-height: 1; }
.voice-score-dial span { color: var(--muted); font-size: 10px; }
.voice-score-overview > div:last-child > strong { color: var(--purple-900); font-size: 13px; }
.voice-score-overview p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.voice-score-metrics { display: grid; gap: 12px; }
.voice-score-metrics > div > span { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.voice-score-metrics strong, .voice-score-metrics b { color: var(--purple-900); font-size: 10px; }
.voice-score-metrics > div > i { position: relative; height: 5px; display: block; overflow: hidden; background: #e5e0e8; border-radius: 99px; }
.voice-score-metrics > div > i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--metric-score); background: linear-gradient(90deg, var(--purple-700), #9b72bd); border-radius: inherit; }
.voice-live-feedback { margin-top: 20px; padding: 13px; border: 1px solid #ddd4e4; background: #fff; border-radius: 13px; }
.voice-live-feedback span { color: var(--purple-700); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.voice-live-feedback p { margin: 5px 0 0; color: var(--purple-900); font-size: 10px; line-height: 1.5; }
.voice-transcript-preview { display: grid; gap: 9px; margin-top: auto; padding-top: 18px; }
.voice-transcript-preview > div { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.voice-transcript-preview span { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--purple-700); border-radius: 7px; font-size: 7px; font-weight: 900; }
.voice-transcript-preview .is-user span { color: var(--purple-900); background: var(--yellow); }
.voice-transcript-preview p { margin: 0; padding: 7px 9px; color: var(--muted); background: #fff; border-radius: 9px; font-size: 9px; }
.voice-studio-meta { display: grid; grid-template-columns: minmax(260px,.7fr) 1.3fr; align-items: center; gap: 24px; margin-top: 14px; padding: 17px 20px; border: 1px solid var(--line); background: var(--purple-50); border-radius: 16px; }
.voice-studio-meta > div:first-child span { display: block; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.voice-studio-meta > div:first-child strong { display: block; margin-top: 4px; color: var(--purple-900); font-size: 12px; }
.candidate-scope { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.candidate-scope > strong { color: var(--purple-900); font-size: 10px; }
.candidate-scope > div { display: flex; flex-wrap: wrap; gap: 6px; }
.candidate-scope span { padding: 6px 8px; color: var(--purple-700); background: var(--white); border: 1px solid var(--purple-200); border-radius: 999px; font-size: 8px; font-weight: 900; }
.voice-studio-demo.is-user-turn .voice-avatar-orbit { border-color: rgba(242,183,5,.38); }
.voice-studio-demo.is-user-turn .studio-voice-wave span { background: var(--yellow); }
.voice-studio-demo.is-paused .voice-live-dot, .voice-studio-demo.is-paused .voice-avatar-orbit, .voice-studio-demo.is-paused .voice-avatar-orbit i, .voice-studio-demo.is-paused .voice-avatar-frame img, .voice-studio-demo.is-paused .studio-voice-wave span { animation-play-state: paused; }
.voice-studio-demo.is-ended .voice-avatar-orbit, .voice-studio-demo.is-ended .studio-voice-wave { opacity: .25; }
@keyframes voice-status-pulse { 50% { opacity: .45; box-shadow: 0 0 0 7px rgba(84,212,155,.05); } }
@keyframes voice-orbit-pulse { 0% { opacity: .2; transform: scale(.84); } 55% { opacity: .68; } 100% { opacity: 0; transform: scale(1.05); } }
@keyframes voice-avatar-breathe { 0%,100% { transform: scale(1.02) translateY(0); } 50% { transform: scale(1.06) translateY(-2px); } }
@keyframes studio-wave { 0%,100% { height: 8px; opacity: .45; } 50% { height: 35px; opacity: 1; } }

.delivery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.delivery-card { padding: 26px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(46,26,71,.055); }
.delivery-card > span { width: 46px; height: 46px; display: grid; place-items: center; color: var(--purple-700); background: var(--purple-100); border-radius: 12px; font-size: 23px; font-weight: 900; }
.delivery-card h3 { margin: 19px 0 8px; color: var(--purple-900); font-size: 19px; }
.delivery-card p { margin: 0; color: var(--muted); font-size: 14px; }
.delivery-card-private { color: var(--white); border-color: transparent; background: var(--purple-900); }
.delivery-card-private > span { color: var(--purple-900); background: var(--yellow); }
.delivery-card-private h3 { color: var(--white); }
.delivery-card-private p { color: rgba(255,255,255,.72); }

.cta-band { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 34px; color: var(--white); background: linear-gradient(130deg, var(--purple-700), var(--purple-900)); border-radius: var(--radius-lg); }
.cta-band h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; }
.cta-band p { max-width: 650px; margin: 0; color: rgba(255,255,255,.72); }
.cta-band .button { color: var(--purple-900); background: var(--yellow); }

.site-footer { padding: 38px 0; color: rgba(255,255,255,.72); background: var(--purple-950); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.footer-grid p { margin: 7px 0 0; font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-links a { font-size: 13px; font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: var(--yellow); }

.balamo-hero { padding: 92px 0 76px; background: var(--white); }
.balamo-hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 60px; }
.balamo-hero p { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: 19px; }
.team-collage { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; padding: 20px; background: var(--purple-100); border-radius: var(--radius-lg); }
.team-collage img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border: 4px solid var(--white); border-radius: 15px; box-shadow: 0 10px 26px rgba(46,26,71,.15); }
.team-collage img:nth-child(2) { transform: translateY(-15px); }

.plain-intro { max-width: 760px; margin-bottom: 34px; }
.plain-intro h2 { margin: 0; color: var(--purple-900); font-family: Georgia, serif; font-size: clamp(34px, 4vw, 50px); line-height: 1.05; letter-spacing: -.035em; }
.plain-intro p { color: var(--muted); font-size: 17px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service-card { padding: 26px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-md); }
.service-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--purple-700); background: var(--purple-100); border-radius: 12px; font-size: 20px; font-weight: 900; }
.service-card h3 { margin: 20px 0 9px; color: var(--purple-900); }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; }

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process-card { padding: 22px; border-top: 3px solid var(--yellow); background: var(--white); border-radius: 0 0 var(--radius-md) var(--radius-md); box-shadow: 0 10px 28px rgba(46,26,71,.07); }
.process-card b { color: var(--purple-700); font-size: 12px; }
.process-card h3 { margin: 9px 0 7px; color: var(--purple-900); font-size: 17px; }
.process-card p { margin: 0; color: var(--muted); font-size: 13px; }

.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.person-card { overflow: hidden; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-md); }
.person-card img { width: 100%; height: 290px; object-fit: cover; object-position: top; background: var(--purple-100); }
.person-body { padding: 22px; }
.person-body h3 { margin: 0; color: var(--purple-900); font-size: 20px; }
.person-role { margin: 5px 0 14px; color: var(--purple-700); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.person-body p { margin: 0; color: var(--muted); font-size: 14px; }
.person-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.person-tags span { padding: 5px 8px; color: var(--purple-700); background: var(--purple-50); border-radius: 7px; font-size: 10px; font-weight: 800; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-card { padding: 28px; color: var(--white); background: var(--purple-900); border-radius: var(--radius-lg); }
.contact-card:nth-child(2) { color: var(--ink); background: var(--yellow-soft); }
.contact-card h3 { margin: 0 0 12px; font-size: 24px; }
.contact-card p { margin: 0 0 20px; opacity: .75; }
.contact-list { display: grid; gap: 8px; }
.contact-list a { font-weight: 700; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.loading-state { min-height: 460px; display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .desktop-nav, .nav-cta { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .hero-grid, .balamo-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 64px; }
  .territory-card { max-width: 620px; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .ai-chat-panel { min-height: 560px; }
  .macrozone-content { grid-template-columns: 1fr; }
  .macrozone-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #electoral-map { height: 470px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .voice-studio-demo { grid-template-columns: 1fr; }
  .voice-call-stage { min-height: 590px; }
  .voice-evaluation-panel { min-height: 520px; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 28px, 1180px); }
  .section { padding: 62px 0; }
  .hero { padding: 54px 0 50px; }
  .hero h1, .balamo-hero h1 { font-size: clamp(40px, 13vw, 58px); }
  .hero-actions .button { width: 100%; }
  .section-heading { display: block; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid, .chart-grid, .method-grid, .service-grid, .people-grid, .contact-grid, .solution-grid, .delivery-grid, .intelligence-strip { grid-template-columns: 1fr; }
  .chart-wrap { height: 270px; }
  #electoral-map { height: 410px; }
  .panel-header { align-items: flex-start; }
  .table-actions { flex-wrap: wrap; justify-content: flex-end; }
  .macrozone-header { align-items: flex-start; }
  .macrozone-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-call-stage { min-height: 560px; padding-inline: 18px; }
  .voice-avatar-scene { width: 210px; height: 210px; margin-top: 38px; }
  .voice-avatar-frame { width: 140px; height: 140px; }
  .voice-studio-meta { grid-template-columns: 1fr; }
  .candidate-scope { justify-content: flex-start; }
  .table-pagination { grid-template-columns: 1fr auto; }
  .pagination-controls { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
  .cta-band, .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .team-collage { padding: 12px; }
  .person-card img { height: 340px; }
}

@media (max-width: 460px) {
  .filters { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .hero-proof { display: grid; gap: 9px; }
  .territory-card { padding: 22px; }
  .filters-top { align-items: flex-start; }
  .macrozone-header { display: grid; }
  .macrozone-actions { justify-content: flex-start; }
  .macrozone-content { padding: 12px; }
  .macrozone-chart-wrap { height: 280px; padding-inline: 2px; }
  .macrozone-stat { padding: 12px; }
  .voice-studio-demo { padding: 6px; border-radius: 22px; }
  .voice-call-stage, .voice-evaluation-panel { border-radius: 17px; }
  .voice-call-stage { min-height: 530px; padding: 16px 12px; }
  .voice-avatar-scene { width: 184px; height: 184px; margin: 30px 0 18px; }
  .voice-avatar-frame { width: 122px; height: 122px; }
  .voice-agent-widget { min-height: 70px; padding: 8px; border-radius: 15px; }
  .voice-evaluation-panel { min-height: 500px; padding: 17px; }
  .voice-score-overview { grid-template-columns: 90px 1fr; gap: 12px; }
  .voice-score-dial { width: 86px; height: 86px; }
  .voice-score-dial::before { width: 66px; height: 66px; }
  .voice-studio-meta { padding: 15px; }
  .table-pagination { grid-template-columns: 1fr; gap: 12px; }
  .rows-per-page, .table-range { justify-self: center; }
  .pagination-controls { grid-column: auto; width: 100%; }
  .pagination-pages { flex: 1; justify-content: center; }
  .pagination-direction { font-size: 0; }
  .pagination-direction::before { font-size: 18px; }
  #table-page-previous::before { content: "‹"; }
  #table-page-next::before { content: "›"; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .chat-typing i { animation: none; }
  .voice-live-dot, .voice-avatar-orbit, .voice-avatar-orbit i, .voice-avatar-frame img, .studio-voice-wave span { animation: none !important; }
}
