/* =========================================================
   Cacique Insurance Agency — insuremyfamily.co
   Brand: Navy #002868 · Red #BF0A30 · Gold #FFD100
   ========================================================= */

:root {
  --navy: #002868;
  --navy-dark: #001a45;
  --navy-soft: #E8EEF8;
  --red: #BF0A30;
  --gold: #FFD100;
  --white: #ffffff;
  --off-white: #F8F9FC;
  --gray: #5A6478;
  --gray-light: #E2E6EF;
  --border: #D8DEE9;
  --shadow: 0 8px 28px rgba(0, 40, 104, 0.08);
  --shadow-sm: 0 2px 10px rgba(0, 40, 104, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --mobile-bar-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; color: var(--navy); }
p { margin: 0 0 1em; color: var(--gray); }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--navy-dark); color: var(--white); border-color: var(--navy-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }

.btn-phone {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
}
.btn-phone:hover { background: var(--navy-dark); color: var(--white); }

.btn-block { width: 100%; }

.icon { flex-shrink: 0; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.text-link:hover { color: var(--red); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-light);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.logo img {
  height: 48px;
  width: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--navy);
  text-decoration: none;
  border-radius: 8px;
}
.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--navy-soft);
  color: var(--navy);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--off-white) 0%, var(--white) 100%);
  padding: 3.5rem 0 3rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 1.75rem;
  max-width: 36ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual { position: relative; }
.hero-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(var(--shadow));
}

/* ---------- Sections shared ---------- */
.section-header {
  text-align: center;
  margin-bottom: 2.25rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.5rem;
}
.section-header h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0;
}

/* ---------- Products ---------- */
.products {
  padding: 4rem 0;
  background: var(--white);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.product-card:hover {
  border-color: #b8c4da;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.product-card h3 { margin: 0; font-size: 1.15rem; }
.product-card p { margin: 0 0 0.5rem; flex: 1; font-size: 0.95rem; }

.product-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

/* ---------- Why us ---------- */
.why {
  padding: 4rem 0;
  background: var(--off-white);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.why-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.why-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.why-card p { margin: 0; font-size: 0.95rem; }

.why-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--white);
}
.why-icon--red { background: var(--red); }
.why-icon--gold { background: var(--gold); color: var(--navy); }
.why-icon--navy { background: var(--navy); }

/* ---------- Testimonials ---------- */
.testimonials {
  padding: 4rem 0;
  background: var(--white);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.testimonial {
  margin: 0;
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  position: relative;
}
.quote-mark {
  display: block;
  font-size: 3.5rem;
  line-height: 0.7;
  color: var(--red);
  font-weight: 700;
  font-family: Georgia, serif;
  margin-bottom: 0.5rem;
}
.testimonial p {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.testimonial cite {
  font-style: normal;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray);
}

/* ---------- Contact ---------- */
.contact {
  padding: 4rem 0;
  background: var(--off-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 0.75rem;
}
.contact-lead { margin-bottom: 1.75rem; max-width: 42ch; }

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.contact-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-list .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  margin-bottom: 0.15rem;
}
.contact-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
}
.contact-list a:hover { color: var(--red); }

.quote-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.form-title {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}
.form-note {
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}
.form-row {
  margin-bottom: 1rem;
}
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--navy);
}
.req { color: var(--red); }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.15);
}
.form-row textarea { resize: vertical; min-height: 100px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-brand img {
  width: 100px;
  height: auto;
  margin-bottom: 0.75rem;
  background: var(--white);
  border-radius: 12px;
  padding: 0.5rem;
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  margin: 0;
  max-width: 28ch;
}

.footer-links h3,
.footer-contact h3 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.footer-links a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-links a:hover,
.footer-contact a:hover { color: var(--gold); }
.footer-links li,
.footer-contact li { margin-bottom: 0.45rem; color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.15rem 0;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.75); }

/* ---------- Mobile sticky bar ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 40, 104, 0.1);
  height: var(--mobile-bar-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-right: 1px solid var(--border);
}
.mobile-bar a:last-child { border-right: none; }
.mobile-bar a:hover,
.mobile-bar a:focus-visible {
  background: var(--navy-soft);
  color: var(--navy);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { order: -1; max-width: 420px; margin-inline: auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  body { padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px)); }

  .nav-toggle { display: flex; }

  .phone-text { display: none; }
  .btn-phone { padding: 0.65rem; border-radius: 50%; width: 44px; height: 44px; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.2s;
    box-shadow: var(--shadow);
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }
  .nav-list a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .hero { padding: 2rem 0 2.5rem; }
  .hero-sub { max-width: none; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }

  .why-grid,
  .testimonial-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .product-grid { gap: 1rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .mobile-bar { display: flex; }

  .logo img { height: 42px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .container { width: min(100% - 1.5rem, var(--max)); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
