/* ==========================================================================
   CY Design Builders — Services section ("What We Do") enhancements
   Kept in its own file (loaded after css/styles.css) purely so this feature
   never needs to touch styles.css, which also holds the hero rules. Cards
   still use var(--sand-dark)/var(--f-display)/etc from styles.css :root —
   custom properties resolve at use time, so file order doesn't matter there.
   Overrides the base .services-grid / .service-card rules in styles.css by
   cascade order (same selectors, this file loads later, no !important).
   ========================================================================== */

.services-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  background: none;
  border-top: none;
  border-bottom: none;
}

.service-card{
  flex: 1 1 260px;
  max-width: 340px;
  position: relative;
  padding: 2.5rem 1.9rem 2.1rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}

/* thin gold rule that grows in from the left on hover — the "line accent
   catching light" cue, echoing the hairline dividers used elsewhere on
   the site instead of introducing an unrelated motif */
.service-card::before{
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--sand-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.service-card:hover{
  transform: translateY(-8px);
  border-color: var(--sand-dark);
  box-shadow: 0 26px 50px -26px rgba(33,29,24,.32);
}
.service-card:hover::before{ transform: scaleX(1); }

.service-num{
  font-family: var(--f-display);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--sand-dark);
  display: block;
  margin-bottom: 1.3rem;
  line-height: 1;
}

.service-icon{
  width: 40px;
  height: 40px;
  color: var(--ink-soft);
  margin-bottom: 1.3rem;
  transition: color .4s var(--ease);
}
.service-card:hover .service-icon{ color: var(--sand-dark); }

.service-card h3{
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: .6rem;
}
.service-card p{
  font-size: .92rem;
  line-height: 1.55;
  margin: 0;
  color: var(--ink-soft);
}

/* staggered scroll-reveal for this grid specifically — independent of the
   site-wide .delay-1/2/3 set (which only goes up to 3) so a 5-card row can
   fade + slide up one after another. */
.services-grid .service-card:nth-child(1){ transition-delay: 0s; }
.services-grid .service-card:nth-child(2){ transition-delay: .08s; }
.services-grid .service-card:nth-child(3){ transition-delay: .16s; }
.services-grid .service-card:nth-child(4){ transition-delay: .24s; }
.services-grid .service-card:nth-child(5){ transition-delay: .32s; }

@media (max-width: 699px){
  .service-card{ flex-basis: 100%; max-width: 440px; }
}

@media (prefers-reduced-motion: reduce){
  .service-card,
  .service-card::before,
  .service-icon{ transition: none; }
  .service-card:hover{ transform: none; }
}
