/* =============================================================
 *  elbocadeurna · design system
 * ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

:root {
  --brand: #0e2a47;       /* azul tinta */
  --brand-2: #1c4e80;
  --celeste: #4aa3df;     /* celeste argentino */
  --celeste-soft: #d8ecfa;
  --accent: #ff6a3d;      /* coral CTA (no partidario) */
  --accent-2: #ffb020;
  --ok: #15b097;
  --warn: #f2a516;
  --bad: #e03a3a;

  --bg: #f5f7fb;
  --bg-soft: #eef2f8;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --ink: #16202c;
  --ink-2: #46566a;
  --muted: #7a8a9e;
  --line: #e4e9f1;
  --line-2: #eef2f7;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(16,32,44,.04), 0 8px 24px rgba(16,32,44,.06);
  --shadow-lg: 0 20px 50px rgba(16,32,44,.16);
  --maxw: 1180px;

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

:root[data-theme='dark'] {
  --brand: #6db4f0;
  --brand-2: #4aa3df;
  --celeste: #5bb0e8;
  --celeste-soft: #16314a;
  --bg: #0b1119;
  --bg-soft: #0f1722;
  --surface: #141d2a;
  --surface-2: #18222f;
  --ink: #eaf1f8;
  --ink-2: #b6c3d2;
  --muted: #7e8ea1;
  --line: #233040;
  --line-2: #1b2533;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink);
  background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 11px 22px;
  display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 21px; letter-spacing: -.03em; }
.brand-name b { color: var(--ink); font-weight: 900; }
.brand-name i { color: var(--celeste); font-style: normal; font-weight: 700; }

.nav-groups { display: flex; gap: 2px; margin-left: 6px; }
.nav-group { position: relative; }
.nav-group-btn {
  display: flex; align-items: center; gap: 5px; background: none; border: 0;
  color: var(--ink-2); font-size: 15px; font-weight: 600; padding: 9px 13px; border-radius: 10px;
}
.nav-group-btn:hover { background: var(--bg-soft); color: var(--ink); }
.nav-group-btn .caret { font-size: 10px; opacity: .6; }
.nav-panel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 290px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: .16s ease;
}
.nav-group.open .nav-panel { opacity: 1; visibility: visible; transform: none; }
.nav-link { display: flex; gap: 11px; align-items: center; padding: 9px 11px; border-radius: 11px; }
.nav-link:hover { background: var(--bg-soft); }
.nav-link:hover .nav-link-ico { background: color-mix(in srgb, var(--celeste) 20%, transparent); color: var(--celeste); }
.nav-link-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-soft); color: var(--ink-2); flex: none; transition: .15s; }
.ebu-ico { display: inline-block; vertical-align: middle; flex: none; }
.nav-link-label { display: block; font-weight: 650; font-size: 14.5px; }
.nav-link-blurb { display: block; font-size: 12.5px; color: var(--muted); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.icon-btn { background: var(--bg-soft); border: 1px solid var(--line); width: 38px; height: 38px;
  border-radius: 10px; font-size: 16px; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--celeste); }
.header-account { display: flex; align-items: center; }
.ebu-account-btn { display: flex; align-items: center; gap: 6px; }
.ebu-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--bg-soft); border: 2px solid var(--line); transition: .15s; }
.ebu-account-btn:hover .ebu-avatar { border-color: var(--celeste); }
.ebu-avatar.is-pro { border-color: var(--accent-2); }
.ebu-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.ebu-avatar-mono { font-weight: 800; color: var(--ink-2); }
.pro-badge { font-size: 10px; font-weight: 900; letter-spacing: .04em; background: var(--accent-2); color: #3a2600; padding: 2px 6px; border-radius: 5px; }

/* ---------- BOTONES ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent;
  padding: 10px 18px; border-radius: 11px; font-weight: 700; font-size: 14.5px; transition: .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(255,106,61,.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(255,106,61,.36); }
.btn-dark { background: var(--brand); color: #fff; }
:root[data-theme='dark'] .btn-dark { color: #08121d; }
.btn-ghost { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--celeste); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 13px; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- BURGER / MOBILE ---------- */
.burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
.mobile-panel { display: none; }

/* ---------- TICKER ---------- */
.ticker { background: var(--brand); color: #fff; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.08); }
:root[data-theme='dark'] .ticker { background: #0a1320; color: var(--ink); }
.ticker-track { display: flex; width: max-content; animation: tick 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-run { display: flex; align-items: center; gap: 22px; padding: 8px 22px; font-size: 13.5px; white-space: nowrap; }
.tick-chip { display: inline-flex; align-items: center; gap: 6px; }
.tick-flag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: .04em; color: var(--accent-2); }
.tick-sep { opacity: .4; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- VIEW / SECCIONES ---------- */
.view { flex: 1; }
.sec { padding: 56px 0; }
.sec-tight { padding: 34px 0; }
.sec-head { max-width: 760px; margin-bottom: 30px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--celeste); margin-bottom: 9px; }
.sec-title { font-size: clamp(26px, 4vw, 40px); font-family: var(--serif); font-weight: 600; }
.sec-sub { font-size: 17px; color: var(--ink-2); margin-top: 8px; }

/* ---------- CARDS ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); }
.card.pad-lg { padding: 30px; }
.card.flat { box-shadow: none; }
.card-hover { transition: .18s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--celeste); box-shadow: var(--shadow-lg); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---------- PILLS / TAGS ---------- */
.ebu-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.ebu-pill.is-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: transparent; }
.ebu-pill.is-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border-color: transparent; }
.ebu-pill.is-bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: transparent; }
.ebu-pill.is-live { background: var(--bad); color: #fff; border-color: transparent; }
.ebu-pill.is-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.ebu-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- DEMO NOTE ---------- */
.demo-note { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent); border: 1px dashed color-mix(in srgb, var(--accent-2) 50%, var(--line));
  padding: 9px 13px; border-radius: 11px; }
.demo-note-tag { font-weight: 800; font-size: 10.5px; letter-spacing: .08em; background: var(--accent-2); color: #3a2600; padding: 2px 7px; border-radius: 5px; }

/* ---------- CHART: hbar ---------- */
.ebu-hbar { display: flex; flex-direction: column; gap: 3px; }
.ebu-hbar-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; align-items: center; gap: 12px; }
.ebu-hbar-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ebu-hbar-name { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebu-hbar-sub { font-size: 12px; color: var(--muted); }
.ebu-hbar-track { background: var(--bg-soft); height: 11px; border-radius: 6px; overflow: hidden; }
.ebu-hbar-fill { height: 100%; border-radius: 6px; transition: width .8s cubic-bezier(.2,.7,.2,1); }
.ebu-hbar-val { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14.5px; min-width: 56px; text-align: right; }

/* ---------- CHART: donut / prog ---------- */
.ebu-donut-wrap { position: relative; display: inline-grid; place-items: center; }
.ebu-donut { transform: rotate(0deg); }
.ebu-donut circle { transition: stroke-dasharray .8s ease; }
.ebu-donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ebu-prog { position: relative; background: var(--bg-soft); border-radius: 999px; height: 22px; overflow: hidden; }
.ebu-prog.slim { height: 8px; }
.ebu-prog-fill { height: 100%; border-radius: 999px; transition: width .8s ease; }
.ebu-prog-label { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 800; color: var(--ink); }

/* ---------- STATS ---------- */
.stat { }
.stat-num { font-size: 30px; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- FORM ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
input[type=text], input[type=email], input[type=number], select, textarea {
  font-family: inherit; font-size: 15px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface-2); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--celeste); border-color: transparent; }
input[type=range] { accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 8px 14px; border-radius: 8px; font-weight: 650; font-size: 13.5px; color: var(--ink-2); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
:root[data-theme='dark'] .seg button.active { background: var(--brand); color: #08121d; }

/* ---------- TOAST ---------- */
#ebu-toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 9px; align-items: center; }
.ebu-toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px;
  font-weight: 650; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); transition: .26s; }
.ebu-toast.show { opacity: 1; transform: none; }
.ebu-toast.is-ok { background: var(--ok); color: #fff; }
.ebu-toast.is-bad { background: var(--bad); color: #fff; }

/* ---------- MODAL ---------- */
.ebu-modal-ov { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px;
  background: rgba(8,16,26,.55); backdrop-filter: blur(4px); opacity: 0; transition: .2s; }
.ebu-modal-ov.show { opacity: 1; }
.ebu-modal-box { position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 30px; max-width: 560px; width: 100%; max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow-lg); transform: scale(.96); transition: .2s; }
.ebu-modal-ov.show .ebu-modal-box { transform: none; }
.ebu-modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-soft); font-size: 15px; }

/* ---------- HERO genérico ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grad { background:
  radial-gradient(900px 420px at 12% -8%, color-mix(in srgb, var(--celeste) 26%, transparent), transparent 60%),
  radial-gradient(700px 400px at 96% 4%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%); }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--brand); color: #cfe1f2; margin-top: 40px; }
:root[data-theme='dark'] .site-footer { background: #0a1320; }
.foot-top { max-width: var(--maxw); margin: 0 auto; padding: 48px 22px 30px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 26px; }
.foot-brand .brand-name b { color: #fff; }
.foot-brand p { font-size: 14px; max-width: 280px; margin: 12px 0; }
.foot-pledge { font-size: 12.5px; background: rgba(255,255,255,.08); padding: 8px 12px; border-radius: 9px; display: inline-block; }
.foot-col h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-col a { font-size: 14px; color: #b9cee2; }
.foot-col a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.1); max-width: var(--maxw); margin: 0 auto;
  padding: 16px 22px; display: flex; justify-content: space-between; font-size: 12.5px; gap: 12px; flex-wrap: wrap; }

/* ---------- helpers ---------- */
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap-s { gap: 8px; } .gap-m { gap: 16px; } .gap-l { gap: 26px; } .wrap-f { flex-wrap: wrap; }
.mt-s { margin-top: 10px; } .mt-m { margin-top: 20px; } .mt-l { margin-top: 34px; }
.tcenter { text-align: center; } .col { flex-direction: column; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) { .foot-top { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 920px) {
  .nav-groups { display: none; }
  .burger { display: flex; }
  .hide-sm { display: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-top { grid-template-columns: 1fr 1fr; }
  body.mobile-open .mobile-panel { display: block; position: fixed; inset: 64px 0 0; z-index: 55;
    background: var(--surface); overflow: auto; padding: 18px 22px 60px; border-top: 1px solid var(--line); }
  body.mobile-open { overflow: hidden; }
  .mob-group { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .mob-group h5 { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }
  .mob-links { display: flex; flex-direction: column; gap: 4px; }
  .mob-links a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font-weight: 600; }
  .mob-links a:hover { background: var(--bg-soft); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .ebu-hbar-row { grid-template-columns: 110px 1fr auto; gap: 8px; }
  .sec { padding: 38px 0; }
}
