/* =========================================================
   Auto Insurance Deals — shared styles
   ========================================================= */

:root {
  --navy: #16233f;
  --navy-soft: #2a3b5c;
  --blue: #2f7fe0;
  --blue-dark: #2566bd;
  --link: #2f80c9;
  --gray-bg: #eef1f6;
  --text: #333333;
  --text-muted: #6b7280;
  --footer-bg: #202329;
  --footer-text: #c9ccd3;
  --white: #ffffff;
  --radius-card: 12px;
  --shadow-card: 0 12px 30px rgba(22, 35, 63, 0.10);
  --max-width: 1080px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
}

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

img, svg { max-width: 100%; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

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

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 0;
}

.header-inner {
  display: flex;
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
}
.brand:hover { text-decoration: none; }

.brand-icon { color: var(--blue); flex-shrink: 0; }

.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  color: var(--navy);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}

.brand-text small {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  color: #c0522f;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 56px 24px 40px;
}

.hero h1 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.3;
  margin: 0 0 18px;
}

.hero-sub {
  max-width: 520px;
  margin: 0 auto 48px;
  font-size: 0.98rem;
  color: var(--text);
}

.hero-highlight { color: var(--link); }

.hero-cards {
  position: relative;
  max-width: 440px;
  height: 250px;
  margin: 0 auto;
}

.halo {
  position: absolute;
  inset: -30px 10% ;
  background: radial-gradient(circle, #dbeafe 0%, rgba(219,234,254,0) 72%);
  border-radius: 50%;
  z-index: 0;
}

.testi-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 12px 20px;
  width: 232px;
  opacity: 0;
  transform: translateY(14px);
  animation: card-in 0.5s ease forwards;
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.testi-card--1 { top: 4px;   left: 46px; z-index: 1; animation-delay: 0.05s; }
.testi-card--2 { top: 84px;  left: 2px;  z-index: 3; animation-delay: 0.2s; box-shadow: 0 16px 34px rgba(22,35,63,0.16); }
.testi-card--3 { top: 164px; left: 78px; z-index: 2; animation-delay: 0.35s; }

.avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}

.testi-info { text-align: left; }
.testi-name { margin: 0; font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.testi-sub { margin: 2px 0 0; font-size: 0.72rem; color: var(--text-muted); }

.testi-amount {
  margin: 0 0 0 auto;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--blue);
  white-space: nowrap;
}

/* ---------- Zip section ---------- */
.zip-section {
  background: var(--gray-bg);
  padding: 56px 24px;
  margin-top: 32px;
}

.zip-inner {
  text-align: center;
  max-width: 420px;
}

.zip-inner h2 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.4rem;
  margin: 0 0 24px;
}

.zip-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#zip {
  padding: 13px 16px;
  border: 1px solid #cbd2e0;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--white);
}

#zip:focus { border-color: var(--blue); }

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.7; cursor: default; }

.form-error {
  margin: -6px 0 0;
  color: #c0392b;
  font-size: 0.85rem;
  min-height: 1.1em;
}

.form-success {
  margin: 18px 0 0;
  color: #1b7a3d;
  font-weight: 600;
}

/* ---------- Generic page content (terms/privacy/contact) ---------- */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.page-content h1 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.9rem;
  margin-bottom: 6px;
}

.page-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.page-content h2 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.15rem;
  margin-top: 34px;
}

.page-content p, .page-content li {
  color: var(--text);
  font-size: 0.96rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd2e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.contact-form textarea { min-height: 130px; resize: vertical; }

.contact-info {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 36px 24px;
  margin-top: 40px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-url { margin: 0 0 14px; font-weight: 600; color: var(--white); }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-nav a { color: #7fb2f0; }

.footer-copy {
  margin: 0;
  color: #8a8f9b;
  max-width: 520px;
  margin: 0 auto;
  font-size: 0.78rem;
}

/* ---------- Zip quote popup ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: overlay-in 0.25s ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  background: var(--white);
  border-radius: 18px;
  max-width: 400px;
  width: 100%;
  padding: 34px 28px 28px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
  text-align: center;
  animation: modal-in 0.32s cubic-bezier(.2,.8,.3,1.2);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
}
.modal-close:hover { color: var(--navy); background: var(--gray-bg); }

.modal-eyebrow {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--blue);
  text-transform: uppercase;
}

.modal-card h2 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.35rem;
  margin: 0 0 10px;
}

.modal-sub {
  color: var(--text);
  font-size: 0.92rem;
  margin: 0 0 22px;
}

.modal-input-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-input-row input {
  flex: 1 1 140px;
  padding: 13px 14px;
  border: 1px solid #cbd2e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.modal-input-row input:focus { border-color: var(--blue); }

.modal-input-row .btn-primary { flex: 1 1 140px; white-space: nowrap; }

.modal-trust {
  margin: 18px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-check {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e4f7ec;
  color: #1b7a3d;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zip-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  box-shadow: 0 10px 24px rgba(47,127,224,0.4);
  cursor: pointer;
  z-index: 900;
  animation: fab-pulse 2.6s ease-in-out infinite;
}
.zip-fab:hover { background: var(--blue-dark); }

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(47,127,224,0.4); }
  50% { box-shadow: 0 10px 30px rgba(47,127,224,0.7); }
}

@media (max-width: 480px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-card {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 28px 20px 26px;
    animation: sheet-in 0.32s ease;
  }
  .zip-fab { right: 16px; bottom: 16px; padding: 12px 18px; font-size: 0.85rem; }
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-card, .zip-fab { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .hero-cards { transform: scale(0.86); }
  .testi-card { width: 208px; padding: 10px 16px; }
}
