/*
  MDC Website v2.0 — Production Release v1.6.1
  File: assets/css/27-homepage-readability.css
  Purpose: Homepage readability, hero typography, and high-contrast CTA refinement.
*/

/* Hero readability and premium typography */
.home-hero {
  isolation: isolate;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(3, 18, 33, .88) 0%, rgba(3, 18, 33, .72) 44%, rgba(3, 18, 33, .38) 100%),
    radial-gradient(circle at 18% 18%, rgba(31, 107, 69, .28), transparent 30rem);
  pointer-events: none;
}

.home-hero .hero-pattern {
  z-index: 1;
}

.home-hero .home-hero-grid {
  z-index: 2;
}

.home-hero h1,
.home-hero .hero-lead,
.home-hero .eyebrow,
.home-hero .hero-proof span {
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .34);
}

.home-hero h1 {
  font-size: clamp(2.25rem, 4.65vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  max-width: 820px;
}

.home-hero .hero-lead {
  color: rgba(255, 255, 255, .92);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.75;
  max-width: 700px;
}

.home-hero .hero-actions {
  gap: .9rem;
  align-items: center;
}

.home-hero .btn,
.home-hero .btn-primary,
.home-hero .btn-outline-light {
  min-height: 48px;
  border-radius: 999px;
}

.home-hero .btn-outline-light {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

.home-hero .btn-outline-light:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.75);
}

/* Services page final CTA contrast fix */
.services-final-cta {
  position: relative;
  overflow: hidden;
  color: var(--color-navy-950, #061c31) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,252,250,.96)) !important;
  border: 1px solid rgba(31, 107, 69, .22) !important;
  box-shadow: 0 22px 65px rgba(3, 23, 42, .18) !important;
}

.services-final-cta::before {
  content: "→";
  position: absolute;
  right: clamp(1rem, 4vw, 2rem);
  top: clamp(1rem, 4vw, 1.5rem);
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--color-gold-500, #d5a642);
  color: var(--color-navy-950, #061c31);
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 12px 35px rgba(184, 138, 26, .32);
}

.services-final-cta .eyebrow {
  color: var(--color-emerald-700, #16865f) !important;
}

.services-final-cta h2 {
  color: var(--color-navy-950, #061c31) !important;
  padding-right: 4rem;
}

.services-final-cta p {
  color: var(--color-gray-700, #4b5563) !important;
}

.services-final-cta .btn-primary {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--color-navy-900, #082c4a), var(--color-emerald-700, #16865f));
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(8,44,74,.22);
  white-space: nowrap;
}

/* Small homepage rhythm improvements */
.home-hero + .section,
.section-muted + .section,
.home-method + .section {
  scroll-margin-top: 6rem;
}

@media (max-width: 900px) {
  .home-hero h1 {
    font-size: clamp(2.15rem, 8vw, 3.65rem);
    letter-spacing: -0.04em;
  }
  .home-hero .hero-lead {
    font-size: 1rem;
  }
  .services-final-cta::before {
    position: static;
    margin-bottom: 1rem;
  }
  .services-final-cta h2 {
    padding-right: 0;
  }
}

@media (max-width: 620px) {
  .home-hero {
    padding-top: 4.35rem;
  }
  .home-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
    line-height: 1.05;
  }
  .home-hero .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .home-hero .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .services-final-cta .btn-primary {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}
