/* Homepage-only WordPress integration for the approved RRM concept. */

body.home .rrm-home-main {
  min-width: 0;
}

body.home .hero-lede > p,
body.home .values-intro > p,
body.home .service-description > p,
body.home .value-description > p,
body.home .dedication-copy > div > p,
body.home .expertise-copy > div > p,
body.home .contact-cards article > div > p,
body.home .quote-intro > div > p {
  margin: 0;
}

body.home .service-description {
  position: relative;
  z-index: 3;
  grid-column: 1 / -1;
  max-width: 72ch;
  align-self: end;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.7;
}

body.home .service-card {
  grid-template-columns: minmax(0, 1fr);
  background: var(--deep-ink);
  isolation: isolate;
}

body.home .service-card__background,
body.home .service-card__wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body.home .service-card__background {
  z-index: 0;
  overflow: hidden;
}

body.home .service-card__background picture,
body.home .service-card__background img {
  width: 100%;
  height: 100%;
  display: block;
}

body.home .service-card__background img {
  max-width: none;
  object-fit: cover;
  object-position: center;
}

body.home .service-card__wash {
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 45%),
    linear-gradient(115deg, rgba(57, 127, 171, 0.9), rgba(13, 39, 52, 0.9));
}

body.home .service-card::before,
body.home .service-card::after {
  z-index: 2;
  pointer-events: none;
}

body.home .service-topline,
body.home .service-card h3,
body.home .service-card > a {
  z-index: 3;
}

body.home .service-description p + p,
body.home .value-description p + p,
body.home .dedication-copy > div p + p,
body.home .expertise-copy > div p + p {
  margin-top: 0.85em;
}

body.home .value-description {
  grid-column: 2;
  max-width: 620px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 220ms ease;
}

body.home .values-section {
  scroll-margin-top: 100px;
}

body.home .value-card {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 78px;
  align-items: start;
  gap: 32px;
  padding-block: 36px;
}

body.home .value-card--text-only {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

body.home .value-card img {
  grid-column: 3;
}

body.home .value-card h3 {
  grid-column: 1;
  max-width: 13ch;
  font-size: clamp(2rem, 3.6vw, 3.8rem);
  line-height: 1.1;
}

body.home .value-description .rrm-core-value-points {
  display: grid;
  gap: 10px;
  padding-left: 1.15em;
  list-style: disc;
  font-size: 1rem;
  line-height: 1.75;
}

body.home .value-card:hover .value-description,
body.home .value-card:focus-within .value-description {
  color: var(--white);
}

body.home .values-heading {
  display: block;
}

body.home .services-sticky {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.home .services-sticky .eyebrow,
body.home .services-sticky h2 {
  grid-column: 1;
}

body.home .services-sticky .rail-controls,
body.home .services-sticky .drag-note {
  grid-column: 2;
}

body.home .values-intro {
  max-width: 510px;
  margin-top: 28px;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 1rem;
}

body.home .hero-lede {
  max-width: 62ch;
}

body.home .hero-lede p {
  color: inherit;
}

body.home .dedication-copy > div:not(.section-number) {
  max-width: 610px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 1.05rem;
}

body.home .expertise-copy > div {
  grid-column: 2;
  align-self: end;
  max-width: 420px;
  padding-bottom: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 1rem;
}

body.home .quote-intro > div:not(.quote-contact) {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.63);
}

body.home .contact-cards article > div:not(.contact-icon) {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.91rem;
  transition: color 220ms ease;
}

body.home .contact-cards article:hover > div:not(.contact-icon) {
  color: rgba(6, 22, 31, 0.7);
}

body.home .secure-content h2 {
  text-wrap: balance;
}

body.home .rrm-form-embed,
body.home .rrm-form-embed iframe {
  width: 100%;
  min-width: 0;
}

body.home .rrm-form-embed iframe {
  min-height: 720px;
  border: 0;
  background: #fff;
}

body.home .quote-form-wrap .jotform-form,
body.home .quote-form-wrap form {
  max-width: 100%;
}

/* Content is readable without JavaScript; motion is enabled only after init. */
body.home [data-reveal] {
  opacity: 1;
  transform: none;
}

body.home.rrm-home-motion-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(34px);
}

body.home.rrm-home-motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.admin-bar.home .hero {
  min-height: calc(100svh - 32px);
}

@media (max-width: 1040px) {
  body.home .expertise-copy > div {
    grid-column: 1;
  }
}

@media (max-width: 782px) {
  body.admin-bar.home .hero {
    min-height: calc(100svh - 46px);
  }
}

@media (max-width: 780px) {
  body.home .value-card {
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 20px;
  }

  body.home .value-card--text-only {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home .value-card img,
  body.home .value-card-top > picture {
    grid-column: 2;
    grid-row: 1;
  }

  body.home .value-card h3 {
    max-width: none;
    font-size: clamp(2rem, 7.7vw, 3rem);
  }

  body.home .value-card--text-only .value-description {
    grid-column: 1 / -1;
  }

  body.home .service-description {
    grid-column: 1;
    align-self: auto;
  }

  body.home .value-description {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-right: 4px;
  }

  body.home .values-intro {
    margin-top: 28px;
  }

  body.home .expertise-copy > div {
    margin-top: 28px;
  }

  body.home .rrm-form-embed iframe {
    min-height: 850px;
  }
}

@media (min-width: 781px) {
  /* WordPress optimizers wrap the original direct image in a picture element. */
  body.home .value-card-top > picture {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  body.home .expertise-stats > div {
    justify-content: flex-start;
    gap: 18px;
  }

  body.home .dedication-section--reverse .dedication-visual {
    grid-column: 2;
    grid-row: 1;
  }

  body.home .dedication-section--reverse .dedication-copy {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home.rrm-home-motion-ready [data-reveal]:not(.is-visible) {
    opacity: 1;
    transform: none;
  }
}
