/* ==============================================
   CUMBERLAND VALLEY HAULING — Hero Quote Form
   Split-hero layout and quote card. Loaded AFTER
   styles.css by index.html, which it overrides.
   ============================================== */

/* ---- Split hero layout ----
   Two simple columns. The copy block (badge → title → subtitle →
   trust) flows naturally in column 1, so nothing stretches it. The
   card is capped and pinned right, giving the headline more room. */
.hero--split .hero__content {
  max-width: 66rem;
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 21.5rem);
  align-items: center;
  gap: var(--space-lg);
}

.hero--split .hero__subtitle {
  margin-left: 0;
  margin-right: 0;
  max-width: 34rem;
}

/* Tightened column gap so all five badges hold one line in the
   narrower split-hero column without shrinking the label text. */
.hero--split .hero__trust {
  justify-content: flex-start;
  gap: 0.75rem;
}

.hero--split .hero__trust span {
  font-size: 0.72rem;
}

/* ---- The quote card ---- */
.hero-form {
  position: relative;
  justify-self: end;
  width: 100%;
  background-color: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 1.375rem 1.25rem;
  box-shadow: var(--shadow-card-hover);
  overflow: hidden;
}

/* Amber cap bar */
.hero-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-amber);
}

.hero-form__header {
  margin-bottom: 1rem;
}

.hero-form__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-heading);
  color: var(--color-navy);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hero-form__subtitle {
  font-size: 0.8rem;
  color: var(--color-gray);
  line-height: 1.45;
  text-wrap: balance;
}

/* Compact field rhythm — the full contact form keeps its roomier
   defaults; this only tightens the hero card. */
.hero-form .form-group {
  margin-bottom: 0.75rem;
}

.hero-form .form-group label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.hero-form .form-group input,
.hero-form .form-group select {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom-width: 1px;
}

.hero-form .form-error {
  font-size: 0.7rem;
}

.hero-form .btn {
  margin-top: 0.25rem;
  padding: 0.8rem 1.25rem;
  font-size: 0.85rem;
}

.hero-form__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--color-gray);
  text-align: center;
}

.hero-form__note i {
  color: var(--color-amber);
}

/* Or-call fallback */
.hero-form__alt {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-gray);
}

.hero-form__alt a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-navy);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-base);
}

.hero-form__alt a:hover {
  color: var(--color-amber);
}

/* ---- Success state ---- */
.hero-form__success {
  display: none;
  text-align: center;
  padding: 1.75rem 0;
}

.hero-form__success.is-visible {
  display: block;
}

.hero-form__success i {
  font-size: 2rem;
  color: var(--color-amber);
  margin-bottom: 0.6rem;
}

.hero-form__success h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 0.4rem;
}

.hero-form__success p {
  font-size: 0.85rem;
  color: var(--color-gray);
  line-height: 1.55;
}

/* ==============================================
   RESPONSIVE
   ============================================== */

/* Tablet & below — stack. `display: contents` dissolves the copy
   wrapper so its children become flex items alongside the card,
   letting the card jump ahead of the trust row without duplicating
   markup or hurting the desktop grouping. */
@media (max-width: 1024px) {
  .hero--split .hero__content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
    text-align: center;
    max-width: 32rem;
  }

  .hero--split .hero__copy {
    display: contents;
  }

  /* Title and subtitle keep the default order (0); the badge, form,
     and trust row get explicit values so the badge can slot in right
     above the card - title, subtitle, badge, form, trust. */
  .hero--split .hero__badge {
    order: 2;
    /* .hero__content's align-items:stretch (set above) stretches the
       badge to the full container width now that it's a flex item -
       without this, the icon+text pack to the left, leaving empty
       space on the right instead of a evenly-padded pill. */
    justify-content: center;
  }

  .hero--split .hero-form {
    order: 3;
    justify-self: auto;
    max-width: 26rem;
    width: 100%;
    margin: 0.5rem auto 0;
    text-align: left;
  }

  .hero--split .hero__trust {
    order: 4;
    justify-content: center;
    max-width: none;
    margin-top: 0.5rem;
  }

  .hero--split .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  /* Scroll cue would collide with the stacked card */
  .hero--split .hero__scroll {
    display: none;
  }
}

/* Mobile — let the hero grow past the viewport rather than cramming
   the card; tighten the copy so the form stays near the fold */
@media (max-width: 640px) {
  .hero--split {
    min-height: 0;
    padding-top: calc(var(--nav-height-mobile) + var(--space-md));
    padding-bottom: var(--space-lg);
  }

  /* This used to compress hard (0.68rem) to fit longer copy
     ("Commercial • Residential • Central PA") on one line. The text is
     shorter now, so it no longer needs to shrink much below the
     desktop size (0.875rem) - the old value just made it look
     disproportionately tiny next to the rest of the mobile hero. */
  .hero--split .hero__badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.9rem;
    letter-spacing: 0.07em;
    margin-bottom: 0.75rem;
    white-space: nowrap;
  }

  .hero--split .hero__subtitle {
    font-size: 0.92rem;
    margin-bottom: 0.5rem;
  }

  .hero--split .hero__trust {
    gap: 0.6rem 0.9rem;
    padding-top: 0.9rem;
  }
}
