:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-alt: #eaf0fb;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1d4ed8;
  --primary-strong: #1e40af;
  --border: #dbe3f2;
  --success: #0f766e;
  --danger: #b91c1c;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
}

:root[data-theme='dark'] {
  --bg: #070d1f;
  --surface: #0f1a33;
  --surface-alt: #111f3f;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --primary-strong: #93c5fd;
  --border: #22304f;
  --success: #2dd4bf;
  --danger: #fca5a5;
  --shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 40%), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-color: var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-toggle,
.menu-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 0.6rem;
  min-height: 2.4rem;
  min-width: 2.4rem;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  padding: 0.4rem;
}

.menu-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--text);
  margin: 0.24rem auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.site-nav a {
  padding: 0.5rem 0.7rem;
  border-radius: 0.45rem;
  color: var(--muted);
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font-weight: 600;
  padding: 0.72rem 1.12rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn.btn-small {
  padding: 0.52rem 0.9rem;
}

.btn.btn-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

main {
  padding-bottom: 4rem;
}

.section {
  padding: clamp(3rem, 5vw, 5.5rem) 0;
}

.hero-grid,
.grid-2,
.grid-3 {
  display: grid;
  gap: 1.2rem;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.8rem;
}

h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.3rem);
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.hero-panel .stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.hero-panel .stats strong {
  display: block;
  font-size: 1.3rem;
}

.alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

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

.icon-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.icon-list li {
  margin-bottom: 0.6rem;
  color: var(--muted);
}

.icon-list li::before {
  content: '✓';
  color: var(--success);
  margin-right: 0.5rem;
}

.process-steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.process-steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.95rem 1rem 0.95rem 3.2rem;
  position: relative;
}

.process-steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 0.9rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 99px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  font-size: 0.8rem;
  font-weight: 700;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 0.7rem 0.85rem;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
}

.quote-form {
  display: grid;
  gap: 0.8rem;
}

.form-row {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.67rem 0.72rem;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

[aria-invalid='true'] {
  border-color: var(--danger);
}

.form-status {
  margin: 0;
  font-weight: 600;
}

.form-status.error {
  color: var(--danger);
}

.form-status.success {
  color: var(--success);
}

.cta-banner {
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.2rem 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 99px;
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .form-row {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: absolute;
    right: 4%;
    top: 4.1rem;
    min-width: 220px;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    border-radius: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-block;
  }
}

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