/* ============================================================
   sections.css — page sections, header/footer, responsive rules
   (Mobile-first: base styles target small screens; media queries
   scale up. Spec §4 requires a mobile-first launch.)
   ============================================================ */

/* ---------- Top notice bar ---------- */
.topbar {
  background: var(--navy);
  color: #c6d8ec;
  font-size: 0.78rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 14px;
  padding-block: 7px;
  text-align: center;
}

/* License credential — visible at every breakpoint */
.topbar-license {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--white);
  white-space: nowrap;
}

.topbar-license .icon {
  color: #7de3a6;
}

.topbar-license strong {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.topbar-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
}

.topbar-note {
  font-weight: 600;
}

.topbar-hours {
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  color: var(--blue);
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  color: var(--navy);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-phone {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.header-phone-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.header-phone-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.header-cta {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(65, 156, 245, 0.35), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(0, 44, 96, 0.55), transparent 55%),
    linear-gradient(140deg, var(--blue-dark) 0%, var(--blue) 55%, #0b72d8 100%);
  color: var(--white);
  padding: 44px 0 60px;
}

.hero-grid {
  display: grid;
  gap: 36px;
}

.hero-copy h1 {
  color: var(--white);
  margin-bottom: 16px;
}

.hero-copy .hl {
  color: #ffd66b;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: var(--fs-md);
  color: #dcebfb;
  max-width: 34em;
  margin-bottom: 22px;
}

.hero-ticks {
  margin-bottom: 28px;
}

.hero-ticks .icon {
  color: #7de3a6;
}

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-stat strong {
  font-size: 1.35rem;
  color: #ffd66b;
}

.hero-stat span {
  font-size: 0.78rem;
  color: #bcd7f2;
  font-weight: 600;
}

/* ---------- Quote form card ---------- */
.quote-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 22px 24px;
}

.quote-card-head {
  text-align: center;
  margin-bottom: 18px;
}

.quote-card-head h2 {
  font-size: 1.45rem;
  margin-bottom: 4px;
}

.quote-card-head p {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin: 0;
}

.form-step {
  display: none;
}

.form-step.is-active {
  display: block;
  animation: step-in 0.25s ease;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.form-nav {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.form-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.form-secure .icon {
  color: var(--green);
}

/* Success step */
.form-success {
  text-align: center;
  padding: 12px 4px 8px;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5f7ec;
  color: var(--green);
}

.success-icon .icon {
  width: 30px;
  height: 30px;
}

.success-lead {
  color: var(--muted);
  max-width: 30em;
  margin-inline: auto;
}

.success-callout {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  justify-items: center;
}

.success-callout span {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.trust-bar-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 12px;
}

.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.trust-item .icon {
  color: var(--blue);
}

/* ---------- Why choose us ---------- */
.why-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.why-copy > p {
  color: #b9cde3;
  font-size: var(--fs-md);
  margin-bottom: 22px;
}

.why-copy .tick-list {
  margin-bottom: 28px;
}

.why-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.why-panel {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.why-panel-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  position: relative;
}

.why-panel-card .icon {
  color: var(--blue);
  margin-bottom: 10px;
}

.why-panel-card p {
  font-size: var(--fs-sm);
  color: var(--ink);
  margin-bottom: 14px;
}

.why-panel-reply {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
  padding: 8px 22px;
  border-radius: 999px 999px 999px 4px;
}

.why-panel-note {
  font-size: 0.8rem;
  color: #8fb4d9;
  text-align: center;
}

/* ---------- Testimonials ---------- */
.testimonial-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.testimonial {
  scroll-snap-align: center;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.testimonial blockquote {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.7;
  flex: 1;
}

.testimonial figcaption {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--navy);
}

/* ---------- Final CTA ---------- */
.final-cta {
  background:
    radial-gradient(700px 380px at 15% -20%, rgba(65, 156, 245, 0.4), transparent 60%),
    linear-gradient(140deg, var(--blue-dark), var(--blue));
  color: var(--white);
  padding: 68px 0;
  text-align: center;
}

.final-cta h2 {
  color: var(--white);
}

.final-cta p {
  color: #d3e6fa;
  font-size: var(--fs-md);
  margin-bottom: 28px;
}

.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #a9bed5;
  font-size: var(--fs-sm);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-footer .brand-mark {
  color: var(--white);
}

.brand-footer .brand-text strong {
  color: var(--white);
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 32em;
  line-height: 1.7;
}

.footer-col h3 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-col a {
  color: #a9bed5;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-contact .icon {
  color: #6d9cc9;
}

.footer-legal {
  padding-top: 28px;
}

.footer-legal p {
  font-size: 0.76rem;
  line-height: 1.7;
  color: #7e97b3;
  margin-bottom: 12px;
}

.footer-copyright {
  padding-top: 8px;
}

/* ---------- Sticky mobile CTA bar ---------- */
.mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(10, 37, 64, 0.12);
  transition: transform 0.25s ease;
}

.mobile-cta.is-off {
  transform: translateY(110%);
}

.mobile-cta .btn {
  padding-block: 13px;
}

body {
  /* keep content clear of the fixed mobile bar */
  padding-bottom: 76px;
}

/* ============================================================
   Responsive scale-up
   ============================================================ */

@media (min-width: 640px) {
  .topbar-inner {
    justify-content: space-between;
    text-align: left;
    flex-wrap: nowrap;
  }

  .topbar-hours {
    display: inline-flex;
  }

  .trust-bar-inner {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonial-track {
    grid-auto-columns: 46%;
  }
}

@media (min-width: 900px) {
  .header-phone {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }

  .hero {
    padding: 64px 0 84px;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: start;
  }

  .quote-card {
    padding: 30px 30px 26px;
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }

  .trust-bar-inner {
    grid-template-columns: repeat(5, 1fr);
  }

  .why-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .testimonial-track {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    scroll-snap-type: none;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  }

  /* Desktop: hide the mobile bar, restore body padding */
  .mobile-cta {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

@media (max-width: 899px) {
  /* Mobile-first paid traffic (Spec §8): form is the primary element.
     Place the quote card directly under the headline block. */
  .hero-copy .hero-stats {
    display: none;
  }
}

@media (max-width: 639px) {
  .section {
    padding: 52px 0;
  }

  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .topbar-inner {
    font-size: 0.7rem;
  }

  .topbar-license {
    white-space: normal;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
    gap: 30px;
  }
}
