/* ==========================================================================
   AUTOMATIZADOR IA — institutional website
   Custom design system. No external dependencies, system fonts only.
   ========================================================================== */

:root {
  --navy-950: #071120;
  --navy-900: #0b1b33;
  --navy-800: #10264a;
  --navy-700: #16325f;
  --blue-600: #1d5bdb;
  --blue-500: #2f6ff0;
  --blue-100: #e3ecfd;
  --cyan-500: #14b8d4;
  --cyan-100: #dff7fb;
  --violet-600: #6d5bd0;
  --violet-100: #ece9fa;
  --ink-900: #101828;
  --ink-700: #344054;
  --ink-500: #5b6577;
  --line-200: #e4e7ec;
  --bg-0: #ffffff;
  --bg-50: #f7f9fc;
  --ok-700: #067647;
  --ok-100: #e5f6ee;
  --warn-700: #935a00;
  --warn-100: #fdf0d9;
  --plan-700: #475467;
  --plan-100: #eef1f5;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px -6px rgba(16, 24, 40, .10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  color: var(--ink-700);
  background: var(--bg-0);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cyan-500);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.015em; }
h3 { font-size: 1.15rem; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy-900); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--navy-950);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: sticky; top: 0; z-index: 50;
}
.nav-bar {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand svg { height: 34px; width: auto; display: block; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
  color: #fff; padding: .45rem .6rem; cursor: pointer; font: inherit;
}

.nav-menu {
  display: flex; align-items: center; gap: .25rem;
  list-style: none; margin-left: auto;
}
.nav-menu a {
  display: block; padding: .5rem .75rem; border-radius: 8px;
  color: #cdd8ea; font-size: .95rem; font-weight: 500;
}
.nav-menu a:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.nav-menu a[aria-current="page"] { color: #fff; background: rgba(47,111,240,.28); }

.lang-switch {
  display: flex; align-items: center; gap: .15rem;
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  padding: .15rem; margin-left: .75rem; flex-shrink: 0;
}
.lang-switch a, .lang-switch span {
  padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: #cdd8ea; letter-spacing: .04em;
}
.lang-switch a:hover { color: #fff; text-decoration: none; }
.lang-switch [aria-current="true"] { background: var(--blue-500); color: #fff; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .4rem; }
  .nav-menu {
    display: none;
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-950); border-bottom: 1px solid rgba(255,255,255,.1);
    padding: .5rem 1rem 1rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: .8rem .75rem; }
  .lang-switch { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(20, 184, 212, .18), transparent 60%),
    radial-gradient(700px 380px at 10% 110%, rgba(109, 91, 208, .20), transparent 60%),
    var(--navy-950);
  color: #d6e0f0;
  padding: 4.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 { color: #fff; max-width: 21ch; }
.hero .lead { font-size: 1.15rem; max-width: 58ch; margin-top: 1.1rem; color: #c2cfe3; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid rgba(20,184,212,.45); color: #8fe6f5;
  border-radius: 999px; padding: .3rem .9rem; font-size: .82rem; font-weight: 600;
  margin-bottom: 1.4rem; letter-spacing: .03em;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-500); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 10px;
  font-weight: 600; font-size: .98rem; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue-500); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--blue-600); color: var(--blue-600); }
.btn-outline:hover { background: var(--blue-100); }

/* Page hero (interior pages) */
.page-hero {
  background: var(--navy-950); color: #c2cfe3;
  padding: 3rem 0 2.6rem;
}
.page-hero h1 { color: #fff; }
.page-hero p { max-width: 66ch; margin-top: .8rem; font-size: 1.05rem; }
.page-hero .crumb { font-size: .85rem; color: #8fa3c2; margin-bottom: .8rem; letter-spacing: .02em; }

/* --------------------------------------------------------------------------
   Sections and cards
   -------------------------------------------------------------------------- */
.section { padding: 3.8rem 0; }
.section.alt { background: var(--bg-50); }
.section-head { max-width: 760px; margin-bottom: 2.2rem; }
.section-head .kicker {
  color: var(--blue-600); font-weight: 700; text-transform: uppercase;
  font-size: .8rem; letter-spacing: .09em; display: block; margin-bottom: .5rem;
}
.section-head p { margin-top: .8rem; font-size: 1.05rem; }

.grid { display: grid; gap: 1.25rem; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-0); border: 1px solid var(--line-200);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .95rem; }
.card .icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-100); color: var(--blue-600); margin-bottom: .9rem;
}
.card .icon svg { width: 22px; height: 22px; }
.card.tone-cyan .icon { background: var(--cyan-100); color: #0e7a8d; }
.card.tone-violet .icon { background: var(--violet-100); color: var(--violet-600); }

.notice {
  border: 1px solid var(--line-200); border-left: 4px solid var(--blue-600);
  background: var(--bg-50); border-radius: 8px; padding: 1rem 1.2rem; margin: 1.5rem 0;
  font-size: .95rem;
}
.notice.cyan { border-left-color: var(--cyan-500); }
.notice.warn { border-left-color: #d9a514; }

/* Status badges */
.badge {
  display: inline-block; padding: .18rem .7rem; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.badge.ok { background: var(--ok-100); color: var(--ok-700); }
.badge.dev { background: var(--warn-100); color: var(--warn-700); }
.badge.plan { background: var(--plan-100); color: var(--plan-700); }

/* Checklist */
.checklist { list-style: none; margin: 1rem 0; }
.checklist li {
  padding: .45rem 0 .45rem 2rem; position: relative;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .72rem;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok-100);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23067647" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4 10-10"/></svg>');
  background-size: 11px; background-position: center; background-repeat: no-repeat;
}
.checklist.neutral li::before {
  background-color: var(--blue-100);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231d5bdb" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4 10-10"/></svg>');
}

/* --------------------------------------------------------------------------
   Prose (legal / long-form pages)
   -------------------------------------------------------------------------- */
.prose { max-width: 820px; }
.prose h2 { margin: 2.4rem 0 .9rem; }
.prose h3 { margin: 1.8rem 0 .6rem; }
.prose p { margin: .9rem 0; }
.prose ul, .prose ol { margin: .9rem 0 .9rem 1.5rem; }
.prose li { margin: .35rem 0; }
.prose .updated {
  color: var(--ink-500); font-size: .9rem; margin-bottom: 2rem;
  border-bottom: 1px solid var(--line-200); padding-bottom: 1.2rem;
}
.prose strong { color: var(--ink-900); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-200); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
table.data th, table.data td { text-align: left; padding: .75rem 1rem; }
table.data thead th {
  background: var(--bg-50); color: var(--ink-900); font-weight: 700;
  border-bottom: 1px solid var(--line-200); font-size: .84rem;
  text-transform: uppercase; letter-spacing: .04em;
}
table.data tbody tr + tr td { border-top: 1px solid var(--line-200); }
table.data td.num { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Demo (mockup) components
   -------------------------------------------------------------------------- */
.demo-banner {
  background: #fdf0d9; border: 1px solid #f0d9a8; color: #6d4a00;
  border-radius: 10px; padding: .9rem 1.2rem; font-weight: 600; font-size: .95rem;
  display: flex; gap: .7rem; align-items: flex-start; margin: 0 0 1.8rem;
}
.demo-shell {
  border: 1px solid var(--line-200); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); background: var(--bg-0);
}
.demo-top {
  background: var(--navy-900); color: #e6edf7;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .8rem 1.2rem; font-size: .9rem;
}
.demo-top .brand-mini { font-weight: 800; letter-spacing: .04em; }
.demo-top .acct {
  border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
  padding: .3rem .8rem; font-size: .85rem; color: #cdd8ea;
}
.demo-top .env {
  margin-left: auto; background: rgba(20,184,212,.18); color: #8fe6f5;
  border: 1px solid rgba(20,184,212,.45);
  padding: .25rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
}
.demo-body { padding: 1.4rem; display: grid; gap: 1.4rem; }

.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: .9rem; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  border: 1px solid var(--line-200); border-radius: 10px; padding: .9rem 1rem;
  background: var(--bg-50);
}
.kpi .label { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; }
.kpi .value { display: block; font-size: 1.35rem; font-weight: 800; color: var(--ink-900); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.kpi .delta { display: block; font-size: .78rem; font-weight: 600; }
.kpi .delta.up { color: var(--ok-700); }
.kpi .delta.down { color: #b42318; }

.demo-panel { border: 1px solid var(--line-200); border-radius: 10px; overflow: hidden; }
.demo-panel > header {
  background: var(--bg-50); padding: .7rem 1rem; font-weight: 700; color: var(--ink-900);
  font-size: .9rem; border-bottom: 1px solid var(--line-200);
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
}
.demo-panel > header .badge { margin-left: auto; }

.chat { display: grid; gap: .8rem; padding: 1rem; }
.msg { max-width: 46rem; padding: .75rem 1rem; border-radius: 12px; font-size: .93rem; }
.msg.user { background: var(--blue-100); color: var(--navy-800); justify-self: end; border-bottom-right-radius: 4px; }
.msg.ai { background: var(--bg-50); border: 1px solid var(--line-200); border-bottom-left-radius: 4px; }
.msg .who { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin-bottom: .25rem; }
.chat-actions { display: flex; gap: .6rem; padding: 0 1rem 1rem; flex-wrap: wrap; }
.chat-actions button {
  font: inherit; font-size: .85rem; font-weight: 600; padding: .5rem 1.1rem;
  border-radius: 8px; border: 1px solid var(--line-200); background: var(--bg-0);
  color: var(--ink-500); cursor: not-allowed;
}
.chat-actions button.primary { background: var(--plan-100); }

.op-preview { padding: 1rem; display: grid; gap: .6rem; font-size: .93rem; }
.op-preview .row { display: flex; gap: .6rem; flex-wrap: wrap; }
.op-preview .row .k { min-width: 160px; font-weight: 700; color: var(--ink-900); }

/* --------------------------------------------------------------------------
   CTA band + footer
   -------------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700) 60%, #1b3f7a);
  color: #d6e0f0; padding: 3.2rem 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 60ch; margin: .8rem 0 1.6rem; }

.site-footer {
  background: var(--navy-950); color: #9fb0c9; padding: 3rem 0 2rem;
  font-size: .9rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .8rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin: .4rem 0; }
.site-footer a { color: #9fb0c9; }
.site-footer a:hover { color: #fff; }
.site-footer .brand svg { height: 30px; margin-bottom: .9rem; }
.footer-note {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.2rem; padding-top: 1.4rem;
  font-size: .8rem; color: #7387a3; display: grid; gap: .5rem;
}
