/* ===== Design tokens ===== */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --secondary: #0F172A;
  --accent: #06B6D4;
  --accent-tint: #ECFEFF;
  --background: #FFFFFF;
  --card-bg: #FFFFFF;
  --header-bg: rgba(255, 255, 255, 0.9);
  --heading: #0F172A;
  --text: #0F172A;
  --text-muted: #475569;
  --border: #E2E8F0;
  --surface: #F8FAFC;
  --success-bg: #ECFDF5;
  --success-text: #047857;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --background: #0B1220;
  --card-bg: #16213A;
  --header-bg: rgba(11, 18, 32, 0.85);
  --heading: #F8FAFC;
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --border: #27354D;
  --surface: #131C2E;
  --accent-tint: rgba(6, 182, 212, 0.12);
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-text: #34D399;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  max-width: 100vw;
  font-family: var(--font);
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
  font-size: 18px;
  transition: background-color 0.25s ease, color 0.25s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 16px; font-weight: 800; }
p { margin: 0 0 16px; color: var(--text-muted); }
.container {
  width: 100%;
  max-width: clamp(1180px, 84vw, 1600px);
  margin: 0 auto;
  padding: 0 clamp(24px, 3vw, 48px);
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,0.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--card-bg); color: var(--heading); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(6,182,212,0.35); }
.btn-accent:hover { background: #0891A8; }
.btn-sm { padding: 10px 20px; font-size: 15px; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--heading);
  min-width: 0;
  flex-shrink: 1;
}
.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand img { flex-shrink: 0; }
.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
}
.main-nav a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--heading);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background-color 0.25s ease;
}
.theme-toggle:hover { border-color: var(--primary); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--heading); border-radius: 2px; }

/* ===== Hero ===== */
.hero { padding: 64px 0 80px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  margin-bottom: 12px;
}
.hero h1 { font-size: 52px; font-weight: 800; color: var(--heading); }
.hero-lead { font-size: 18px; max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0; }
.trust-label { font-weight: 700; color: var(--heading); margin-bottom: 14px; font-size: 15px; }
.check-row { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.check-row li {
  font-weight: 600;
  font-size: 15px;
  color: var(--heading);
  padding-left: 24px;
  position: relative;
}
.check-row li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== Carousel ===== */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--surface);
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.carousel-slide { min-width: 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,23,42,0.55);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.carousel-arrow:hover { background: var(--primary); }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0;
}
.carousel-dots button.active { background: var(--accent); width: 22px; border-radius: 6px; }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); }
.section-eyebrow {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  margin-bottom: 10px;
}
h2 { font-size: 36px; color: var(--heading); }
.sub-heading { font-size: 22px; color: var(--heading); margin-top: 32px; }
.lead-text { font-size: 20px; color: var(--heading); font-weight: 600; }
.callout {
  font-weight: 700;
  color: var(--heading);
  border-left: 4px solid var(--accent);
  padding-left: 16px;
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.check-list li {
  position: relative;
  padding: 8px 0 8px 30px;
  color: var(--heading);
  font-weight: 600;
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.check-list.two-col { column-count: 2; column-gap: 24px; }
.check-list.two-col li { break-inside: avoid; }
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.trust-grid img {
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* Problem / interest */
.centered-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.x-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 32px;
  max-width: 900px;
  margin: 0 auto 24px;
}
.x-list li {
  position: relative;
  padding-left: 28px;
  font-weight: 600;
  color: var(--heading);
}
.x-list li::before {
  content: "\2715";
  position: absolute;
  left: 0;
  color: #EF4444;
  font-weight: 700;
}
.centered-note { text-align: center; font-weight: 600; color: var(--heading); margin-bottom: 48px; }

.flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}
.flow-step {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.flow-step p { margin: 0; color: var(--heading); font-weight: 500; }
.flow-step-accent { border-color: var(--accent); background: var(--accent-tint); }
.flow-label {
  display: inline-block;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.flow-arrow { color: var(--accent); font-size: 22px; font-weight: 700; }

/* Services */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(15,23,42,0.12); }
.service-icon { font-size: 34px; margin-bottom: 16px; }
.service-card h3 { font-size: 20px; color: var(--heading); margin-bottom: 10px; }
.service-card p { margin: 0; }

/* Benefits table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.benefits-table { width: 100%; border-collapse: collapse; background: var(--card-bg); min-width: 560px; }
.benefits-table th, .benefits-table td { padding: 18px 24px; text-align: left; border-bottom: 1px solid var(--border); }
.benefits-table th { background: var(--secondary); color: #fff; font-size: 16px; }
.benefits-table td:first-child { font-weight: 700; color: var(--heading); white-space: nowrap; }
.benefits-table tr:last-child td { border-bottom: none; }

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 17px; margin: 0; color: var(--heading); }

/* Contact / lead form */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.lead-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 600; font-size: 14px; color: var(--heading); }
.form-field input, .form-field select, .form-field textarea {
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.form-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 600;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin: 0;
}
.stars { color: var(--accent); letter-spacing: 4px; margin-bottom: 12px; }
.testimonial-card p { color: var(--heading); font-style: italic; }
.testimonial-card cite { font-weight: 700; font-style: normal; color: var(--primary); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 24px;
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
  cursor: pointer;
  font-family: inherit;
}
.faq-toggle { color: var(--primary); font-size: 22px; font-weight: 400; transition: transform 0.2s ease; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 24px;
}
.faq-item.open .faq-answer { max-height: 240px; padding: 0 24px 20px; }
.faq-answer p { margin: 0; }

/* Final CTA */
.final-cta { background: var(--secondary); padding: 80px 0; }
.final-cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.final-cta h2 { color: #fff; }
.final-cta p { color: #CBD5E1; }

/* Footer */
.site-footer { background: var(--secondary); border-top: 1px solid rgba(255,255,255,0.08); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #fff; }
.footer-phone { color: #CBD5E1; margin: 0; font-weight: 600; }
.footer-copy { color: #64748B; font-size: 14px; margin: 8px 0 0; }
.footer-legal { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 13px; }
.footer-legal a { color: #94A3B8; }
.footer-legal a:hover { color: #fff; }
.footer-legal span { color: #475569; }

/* ===== Legal pages ===== */
.legal-hero { padding: 48px 0 8px; }
.legal-hero h1 { font-size: 40px; color: var(--heading); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 20px;
}
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-content .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.legal-disclaimer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.legal-disclaimer strong { color: var(--heading); }
.legal-content h2 {
  font-size: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legal-content h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.legal-content h3 { font-size: 18px; color: var(--heading); margin: 20px 0 8px; }
.legal-content ul { list-style: disc; padding-left: 22px; margin: 0 0 14px; }
.legal-content ul li { margin-bottom: 6px; color: var(--text-muted); }
.legal-content a { color: var(--primary); text-decoration: underline; }

/* Reveal animation */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-carousel { order: -1; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .x-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    z-index: 99;
  }
}
@media (max-width: 720px) {
  .hero h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .check-list.two-col { column-count: 1; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .x-list { grid-template-columns: 1fr; }
}

@media (min-width: 1600px) {
  .hero h1 { font-size: 60px; }
  h2 { font-size: 40px; }
  body { font-size: 19px; }
  .hero-lead { max-width: 620px; }
}

/* ===== Chat widget ===== */
.chat-widget {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  max-width: calc(100vw - 32px);
}
.chat-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
  transition: transform 0.2s ease;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab-icon-close { display: none; }
.chat-widget.open .chat-fab-icon-open { display: none; }
.chat-widget.open .chat-fab-icon-close { display: inline; }

.chat-greeting {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: min(264px, calc(100vw - 32px));
  background: var(--secondary);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  animation: chatPop 0.3s ease;
}
.chat-greeting[hidden] { display: none; }
.chat-greeting p { color: #fff; margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.chat-greeting-cta {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.chat-greeting-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

@keyframes chatPop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-panel {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: min(350px, calc(100vw - 32px));
  height: 480px;
  max-height: 70vh;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatPop 0.2s ease;
}
.chat-panel[hidden] { display: none; }

.chat-panel-header {
  background: var(--secondary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-panel-brand { display: flex; align-items: center; gap: 10px; }
.chat-panel-brand img { border-radius: 6px; display: block; }
.chat-panel-brand strong { display: block; font-size: 14px; }
.chat-panel-brand span { display: block; font-size: 11px; color: #94A3B8; }
.chat-panel-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }

.chat-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.chat-msg.bot { background: var(--surface); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-quick-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; flex-shrink: 0; }
.chat-quick-replies button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.chat-quick-replies button:hover { border-color: var(--primary); color: var(--primary); }

.chat-panel-input {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 10px;
  gap: 8px;
  flex-shrink: 0;
}
.chat-panel-input input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  min-width: 0;
}
.chat-panel-input input:focus { outline: none; border-color: var(--primary); }
.chat-panel-input button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .chat-panel { height: 65vh; }
}
