:root {
  --navy-950: #070d19;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-600: #475569;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--navy-900); background: var(--slate-50); }
body { margin: 0; padding: 0; line-height: 1.6; }
a { color: var(--emerald-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.top-alert-bar {
  background: var(--navy-950);
  color: #f8fafc;
  font-size: 0.84rem;
  padding: 9px 16px;
  text-align: center;
  border-bottom: 1px solid #1e293b;
}
.top-alert-bar strong { color: #34d399; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1e293b;
  color: #fff;
}
.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none !important;
}
.brand-badge {
  background: var(--emerald-500);
  color: var(--navy-950);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nav-links a {
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: var(--navy-800);
}
.nav-cta-pro {
  background: var(--emerald-600) !important;
  color: #fff !important;
}
.nav-cta-pro:hover {
  background: var(--emerald-500) !important;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  background: linear-gradient(135deg, #070d19 0%, #0f172a 60%, #064e3b 100%);
  color: #fff;
  padding: 48px 0 42px;
  border-bottom: 3px solid var(--emerald-500);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 28px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.16;
  margin: 0 0 14px;
  letter-spacing: -0.025em;
}
.hero p.lead {
  color: #cbd5e1;
  font-size: 1.04rem;
  margin: 0 0 22px;
  max-width: 720px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-emerald { background: var(--emerald-500); color: var(--navy-950); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.32); }
.btn-emerald:hover { background: #34d399; }
.btn-amber { background: #f59e0b; color: var(--navy-950); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); }
.btn-amber:hover { background: #fbbf24; }
.btn-navy { background: var(--navy-900); color: #fff; border: 1px solid var(--navy-700); }
.btn-navy:hover { background: var(--navy-800); }
.btn-outline { background: #fff; color: var(--navy-900); border: 1px solid #cbd5e1; }
.btn-outline:hover { background: var(--slate-100); }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 760px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
.stat-box {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat-box .num {
  font-size: 1.32rem;
  font-weight: 800;
  color: #34d399;
  display: block;
}
.stat-box .lbl {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.hero-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.hero-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: #fff;
}
.hero-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.hero-checklist li {
  font-size: 0.86rem;
  color: #e2e8f0;
  margin-bottom: 9px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.section { padding: 48px 0; border-bottom: 1px solid var(--slate-200); }
.section-alt { background: #fff; }
.section-header { margin-bottom: 24px; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.section-header h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  margin: 0 0 8px;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
.section-header p {
  margin: 0;
  color: var(--slate-600);
  max-width: 820px;
}

.tool-panel {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  margin-bottom: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 6px;
}
.field select, .field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #94a3b8;
  font-size: 0.92rem;
  color: var(--navy-900);
  background: #fff;
}
.field select:focus, .field input:focus {
  outline: 2px solid var(--emerald-500);
  border-color: var(--emerald-600);
}

.result-banner {
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border-left: 6px solid var(--emerald-600);
  background: var(--emerald-50);
}
.result-banner.warn {
  border-left-color: var(--amber-600);
  background: var(--amber-100);
}
.result-banner.danger {
  border-left-color: var(--red-600);
  background: var(--red-100);
}
.result-banner h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 14px 16px;
}
.kpi-card .k-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--slate-600);
}
.kpi-card .k-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-top: 4px;
}
.kpi-card .k-sub {
  font-size: 0.78rem;
  color: var(--slate-600);
  margin-top: 2px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: #fff;
}
table.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
table.comp-table th {
  background: var(--navy-900);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  white-space: nowrap;
}
table.comp-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: middle;
}
table.comp-table tr:nth-child(even) { background: var(--slate-50); }
table.comp-table tr.highlight-row { background: #ecfdf5; }

.v-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.v-badge-emerald { background: var(--emerald-100); color: var(--emerald-700); }
.v-badge-navy { background: #e0e7ff; color: #1e3a8a; }
.v-badge-amber { background: var(--amber-100); color: #92400e; }
.v-badge-red { background: var(--red-100); color: var(--red-600); }

.canvas-studio-wrap {
  background: var(--navy-950);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--navy-700);
}
canvas#ab2801-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.upsell-dual-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 860px) {
  .upsell-dual-grid { grid-template-columns: 1fr; }
}
.upsell-box {
  border-radius: 14px;
  padding: 22px;
  border: 2px solid var(--emerald-500);
  background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%);
  color: #fff;
}
.upsell-box.secondary {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.upsell-box h3 { margin: 6px 0 10px; font-size: 1.2rem; color: #fff; }
.upsell-box p { font-size: 0.88rem; color: #e2e8f0; margin: 0 0 14px; }

.letter-preview-box {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-top: 4px solid #0f172a;
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.84rem;
  line-height: 1.65;
  white-space: pre-wrap;
  max-height: 440px;
  overflow-y: auto;
  position: relative;
}
.gbb-card.featured {
  border: 2px solid #059669;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 28%);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(5, 150, 105, 0.16);
}
@media (max-width: 820px) {
  .top-alert-bar {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 12px;
    font-size: 0.72rem;
  }
  .nav-container {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-logo {
    font-size: 1rem;
  }
  .nav-links {
    width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    gap: 6px;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 0.77rem;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
  }
  .hero {
    padding: 20px 14px 24px;
  }
  .trust-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
    margin-bottom: 10px;
  }
  .hero h1 {
    font-size: 1.52rem;
    line-height: 1.18;
    margin-bottom: 10px;
  }
  .hero p.lead {
    font-size: 0.9rem;
    line-height: 1.42;
    margin-bottom: 14px;
  }
  .hero-actions {
    gap: 8px;
    margin-bottom: 16px;
  }
  .hero-actions .btn {
    padding: 10px 14px;
    font-size: 0.84rem;
    width: 100%;
  }
}

.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 780px) {
  .faq-list { grid-template-columns: 1fr; }
}
.faq-item {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 18px;
}
.faq-item h4 { margin: 0 0 8px; color: var(--navy-900); font-size: 0.96rem; }
.faq-item p { margin: 0; font-size: 0.86rem; color: var(--slate-600); }

.site-footer {
  background: var(--navy-950);
  color: #94a3b8;
  padding: 44px 0 32px;
  font-size: 0.84rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 0.94rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { color: #cbd5e1; }
.footer-disclaimer {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

/* Contractor Good-Better-Best Tier Grid & Signature Pad */
.gbb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.gbb-card {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.gbb-card.featured {
  border-color: var(--emerald);
  box-shadow: 0 10px 25px rgba(4, 120, 87, 0.14);
}
.gbb-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.gbb-price {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--navy);
  margin: 8px 0 4px;
}
.statutory-warning-box {
  background: #fef2f2;
  border: 2px solid #dc2626;
  color: #7f1d1d;
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 16px;
}
.sig-pad-wrap {
  background: #ffffff;
  border: 2px dashed #64748b;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.sig-pad-wrap canvas {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: crosshair;
  max-width: 100%;
  touch-action: none;
}

/* Regla global para números en tablas, precios y calculadoras */
.tabular-nums, .kpi-value, .price-tag, .table td, .data-table td, .dynamic-col-price, input[type="number"] {
  font-variant-numeric: tabular-nums;
}

/* P0 Universal Mobile Header Fix (< 768px / 820px) */
@media (max-width: 820px) {
  .top-alert-bar {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 12px;
    font-size: 0.72rem;
  }
  .nav-container {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-logo {
    font-size: 1rem;
  }
  .nav-links {
    width: 100%;
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    gap: 6px;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 0.77rem;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
  }
  .hero {
    padding: 20px 14px 24px;
  }
  .trust-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
    margin-bottom: 10px;
  }
  .hero h1 {
    font-size: 1.52rem;
    line-height: 1.18;
    margin-bottom: 10px;
  }
  .hero p.lead {
    font-size: 0.9rem;
    line-height: 1.42;
    margin-bottom: 14px;
  }
  .hero-actions {
    gap: 8px;
    margin-bottom: 16px;
  }
  .hero-actions .btn {
    padding: 10px 14px;
    font-size: 0.84rem;
    width: 100%;
  }
}
