/* ===== Design tokens ===== */
:root {
  --color-primary: #2c5cf0;
  --color-primary-dark: #1a3fc4;
  --color-primary-light: #eaf0ff;
  --color-accent: #17b891;
  --color-text: #16213e;
  --color-text-muted: #5a6478;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f8fc;
  --color-border: #e6e9f2;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(22, 33, 62, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 33, 62, 0.10);
  --shadow-lg: 0 20px 48px rgba(22, 33, 62, 0.14);
  --max-width: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--color-text-muted); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-primary); }
.btn-light { background: #fff; color: var(--color-primary); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ===== Topbar ===== */
.topbar {
  background: var(--color-text);
  color: #cfd8ff;
  font-size: 0.8rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  flex-wrap: wrap;
  gap: 4px;
}
.topbar-right { opacity: 0.85; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 24px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.5px;
}
.logo span { color: var(--color-primary); }
.nav {
  display: flex;
  gap: 22px;
  flex: 1;
  justify-content: center;
}
.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  position: relative;
  padding: 4px 0;
}
.nav a:hover { color: var(--color-primary); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn { padding: 10px 16px; font-size: 0.88rem; white-space: nowrap; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #e3ecff 0%, #e2fbf3 50%, #fff7ec 100%);
  padding: 64px 0 40px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.pill {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -1px;
}
.hero .highlight { color: var(--color-primary); }
.hero-content > p {
  font-size: 1.05rem;
  max-width: 560px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 28px;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.4rem; color: var(--color-text); }
.hero-stats span { font-size: 0.85rem; color: var(--color-text-muted); }

/* Quote form */
.quote-form {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 18px;
  margin: 28px 0 8px;
  border: 1px solid var(--color-border);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
}
.form-select, .form-input {
  padding: 13px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  width: 100%;
}
.form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 10px 2px 0;
}

/* Hero visual */
.hero-visual {
  position: relative;
  height: 460px;
}
.hero-blob {
  position: absolute;
  inset: 2% -5%;
  background: radial-gradient(circle at 22% 22%, rgba(44, 92, 240, 0.38), transparent 55%),
              radial-gradient(circle at 78% 32%, rgba(23, 184, 145, 0.38), transparent 55%),
              radial-gradient(circle at 45% 82%, rgba(255, 159, 67, 0.32), transparent 55%),
              radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.3), transparent 55%);
  border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%;
  z-index: 0;
  animation: blobMove 10s ease-in-out infinite;
}
@keyframes blobMove {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.04); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  z-index: 1;
  border: 1px solid var(--color-border);
  animation: floatY 4.5s ease-in-out infinite;
  max-width: 230px;
}
.hero-card-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.icon-blue { background: linear-gradient(135deg, #2c5cf0, #6a92ff); }
.icon-teal { background: linear-gradient(135deg, #17b891, #5fe6c4); }
.icon-amber { background: linear-gradient(135deg, #ff9f43, #ffcd94); }
.icon-purple { background: linear-gradient(135deg, #8b5cf6, #c7b6fb); }
.hero-card-title { font-weight: 700; font-size: 0.9rem; color: var(--color-text); line-height: 1.25; }
.hero-card span { font-size: 0.78rem; font-weight: 600; color: var(--color-accent); }
.card-1 { top: 2%; left: 0; animation-delay: 0s; }
.card-2 { top: 26%; right: 0; animation-delay: 0.6s; }
.card-3 { top: 56%; left: 4%; animation-delay: 1.2s; }
.card-4 { bottom: 0; right: 8%; animation-delay: 1.8s; }

/* ===== Trust bar ===== */
.trustbar { padding: 28px 0; border-bottom: 1px solid var(--color-border); }
.trustbar-inner p {
  text-align: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.logo-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px;
  font-weight: 700;
  color: #a7afc4;
  font-size: 1.05rem;
}

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.5px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.product-card .icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.link-arrow {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ===== Lead capture modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 33, 62, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-bg-alt);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-text-muted);
}
.modal h3 { margin-bottom: 6px; }
.modal-field { margin-bottom: 14px; }
.btn-full { width: 100%; margin-top: 4px; }

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
}
.checkbox-item input { width: 16px; height: 16px; flex-shrink: 0; }

/* Plan selector on comparison page */
.plan-selector {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.plan-selector-title { font-weight: 700; margin-bottom: 12px; font-size: 0.95rem; }
.plan-selector-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.plan-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.plan-chip input { width: 15px; height: 15px; }
.recommendation-banner {
  background: linear-gradient(120deg, var(--color-primary-light), #eafff8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
}
.full-compare-toggle-wrap { text-align: center; margin: 32px 0; }

/* Team / Our People */
.team-card { text-align: center; padding: 32px; }
.team-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 4px solid var(--color-primary-light);
  box-shadow: var(--shadow-md);
}
.team-role {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.team-social { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.team-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
}

/* Steps */
.steps { text-align: center; }
.step-number {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Features */
.feature { text-align: center; padding: 12px; }
.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Testimonials */
.testimonial p { color: var(--color-text); font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.testimonial-author div:last-child { display: flex; flex-direction: column; }
.testimonial-author strong { font-size: 0.9rem; }
.testimonial-author span { font-size: 0.8rem; color: var(--color-text-muted); }

/* Accordion */
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}
.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.accordion-header span { color: var(--color-primary); font-size: 1.2rem; transition: transform 0.2s ease; }
.accordion-item.open .accordion-header span { transform: rotate(45deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 4px;
}
.accordion-item.open .accordion-body {
  max-height: 240px;
  padding: 0 4px 20px;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--color-primary), var(--color-primary-dark));
  padding: 56px 0;
  color: #fff;
}
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.cta-inner h2 { margin-bottom: 6px; }
.cta-inner p { color: #dbe4ff; margin: 0; }

/* Footer */
.footer { background: var(--color-text); color: #b7bedb; padding: 64px 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer .logo { color: #fff; }
.footer-brand p { color: #9aa2c4; margin-top: 10px; }
.social { display: flex; gap: 12px; margin-top: 16px; }
.social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-col h5 { color: #fff; margin-bottom: 14px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a, .footer-col p { display: block; color: #b7bedb; margin-bottom: 10px; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; }
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: #fff; }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== Comparison page ===== */
.compare-hero {
  background: linear-gradient(180deg, var(--color-primary-light) 0%, #ffffff 100%);
  padding: 56px 0 32px;
  text-align: center;
}
.compare-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.5px; }

.compare-subnav {
  position: sticky;
  top: 65px;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  z-index: 90;
  overflow-x: auto;
  white-space: nowrap;
  padding: 12px 0;
}
.compare-subnav a {
  display: inline-block;
  margin-right: 24px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.compare-subnav a:hover { color: var(--color-primary); }

.compare-section-title { font-size: clamp(1.3rem, 2.5vw, 1.7rem); letter-spacing: -0.3px; }

.snapshot-grid { grid-template-columns: repeat(5, 1fr); }
.snapshot-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.snapshot-card h4 { font-size: 1rem; margin-bottom: 2px; }
.snapshot-card .insurer { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 12px; }
.snapshot-usp { font-size: 0.83rem; color: var(--color-text); flex: 1; }
.snapshot-si { font-size: 0.8rem; color: var(--color-accent); font-weight: 700; margin-bottom: 14px; }

.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.compare-table { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 0.86rem; }
.compare-table th, .compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: var(--color-bg-alt);
  position: sticky;
  top: 0;
  font-size: 0.85rem;
}
.compare-table td:first-child, .compare-table th:first-child {
  font-weight: 600;
  background: #fbfcff;
  min-width: 190px;
  position: sticky;
  left: 0;
}
.compare-table tr.group-row td {
  background: var(--color-primary-light);
  font-weight: 700;
  color: var(--color-primary-dark);
  position: static;
}

.verdict-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.verdict-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.verdict-card h4 { margin-bottom: 2px; }
.verdict-insurer { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 4px; }
.verdict-card h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin: 14px 0 6px;
}
.verdict-card ul { padding-left: 18px; list-style: disc; margin: 0 0 4px; }
.verdict-card li { font-size: 0.83rem; color: var(--color-text-muted); margin-bottom: 4px; }
.verdict-card .btn { margin-top: auto; padding-top: 14px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 340px; margin-top: 24px; }
  .hero-card { max-width: 180px; padding: 10px 14px; }
  .hero-card-icon { width: 34px; height: 34px; min-width: 34px; font-size: 1.05rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Nav collapses to hamburger earlier than other mobile rules, since the
   header now carries more nav links and buttons than fit on medium screens. */
@media (max-width: 1150px) {
  .nav { display: none; }
  .header-actions .btn-outline { display: none; }
  .nav-toggle { display: flex; }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .snapshot-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .topbar-inner { flex-direction: column; text-align: center; }
}
