/* ============================================================================
   Bravos CRM — estilos del sitio
   Paleta clonada de WhatsApp: verde #25D366 / teal #075E54 / tinta #111B21
   ========================================================================== */

:root {
  --green: #25D366;
  --green-dark: #0B7A3E;
  --teal: #075E54;
  --teal-mid: #128C7E;
  --ink: #111B21;
  --ink-2: #3B4A54;
  --ink-3: #54656F;
  --muted: #667781;
  --muted-2: #8696A0;
  --line: #E9EDEF;
  --line-2: #EEF1F3;
  --panel: #F0F2F5;
  --wash: #F7F9FA;
  --wash-2: #F6F8FA;
  --shell: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--ink);
}

a { color: var(--teal-mid); text-decoration: none; }
a:hover { color: var(--teal); }

.shell { max-width: var(--shell); margin: 0 auto; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* --- Logo ---------------------------------------------------------------- */
.logo-mark {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -2px rgba(37, 211, 102, .55);
  flex: none;
}
.logo-mark i { width: 18px; height: 15px; border-radius: 5px; background: #fff; display: block; }
.logo-mark i::after {
  content: '';
  position: absolute; left: 11px; bottom: 9px;
  width: 6px; height: 6px; background: #fff;
  transform: rotate(45deg);
}
.logo-text {
  font-weight: 800; font-size: 18px;
  letter-spacing: -.02em; color: var(--ink);
  white-space: nowrap;
}
.logo-text span { color: var(--muted-2); font-weight: 600; }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .shell {
  display: flex; align-items: center;
  padding: 13px 24px; gap: 0;
}
.brand-btn {
  display: flex; align-items: center; gap: 11px;
  background: none; border: none; padding: 0; cursor: pointer;
}
/* margin-left:auto empuja nav + idioma a la derecha, pegados entre sí */
.header-nav { display: flex; align-items: center; gap: 5px; margin-left: auto; }

.nav-btn {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600; font-size: 14px;
  font-family: inherit;
  border: none; cursor: pointer;
  background: none; color: var(--ink-3);
  white-space: nowrap;
}
/* El original solo cambia el fondo en hover (style-hover="background:#F0F2F5") */
.nav-btn:hover { background: var(--panel); }
.nav-btn.is-active {
  background: rgba(37, 211, 102, .12);
  color: var(--green-dark);
  font-weight: 700;
}

/* 15px = el gap:5px del contenedor del original + su margin-left:10px */
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  padding: 3px; background: var(--panel);
  border-radius: 9px; margin-left: 15px;
}
.lang-pill {
  padding: 6px 13px; border: none; border-radius: 7px;
  font-weight: 600; font-size: 12.5px; font-family: inherit;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.lang-pill.is-active {
  font-weight: 700; background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, #ffffff, var(--wash));
  border-bottom: 1px solid var(--line-2);
}
.hero .shell {
  padding: 64px 24px;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(37, 211, 102, .13);
  color: var(--green-dark);
  font-weight: 700; font-size: 12.5px;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); flex: none;
}
.hero h1 {
  font-size: 48px; line-height: 1.07; font-weight: 800;
  letter-spacing: -.03em; color: var(--ink);
  margin: 20px 0 0; text-wrap: balance;
}
.hero-sub {
  font-size: 17px; line-height: 1.65; color: var(--muted);
  margin: 20px 0 0; max-width: 46ch; text-wrap: pretty;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip {
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px;
}

/* --- Mockup de chat ------------------------------------------------------ */
.phone {
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px -22px rgba(11, 27, 33, .42);
  border: 1px solid var(--line); background: #fff;
}
.phone-top {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; background: var(--teal);
}
.phone-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: var(--teal); flex: none;
}
.phone-ident { flex: 1; min-width: 0; }
.phone-name { font-weight: 700; font-size: 14px; color: #fff; }
.phone-status { font-size: 11.5px; color: rgba(255, 255, 255, .75); }
.phone-body {
  background: #EFEAE2;
  background-image: radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 0);
  background-size: 20px 20px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 236px;
}
.bubble {
  max-width: 82%;
  padding: 6px 10px 5px;
  box-shadow: 0 1px 1px rgba(11, 27, 33, .14);
}
.bubble-in {
  align-self: flex-start;
  background: #fff;
  border-radius: 9px 9px 9px 2px;
}
.bubble-out {
  align-self: flex-end;
  background: #D9FDD3;
  border-radius: 9px 9px 2px 9px;
}
.bubble-text { font-size: 13.5px; line-height: 1.35; color: var(--ink); }
.bubble-meta-in {
  text-align: right; font-size: 10.5px;
  color: var(--muted-2); margin-top: 3px;
}
.bubble-meta-out {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 4px; margin-top: 3px;
}
.bubble-meta-out .time { font-size: 10.5px; color: var(--muted); }
.ticks { color: #53BDEB; font-size: 12px; letter-spacing: -4px; font-weight: 700; }
.phone-compose {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; background: var(--panel);
}
.compose-field {
  flex: 1; background: #fff; border-radius: 18px;
  padding: 9px 13px; font-size: 12.5px; color: var(--muted-2);
}
.compose-send {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; flex: none;
}

/* --- Features ------------------------------------------------------------ */
.features { background: #fff; }
.features .shell { padding: 56px 24px 64px; }
.features h2 {
  font-size: 30px; line-height: 1.15; font-weight: 800;
  letter-spacing: -.02em; color: var(--ink); margin: 0;
}
.features-sub {
  font-size: 15.5px; line-height: 1.5;
  color: var(--muted); margin: 10px 0 0;
}
.feature-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.feature-card {
  display: flex; flex-direction: column; gap: 6px;
  width: 340px; flex: 1 1 300px;
  padding: 18px 20px;
  border: 1.5px solid rgba(37, 211, 102, .32);
  border-radius: 14px;
  background: rgba(37, 211, 102, .05);
  transition: border-color .15s, background .15s;
}
.feature-card:hover {
  border-color: rgba(37, 211, 102, .6);
  background: rgba(37, 211, 102, .09);
}
.feature-title { font-weight: 700; font-size: 15px; color: var(--green-dark); }
.feature-desc { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* --- Encabezados de subpáginas ------------------------------------------ */
.subpage { background: var(--wash-2); min-height: 70vh; }
.subpage--white { background: #fff; }
.kicker {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-dark);
}
.subpage h1 {
  font-size: 40px; line-height: 1.1; font-weight: 800;
  letter-spacing: -.03em; color: var(--ink); margin: 14px 0 0;
}
.subpage-sub {
  font-size: 16px; line-height: 1.6;
  color: var(--muted); margin: 12px 0 0; max-width: 56ch;
}

/* --- Badges -------------------------------------------------------------- */
.badge {
  display: inline-block; padding: 4px 11px;
  border-radius: 999px; font-weight: 700; font-size: 11.5px;
  white-space: nowrap;
}
.badge--green { background: rgba(37, 211, 102, .13); color: #0B7A3E; }
.badge--blue  { background: rgba(37, 131, 209, .14); color: #1E6FB8; }
.badge--amber { background: rgba(214, 158, 46, .16); color: #8A5A12; }

/* --- Versiones (timeline) ------------------------------------------------ */
.versions-shell { max-width: 900px; margin: 0 auto; padding: 56px 24px 72px; }
.timeline { margin-top: 40px; }
.tl-item { position: relative; padding-left: 36px; padding-bottom: 26px; }
.tl-dot {
  position: absolute; left: 0; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, .16);
  z-index: 2;
}
.tl-line {
  position: absolute; left: 6px; top: 22px; bottom: -4px;
  width: 2px; background: #E1E7EA;
}
.tl-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 8px 24px -18px rgba(11, 27, 33, .35);
}
.tl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-v {
  font-weight: 800; font-size: 22px; letter-spacing: -.02em;
  color: var(--ink); font-family: ui-monospace, Menlo, monospace;
}
.tl-date { margin-left: auto; font-size: 13px; color: var(--muted-2); }
.tl-changes { margin-top: 14px; display: flex; flex-direction: column; gap: 3px; }
.tl-change { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.tl-change::before {
  content: '✓';
  color: var(--green); font-size: 13px; font-weight: 800; line-height: 1.6;
  flex: none;
}
.tl-change span { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

/* --- Roadmap ------------------------------------------------------------- */
.working-shell { max-width: 1080px; margin: 0 auto; padding: 56px 24px 72px; }
.work-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px; margin-top: 38px;
}
.work-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 8px 24px -18px rgba(11, 27, 33, .35);
  display: flex; flex-direction: column;
}
.work-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.work-code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; color: #B4C0C7; font-weight: 700;
}
.work-title {
  font-weight: 700; font-size: 18px; line-height: 1.25;
  color: var(--ink); margin: 14px 0 0; letter-spacing: -.01em;
}
.work-desc {
  font-size: 14px; line-height: 1.55;
  color: var(--muted); margin: 8px 0 0; flex: 1;
}
.work-bar-wrap { margin-top: 18px; }
.work-bar-track {
  height: 7px; border-radius: 999px;
  background: #EDF1F3; overflow: hidden;
}
/* El ancho lo pone applyBars() en app.js desde data-bar */
.work-bar-fill {
  height: 7px; border-radius: 999px;
  background: linear-gradient(90deg, #25D366, #128C7E);
}
.work-progress-label { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }

/* --- Términos ------------------------------------------------------------ */
.terms-shell { max-width: 760px; margin: 0 auto; padding: 56px 24px 72px; }
.terms-updated { font-size: 13.5px; color: var(--muted-2); margin: 12px 0 0; }
.terms-note {
  margin-top: 22px;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: rgba(37, 211, 102, .08);
  border: 1px solid rgba(37, 211, 102, .28);
  border-radius: 12px;
}
.terms-note::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); margin-top: 6px; flex: none;
}
.terms-note span { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.terms-list { margin-top: 14px; }
.terms-item {
  padding: 24px 0; border-top: 1px solid var(--line-2);
  display: grid; grid-template-columns: 44px 1fr;
  gap: 16px; align-items: start;
}
.terms-n {
  font-weight: 800; font-size: 15px;
  font-family: ui-monospace, Menlo, monospace; color: var(--green);
}
.terms-item h3 {
  font-weight: 700; font-size: 18px; line-height: 1.3;
  color: var(--ink); margin: 0; letter-spacing: -.01em;
}
.terms-item p {
  font-size: 15px; line-height: 1.65;
  color: var(--ink-3); margin: 8px 0 0; text-wrap: pretty;
}

/* --- Sin JavaScript ------------------------------------------------------ */
.noscript {
  max-width: 640px; margin: 64px auto; padding: 0 24px;
}
.noscript h1 { font-size: 28px; letter-spacing: -.02em; }
.noscript p { color: var(--muted); line-height: 1.6; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--wash); border-top: 1px solid var(--line); }
.site-footer .shell {
  padding: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand .logo-mark { width: 30px; height: 30px; border-radius: 9px; box-shadow: none; }
.footer-brand .logo-mark i { width: 15px; height: 12px; border-radius: 4px; }
.footer-brand .logo-mark i::after { display: none; }
.footer-brand-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.footer-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--ink-3);
}
.footer-link:hover { color: var(--ink); }
.footer-rights { font-size: 13px; color: var(--muted-2); }

/* ============================================================================
   RESPONSIVE — lo que le faltaba al diseño original
   ========================================================================== */

@media (max-width: 900px) {
  .hero .shell {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 44px 20px 48px;
  }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 16px; max-width: none; }
  .work-grid { grid-template-columns: 1fr; }
  .subpage h1 { font-size: 32px; }
  .features h2 { font-size: 25px; }
}

@media (max-width: 720px) {
  /* Fila 1: logo + idioma (el switch tiene que quedar siempre a la vista).
     Fila 2: los links, a lo ancho. */
  .site-header .shell { padding: 10px 16px; flex-wrap: wrap; row-gap: 8px; }
  .brand-btn { order: 1; }
  .lang-switch { order: 2; margin-left: auto; }
  .header-nav {
    order: 3; width: 100%; margin-left: 0;
    justify-content: space-between; gap: 2px;
    overflow-x: auto; scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .nav-btn { padding: 7px 8px; font-size: 12.5px; }
  .features .shell,
  .versions-shell,
  .working-shell,
  .terms-shell { padding-left: 18px; padding-right: 18px; }
  .site-footer .shell { justify-content: center; text-align: center; }
  .terms-item { grid-template-columns: 30px 1fr; gap: 10px; }
  .feature-card { width: 100%; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  .tl-head { gap: 8px; }
  .tl-date { margin-left: 0; width: 100%; }
}

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