/*
 * marnamic homepage micro layout.
 *
 * Enqueued only on the configured front page and scoped to its .mn-home root.
 */

body.home.wp-child-theme-marnamic .page__text > .mn-home .mn-home-kicker {
  box-sizing: border-box;
  margin-bottom: 1.1rem;
  font-size: 12px !important;
  line-height: 14px !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
  white-space: nowrap;
}

body.home.wp-child-theme-marnamic .page__text > .mn-home
  .mn-home-kicker + :is(h1, h2) {
  margin-top: 0 !important;
}

body.home.wp-child-theme-marnamic .page__text > .mn-home h1 {
  max-width: 11.5ch !important;
  margin-bottom: 1.25rem !important;
  font-size: clamp(2.125rem, 3.75vw, 3rem) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

body.home.wp-child-theme-marnamic .page__text > .mn-home h2 {
  font-size: clamp(1.375rem, 2.35vw, 1.875rem) !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
}

/* Match the 18px / 27px body-copy rhythm used on marnamic.com without
 * enlarging compact labels or the embedded map UI. */
body.home.wp-child-theme-marnamic .page__text > .mn-home :is(
  .mn-home-lead,
  .mn-home-intro p,
  .mn-home-explore__copy > p,
  .mn-home-steps p,
  .mn-home-benefits__head > p,
  .mn-home-benefit > p
) {
  font-size: 18px !important;
  line-height: 27px !important;
}

/* The homepage map is an editorial world overview. Keep it panoramic instead
 * of stretching it to the full height of the adjacent hero copy. */
body.home.wp-child-theme-marnamic .mn-home-hero__visual {
  align-self: center !important;
}

body.home.wp-child-theme-marnamic :is(
  .mn-home-hero__map,
  .marnamic-home-vendor-map
) {
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 680px !important;
  aspect-ratio: 16 / 10;
  overflow: hidden !important;
}

body.home.wp-child-theme-marnamic .mn-home-hero__map :is(
  .marnamic-home-vendor-map,
  .combined-map-wrapper
),
body.home.wp-child-theme-marnamic .marnamic-home-vendor-map > :is(
  [id^="marnamic-hotfix-map-"],
  .combined-map
) {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
}

@media (max-width: 640px) {
  body.home.wp-child-theme-marnamic :is(
    .mn-home-hero__map,
    .marnamic-home-vendor-map
  ) {
    min-height: 240px !important;
    max-height: 340px !important;
    aspect-ratio: 3 / 2;
  }
}

body.wp-child-theme-marnamic .mn-home .mn-home-query > b {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

body.wp-child-theme-marnamic .mn-home-benefits {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
}

body.wp-child-theme-marnamic .mn-home-benefits__head {
  display: grid;
  gap: 16px;
  max-width: 840px;
}

body.wp-child-theme-marnamic .mn-home-benefits__head :is(h2, p) {
  margin: 0 !important;
}

body.wp-child-theme-marnamic .mn-home-benefits__head p {
  max-width: 72ch;
  color: var(--marnamic-text-muted, #a1c0c3);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.65;
}

body.wp-child-theme-marnamic .mn-home-benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

body.wp-child-theme-marnamic .mn-home-benefit {
  box-sizing: border-box;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(22px, 2.6vw, 32px);
  color: var(--marnamic-cream, #f1e9dd);
  background: rgba(24, 39, 43, 0.78);
  border: 1px solid rgba(161, 192, 195, 0.26);
  border-radius: 14px;
  box-shadow: none;
}

body.wp-child-theme-marnamic .mn-home-benefit__icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #e7fd87;
  background: #0f191b;
  border: 1px solid rgba(231, 253, 135, 0.34);
  border-radius: 12px;
}

body.wp-child-theme-marnamic .mn-home-benefit__icon::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

body.wp-child-theme-marnamic .mn-home-benefit__icon[data-icon="match-quality"]::before {
  -webkit-mask-image: url("../icons/benefits/match-quality.svg");
  mask-image: url("../icons/benefits/match-quality.svg");
}

body.wp-child-theme-marnamic .mn-home-benefit__icon[data-icon="compare-fast"]::before {
  -webkit-mask-image: url("../icons/benefits/compare-fast.svg");
  mask-image: url("../icons/benefits/compare-fast.svg");
}

body.wp-child-theme-marnamic .mn-home-benefit__icon[data-icon="implementation"]::before {
  -webkit-mask-image: url("../icons/benefits/implementation.svg");
  mask-image: url("../icons/benefits/implementation.svg");
}

body.wp-child-theme-marnamic .mn-home-benefit h3 {
  margin: 0 0 12px !important;
  color: var(--marnamic-cream, #f1e9dd) !important;
  font-size: clamp(1.18rem, 1.7vw, 1.42rem) !important;
  line-height: 1.2 !important;
}

body.wp-child-theme-marnamic .mn-home-benefit p {
  margin: 0 !important;
  color: var(--marnamic-text-muted, #a1c0c3) !important;
  line-height: 1.6 !important;
}

@media (max-width: 900px) {
  body.wp-child-theme-marnamic .mn-home-benefits__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.wp-child-theme-marnamic .mn-home-benefit:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  body.wp-child-theme-marnamic .mn-home-benefits__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.wp-child-theme-marnamic .mn-home-benefit:last-child {
    grid-column: auto;
  }

  body.wp-child-theme-marnamic .mn-home-benefit {
    padding: 22px;
  }

  body.wp-child-theme-marnamic .mn-home-benefit__icon {
    margin-bottom: 20px;
  }
}
