/* ═══════════════════════════════════════════════════════════════════
   Lex Intellecta — Ventas Design System v2.0
   ═══════════════════════════════════════════════════════════════════
   Sistema de diseño unificado del Departamento Comercial.
   Fusiona saas-design-system.css + rwd-system.css.

   Breakpoints: 480 / 640 / 768 / 1024 — Mobile-first.
   Tipografía: DM Serif Display + DM Sans.

   Incluir DESPUÉS de cualquier estilo de página:
   <link rel="stylesheet" href="/ventas/css/ventas-design-system.css?v=2">
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Design Tokens ───────────────────────────────────────────────── */
:root {
  --navy: #0B1C2C;
  --navy-mid: #132438;
  --navy-dk: #07121D;
  --coral: #E05C3A;
  --teal: #1D9E75;
  --teal-lt: #2BB88A;
  --teal-dk: #0F6E56;
  --gold: #C9963A;
  --text: #E8E4DC;
  --muted: #8A9BAA;
  --border: rgba(255, 255, 255, 0.08);
  --paper: #FBF9F4;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

  /* Accent defaults — cada segmento sobreescribe */
  --accent: #1D9E75;
  --accent-lt: #2BB88A;
  --accent-dk: #0F6E56;
}

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Segmentos: acentos por capa del embudo ──────────────────────── */
body.segment-entidades {
  --accent: #1D9E75;
  --accent-lt: #2BB88A;
  --accent-dk: #0F6E56;
}
body.segment-aseguradora {
  --accent: #1D6F9E;
  --accent-lt: #2B8AB8;
  --accent-dk: #0F4E6E;
}
body.segment-empresas {
  --accent: #C9A02C;
  --accent-lt: #D4B04A;
  --accent-dk: #8B6E1A;
}
body.segment-pyme {
  --accent: #9E7D1D;
  --accent-lt: #B89A2B;
  --accent-dk: #6E5A0F;
}
body.segment-demo {
  --accent: #E85D3F;
  --accent-lt: #F2795C;
  --accent-dk: #C04A2F;
}
body.segment-admin {
  --accent: #4A90D9;
  --accent-lt: #6BA8E8;
  --accent-dk: #3570A5;
}
body.segment-reclutamiento {
  --accent: #8B5CF6;
  --accent-lt: #A78BFA;
  --accent-dk: #6D3FD4;
}
body.segment-marketing {
  --accent: #E05C3A;
  --accent-lt: #F2795C;
  --accent-dk: #C04A2F;
}

/* ═════════════════════════════════════════════════════════════════════
   COMPONENTES COMPARTIDOS (saas-design-system)
   ════════════════════════════════════════════════════════════════════ */

/* ─── Token Overlay ───────────────────────────────────────────────── */
#tokenOverlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  transition: opacity .5s, visibility .5s;
}
#tokenOverlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.token-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-lt);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.token-status { text-align: center; }
.token-status h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; }
.token-status p { color: var(--muted); font-size: 14px; max-width: 420px; line-height: 1.5; }
.token-error { text-align: center; }
.token-error .err-icon {
  width: 56px; height: 56px;
  background: rgba(224, 92, 58, 0.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 28px;
}
.token-error h2 { font-family: var(--font-display); font-size: 20px; color: var(--coral); margin-bottom: 8px; }
.token-error p { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ─── Topbar ──────────────────────────────────────────────────────── */
.topbar {
  padding: 18px 32px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(11, 28, 44, 0.9); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 100;
}
.topbar .brand {
  font-family: var(--font-display); font-size: 18px;
  display: flex; align-items: center; gap: 10px;
}
.topbar .brand .mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-lt));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: white; font-weight: 700;
}
.topbar .brand em { color: var(--accent-lt); font-style: italic; }
.topbar .nav a {
  color: var(--muted); text-decoration: none;
  font-size: 12px; margin-left: 18px; transition: color .15s;
}
.topbar .nav a:hover { color: var(--text); }

/* ─── Secciones ───────────────────────────────────────────────────── */
section { max-width: 920px; margin: 0 auto; padding: 50px 24px; }
.section-hidden { display: none; }

/* ─── Botones ─────────────────────────────────────────────────────── */
.btn {
  padding: 14px 32px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: .2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover {
  background: var(--accent-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29, 158, 117, 0.3);
}
.btn-secondary {
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-lt); }
.btn-coral { background: var(--coral); color: white; }
.btn-coral:hover { background: #F2795C; transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: 13px; border-radius: 8px; }

/* ─── Landing page ────────────────────────────────────────────────── */
.landing-hero { text-align: center; padding: 80px 24px 60px; }
.landing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1; margin-bottom: 16px;
}
.landing-hero h1 em { color: var(--accent-lt); font-style: italic; }
.landing-hero p {
  color: var(--muted); font-size: 17px;
  max-width: 600px; margin: 0 auto 40px; line-height: 1.6;
}
.segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; max-width: 960px; margin: 0 auto; padding: 0 24px;
}
.segment-card {
  background: var(--navy-mid); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 28px; text-align: center;
  transition: .25s; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.segment-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-lt);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.segment-card .seg-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.segment-card h3 { font-family: var(--font-display); font-size: 22px; }
.segment-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.segment-card .seg-badge {
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 14px; border-radius: 12px; font-weight: 600;
}

/* ─── Call Phase ──────────────────────────────────────────────────── */
#phaseCall { text-align: center; }
.call-frame-wrap {
  background: var(--navy-mid); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  max-width: 480px; margin: 0 auto 20px;
  position: relative; min-height: 600px;
}
.call-frame-wrap iframe { width: 100%; height: 600px; border: none; display: block; }
.call-status { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.call-status .dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--accent-lt); border-radius: 50%;
  margin-right: 8px; animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.btn-hangup {
  background: transparent; border: 1px solid rgba(224, 92, 58, 0.3);
  color: var(--coral); padding: 10px 24px; border-radius: 8px;
  font-size: 13px; cursor: pointer; transition: .15s;
}
.btn-hangup:hover { background: rgba(224, 92, 58, 0.1); }

/* ─── Results Phase ───────────────────────────────────────────────── */
#phaseResults { max-width: 820px; }
.result-label {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 6px;
}
.result-card { display: none; margin-bottom: 30px; }
.result-card.visible { display: block; }
.result-card .card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.result-card .card-header .ix {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(29, 158, 117, 0.15); color: var(--accent-lt);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.result-card .card-header h3 { font-family: var(--font-display); font-size: 18px; }
.result-card .card-header .badge {
  margin-left: auto; font-size: 11px; padding: 4px 12px;
  background: rgba(43, 184, 138, 0.15); color: var(--accent-lt);
  border-radius: 12px; font-weight: 500;
}

/* ─── Email Paper ─────────────────────────────────────────────────── */
.email-paper {
  background: var(--paper); color: #1A2D27; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4); overflow: hidden;
}
.email-header {
  background: #ECECE6; padding: 14px 22px;
  border-bottom: 1px solid #DCDAD2;
}
.email-header .row { display: flex; gap: 10px; padding: 3px 0; font-size: 12px; }
.email-header .row .k { color: #6F7B72; min-width: 60px; }
.email-header .row .v { color: #1A2D27; font-family: monospace; }
.email-header .row .v.subject { font-weight: 600; }
.email-body {
  padding: 30px 36px; font-family: Georgia, serif;
  line-height: 1.65; font-size: 14px;
  max-height: 540px; overflow-y: auto;
}
.email-body h2 { font-size: 20px; color: var(--accent-dk); margin-bottom: 14px; font-weight: normal; font-family: var(--font-display); }
.email-body h3 { font-size: 13px; color: #1A2D27; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-body); font-weight: 600; }
.email-body p { margin-bottom: 12px; }
.email-body ul, .email-body ol { padding-left: 22px; margin-bottom: 12px; }
.email-body li { margin-bottom: 6px; }
.email-body .quote {
  background: #F0F7F3; border-left: 4px solid var(--accent-dk);
  padding: 12px 16px; margin: 14px 0; font-size: 13px; color: #1A2D27;
}
.email-body .norma { font-style: italic; color: #6F7B72; font-size: 12px; }
.email-body strong { color: #1A2D27; }
.email-body .footer-note {
  margin-top: 30px; padding-top: 18px;
  border-top: 1px solid #DCDAD2; font-size: 11px; color: #6F7B72;
}

/* ─── Document Paper ──────────────────────────────────────────────── */
.doc-paper {
  background: var(--paper); color: #2A2A2A; padding: 36px 44px;
  border-radius: 10px; font-family: Georgia, serif; line-height: 1.7;
  max-height: 560px; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
}
.doc-paper h2 {
  font-size: 18px; text-align: center; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 2px; color: #1A2D27;
}
.doc-paper h3 { font-size: 14px; color: #1A2D27; margin: 18px 0 8px; }
.doc-paper p { font-size: 13px; margin-bottom: 12px; text-align: justify; color: #2A2A2A; }

/* ─── Loading ─────────────────────────────────────────────────────── */
.loading-inline { display: none; text-align: center; padding: 50px 20px; }
.loading-inline.show { display: block; }
.loading-inline .spinner-s {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-lt);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 14px;
}
.loading-inline h4 { font-family: var(--font-display); font-size: 16px; color: var(--text); margin-bottom: 6px; }
.loading-inline p { color: var(--muted); font-size: 13px; }

/* ─── CTA Section ─────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, rgba(29, 158, 117, 0.08), rgba(34, 160, 96, 0.04));
  border: 1px solid var(--accent); border-radius: 14px;
  padding: 40px; max-width: 680px; margin: 40px auto 20px; text-align: center;
}
.cta-section h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 10px; }
.cta-section p { color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.cta-section .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ──────────────────────────────────────────────────────── */
.footer-legal {
  padding: 30px 24px 40px; color: var(--muted);
  font-size: 11px; text-align: center;
  max-width: 680px; margin: 0 auto; line-height: 1.7;
}
.footer-legal a { color: var(--accent-lt); text-decoration: none; }
.footer-legal .sep { margin: 0 8px; color: var(--border); }

/* ─── Reveal animation ────────────────────────────────────────────── */
.reveal { animation: revealUp .6s ease-out both; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Escenario cards ─────────────────────────────────────────────── */
.esc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px; max-width: 780px; margin: 0 auto;
}
.esc-card {
  background: var(--navy-mid); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; cursor: pointer;
  transition: .2s; text-align: left;
}
.esc-card:hover { border-color: var(--accent-lt); transform: translateY(-2px); }
.esc-card.selected { border-color: var(--accent); background: rgba(29, 158, 117, 0.06); }
.esc-card .area-tag {
  display: inline-block; font-size: 10px; letter-spacing: .8px;
  text-transform: uppercase; color: var(--accent-lt);
  margin-bottom: 6px; font-weight: 500;
}
.esc-card .title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.esc-card .desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.esc-card .check { display: none; float: right; color: var(--accent-lt); font-size: 18px; }
.esc-card.selected .check { display: block; }

/* ═════════════════════════════════════════════════════════════════════
   RESPONSIVE WEB DESIGN SYSTEM (rwd-system.css integrado)
   ════════════════════════════════════════════════════════════════════ */

/* ─── Responsive Container ────────────────────────────────────────── */
.rwd-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 640px) {
  .rwd-container { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 1024px) {
  .rwd-container { padding-left: 32px; padding-right: 32px; }
}

/* ─── Responsive Grid ─────────────────────────────────────────────── */
.rwd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 480px) {
  .rwd-grid.rwd-grid-2,
  .rwd-grid.rwd-grid-3,
  .rwd-grid.rwd-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .rwd-grid.rwd-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .rwd-grid.rwd-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .rwd-grid.rwd-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Responsive Navigation (hamburger mobile) ────────────────────── */
.rwd-nav { position: relative; }
.rwd-nav .rwd-nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  padding: 8px 0;
  z-index: 200;
}
.rwd-nav .rwd-nav-links.open { display: flex; }
.rwd-nav .rwd-nav-links a {
  padding: 12px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: color .15s, background .15s;
}
.rwd-nav .rwd-nav-links a:last-child { border-bottom: none; }
.rwd-nav .rwd-nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,.03);
}
.rwd-nav .rwd-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  transition: border-color .15s, color .15s;
}
.rwd-nav .rwd-hamburger:hover { border-color: var(--accent); color: var(--text); }
@media (min-width: 768px) {
  .rwd-nav .rwd-hamburger { display: none; }
  .rwd-nav .rwd-nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    gap: 4px;
  }
  .rwd-nav .rwd-nav-links a {
    padding: 6px 12px;
    border-bottom: none;
    border-radius: 6px;
    font-size: 12px;
  }
}

/* ─── Responsive Tables → Cards on Mobile ─────────────────────────── */
.rwd-table { width: 100%; border-collapse: collapse; }
.rwd-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  white-space: nowrap;
}
.rwd-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 13px;
  color: var(--text);
}

@media (max-width: 639px) {
  .rwd-table,
  .rwd-table tbody,
  .rwd-table tr,
  .rwd-table td { display: block; }
  .rwd-table thead { display: none; }
  .rwd-table tr {
    background: var(--navy-mid);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 4px 0;
  }
  .rwd-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .rwd-table td:last-child { border-bottom: none; }
  .rwd-table td::before {
    content: attr(data-label);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--muted);
    font-weight: 500;
    flex-shrink: 0;
  }
}

/* ─── Responsive Forms ────────────────────────────────────────────── */
.rwd-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .rwd-form-grid { grid-template-columns: repeat(2, 1fr); }
}
.rwd-form-grid .rwd-form-full { grid-column: 1 / -1; }

.rwd-form-group { display: flex; flex-direction: column; gap: 4px; }
.rwd-form-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  font-weight: 500;
}
.rwd-form-group input,
.rwd-form-group select,
.rwd-form-group textarea {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .15s;
  width: 100%;
}
.rwd-form-group input:focus,
.rwd-form-group select:focus,
.rwd-form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, .12);
}
.rwd-form-group textarea { min-height: 90px; resize: vertical; }

/* ─── Responsive Sidebar Layout ───────────────────────────────────── */
.rwd-sidebar-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.rwd-sidebar-layout .rwd-sidebar {
  width: 100%;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  flex-shrink: 0;
}
.rwd-sidebar-layout .rwd-main {
  flex: 1;
  padding: 16px;
  overflow-x: auto;
}
@media (min-width: 768px) {
  .rwd-sidebar-layout { flex-direction: row; }
  .rwd-sidebar-layout .rwd-sidebar {
    width: 220px;
    min-height: 100vh;
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 20px 16px;
  }
  .rwd-sidebar-layout .rwd-main { padding: 24px; }
}
@media (min-width: 1024px) {
  .rwd-sidebar-layout .rwd-sidebar { width: 250px; }
  .rwd-sidebar-layout .rwd-main { padding: 32px; }
}

/* ─── Responsive Card Grid ────────────────────────────────────────── */
.rwd-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 480px) {
  .rwd-card-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ─── Responsive Images ───────────────────────────────────────────── */
img.rwd-img {
  max-width: 100%;
  height: auto;
}

/* ─── Responsive Visibility Utilities ─────────────────────────────── */
.rwd-hide-mobile { display: none; }
.rwd-show-mobile { display: block; }
@media (min-width: 768px) {
  .rwd-hide-mobile { display: initial; }
  .rwd-show-mobile { display: none; }
}
.rwd-hide-tablet { display: none; }
@media (min-width: 1024px) {
  .rwd-hide-tablet { display: initial; }
}

/* ─── Responsive Text ─────────────────────────────────────────────── */
.rwd-text-center-mobile { text-align: center; }
@media (min-width: 768px) {
  .rwd-text-center-mobile { text-align: inherit; }
}

/* ─── Responsive Spacing ──────────────────────────────────────────── */
@media (max-width: 639px) {
  .rwd-section { padding: 32px 16px; }
  .rwd-stack-mobile { flex-direction: column !important; }
  .rwd-gap-mobile { gap: 12px !important; }
  .rwd-full-mobile { width: 100% !important; max-width: 100% !important; }
}
@media (min-width: 640px) {
  .rwd-section { padding: 48px 24px; }
}
@media (min-width: 1024px) {
  .rwd-section { padding: 64px 32px; }
}

/* ─── Responsive Modal ────────────────────────────────────────────── */
.rwd-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(7, 18, 29, .85);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 640px) {
  .rwd-modal-overlay { align-items: center; padding: 24px; }
}
.rwd-modal {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 18px;
}
@media (min-width: 640px) {
  .rwd-modal {
    border-radius: 16px;
    max-width: 560px;
    padding: 28px 24px;
  }
}

/* ─── Responsive Flex Utilities ───────────────────────────────────── */
.rwd-flex { display: flex; }
.rwd-flex-wrap { flex-wrap: wrap; }
.rwd-flex-col { flex-direction: column; }
@media (max-width: 639px) {
  .rwd-flex-col-mobile { flex-direction: column !important; }
}
.rwd-justify-between { justify-content: space-between; }
.rwd-items-center { align-items: center; }
.rwd-gap-sm { gap: 8px; }
.rwd-gap-md { gap: 16px; }

/* ─── Breadcrumb ──────────────────────────────────────────────────── */
.funnel-breadcrumb {
  padding: 12px 24px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.funnel-breadcrumb a {
  color: var(--accent-lt);
  text-decoration: none;
  transition: color .15s;
}
.funnel-breadcrumb a:hover { color: var(--text); }
.funnel-breadcrumb .sep { color: var(--border); }

/* ═════════════════════════════════════════════════════════════════════
   EMBUDO COMERCIAL — Funnel Component
   ════════════════════════════════════════════════════════════════════ */

.funnel {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.funnel-header {
  text-align: center;
  margin-bottom: 48px;
}

.funnel-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.15;
  margin-bottom: 12px;
}

.funnel-header h1 em {
  color: var(--accent-lt);
  font-style: italic;
}

.funnel-header p {
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Funnel layers — vertical stack on mobile, horizontal on desktop */
.funnel-layers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Each layer is wider at top, narrower at bottom */
.funnel-layer {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text);
  transition: .2s;
  margin: 0 auto;
  width: 100%;
  max-width: 700px;
  position: relative;
  overflow: hidden;
}

.funnel-layer:hover {
  border-color: var(--accent-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}

/* Progressive narrowing for funnel effect (desktop) */
@media (min-width: 768px) {
  .funnel-layer:nth-child(1) { max-width: 700px; }
  .funnel-layer:nth-child(2) { max-width: 640px; }
  .funnel-layer:nth-child(3) { max-width: 580px; }
  .funnel-layer:nth-child(4) { max-width: 520px; }
  .funnel-layer:nth-child(5) { max-width: 460px; }
  .funnel-layer:nth-child(6) { max-width: 400px; }
  .funnel-layer:nth-child(7) { max-width: 340px; }
}

.funnel-layer .layer-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  color: white;
}

.funnel-layer:nth-child(1) .layer-num { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.funnel-layer:nth-child(2) .layer-num { background: linear-gradient(135deg, var(--teal), var(--teal-lt)); }
.funnel-layer:nth-child(3) .layer-num { background: linear-gradient(135deg, #C9A02C, #D4B04A); }
.funnel-layer:nth-child(4) .layer-num { background: linear-gradient(135deg, #E85D3F, #F2795C); }
.funnel-layer:nth-child(5) .layer-num { background: linear-gradient(135deg, #4A90D9, #6BA8E8); }
.funnel-layer:nth-child(6) .layer-num { background: linear-gradient(135deg, #E05C3A, #F2795C); }
.funnel-layer:nth-child(7) .layer-num { background: linear-gradient(135deg, #6B7280, #9CA3AF); }

.funnel-layer .layer-info { flex: 1; min-width: 0; }
.funnel-layer .layer-info h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin-bottom: 2px;
}
.funnel-layer .layer-info span {
  font-size: 12px;
  color: var(--muted);
}

.funnel-layer .layer-arrow {
  color: var(--muted);
  font-size: 20px;
  flex-shrink: 0;
  transition: transform .2s, color .2s;
}
.funnel-layer:hover .layer-arrow {
  transform: translateX(3px);
  color: var(--accent-lt);
}

/* Metrics row */
.funnel-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 48px auto 0;
}

.funnel-metric {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}
.funnel-metric .val {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent-lt);
  margin-bottom: 4px;
}
.funnel-metric .lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ═════════════════════════════════════════════════════════════════════
   RESPONSIVE (global overrides)
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .topbar { padding: 14px 18px; flex-direction: column; gap: 8px; }
  .topbar .nav a { margin: 0 8px; font-size: 11px; }
  section { padding: 30px 18px; }
  .email-body { padding: 20px 22px; }
  .doc-paper { padding: 24px 20px; }
  .esc-grid { grid-template-columns: 1fr; }
  .segment-grid { grid-template-columns: 1fr; }
  .call-frame-wrap { min-height: 480px; }
  .call-frame-wrap iframe { height: 480px; }
  .landing-hero { padding: 50px 18px 40px; }
  .funnel { padding: 24px 16px 40px; }
  .funnel-layer { padding: 16px 18px; }
  .funnel-layer .layer-num { width: 34px; height: 34px; font-size: 14px; }
  .funnel-layer .layer-info h3 { font-size: 15px; }
  .funnel-metrics { grid-template-columns: repeat(2, 1fr); }
}
