/* ============================================================
   SERVICES SECTION — Sticky Stacking Cards
   ============================================================ */
.services-section { background: var(--clr-white); border-top: 1px solid var(--clr-line); }

.services-header {
  padding: 80px 24px 48px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}
.services-sub {
  font-size: 16px;
  color: var(--clr-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── STICKY STACKING LAYOUT ── */
.svc-stack-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 120px;
  gap: 80px;
  align-items: start;
}

/* LEFT — sticky panel */
.svc-stack-left { position: sticky; top: calc(var(--header-h) + 40px); }

.svc-stack-sticky { padding: 40px 0; }

.svc-brand-line { display:flex; align-items:center; gap:10px; margin-bottom:28px; }
.svc-brand-rule { display:block; width:24px; height:2px; background:var(--clr-red); flex-shrink:0; }
.svc-brand-label { font-family:var(--ff-display); font-size:10px; font-weight:700; letter-spacing:.2em; text-transform:uppercase; color:var(--clr-red); }

.svc-stack-heading {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(28px, 3.5vw, 48px);
  color: var(--clr-dark);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

.svc-stack-desc {
  font-size: 15px;
  color: var(--clr-muted);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 380px;
}

.svc-stack-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--clr-line);
  border-bottom: 1px solid var(--clr-line);
}

.svc-stack-stat { display: flex; align-items: baseline; gap: 12px; }
.svc-stack-stat-num {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 32px;
  color: var(--clr-red);
  letter-spacing: -.02em;
  line-height: 1;
}
.svc-stack-stat-label {
  font-size: 13px;
  color: var(--clr-muted);
  font-family: var(--ff-body);
  letter-spacing: .04em;
}

/* RIGHT — stacking cards container */
.svc-stack-right { padding-top: 40px; }

.svc-stack-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── STICKY STACKING CARD ── */
.svc-stack-card {
  position: sticky;
  border-radius: 20px;
  overflow: hidden;
  /* Only compositor-friendly properties — NO filter on scroll */
  will-change: transform, opacity;
  background: var(--clr-white);
  border: 1px solid var(--clr-line);
  box-shadow:
    0 4px 20px rgba(0,0,0,.07),
    0 1px 4px rgba(0,0,0,.04);
  transform-origin: center top;
  /* NO transition here — scroll-driven changes must be instant */
  /* Hover box-shadow uses CSS-only transition on the property directly */
  margin-bottom: 20px;
  isolation: isolate; /* create own stacking context */
}
/* Hover shadow via CSS only — no JS */
.svc-stack-card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.13), 0 4px 16px rgba(204,31,43,.12);
}

/* Stagger top offsets so cards peek — must match cardTops[] in JS */
.svc-stack-card:nth-child(1) { top: calc(var(--header-h) + 20px); z-index: 1; }
.svc-stack-card:nth-child(2) { top: calc(var(--header-h) + 34px); z-index: 2; }
.svc-stack-card:nth-child(3) { top: calc(var(--header-h) + 48px); z-index: 3; }
.svc-stack-card:nth-child(4) { top: calc(var(--header-h) + 62px); z-index: 4; }
.svc-stack-card:nth-child(5) { top: calc(var(--header-h) + 76px); z-index: 5; }
.svc-stack-card:nth-child(6) { top: calc(var(--header-h) + 90px); z-index: 6; }
.svc-stack-card:nth-child(7) { top: calc(var(--header-h) + 104px); z-index: 7; }

/* Card inner layout */
.svc-stack-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 340px;
}

.svc-stack-card-image {
  position: relative;
  overflow: hidden;
}
.svc-stack-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) brightness(.85);
  transition: transform .6s var(--ease-out-expo), filter .4s;
}
.svc-stack-card:hover .svc-stack-card-image img {
  transform: scale(1.04);
  filter: grayscale(0%) brightness(.95);
}
.svc-stack-card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(204,31,43,.18) 0%, transparent 60%);
}

.svc-stack-card-content {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: var(--clr-red);
}

/* Big ghost number in background like svc-card-band */
.svc-stack-card-content::after {
  content: attr(data-num);
  position: absolute;
  right: 16px; bottom: 12px;
  font-family: var(--ff-display);
  font-size: 80px;
  font-weight: 900;
  color: rgba(255,255,255,.08);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Left accent border */
.svc-stack-card-content::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: rgba(255,255,255,.2);
}

.svc-stack-card-num {
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.svc-stack-card-num::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.18);
}

.svc-stack-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background .3s, transform .4s var(--ease-bounce);
}
.svc-stack-card:hover .svc-stack-icon-wrap {
  background: rgba(255,255,255,.28);
  transform: rotate(10deg) scale(1.1);
}
.svc-stack-icon-wrap svg { width: 22px; height: 22px; }

.svc-stack-card-title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(18px, 2vw, 26px);
  color: var(--clr-white);
  letter-spacing: -.01em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.svc-stack-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,.8);
  line-height: 1.7;
  flex: 1;
}

/* Footer divider + CTA */
.svc-stack-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,.15);
  position: relative;
}

.svc-stack-card-cta {
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  transition: color .25s;
}
.svc-stack-card:hover .svc-stack-card-cta { color: var(--clr-white); }

.svc-stack-card-arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
  transition: background .25s, border-color .25s, color .25s, transform .3s;
}
.svc-stack-card:hover .svc-stack-card-arrow {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.6);
  color: white;
  transform: translateX(3px);
}

/* Responsive */
@media(max-width:900px) {
  .svc-stack-layout { grid-template-columns: 1fr; gap: 40px; padding-bottom: 80px; }
  .svc-stack-left { position: relative; top: 0; }
  .svc-stack-card-inner { grid-template-columns: 1fr; min-height: auto; }
  .svc-stack-card-image { height: 200px; }
  .svc-stack-card:nth-child(1) { top: calc(var(--header-h) + 12px); }
  .svc-stack-card:nth-child(2) { top: calc(var(--header-h) + 20px); }
  .svc-stack-card:nth-child(3) { top: calc(var(--header-h) + 28px); }
  .svc-stack-card:nth-child(4) { top: calc(var(--header-h) + 36px); }
  .svc-stack-card:nth-child(5) { top: calc(var(--header-h) + 44px); }
  .svc-stack-card:nth-child(6) { top: calc(var(--header-h) + 52px); }
  .svc-stack-card:nth-child(7) { top: calc(var(--header-h) + 60px); }
}
@media(max-width:600px) {
  .services-header { padding: 60px 20px 32px; }
  .svc-stack-layout { padding: 0 16px 80px; gap: 28px; }
  .svc-stack-card-content { padding: 24px 20px; }
}

