/* =============================================
   TRUST STATS SECTION
   Used on: hero.html
   ============================================= */
.trust-stats {
  background-color: var(--white);
  padding: 47px 24px 100px;
  position: relative;
  overflow: hidden;
}

.trust-stats__container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

/* Intro row: label on the left aligned with 1st stat card,
   quote + subquote on the right aligned with 2nd–4th stat cards */
.trust-stats__intro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 29px;
  margin: 0 0 72px;
  align-items: start;
}

.trust-stats__label {
  grid-column: 1 / 2;
  justify-self: start;
  display: inline-block;
  padding: 0;
  background: transparent;
  color: var(--dark-gray);
  border: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 0;
  letter-spacing: 0.02em;
  margin-top: 10px;
}

.trust-stats__intro-text {
  grid-column: 2 / -1;
  /* Flush with the 2nd stats card's left edge — the grid column already
     lines up, so no extra shift (v68; was margin-left: 6%) */
  margin-left: 0;
}

.trust-stats__quote {
  font-size: 33px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--dark-gray);
  margin: 0 0 28px;
}

/* Full text on desktop/tablet, shortened text on mobile */
.trust-stats__quote--mobile {
  display: none;
}

/* Scroll-driven word fill (Aston Martin textblock mechanic, 1:1 port).
   JS in hero.html splits the quote into per-word dual layers:
   a dim base word + an absolute full-color copy clipped from the right.
   GSAP scrubs each mask's clip-path open sequentially, left-to-right. */
.trust-stats__quote .word {
  position: relative;
  left: 0;
  top: 0;
  text-align: start;
  display: inline-block;
  color: rgba(21, 21, 21, 0.5);
}

/* Keeps the final two words on one line (no orphan) — see the split JS in hero.html */
.trust-stats__quote .word-glue {
  white-space: nowrap;
}

.trust-stats__quote .word-mask {
  position: absolute;
  display: inline-block;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  text-align: start;
  color: var(--dark-gray);
  -webkit-clip-path: inset(0% 100% 0% 0%);
  clip-path: inset(0% 100% 0% 0%);
}

@media (prefers-reduced-motion: reduce) {
  .trust-stats__quote .word {
    color: var(--dark-gray);
  }

  .trust-stats__quote .word-mask {
    display: none;
  }
}

.trust-stats__subquote {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--gray-500);
  margin: 0;
}

.trust-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 29px;
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.trust-stats__card {
  background: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 6px;
  padding: 39px 31px 24px;
  text-align: left;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 342px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--reveal-duration) var(--reveal-ease),
              transform var(--reveal-duration) var(--reveal-ease),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.trust-stats__card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.trust-stats__card:hover,
.trust-stats__card.touch-hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

a.trust-stats__card--link {
  text-decoration: none;
  color: inherit;
}

.trust-stats__number {
  font-size: 62px;
  font-weight: 500;
  color: var(--dark-gray);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
  white-space: nowrap;
}

.trust-stats__stat-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 14px;
}

.trust-stats__sublabel {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--gray-500);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  min-height: calc(3 * 1.45em + 14px + 1px);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Staggered scroll reveal — label fades first, then cards one-by-one (JS-driven).
   Scoped to the label only: the quote must stay visible from the start so its
   dim word layer carries the entrance (Aston-style word fill), not a block fade. */
.trust-stats__intro .trust-stats__label {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity var(--reveal-duration) var(--reveal-ease),
              transform var(--reveal-duration) var(--reveal-ease);
}

.trust-stats__intro.is-visible .trust-stats__label {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .trust-stats__intro .trust-stats__label,
  .trust-stats__card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =============================================
   RESPONSIVE — TRUST STATS
   ============================================= */
/* === Wide desktop (≤1200px) === */
@media (max-width: 1200px) {
  .trust-stats__intro {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 56px;
  }

  .trust-stats__label {
    grid-column: auto;
    margin-top: 0;
  }

  .trust-stats__intro-text {
    grid-column: auto;
    margin-left: 0;
  }

  .trust-stats__quote {
    font-size: 29px;
    margin-bottom: 24px;
  }

  .trust-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-stats__number {
    font-size: 48px;
  }
}

/* === Tablet (≤1024px) === */
@media (max-width: 1024px) {
  .trust-stats {
    padding: 40px 24px 80px;
    background-color: transparent;
  }

  .trust-stats__quote {
    font-size: 29px;
  }

  .trust-stats__subquote {
    font-size: 15px;
  }

  .trust-stats__card {
    padding: 32px 25px;
  }

  .trust-stats__number {
    font-size: 42px;
  }
}

/* === Mobile (≤768px) === */
@media (max-width: 768px) {
  .trust-stats {
    padding: 36px 20px 72px;
  }

  .trust-stats__intro {
    margin-bottom: 40px;
  }

  .trust-stats__quote {
    font-size: 24px;
    line-height: 1.35;
    margin-bottom: 20px;
  }

  .trust-stats__quote--full {
    display: none;
  }

  .trust-stats__quote--mobile {
    display: block;
  }

  .trust-stats__subquote {
    font-size: 15px;
    line-height: 1.65;
  }

  .trust-stats__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .trust-stats__card {
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .trust-stats__number {
    font-size: 44px;
  }
}

/* Section badge prefix "// " */
.trust-stats__label::before { content: "// "; }
.trust-stats__label { text-transform: capitalize; }

/* ---- TELEFON: etykieta „O nas" wjezdza Z LEWEJ ----
   Wspolna regula calego serwisu (2026-08-03, base.css v142): naglowek sekcji
   wchodzi Z BOKU, tresc Z DOLU. Tutaj „naglowkiem" jest sama etykieta — cytat
   ma wlasny efekt (scroll-driven word fill) i celowo nie jest animowany
   wejsciem, a karty statystyk zostaja z dolu.
   Selektor jest kopia stanu ukrytego (0,2,0) → wygrywa kolejnoscia w zrodle;
   `.is-visible` (0,3,0) dalej przebija. Sekcja ma `overflow: hidden`, wiec
   wysuw w lewo nie robi przewijania w bok. */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  .trust-stats__intro .trust-stats__label {
    transform: translateX(-44px);
  }

  /* Karty: 24px → 44px, zeby wjazd z dolu byl w calym serwisie jednakowy
     (base.css v142 ustawia 44px pozostalym sekcjom przez ich tokeny; ta
     sekcja ma dystans wpisany liczba, wiec trzeba go ruszyc tutaj). */
  .trust-stats__card {
    transform: translateY(44px);
  }
}
