/* ==========================================================================
   InsuristQuote — shared stylesheet
   ========================================================================== */

:root {
  /* Color tokens */
  --navy-900: #0b2545;
  --navy-800: #123362;
  --navy-700: #17417f;
  --teal-500: #1a9e97;
  --teal-100: #e4f5f3;
  --orange-500: #f2762e;
  --orange-600: #dd5f18;
  --bg: #f6f8fb;
  --white: #ffffff;
  --ink: #16213a;
  --ink-soft: #56637a;
  --line: #e2e8f1;
  --shadow: 0 20px 40px -24px rgba(11, 37, 69, 0.35);

  /* Type */
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 3.4vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 16px; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }
li { list-style: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-500);
  margin-bottom: 10px;
}

.section {
  padding: 72px 0;
}
.section--tight { padding: 48px 0; }
.section--navy {
  background: var(--navy-900);
  color: var(--white);
}
.section--navy h2, .section--navy h3, .section--navy p { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.75); }
.section--soft { background: var(--white); }

/* Safety net: light-surface components (cards, the quote form panel, step
   tiles, disclaimer box) must always render dark text on their own white
   background, even when a parent .section--navy sets white text for the
   surrounding copy. Without this, e.g. the quote form dropped onto a navy
   section (ACA, Auto Insurance) renders white-on-white and disappears. */
.section--navy .card,
.section--navy .quote-panel,
.section--navy .step,
.section--navy .reason-list li,
.section--navy .plan-types li,
.section--navy .disclaimer-box {
  color: var(--ink) !important;
}
.section--navy .card h3,
.section--navy .quote-panel h3,
.section--navy .step h3 {
  color: var(--navy-900) !important;
}
.section--navy .card p,
.section--navy .quote-panel p,
.section--navy .step p,
.section--navy .reason-list li p {
  color: var(--ink-soft) !important;
}
.section--navy .quote-panel .sub,
.section--navy .quote-panel .consent {
  color: var(--ink-soft) !important;
}
.section--navy .quote-panel .field label {
  color: var(--navy-900) !important;
}
.section--navy .plan-types .num {
  color: var(--teal-500) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn--primary {
  background: var(--orange-500);
  color: var(--white);
  box-shadow: 0 12px 24px -10px rgba(242, 118, 46, 0.65);
}
.btn--primary:hover { background: var(--orange-600); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--white);
}
.btn--ghost:hover { border-color: var(--white); }
.btn--block { width: 100%; justify-content: center; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 76px;
  gap: 20px;
}
/* Minimal header (service/vertical pages): logo + CTA only, no nav column */
.site-header__row--minimal {
  grid-template-columns: auto auto;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.logo span { color: var(--teal-500); }

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover, .nav a[aria-current="page"] {
  background: var(--teal-100);
  color: var(--teal-500);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-900);
  margin: 5px 0;
}

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(26,158,151,0.18), transparent 60%),
    linear-gradient(180deg, #0b2545 0%, #123362 100%);
  color: var(--white);
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero p.lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 46ch;
}
.hero__actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero__art {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  padding: 20px;
}
.hero__art img { border-radius: 14px; width: 100%; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}
.trust-strip strong { color: var(--white); }

/* ---------------- About / two-col ---------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.two-col img { border-radius: var(--radius); }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

/* ---------------- Plan cards ---------------- */
.section-head {
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head p { max-width: 50ch; margin-inline: auto; }

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--teal-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card__icon img { width: 28px; height: 28px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.95rem; margin-bottom: 18px; }
.card a.link {
  color: var(--teal-500);
  font-weight: 600;
  font-size: 0.92rem;
}
.card a.link:hover { text-decoration: underline; }

/* ---------------- Why us / pills ---------------- */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 40px;
}
.pill {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-500);
  font-weight: 600;
  font-size: 0.92rem;
}

.feature-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.feature-block img { border-radius: var(--radius); }

.reason-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.reason-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.reason-list img { width: 34px; height: 34px; flex-shrink: 0; }
.reason-list p { margin: 0; font-size: 0.95rem; }

/* ---------------- Numbered steps ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step .num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal-500);
  margin-bottom: 10px;
}

/* ---------------- Quote form ---------------- */
.quote-panel {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 32px;
}
.quote-panel h3 { margin-bottom: 4px; }
.quote-panel .sub { font-size: 0.92rem; margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--teal-500);
  outline-offset: 1px;
  background: var(--white);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.consent {
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 16px 0;
}
.consent a { color: var(--teal-500); text-decoration: underline; }

.form-message {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.form-message--success {
  background: var(--teal-100);
  color: var(--navy-900);
}
.form-message--preview {
  background: #fff4e5;
  color: #8a4b0a;
}

.cta-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

/* ---------------- FAQ ---------------- */
.faq {
  max-width: 780px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-weight: 600;
  color: var(--navy-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--teal-500);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 20px; margin: 0; }

.disclaimer-box {
  margin-top: 32px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.disclaimer-box strong { color: var(--navy-900); }

/* ---------------- Numbered plan-type list ---------------- */
.plan-types { display: flex; flex-direction: column; gap: 18px; }
.plan-types li {
  display: flex;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.plan-types .num {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--teal-500);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 28px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.footer-nav a:hover { color: var(--white); }
.footer-disclaimer {
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
}

/* ---------------- Legal pages ---------------- */
.legal-hero {
  background: var(--navy-900);
  color: var(--white);
  padding: 56px 0 40px;
}
.legal-hero h1 { color: var(--white); margin-bottom: 8px; }
.legal-hero .updated { color: rgba(255,255,255,0.65); font-size: 0.9rem; }

.legal-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.legal-body h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  padding-top: 8px;
  scroll-margin-top: 100px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin-top: 24px; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 0.98rem; }
.legal-body ul, .legal-body ol { margin: 0 0 16px; padding-left: 22px; }
.legal-body li { margin-bottom: 8px; list-style: disc; }
.legal-body ol li { list-style: decimal; }
.legal-body a { color: var(--teal-500); text-decoration: underline; }
.legal-toc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 40px;
}
.legal-toc h2 { margin-top: 0; font-size: 1rem; text-transform: none; }
.legal-toc ol { margin: 0; padding-left: 20px; }
.legal-toc li { margin-bottom: 6px; }
.legal-toc a { color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.legal-toc a:hover { color: var(--teal-500); text-decoration: underline; }
.legal-callout {
  background: var(--teal-100);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.92rem;
  color: var(--navy-900);
  margin: 20px 0;
}
.legal-callout strong { display: block; margin-bottom: 4px; }

/* ---------------- Motion: scroll reveal & hero polish ---------------- */
/* Classes are added by JS only — if JS fails to load, nothing is hidden,
   so this is safe progressive enhancement, not a requirement to see content. */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(.2,.65,.3,1), transform 0.65s cubic-bezier(.2,.65,.3,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero__art { animation: floatY 6s ease-in-out infinite; }

@keyframes heroGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero { background-size: 180% 180%; animation: heroGlow 16s ease infinite; }

/* Card / interactive polish */
.card {
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-500), var(--orange-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover .card__icon { transform: translateY(-2px) scale(1.06); }
.card__icon { transition: transform 0.25s ease; }

.btn--primary { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn--primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 28px -10px rgba(242,118,46,0.75); }
.btn--primary:active { transform: translateY(0) scale(0.99); }

a.link {
  position: relative;
  display: inline-block;
}
a.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
a.link:hover::after { transform: scaleX(1); }

.pill { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.pill:hover { transform: translateY(-2px); box-shadow: 0 10px 18px -8px rgba(26,158,151,0.4); }

/* ---------------- Trust badge strip (auto-injected on pages without one) ---------------- */
.trust-badges {
  background: var(--teal-100);
  padding: 14px 0;
}
.trust-badges__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
}

/* ---------------- Sticky mobile quote bar ---------------- */
.sticky-cta { display: none; }
@media (max-width: 720px) {
  body.has-sticky-cta { padding-bottom: 84px; }
  .sticky-cta {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 24px rgba(11,37,69,0.12);
  }
}

/* ---------------- Accessibility: focus states & motion ---------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 6px;
}
.nav-toggle:focus-visible { outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .hero__grid, .two-col, .feature-block, .cta-split { grid-template-columns: 1fr; }
  .two-col.reverse { direction: ltr; }
  .two-col .hero__art, .feature-block img { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .reason-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-header__row { height: 64px; gap: 10px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 0.95rem; }
  .header-right { gap: 8px; }
  .header-right .btn--primary { padding: 9px 14px; font-size: 0.8rem; white-space: nowrap; }
  .logo { font-size: 1rem; }
  .grid-4, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
