/* ==========================================================================
   animations.css — scroll-reveal, marquee strips, count-up stats bar
   ========================================================================== */

/* ---- Scroll-reveal base ------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal--left {
  transform: translateX(-48px);
}

.reveal.reveal--right {
  transform: translateX(48px);
}

.reveal.reveal--scale {
  transform: translateY(24px) scale(0.96);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children */
.reveal-group > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-group.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-group.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-group.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-group.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-group.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-group.is-visible > *:nth-child(6) { transition-delay: 0.40s; }

.reveal-group.is-visible > * {
  opacity: 1;
  transform: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--right, .reveal--scale,
  .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- Stats bar --------------------------------------------------------- */
.stats-bar {
  position: relative;
  background: var(--ink-3);
  overflow: hidden;
}

.stats-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.stats-bar__inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: 56px;
}

.stats-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  text-align: center;
  color: var(--white);
}

.stats-bar__item + .stats-bar__item {
  border-left: 1px solid rgba(255,255,255,0.12);
}

.stats-bar__number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* first stat number is blue (accent), others white per screenshot */
.stats-bar__item:not(:first-child) .stats-bar__number {
  color: var(--white);
}

.stats-bar__label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

@media (max-width: 720px) {
  .stats-bar__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .stats-bar__item:nth-child(3),
  .stats-bar__item:nth-child(4) {
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .stats-bar__item:nth-child(3) {
    border-left: none;
  }
  .stats-bar__item:nth-child(2) {
    border-left: 1px solid rgba(255,255,255,0.12);
  }
}

@media (max-width: 400px) {
  .stats-bar__inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Ticker / marquee strip ------------------------------------------- */
.ticker-wrap {
  overflow: hidden;
  width: 100%;
}

.ticker-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.ticker-track--ltr {
  animation: ticker-ltr 38s linear infinite;
}

.ticker-track--rtl {
  animation: ticker-rtl 42s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-ltr {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes ticker-rtl {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Brand ticker */
.brand-ticker {
  padding-block: 24px;
  background: var(--white);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.brand-ticker__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  padding: 12px 32px;
  border-right: 1px solid var(--line-strong);
  flex: none;
}

.brand-ticker__item img {
  width: auto;
  max-width: 140px;
  max-height: 58px;
  object-fit: contain;
  filter: grayscale(0.15);
  transition: filter 0.25s;
}

.brand-ticker__item:hover img {
  filter: grayscale(0);
}

/* Customer ticker */
.customer-ticker {
  padding-block: 20px;
}

.customer-ticker__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  padding: 14px 28px;
  margin-right: 16px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  flex: none;
}

.customer-ticker__item img {
  width: auto;
  max-width: 130px;
  max-height: 56px;
  object-fit: contain;
  filter: grayscale(0.2);
  transition: filter 0.25s;
}

.customer-ticker__item:hover img {
  filter: grayscale(0);
}

/* ---- Hero copy entrance (desktop only to avoid mobile flash) ---------- */
@media (min-width: 641px) {
  .hero__copy {
    animation: hero-copy-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  }

  .hero .showcase {
    animation: hero-img-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  }
}

@keyframes hero-copy-in {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hero-img-in {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: none; }
}

/* ---- Section head animation ------------------------------------------- */
.section-head {
  animation: none; /* controlled by reveal class */
}

/* ---- Product card hover lift ------------------------------------------ */
.product-card {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.product-card__media img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-card__media img {
  transform: scale(1.04);
}

/* ---- Quality steps animated line draw --------------------------------- */
.quality__steps li {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.quality__steps.is-visible li:nth-child(1) { opacity:1; transform:none; transition-delay:0.05s; }
.quality__steps.is-visible li:nth-child(2) { opacity:1; transform:none; transition-delay:0.15s; }
.quality__steps.is-visible li:nth-child(3) { opacity:1; transform:none; transition-delay:0.25s; }
.quality__steps.is-visible li:nth-child(4) { opacity:1; transform:none; transition-delay:0.35s; }

/* ---- Accent pulse on hero CTA ----------------------------------------- */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

.hero__actions .btn--accent {
  animation: pulse-ring 2.4s ease-out 1.8s 3;
}


/* =====================================================================
   RESPONSIVE — animations.css
   ===================================================================== */

/* Stats bar: 4 col → 2×2 on mobile */
@media (max-width: 640px) {
  .stats-bar__inner {
    grid-template-columns: repeat(2, 1fr);
    padding-block: 36px;
  }

  .stats-bar__item:nth-child(3),
  .stats-bar__item:nth-child(4) {
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .stats-bar__item:nth-child(3) {
    border-left: none;
  }

  .stats-bar__item:nth-child(4) {
    border-left: 1px solid rgba(255,255,255,0.12);
  }

  .stats-bar__number {
    font-size: 2.75rem;
  }

  .stats-bar__label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  /* Brand ticker items smaller */
  .brand-ticker__item {
    height: 72px;
    padding: 10px 20px;
  }

  .brand-ticker__item img {
    max-width: 100px;
    max-height: 44px;
  }

  /* Customer ticker items smaller */
  .customer-ticker__item {
    height: 72px;
    padding: 10px 18px;
    margin-right: 12px;
  }

  .customer-ticker__item img {
    max-width: 100px;
    max-height: 44px;
  }
}

@media (max-width: 375px) {
  .stats-bar__inner {
    padding-block: 28px;
  }

  .stats-bar__number {
    font-size: 2.25rem;
  }

  /* Ticker category bar font */
  .ticker-track span {
    font-size: 0.75rem !important;
    padding: 0 18px !important;
  }
}

/* Disable translate reveals on very small to avoid flicker */
@media (max-width: 480px) {
  .reveal--left,
  .reveal--right {
    transform: translateY(24px);
  }
}
