/* ================================================================
   Coverage Insurance Agency — Design System
   Typography: Playfair Display (headings) + Montserrat (body/UI)
   Palette: Primary Gold #D4AF37 / Gold Light #F4D77A / Charcoal #0D0D0D
            Dark Gray #1F1F1F / Light Gray #F5F5F5 / White #FFFFFF
================================================================ */

:root {
  --gold: #D4AF37;
  --gold-light: #F4D77A;
  --gold-ink: #8a6d12; /* darker gold for text links on white — meets WCAG AA */
  --charcoal: #0D0D0D;
  --ink: #0D0D0D;
  --dark-gray: #1F1F1F;
  --light-gray: #F5F5F5;
  --white: #FFFFFF;
  --text: #1F1F1F;
  --muted: #5a5a5a;
  --border: #e6e6e6;

  --container: 1200px;
  --section-pad: 80px;
  --radius: 8px;

  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; margin: 0 0 0.5em; line-height: 1.15; color: var(--charcoal); overflow-wrap: break-word; }
.eyebrow { overflow-wrap: break-word; }
h1 { font-size: 48px; line-height: 56px; }
h2 { font-size: 32px; line-height: 40px; font-weight: 600; }
h3 { font-family: var(--font-body); font-size: 24px; line-height: 32px; font-weight: 600; color: var(--charcoal); }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-pad) 0; }
.section--light { background: var(--light-gray); }
.section--dark { background: var(--charcoal); color: var(--white); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.btn--primary { background: var(--gold); color: var(--charcoal); }
.btn--primary:hover { background: var(--gold-light); }
.btn--secondary { background: transparent; color: var(--white); border-color: var(--white); }
.btn--secondary:hover { background: var(--white); color: var(--charcoal); }
.btn--outline-dark { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn--outline-dark:hover { background: var(--charcoal); color: var(--white); }

/* ---------- Header / Nav ---------- */
.header {
  background: var(--charcoal);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
/* Homepage only: header floats transparently over the full-bleed video hero
   (SpaceX-style). A soft top-down gradient keeps the white nav legible against
   the bright aerial. Every other page keeps the solid charcoal bar above. */
.home .header {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom: none;
  background-image: linear-gradient(to bottom, rgba(13,13,13,0.55), rgba(13,13,13,0));
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { display: inline-flex; flex-shrink: 0; }
.brand-logo img {
  height: 46px;
  width: auto;
  max-width: 240px;
  display: block;
  object-fit: contain;
}
.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  position: relative;
  padding: 8px 0;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold); }
/* The gold CTA button inside the nav: keep dark text (the .nav-links a rule
   above would otherwise force it white, and the :hover would turn it gold —
   invisible on a gold background). */
.nav-links a.btn--primary,
.nav-links a.btn--primary:hover,
.nav-links a.btn--primary[aria-current="page"] { color: var(--charcoal); }
/* The `.nav-links a` rule above resets padding to `8px 0`, which leaves the gold
   CTA with NO horizontal padding (text jammed to the edges). Restore proper pill
   padding — trimmed vertically to fit the compact nav bar. */
.nav-links a.btn--primary { padding: 11px 22px; }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* Solid charcoal stays as fallback if the hero image fails to load */
  background-color: var(--charcoal);
  /* Layered: dark gradient overlay (on top) + Miami Lakes aerial photo (below) */
  background-image:
    linear-gradient(rgba(13, 13, 13, 0.55), rgba(13, 13, 13, 0.75)),
    url('/assets/hero-miami-lakes-1920.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 80px 0 100px;
}
.hero > .container { position: relative; z-index: 1; }

/* ---------- Video hero (homepage, SpaceX-style) ---------- */
/* Full-bleed looping video fills the viewport; the transparent header sits on
   top of it, so the hero starts at y=0 and the content is pushed below the nav. */
.hero--video {
  /* The photo background above is irrelevant here — the <video> covers it.
     Keep charcoal as the base color while the poster/video loads. */
  background-image: none;
  min-height: 100svh;            /* fill the viewport, like SpaceX */
  display: flex;
  flex-direction: column;         /* column so the content fills full width... */
  justify-content: center;        /* ...and sits vertically centered in the frame */
  overflow: hidden;
  /* Top pad matches the floating header (46px logo + 2×18px nav pad) so the
     block centers in the space *below* the nav, not in the raw viewport. */
  padding: 82px 0 0;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;             /* cover the area, crop as needed */
  z-index: 0;
  /* Poster shows here too via the element's poster attr while loading */
}
/* Legibility scrim: two layers — a vertical gradient (darker top for the nav)
   plus a left-side wash so the centered left-hand content stays readable even
   where the lake is bright. Middle-right stays clear so the aerial shows
   through, SpaceX-style. */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* Diagonal wash, weighted to the left column where the text lives. It runs
       further out than it used to because the copy now sits mid-height, not in
       the bottom corner, and there's no local pedestal behind it. */
    linear-gradient(to right,
      rgba(13,13,13,0.66) 0%,
      rgba(13,13,13,0.46) 34%,
      rgba(13,13,13,0.14) 62%,
      rgba(13,13,13,0) 82%),
    linear-gradient(to bottom,
      rgba(13,13,13,0.42) 0%,
      rgba(13,13,13,0.10) 22%,
      rgba(13,13,13,0.10) 62%,
      rgba(13,13,13,0.46) 100%);
}
.hero--video > .container { position: relative; z-index: 2; width: 100%; }
.hero--video .hero-content {
  border-left: none;             /* drop the divider — single column now */
  padding-left: 0;
  max-width: 640px;
  position: relative;
}
/* No local pedestal behind the copy — the full-bleed .hero-scrim plus the
   text-shadow below carry legibility on their own. */
/* Shadow + full-opacity text guarantee legibility over any bright patch of water
   as the loop plays (the bright frames are the worst case, not the average). */
.hero--video .hero-content .eyebrow,
.hero--video .hero-content h1,
.hero--video .hero-content p { text-shadow: 0 1px 16px rgba(13,13,13,0.60); }
/* Eyebrow becomes a smaller "kicker" so it reads as a distinct tier above the
   headline instead of competing with the 18px body copy. */
.hero--video .hero-content .eyebrow {
  font-size: 13px;
  color: var(--gold);
}
/* Body copy at full opacity (was 85%) for a stronger contrast ratio. */
.hero--video .hero-content p { color: #fff; }

/* Legacy two-column hero pieces (no longer used on the homepage, kept harmless
   in case any other view references them). */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}
.hero-mark {
  width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.hero-mark img,
.hero-mark svg { width: 100%; height: 100%; object-fit: contain; }
.hero-content { border-left: 1px solid rgba(255,255,255,0.15); padding-left: 60px; }
.hero h1 { color: var(--white); margin-bottom: 24px; }
.hero p { font-size: 18px; color: rgba(255,255,255,0.85); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* Respect reduced-motion: freeze the loop on the poster frame for users who
   ask for less animation. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero--video {
    background-image:
      linear-gradient(rgba(13,13,13,0.45), rgba(13,13,13,0.62)),
      url('/assets/hero-poster.jpg');
    background-size: cover;
    background-position: center center;
  }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--charcoal);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero p { font-size: 18px; color: rgba(255,255,255,0.85); max-width: 720px; margin: 0 auto; }


/* ---------- Stats ---------- */
.stats { padding: 60px 0; background: var(--white); border-bottom: 1px solid var(--border); }
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); border-color: var(--gold); }
.card-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--light-gray);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; stroke: var(--gold); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); margin: 0; }
.card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.card-link:hover { color: var(--charcoal); }

/* ---------- Section heading block ---------- */
.section-heading { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-heading p { color: var(--muted); font-size: 18px; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 80px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.step h3 { margin-bottom: 12px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
}
.testimonial::before {
  content: "“";
  position: absolute;
  top: -8px; left: 24px;
  font-family: var(--font-heading);
  font-size: 96px;
  color: var(--gold);
  line-height: 1;
}
.testimonial p { font-style: italic; color: var(--text); margin-top: 24px; }
.testimonial-author { font-weight: 600; color: var(--charcoal); margin: 0; font-style: normal; }
.testimonial-date {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.testimonial-stars {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 2px;
  margin-top: 24px;
  line-height: 1;
}
.testimonial-stars + p { margin-top: 12px; }

/* Rating summary line under the testimonials heading */
.reviews-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--charcoal);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.reviews-rating:hover { opacity: 0.7; }
.reviews-rating .reviews-stars {
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 2px;
}
.reviews-rating .reviews-score { font-weight: 600; }
.reviews-rating .reviews-count { color: var(--muted); }
.reviews-rating .reviews-google { font-weight: 600; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(90deg, var(--charcoal), var(--dark-gray));
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 16px; }
.cta-banner p { font-size: 18px; color: rgba(255,255,255,0.85); margin-bottom: 32px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-info-list li {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-list li:last-child { border-bottom: none; }
.contact-icon {
  width: 40px; height: 40px;
  background: var(--light-gray);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; stroke: var(--gold); }
.contact-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.contact-value { font-weight: 600; color: var(--charcoal); }

form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form label { display: block; font-size: 13px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
form input, form select, form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  /* 16px prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
  background: var(--white);
  color: var(--text);
  margin-bottom: 16px;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.18);
}
form textarea { resize: vertical; min-height: 120px; }

/* ---------- Honeypot field (anti-spam — invisible to humans + screen readers) ----------
   Bots fill every field they see in the HTML. Real users never see this field, and
   screen-reader users skip it via aria-hidden + tabindex=-1. If the field arrives
   with a value, the server-side handler silently rejects the submission.

   We DON'T use display:none — some bots specifically skip fields hidden that way.
   Instead, position it off-screen with multiple fallbacks. */
.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.honeypot-field input,
.honeypot-field label {
  /* Override the global form input width:100% etc. so layout never reflows */
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- SMS / A2P consent block (Twilio-friendly disclosures) ---------- */
.consent-block {
  margin: 8px 0 16px;
  padding: 14px 16px;
  background: var(--light-gray);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.consent-block .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.consent-block .consent-row:last-child { margin-bottom: 0; }
.consent-block input[type="checkbox"] {
  /* Override the global form input width:100% */
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 2px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.consent-block label {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  cursor: pointer;
  line-height: 1.55;
}
.consent-block label strong { font-weight: 600; }
.consent-block label a { color: var(--charcoal); font-weight: 600; text-decoration: underline; }
.consent-block .consent-required-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.consent-fineprint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 12px 0 0;
}
.consent-fineprint a { color: var(--charcoal); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--charcoal); color: rgba(255,255,255,0.75); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; }
.footer h4 { color: var(--white); font-family: var(--font-body); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: rgba(255,255,255,0.7); font-size: 15px; }
.footer ul a:hover { color: var(--gold); }
.footer-tag { font-size: 14px; line-height: 1.6; margin-top: 12px; max-width: 280px; }
.footer-contact-line { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; font-size: 14px; }
.footer-contact-line svg { width: 18px; height: 18px; stroke: var(--gold); flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.footer-credit { margin-top: 6px; }
.footer-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--gold); }
.footer-social svg { width: 16px; height: 16px; fill: var(--white); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  h1 { font-size: 36px; line-height: 44px; }
  h2 { font-size: 28px; line-height: 36px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-content { border-left: none; padding-left: 0; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  /* Video hero stays left-aligned on tablet/mobile, overriding the
     text-centered legacy hero rules above. */
  .hero--video .hero-content { text-align: left; max-width: none; }
  .hero--video.hero p { margin-left: 0; margin-right: 0; }
  .hero--video .hero-actions { justify-content: flex-start; }
  .hero--video { min-height: 88svh; padding-bottom: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  :root { --section-pad: 60px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.is-open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--charcoal); padding: 24px; gap: 20px; }
  .menu-toggle { display: flex; }
  form .form-row { grid-template-columns: 1fr; }
  h1 { font-size: 32px; line-height: 40px; }
  .stat-num { font-size: 36px; }
  /* Declutter the video hero on phones (SpaceX-style): let the headline + CTAs
     carry it. The paragraph stays in the DOM (crawlable; visible on desktop),
     and its value-prop is repeated in the sections immediately below.
     `:not(.eyebrow)` keeps the eyebrow kicker — only the long body copy hides. */
  .hero--video .hero-content > p:not(.eyebrow) { display: none; }
  .hero--video h1 { margin-bottom: 28px; }
}

/* Small phones: step hero headings down further so long words don't overflow */
@media (max-width: 480px) {
  h1 { font-size: 26px; line-height: 32px; }
  .hero h1, .page-hero h1 { font-size: 26px; line-height: 32px; }
  .eyebrow { letter-spacing: 0.10em; font-size: 12px; }
}

.menu-toggle {
  display: none;
  background: none; border: none; color: var(--white);
  width: 40px; height: 40px; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 24px; height: 24px; stroke: var(--white); }

/* ================================================================
   Floating Quote Widget
   ================================================================ */
.quote-widget-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--gold);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.quote-widget-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), 0 3px 8px rgba(0, 0, 0, 0.14);
}
.quote-widget-btn:focus-visible {
  outline: 3px solid rgba(212, 175, 55, 0.5);
  outline-offset: 2px;
}
.quote-widget-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.quote-widget-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 13, 13, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.quote-widget-overlay.is-open {
  display: flex;
  opacity: 1;
}

.quote-widget-modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.quote-widget-overlay.is-open .quote-widget-modal {
  transform: translateY(0);
}

.quote-widget-header {
  background: var(--charcoal);
  color: var(--white);
  padding: 24px 28px 20px;
  border-radius: 12px 12px 0 0;
  position: relative;
}
.quote-widget-header h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.2;
}
.quote-widget-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  line-height: 1.5;
}

.quote-widget-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.quote-widget-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.quote-widget-close svg {
  width: 18px;
  height: 18px;
  stroke: var(--white);
}

.quote-widget-body {
  padding: 24px 28px 28px;
}
.quote-widget-body form input,
.quote-widget-body form select,
.quote-widget-body form textarea {
  margin-bottom: 12px;
  padding: 12px 14px;
  /* 16px prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
}
.quote-widget-body form label {
  font-size: 12px;
  margin-bottom: 4px;
}
.quote-widget-body form .form-row {
  gap: 12px;
}
.quote-widget-body form textarea {
  min-height: 90px;
}
.quote-widget-body .quote-widget-submit {
  width: 100%;
  margin-top: 4px;
}

/* Type toggle (segmented control) */
.qw-type-toggle {
  border: none;
  padding: 0;
  margin: 0 0 14px;
}
.qw-type-toggle legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  padding: 0;
}
.qw-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--light-gray);
  border-radius: var(--radius);
  padding: 4px;
}
.qw-type-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
}
.qw-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}
.qw-type-option:hover {
  color: var(--charcoal);
}
.qw-type-option:has(input[type="radio"]:checked) {
  background: var(--white);
  color: var(--charcoal);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.qw-type-option:has(input[type="radio"]:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Conditional commercial-only fields */
.qw-commercial-only {
  margin-bottom: 0;
}
.qw-commercial-only[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .quote-widget-btn {
    right: 16px;
    bottom: 16px;
    padding: 12px 18px;
    font-size: 13px;
  }
  .quote-widget-btn .quote-widget-btn-label-mobile {
    display: none;
  }
  .quote-widget-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .quote-widget-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
  }
}

/* ================================================================
   Review modal
================================================================ */
.rm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(13, 13, 13, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.rm-overlay.is-open {
  display: flex;
  opacity: 1;
}
.rm-modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  padding: 32px 28px 28px;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.rm-overlay.is-open .rm-modal { transform: translateY(0); }

.rm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.rm-close:hover { background: var(--light-gray); color: var(--charcoal); }
.rm-close svg { width: 16px; height: 16px; stroke: currentColor; }

.rm-step h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 8px;
}
.rm-step p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 20px;
}

/* Star rating */
.rm-stars {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 12px 0 4px;
}
.rm-star {
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--border);
  transition: color 0.12s ease, transform 0.12s ease;
  border-radius: 4px;
}
.rm-star:hover { transform: scale(1.08); }
.rm-star:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.rm-star svg {
  width: 38px;
  height: 38px;
  fill: transparent;
  transition: fill 0.12s ease, stroke 0.12s ease;
}
.rm-star.is-filled {
  color: var(--gold);
}
.rm-star.is-filled svg {
  fill: var(--gold);
  stroke: var(--gold);
}

/* Buttons in modal (positive / negative steps) */
.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rm-btn:last-child { margin-bottom: 0; }
.rm-btn-primary {
  background: var(--gold);
  color: var(--charcoal);
}
.rm-btn-primary:hover { background: var(--gold-light); }
.rm-btn-ghost {
  background: transparent;
  color: var(--muted);
}
.rm-btn-ghost:hover { color: var(--charcoal); }

/* Negative step form */
#rmFeedbackForm label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
#rmFeedbackForm textarea,
#rmFeedbackForm input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  /* 16px prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
  background: var(--white);
  color: var(--text);
  margin-bottom: 12px;
  box-sizing: border-box;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}
#rmFeedbackForm textarea {
  resize: vertical;
  min-height: 100px;
}
#rmFeedbackForm textarea:focus,
#rmFeedbackForm input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

/* Footer review link */
.footer .footer-review-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.footer .footer-review-link:hover {
  color: var(--gold-light);
}

/* Hero "Review Us" link — small, subordinate to primary/secondary CTAs */
.hero-review-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}
.hero-review-link:hover {
  color: var(--gold);
}
.hero-review-link svg {
  width: 16px;
  height: 16px;
  fill: var(--gold);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .rm-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .rm-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
  }
  .rm-star svg {
    width: 32px;
    height: 32px;
  }
}

/* ---------- Quote funnel (/quote) ---------- */
.quote-wrap { max-width: 720px; }
/* The quote pages: Quopilot's form, and beside it who answers and how to call.
   Two columns from 960px; below that the panel follows the form. The hero's
   call line is for phones, where the panel sits under the form; on a desktop
   the panel is in view and the hero line would say the number twice. */
.quote-layout { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.quote-aside { position: sticky; top: 112px; background: var(--light-gray); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 28px; font-size: 15px; line-height: 1.55; color: var(--text); }
.quote-aside h2 { font-size: 24px; line-height: 32px; margin-bottom: 6px; }
.quote-aside-phone { display: inline-block; font-family: var(--font-heading); font-size: 28px; line-height: 36px; font-weight: 700; color: var(--charcoal); margin-bottom: 16px; border-bottom: 2px solid var(--gold); }
.quote-aside-phone:hover, .quote-aside-phone:focus-visible { color: var(--gold-ink); }
.quote-aside p { margin: 0 0 10px; color: var(--muted); }
.quote-aside-link { color: var(--gold-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.quote-aside h3 { font-size: 16px; line-height: 24px; margin: 22px 0 10px; padding-top: 20px; border-top: 1px solid var(--border); }
.quote-aside-steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; }
.quote-aside-steps li::marker { color: var(--gold-ink); font-weight: 600; }
.quote-aside .quote-aside-note { margin: 0; font-weight: 600; color: var(--charcoal); }
.quote-hero-call { display: none; }
.quote-hero-call a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 960px) {
  .quote-layout { max-width: 720px; grid-template-columns: 1fr; gap: 32px; }
  .quote-aside { position: static; }
  .quote-hero-call { display: inline; }
}
.quote-progress { display: flex; gap: 6px; margin-bottom: 28px; }
.quote-progress .qp { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background .2s; }
.quote-progress .qp.is-active, .quote-progress .qp.is-done { background: var(--gold); }
.quote-step { animation: qfade .2s ease; }
@keyframes qfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.quote-step h2 { margin: 0 0 4px; }
.quote-step .quote-sub { color: var(--muted); margin-bottom: 20px; }
.quote-lob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quote-lob { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: pointer; background: var(--white); text-align: center; user-select: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.quote-lob:hover { border-color: var(--gold); transform: translateY(-1px); }
.quote-lob.is-selected { border-color: var(--gold); background: var(--light-gray); box-shadow: 0 2px 10px rgba(212,175,55,.18); }
.quote-lob .qicon { font-size: 24px; display: block; margin-bottom: 6px; }
.quote-lob .qname { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.quote-line-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.quote-line-group h3 { font-size: 14px; color: var(--gold); margin: 0 0 12px; }
.quote-field { margin-bottom: 12px; }
.quote-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.quote-field input, .quote-field select, .quote-field textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; background: var(--white); }
.quote-field input:focus, .quote-field select:focus, .quote-field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.12); }
.quote-field.has-error input, .quote-field.has-error select { border-color: #b00020; }
.quote-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quote-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.quote-actions .btn { flex: 0 0 auto; }
.quote-actions .quote-spacer { flex: 1; }
.quote-summary-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.quote-summary-block h3 { font-size: 13px; color: var(--gold); margin: 0 0 8px; }
.quote-summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--light-gray); }
.quote-summary-row:last-child { border-bottom: none; }
.quote-summary-row span:first-child { color: var(--muted); padding-right: 12px; }
.quote-summary-row span:last-child { font-weight: 600; text-align: right; }
.quote-status { margin: 16px 0 0; font-size: 14px; color: var(--muted); min-height: 18px; }
.quote-err { font-size: 12px; color: #b00020; margin-top: 4px; display: none; }
.quote-err.is-shown { display: block; }
@media (max-width: 640px) {
  .quote-lob-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-row2 { grid-template-columns: 1fr; }
}

/* ---- Policy upload field (policy-upload.js) ---- */
.policy-upload { margin: 0 0 14px; }
.pu-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.pu-optional { font-weight: 400; color: var(--muted); }
.pu-hint { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.pu-btn { padding: 10px 14px; border: 1.5px dashed var(--border); border-radius: 10px; background: var(--white); font: inherit; font-size: 14px; cursor: pointer; width: 100%; text-align: left; color: var(--charcoal); }
.pu-btn:hover { border-color: var(--gold); }
.pu-list { list-style: none; padding: 0; margin: 10px 0 0; }
.pu-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1.5px solid var(--border); border-radius: 10px; margin-bottom: 6px; font-size: 13px; background: var(--white); }
.pu-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.pu-thumb--pdf { display: flex; align-items: center; justify-content: center; font-size: 20px; }
.pu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-size { color: var(--muted); flex-shrink: 0; }
.pu-remove { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px; flex-shrink: 0; }
.pu-remove:hover { color: #b00020; }
.pu-err { font-size: 12px; color: #b00020; margin: 6px 0 0; min-height: 14px; }
