:root {
  --surface-soft: rgba(15, 23, 42, 0.55);
  --muted: #94a3b8;
  --success: #34d399;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* Light mode is treated as its own visual system rather than a color inversion. */
body.light {
  --bg: #f3f6fb;
  --text: #172033;
  --muted: #526176;
  --glass: rgba(255, 255, 255, 0.92);
  --border: #dbe3ee;
  --card-bg: #ffffff;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.2);
  --surface-soft: #eaf2ff;
  --success: #059669;
  background-image:
    radial-gradient(circle at 8% 4%, rgba(37, 99, 235, 0.07), transparent 28rem),
    radial-gradient(circle at 92% 32%, rgba(14, 165, 233, 0.05), transparent 24rem);
}

body.light .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.09);
}
body.light .site-nav a:not(.nav-cta):hover,
body.light .site-nav a:not(.nav-cta)[aria-current="page"] { color: #1d4ed8; }
body.light .mode-toggle,
body.light .menu-toggle { background: #f8fafc; border-color: #cbd5e1; }

body.light .home-hero,
body.light .faq-hero {
  background: radial-gradient(circle at center top, rgba(37, 99, 235, 0.14), transparent 68%);
}
body.light .home-hero h1,
body.light .faq-hero h1 {
  background: linear-gradient(135deg, #0f172a 15%, #2563eb 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light .eyebrow { color: #1d4ed8; }

body.light :is(.s-card, .service-card, .testimonial-card, .stats-box, .contact-info, .contact-form, .accordion) {
  border-color: #dbe3ee !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}
body.light :is(.s-card, .service-card, .testimonial-card, .stats-box, .contact-info) {
  background: #ffffff !important;
}
body.light :is(.s-card, .service-card, .testimonial-card, .stats-box, .contact-info, .contact-form, .accordion):hover {
  border-color: rgba(37, 99, 235, 0.55) !important;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.11);
}
body.light .cta-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), #eaf2ff);
  border: 1px solid #dbeafe;
}
body.light .panel {
  background: #eef4fc;
  border: 1px solid #dbe3ee;
  border-top: 0;
}
body.light :is(input, textarea) { background: #ffffff !important; border-color: #cbd5e1 !important; }
body.light :is(input, textarea):focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
body.light .btn { box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2); }
body.light footer { opacity: 1; color: var(--muted); }
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

.site-header {
  max-width: 1240px;
  min-height: 64px;
}
.site-header .logo { white-space: nowrap; }
body.light .site-header .logo { color: #0f172a !important; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { margin-left: 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #60a5fa; opacity: 1; }
.nav-cta {
  padding: 9px 16px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--accent);
  opacity: 1 !important;
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
}

.trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 20px;
  color: inherit;
  opacity: .72;
  font-size: .9rem;
}
.trust-row span::before { content: '\2713'; color: var(--success); margin-right: 7px; font-weight: 700; }
.eyebrow {
  margin-bottom: 14px;
  color: #93c5fd;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.accordion {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.accordion[aria-expanded="true"] + .panel { visibility: visible; }
.panel { visibility: hidden; }

.form-note { margin-top: 14px; font-size: .85rem; opacity: .7; }
.required { color: #fca5a5; }

.right-column-container {
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
}

/* Wide desktop rhythm: fixed gutters preserve usable space on large screens. */
@media (min-width: 821px) {
  body > section:not(.hero),
  .services-container,
  .content-section,
  .contact-wrapper {
    width: min(calc(100% - 64px), 1500px);
    max-width: 1500px;
    margin-inline: auto;
    padding-left: 32px !important;
    padding-right: 32px !important;
  }

  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-section {
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 820px) {
  .site-header {
    width: calc(100% - 24px);
    top: 12px;
    padding: 9px 14px;
    border-radius: 24px;
  }
  .site-header .header-contact { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .site-header .header-right { flex-wrap: nowrap; }
  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #0f172a;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
  }
  .site-nav.open { display: flex; flex-direction: column; }
  .site-nav a { margin: 0; padding: 11px 14px; color: #f1f5f9; border-radius: 10px; }
  .site-nav a:hover { background: rgba(59,130,246,.12); }
  .nav-cta { text-align: center; }
  .hero { padding-top: 140px !important; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: clamp(2.2rem, 12vw, 3.1rem) !important; }
  section { padding-left: 20px !important; padding-right: 20px !important; }
  .services-grid, .services-container { grid-template-columns: minmax(0, 1fr) !important; }
  .service-card, .s-card, .contact-form, .contact-info { padding: 26px !important; }
}
