/*
 * G2 badge strip — template-parts/components/g2-badge-strip.php
 * Class prefix is g2- (not opal-) to stay clear of the theme's
 * opal-* container padding rules. Badge art is never recolored,
 * cropped, or shadowed: only its height is set.
 */

.g2-strip {
  --g2-ink: #0A0A0F;
  --g2-muted: rgba(10, 10, 15, 0.64);
  --g2-badge-h: 96px;
  --g2-badge-w: 83px; /* 92x106 artwork at 96px tall */
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px;
  text-align: center;
  font-family: var(--opal-font-body, "Apercu", system-ui, sans-serif);
  color: var(--g2-ink);
}

.g2-strip--dark {
  --g2-ink: #ffffff;
  --g2-muted: rgba(255, 255, 255, 0.72);
}

.g2-strip--compact { padding: 24px 0; }

.g2-strip .g2-strip__eyebrow {
  margin: 0 0 20px;
  font-family: var(--opal-font-body, "Apercu", system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g2-ink);
}

.g2-strip .g2-strip__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.g2-strip .g2-strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.g2-strip .g2-strip__item::before { content: none; }

.g2-strip .g2-strip__badge,
.g2-page .g2-strip__badge {
  display: block;
  line-height: 0;
  border: 0;
  text-decoration: none;
}

.g2-strip .g2-strip__badge:focus-visible {
  outline: 2px solid var(--opal-blue, #2A70EA);
  outline-offset: 4px;
}

.g2-strip .g2-strip__img {
  display: block;
  width: auto;
  max-width: none;
  height: var(--g2-badge-h);
  margin: 0;
  box-shadow: none;
  filter: none;
}

.g2-strip__placeholder {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--g2-badge-w);
  height: var(--g2-badge-h);
  padding: 6px;
  border: 1px dashed var(--g2-muted);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--g2-muted);
}

.g2-strip .g2-strip__segment {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--g2-muted);
}

.g2-strip .g2-strip__caption {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--g2-muted);
}

.g2-strip .g2-strip__more {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--opal-blue, #2A70EA);
  text-decoration: none;
}

.g2-strip--dark .g2-strip__more { color: #ffffff; }
.g2-strip .g2-strip__more:hover { text-decoration: underline; }

/* Mobile: 2x2 grid at 80px (an odd last badge centers). */
@media (max-width: 767px) {
  .g2-strip {
    --g2-badge-h: 80px;
    --g2-badge-w: 69px;
  }
  .g2-strip .g2-strip__row {
    max-width: calc(2 * 96px + 24px);
    margin: 0 auto;
  }
  .g2-strip .g2-strip__item { flex: 0 0 96px; }
}

/* Footer: small, left-aligned, badge + text link. */
.g2-strip--footer {
  --g2-badge-h: 64px;
  --g2-badge-w: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: none;
  margin: 24px 0 0;
  padding: 0;
  text-align: left;
}
.g2-strip--footer .g2-strip__row { justify-content: flex-start; max-width: none; margin: 0; }
.g2-strip--footer .g2-strip__item { flex: none; }
.g2-strip--footer .g2-strip__more { margin-top: 0; }

/* /g2 page grid */
.g2-page {
  --g2-muted: rgba(10, 10, 15, 0.64);
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 16px 96px;
  font-family: var(--opal-font-body, "Apercu", system-ui, sans-serif);
  color: #0A0A0F;
  text-align: center;
}
.g2-page .g2-page__title {
  margin: 0 auto 16px;
  max-width: 14em;
  font-family: var(--opal-font-display, "VC Garamond Condensed", Garamond, serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  color: #0A0A0F;
}
.g2-page .g2-page__sub {
  margin: 0 auto 32px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(10, 10, 15, 0.72);
}
.g2-page .g2-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 64px;
}
.g2-page .g2-page__btn {
  display: inline-block;
  padding: 14px 24px;
  border: 1px solid var(--opal-blue, #2A70EA);
  border-radius: var(--opal-radius-btn, 4px);
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  color: var(--opal-blue, #2A70EA);
  background: transparent;
}
.g2-page .g2-page__btn--primary { color: #ffffff; background: var(--opal-blue, #2A70EA); }
.g2-page .g2-page__btn:hover { text-decoration: none; opacity: 0.9; }
.g2-page .g2-page__group { margin: 0 0 56px; }
.g2-page .g2-page__group h2 {
  margin: 0 0 24px;
  font-family: var(--opal-font-body, "Apercu", system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0A0A0F;
}
.g2-page .g2-page__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.g2-page .g2-page__grid li { flex: 0 0 200px; margin: 0; padding: 0; list-style: none; }
.g2-page .g2-strip__badge { display: inline-block; }
.g2-page .g2-page__grid li::before { content: none; }
.g2-page .g2-page__grid .g2-strip__img { height: 120px; width: auto; margin: 0 auto 12px; display: block; }
.g2-page .g2-page__grid .g2-strip__placeholder { width: 104px; height: 120px; margin: 0 auto 12px; }
.g2-page .g2-page__badge-name { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; }
.g2-page .g2-page__badge-meta { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: rgba(10, 10, 15, 0.64); }
.g2-page .g2-page__reviews-link {
  display: inline-block;
  margin-top: clamp(16px, 3vw, 40px);
  font-family: var(--opal-font-display, "VC Garamond Condensed", Garamond, serif);
  font-weight: 300;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
  color: #0A0A0F;
  text-decoration: none;
  border-bottom: 1px solid rgba(10, 10, 15, 0.2);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.g2-page .g2-page__reviews-link:hover,
.g2-page .g2-page__reviews-link:focus-visible {
  color: var(--opal-blue, #2A70EA);
  border-color: currentColor;
  text-decoration: none;
}

@media (max-width: 767px) {
  .g2-page { padding: 48px 16px 72px; }
  .g2-page .g2-page__grid { gap: 24px 16px; }
  .g2-page .g2-page__grid li { flex-basis: calc(50% - 8px); }
  .g2-page .g2-page__grid .g2-strip__img { height: 96px; }
  .g2-page .g2-page__grid .g2-strip__placeholder { width: 83px; height: 96px; }
}

/* Icon + text mark (badges without G2 artwork, e.g. Users Love Us). */
.g2-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--opal-font-body, "Apercu", system-ui, sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--g2-ink, #0A0A0F);
}
.g2-mark .g2-mark__icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--opal-blue, #2A70EA);
}
.g2-strip--dark .g2-mark .g2-mark__icon { color: #ffffff; }
.g2-strip .g2-strip__badge:has(.g2-mark) { line-height: 1.2; }
.g2-strip--footer .g2-strip__more::before { content: "·"; margin-right: 16px; opacity: 0.5; }

/* /g2 grid: sit the mark in a badge-height box so rows stay aligned. */
.g2-page .g2-strip__badge:has(.g2-mark) {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  margin: 0 auto 12px;
  line-height: 1.2;
}
.g2-page .g2-mark { flex-direction: column; gap: 10px; }
.g2-page .g2-mark .g2-mark__icon { width: 40px; height: 40px; }
.g2-page .g2-mark .g2-mark__text { display: none; } /* name already shows below */
@media (max-width: 767px) {
  .g2-page .g2-strip__badge:has(.g2-mark) { height: 96px; }
}

/* Footer row wraps on narrow phones. */
.g2-strip--footer { flex-wrap: wrap; row-gap: 8px; }

/* Demo stripe: 7 badges -> one row on desktop, 3 per row on phones. */
.g2-strip--demo { padding-top: 56px; padding-bottom: 56px; }
@media (max-width: 767px) {
  .g2-strip--demo .g2-strip__row,
  .g2-strip--homepage .g2-strip__row,
  .g2-strip--customers .g2-strip__row { max-width: calc(3 * 80px + 2 * 16px); gap: 24px 16px; }
  .g2-strip--demo .g2-strip__item,
  .g2-strip--homepage .g2-strip__item,
  .g2-strip--customers .g2-strip__item { flex-basis: 80px; }
}

/* Homepage: inside .hg-proof after the video, same divider + rhythm as .hg-video. */
body.home .hg-proof .g2-strip--homepage {
  max-width: none;
  margin: clamp(56px, 6vw, 88px) 0 0;
  padding: clamp(56px, 6vw, 88px) 0 0;
  border-top: 1px solid var(--hg-line, rgba(25, 55, 62, 0.17));
  text-align: center;
}

/* Smush lazy-load pins unloaded imgs to width:var(--smush-placeholder-width) !important
   (the 83px width attr). Size by height + true badge ratio instead, so rows don't
   reflow as badges load. */
.g2-strip .g2-strip__img,
.g2-page .g2-strip__img {
  --smush-placeholder-width: auto !important;
  --smush-placeholder-aspect-ratio: 92 / 106 !important;
  aspect-ratio: 92 / 106;
}

/* Customers: inside the testimonials band, above the testimonial.to embed. */
.opal-testimonials-section .g2-strip--customers {
  max-width: none;
  padding: 0 0 clamp(48px, 5vw, 72px);
}
