/* Growth Formula section (/web-development).
   Sits between #built-solution and #about-us. The receipt is a container-query
   context so the odometer, total badge and signature scale with it and stay
   aligned to the 393x656 receipt artwork at any width. */

#growth-formula .title-block p {
  max-width: 812px;
}

#growth-formula .gf-grid {
  display: flex;
  gap: 24px;
  align-items: stretch;
  justify-content: center;
  max-width: 1060px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 900px) {
  #growth-formula .gf-grid {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
}

/* ---------- Left column: cards ---------- */

#growth-formula .gf-cards {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Card track: a plain vertical stack on desktop; becomes a horizontal
   swipeable carousel on mobile (see the max-width: 768px block below). */
#growth-formula .gf-cards__track {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 900px) {
  #growth-formula .gf-cards {
    width: 100%;
    max-width: 560px;
  }
}

#growth-formula .gf-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  min-height: 168px;
  border-radius: 35px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 79.5px rgba(0, 0, 0, 0.35);
}

#growth-formula .gf-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 57px;
  height: 57px;
  border-radius: 17px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.02) 100%),
    linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 18.27%, rgba(255, 255, 255, 0) 78.85%, rgba(153, 153, 153, 0.12) 100%);
}

#growth-formula .gf-card__icon svg {
  width: 24px;
  height: 24px;
}

#growth-formula .gf-card__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

#growth-formula .gf-card__text h4 {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.1;
  color: #fff;
}

#growth-formula .gf-card__text p {
  font-weight: 400;
  font-size: 15px;
  line-height: 1.25;
  color: #fff;
  opacity: 0.5;
  max-width: 503px;
}

@media (max-width: 480px) {
  #growth-formula .gf-card__text h4 {
    font-size: 20px;
  }
  #growth-formula .gf-card__text p {
    font-size: 14px;
  }
}

#growth-formula .gf-btn {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 211px;
  height: 48px;
  padding: 0 24px;
  margin-top: 8px;
  border-radius: 999px;
  background: #57a6fb;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1), 0 1px 8px rgba(0, 0, 0, 0.12);
  transition: filter 0.2s ease, transform 0.2s ease;
}

#growth-formula .gf-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ---------- Right column: receipt ---------- */

#growth-formula .gf-receipt {
  position: relative;
  flex: 0 0 auto;
  width: 393px;
  max-width: 100%;
  container-type: inline-size;
}

#growth-formula .gf-receipt__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Odometer — "Predictable Growth" rolling counter.
   All sizing is in cqw (1cqw = 1% of the 393px-wide receipt) so it tracks the
   artwork exactly. Design digit-box height = 54px = 13.74cqw. */

#growth-formula .gf-odometer {
  position: absolute;
  top: 32.47%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.51cqw;
  padding: 2.04cqw;
  width: 87.79cqw;
  border-radius: 5.09cqw;
  background: #eaeaea;
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
}

#growth-formula .gf-reel {
  position: relative;
  flex: 1 1 0;
  height: 41.22cqw;
  overflow: hidden;
  border-radius: 3.56cqw;
  background: #f0f0f0;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.05),
    inset 0 3px 4.8px rgba(255, 255, 255, 0.5);
}

/* top / bottom fades on each reel */
#growth-formula .gf-reel::before,
#growth-formula .gf-reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 15.78cqw;
  z-index: 2;
  pointer-events: none;
}

#growth-formula .gf-reel::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(217, 217, 217, 0));
}

#growth-formula .gf-reel::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), rgba(217, 217, 217, 0));
}

#growth-formula .gf-reel__strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
  /* No-JS fallback shows the settled 1 centred; growth-formula.js rebuilds the
     strip and drives the slot-machine transforms once the section is in view. */
  transform: translateY(0);
}

/* Motion blur while a reel is spinning (toggled per reel from JS). */
#growth-formula .gf-reel__strip.is-spinning {
  filter: blur(0.4cqw);
}

#growth-formula .gf-reel__digit {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 13.74cqw;
  font-weight: 600;
  font-size: 6.11cqw;
  line-height: 1;
  color: transparent;
  background: linear-gradient(to bottom, #c4c4c4, #727272);
  -webkit-background-clip: text;
  background-clip: text;
}

#growth-formula .gf-reel__digit.is-target {
  font-size: 9.16cqw;
  font-weight: 600;
  color: #1a1a1a;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

/* Total badge */
#growth-formula .gf-total {
  position: absolute;
  top: 80.1%;
  left: 54.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39.7cqw;
  height: 8.14cqw;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 8.65cqw;
  background: #e1e1e1;
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
  color: #1a1a1a;
  font-weight: 600;
  font-size: 5.09cqw;
  letter-spacing: 1.22cqw;
  white-space: nowrap;
}

/* Signature */
#growth-formula .gf-sign {
  position: absolute;
  top: 86.9%;
  left: 77.9%;
  width: 17.81cqw;
  height: 18.22cqw;
}

/* ---------- Mobile (phones) ---------- */

@media (max-width: 768px) {
  /* Turn the card stack into a horizontal, swipeable carousel that shows
     roughly one-and-a-half cards at a time, so the next card peeks in and
     invites a swipe. */
  #growth-formula .gf-cards__track {
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 0;
    /* Let the peeking card bleed to the section edges instead of being
       clipped by the container's side padding. */
    margin: 0 -20px;
    padding: 4px 20px 8px;
    scrollbar-width: none;
  }

  #growth-formula .gf-cards__track::-webkit-scrollbar {
    display: none;
  }

  #growth-formula .gf-card {
    /* ~1.5 cards visible: each card is 66% of the track, so the following
       card shows about a third of its width past the 16px gap. */
    flex: 0 0 66%;
    scroll-snap-align: start;
  }

  /* Nudge the Total badge down slightly so it sits centred on the receipt's
     total row on mobile. */
  #growth-formula .gf-total {
    top: 81.1%;
  }
}
