/* =========================================================
   Kester Insurance & Financial Services Group
   Design tokens
   Navy + gold, drawn directly from the agency shield mark.
   Display: Fraunces (serif, character without going Trajan)
   Body: Public Sans (clean, quiet, does not compete)
   ========================================================= */

:root {
  --navy-deep:   #0E1F3C;
  --navy-mid:    #16305C;
  --navy-line:   #26436F;
  --gold:        #C6992F;
  --gold-light:  #E3C878;
  --cream:       #F7F5F0;
  --paper:       #FFFFFF;
  --ink:         #1A1D24;
  --slate:       #5B6270;
  --slate-light: #8A90A0;
  --hairline:    #E4E0D6;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1160px;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-deep);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 500;
}

p { margin: 0 0 1em; color: var(--slate); max-width: 62ch; }

a { color: inherit; text-decoration: none; }
ul { padding-left: 1.1em; color: var(--slate); }
li { margin-bottom: 0.4em; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-navy { background: var(--navy-deep); color: var(--paper); }
.btn-navy:hover { background: var(--navy-mid); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { border-color: var(--navy-deep); color: var(--navy-deep); }
.btn-outline:hover { background: var(--navy-deep); color: var(--paper); }
.btn-outline-light { border-color: rgba(255,255,255,0.5); color: var(--paper); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }
.btn-lg { padding: 1em 2em; font-size: 1.05rem; }

.eyebrow {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.9em;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand-mark { height: 56px; width: auto; display: block; }
.main-nav {
  display: flex;
  gap: 26px;
  margin-left: 12px;
  flex: 1;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-deep);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { border-color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.phone-link { font-weight: 600; color: var(--navy-deep); font-size: 0.95rem; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  max-width: 15ch;
}
.hero-sub { font-size: 1.08rem; max-width: 48ch; }
.hero-actions { display: flex; gap: 14px; margin: 28px 0 44px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.hero-stats dt {
  font-family: var(--font-display);
  color: var(--navy-deep);
  font-size: 2rem;
  font-weight: 600;
}
.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--slate);
  max-width: 16ch;
}

.hero-visual { display: flex; justify-content: center; }

.hero-photo-frame {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 48px -20px rgba(14,31,60,0.35);
}
.hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--gold);
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.85;
  outline: 1px solid var(--navy-deep);
  outline-offset: -8px;
}
.hero-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.service-photo-frame {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 48px -20px rgba(14,31,60,0.3);
}
.service-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

/* ---------- trust bar ---------- */
.trust-bar { background: var(--navy-deep); }
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  padding: 16px 28px;
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 600;
}
.trust-inner .dot { color: var(--navy-line); }

/* ---------- services / pillars ---------- */
.services { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }

/* ---------- product breakdown lists ---------- */
.product-group { margin-bottom: 44px; }
.product-group:last-child { margin-bottom: 0; }
.product-group-title {
  font-family: var(--font-display);
  color: var(--navy-deep);
  font-size: 1.2rem;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--gold);
}
.product-list { list-style: none; margin: 0; padding: 0; }
.product-item { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.product-item h5 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy-deep);
  margin: 0 0 6px;
}
.product-item p { margin: 0; font-size: 0.92rem; color: var(--slate); max-width: 64ch; }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.pillar {
  padding: 36px 32px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.pillar:last-child { border-right: none; }
.pillar-mark {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.pillar h3 { font-size: 1.3rem; margin-bottom: 0.5em; }
.pillar-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--navy-deep);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.pillar-link:hover { color: var(--navy-mid); }

/* ---------- process ---------- */
.process { background: var(--cream); padding: 88px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.steps li { padding-top: 18px; border-top: 2px solid var(--gold); }
.step-num {
  display: block;
  font-family: var(--font-display);
  color: var(--navy-deep);
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.steps h4 { font-size: 1.05rem; margin-bottom: 0.4em; }
.steps p { font-size: 0.92rem; }

/* ---------- about ---------- */
.about { padding: 96px 0; }
.about-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.about-copy h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); max-width: 20ch; }
.about-tagline-card {
  background: var(--navy-deep);
  color: var(--gold-light);
  padding: 40px 34px;
  border-radius: 3px;
  border-left: 4px solid var(--gold);
}
.about-tagline-card p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-light);
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 0;
}

/* ---------- reviews ---------- */
.reviews { padding: 88px 0; border-top: 1px solid var(--hairline); }
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 28px 26px;
  background: var(--cream);
}
.review-stars { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 12px; }
.review-text { font-style: italic; color: var(--ink); font-size: 0.95rem; }
.review-author { margin: 0; font-weight: 600; font-size: 0.85rem; color: var(--navy-deep); }
.reviews-cta { text-align: center; margin: 36px 0 0; }
.reviews-cta a { font-weight: 600; color: var(--navy-deep); border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.reviews-cta a:hover { color: var(--navy-mid); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy-deep); padding: 68px 0; }
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--paper); font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 0.35em; }
.cta-band p { color: rgba(255,255,255,0.75); margin: 0; max-width: 46ch; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 64px 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-mark { height: 90px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; max-width: 34ch; }
.licensed-states { font-size: 0.82rem; color: var(--gold-light); }
.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.85);
}
.social-badge:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.footer-col h5 {
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.footer-col p { margin: 0 0 10px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 28px 28px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.fine-print { max-width: 46ch; margin: 0; }

.nav-client-login {
  color: var(--navy-deep) !important;
  border: 1px solid var(--navy-deep);
  border-radius: 3px;
  padding: 6px 14px !important;
}
.nav-client-login:hover { background: var(--navy-deep); color: var(--paper) !important; border-color: var(--navy-deep); }

/* ---------- client portal band ---------- */
.client-portal {
  background: var(--cream);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 48px 0;
}
.client-portal-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.client-portal h2 { font-size: 1.35rem; margin-bottom: 0.3em; }
.client-portal p { margin: 0; max-width: 52ch; }

/* ---------- lead capture popup ---------- */
.lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 31, 60, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.lead-modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.lead-modal {
  background: var(--paper);
  border-radius: 6px;
  max-width: 420px;
  width: 100%;
  padding: 36px 32px 30px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.lead-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--slate);
}
.lead-modal-close:hover { color: var(--ink); }
.lead-modal h3 { margin-bottom: 0.35em; font-size: 1.4rem; }
.lead-modal p { font-size: 0.95rem; }
.lead-modal .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-modal label {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  margin: 14px 0 6px;
  color: var(--navy-deep);
}
.lead-modal input, .lead-modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.lead-modal .btn { margin-top: 20px; width: 100%; text-align: center; border: none; cursor: pointer; }
.lead-form-error { color: #B3261E; font-size: 0.85rem; margin: 10px 0 0; }

/* ---------- standalone page forms (quote details, etc.) ---------- */
.quote-form { max-width: 560px; background: var(--cream); border: 1px solid var(--hairline); border-radius: 6px; padding: 40px; }
.quote-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quote-form label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin: 18px 0 7px;
  color: var(--navy-deep);
}
.quote-form label:first-of-type { margin-top: 0; }
.quote-form input, .quote-form select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
}
.quote-form .btn { margin-top: 26px; width: 100%; text-align: center; border: none; cursor: pointer; }
.quote-form-error { color: #B3261E; font-size: 0.85rem; margin: 14px 0 0; }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-visual { order: -1; max-width: 220px; margin: 0 auto; }
  .hero-visual:has(.hero-photo-frame) { max-width: 100%; }
  .service-hero-inner { grid-template-columns: 1fr !important; }
  .service-photo-frame { order: -1; }
  .pillar-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .pillar { border-right: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .header-actions .phone-link { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px; height: 32px;
    background: none; border: none; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--navy-deep); }
  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    padding: 20px 28px 28px;
    border-bottom: 1px solid var(--hairline);
    gap: 16px;
  }
  .hero-stats { flex-wrap: wrap; row-gap: 20px; }
  .steps { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; }
  .quote-form { padding: 28px 22px; }
  .quote-form .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 420px) {
  .lead-modal { padding: 30px 22px 26px; }
  .lead-modal .field-row { grid-template-columns: 1fr; gap: 0; }
}
