/* ==========================================================================
   MBH — components.css
   Cards, stats, media frames, swiper overrides, CTA band, placeholders
   ========================================================================== */

/* --------------------------------------------------------- hairline card grid
   Cards sit inside a single bordered block sharing hairlines, matching the
   grid treatment in the approved layouts.                                   */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  background: var(--paper);
}

.card-grid > .card {
  border-top: 1px solid var(--line);
}
.card-grid > .card:first-child { border-top: 0; }

@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid > .card { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .card-grid > .card:nth-child(-n + 2) { border-top: 0; }
  .card-grid > .card:nth-child(2n + 1) { border-left: 0; }
}

@media (min-width: 1000px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--3 > .card { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .card-grid--3 > .card:nth-child(-n + 3) { border-top: 0; }
  .card-grid--3 > .card:nth-child(2n + 1) { border-left: 1px solid var(--line); }
  .card-grid--3 > .card:nth-child(3n + 1) { border-left: 0; }
}

.card {
  position: relative;
  padding: clamp(28px, 3vw, 40px);
  background: var(--paper);
  transition: background-color var(--dur) var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.55s var(--ease);
}

.card:hover { background: #FAFBF9; }
.card:hover::after { width: 100%; }

.card__icon {
  width: 22px;
  height: 22px;
  margin-bottom: 26px;
  color: var(--green-900);
}
.card__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.card__title { margin-bottom: 10px; font-size: 1.0625rem; }
.card__text { font-size: var(--fs-body); max-width: 34ch; }

.card__list {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 9px;
}

.card__list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  font-size: var(--fs-small);
  line-height: 1.5;
}

.card__list li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 8px;
  background: var(--accent);
}

.card__link { margin-top: 22px; }

/* --------------------------------------------------------- value cells
   Four short value statements with a rule above each. Light or dark.      */
.value-set {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .value-set { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .value-set { grid-template-columns: repeat(4, 1fr); } }

.value {
  padding: 30px 26px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.value::before {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  margin-bottom: 22px;
  background: var(--accent);
}

.value__title {
  margin-bottom: 8px;
  color: var(--green-900);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.value__text { font-size: var(--fs-small); }

.value-set--icons .value::before { display: none; }

.value__icon {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 20px;
  color: var(--accent);
}

.value__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------- stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(24px, 4vw, 56px);
  justify-content: start;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.stat__num {
  display: block;
  color: var(--green-900);
  font-size: clamp(1.6rem, 2.4vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat__label {
  display: block;
  margin-top: 8px;
  font-size: var(--fs-small);
}

/* --------------------------------------------------------- media frame */
.media {
  position: relative;
  overflow: hidden;
  background: var(--bone-deep);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--16x9 { aspect-ratio: 16 / 9; }

/* Placeholder tile for image slots awaiting client supply */
.media--placeholder {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(
      -19deg,
      var(--green-800) 0 22px,
      var(--green-900) 22px 68px
    );
}

.media--placeholder span {
  color: rgba(254, 254, 254, 0.5);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  padding-inline: 20px;
}

/* --------------------------------------------------------- swiper */
.swiper { overflow: hidden; }
.swiper-slide { height: auto; }

.swiper-nav {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.swiper-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  color: var(--green-900);
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.swiper-btn:hover { background: var(--green-900); border-color: var(--green-900); color: var(--paper); }
.swiper-btn[disabled] { opacity: 0.3; pointer-events: none; }
.swiper-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.swiper-progress {
  position: relative;
  flex: 1;
  align-self: center;
  height: 1px;
  margin-left: 14px;
  background: var(--line);
}

.swiper-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 0;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}

/* --------------------------------------------------------- clients marquee */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(34px, 4.8vw, 72px);
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__item {
  display: inline-flex;
  align-items: center;
  opacity: 0.58;
  transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.marquee__item img {
  display: block;
  width: clamp(92px, 8vw, 128px);
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(1);
}

.marquee__item:hover { opacity: 1; }
.marquee__item:hover img { filter: grayscale(0); }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* --------------------------------------------------------- CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--green-800);
  padding-block: clamp(56px, 6.5vw, 92px);
}

.cta-band--light {
  background: var(--green-light);
}

.cta-band--light .on-dark {
  color: var(--muted);
}

.cta-band--light .on-dark h1,
.cta-band--light .on-dark h2,
.cta-band--light .on-dark h3,
.cta-band--light .on-dark h4 {
  color: var(--green-900);
}

.cta-band__inner {
  display: grid;
  gap: 30px;
  align-items: center;
}

@media (min-width: 900px) {
  .cta-band__inner {
    grid-template-columns: 1.3fr auto;
    gap: 56px;
  }
}

.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band .h2 { max-width: 14ch; margin-bottom: 14px; }
.cta-band p { max-width: 46ch; }
