/* ===================== HOW WE DEPLOY — timeline ===================== */
.deploy {
  position: relative;
  padding: clamp(70px, 8vw, 120px) clamp(20px, 4vw, 60px);
  background: #ffffff;
  overflow: hidden;
}

/* ---------- Heading ---------- */
.deploy-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(46px, 5.5vw, 80px);
}
.deploy-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #2f6bd8;
  margin-bottom: 14px;
}
.deploy-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #16202f;
}
.deploy-title .grad {
  background: linear-gradient(100deg, #4aa0ff 0%, #2f6bd8 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.deploy-sub {
  margin-top: 16px;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  font-weight: 300;
  line-height: 1.6;
  color: #6b7689;
}

/* ---------- Timeline rail ---------- */
.deploy-steps {
  position: relative;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
}
/* the vertical connector line — dim track (ends at the last dot's center) */
.deploy-steps::before {
  content: "";
  position: absolute;
  top: 8px;
  height: var(--rail-len, calc(100% - 16px));
  left: 27px;
  width: 2px;
  background: rgba(40, 60, 100, 0.14);
  border-radius: 2px;
}

/* the glowing fill that grows with scroll */
.deploy-progress {
  position: absolute;
  top: 8px;
  left: 27px;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #6aa6ff, #2f6bd8);
  box-shadow: 0 0 10px rgba(74, 160, 255, 0.6), 0 0 20px rgba(47, 107, 216, 0.4);
  z-index: 0;
  will-change: height;
}

.deploy-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 2.5vw, 28px);
  padding-left: 0;
  margin-bottom: clamp(34px, 4.5vw, 56px);
}
.deploy-step:last-child { margin-bottom: 0; }

/* numbered node — muted "pending" by default, lights up when the fill reaches it */
.deploy-node {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #9aa7bd;
  background: #e8edf5;
  box-shadow: inset 0 0 0 1px rgba(40, 60, 100, 0.08);
  transition: background 0.45s ease, color 0.45s ease, box-shadow 0.45s ease,
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.deploy-step:hover .deploy-node { transform: scale(1.08); }

/* active (filled) state — blue for every node */
.deploy-step.is-active .deploy-node {
  color: #fff;
  background: linear-gradient(150deg, #4aa0ff, #2f6bd8);
  box-shadow: 0 10px 22px rgba(47, 107, 216, 0.34), 0 0 0 6px rgba(47, 107, 216, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* content card */
.deploy-card {
  position: relative;
  flex: 1 1 auto;
  background: #ffffff;
  border: 1px solid rgba(40, 60, 100, 0.09);
  border-radius: 16px;
  padding: clamp(18px, 2.4vw, 24px) clamp(20px, 2.6vw, 28px);
  box-shadow: 0 14px 34px rgba(40, 60, 100, 0.08);
  /* blue border that deepens as the card fills (--fill: 0 → 1) */
  border-color: rgba(47, 107, 216, calc(0.18 + var(--fill, 0) * 0.62));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  overflow: hidden;
}
.deploy-step:hover .deploy-card {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(40, 60, 100, 0.14);
}
/* light-blue wash that fades in continuously with scroll (no sudden snap) */
.deploy-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(150deg, #eef5ff 0%, #d9e8ff 100%);
  opacity: var(--fill, 0);
  transition: opacity 0.1s linear;
  pointer-events: none;
  z-index: 0;
}
.deploy-card-title,
.deploy-card-desc { position: relative; z-index: 1; }
.deploy-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  color: #1a2440;
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}
.deploy-card-desc {
  font-size: clamp(0.93rem, 1.1vw, 1.02rem);
  font-weight: 400;
  line-height: 1.58;
  color: #51607a;
}

/* ---------- Reveal on scroll ---------- */
.deploy .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.deploy .reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .deploy-steps::before,
  .deploy-progress { left: 23px; }
  .deploy-node { width: 48px; height: 48px; font-size: 1.02rem; }
  .deploy-step { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .deploy .reveal { transition: none; opacity: 1; transform: none; }
  .deploy-node, .deploy-card { transition: none; }
}

/* ===================== Dark theme ===================== */
[data-theme="dark"] .deploy {
  background: linear-gradient(180deg, var(--d-base) 0%, var(--d-alt) 100%);
}
[data-theme="dark"] .deploy-title { color: var(--d-t1); }
[data-theme="dark"] .deploy-sub { color: var(--d-t2); }
[data-theme="dark"] .deploy-card {
  background: var(--d-surface);
  border-color: var(--d-line);
  box-shadow: var(--d-shadow-sm);
}
[data-theme="dark"] .deploy-step:hover .deploy-card { border-color: var(--d-line-2); }
[data-theme="dark"] .deploy-card-title { color: var(--d-t1); }
[data-theme="dark"] .deploy-card-desc { color: var(--d-t2); }
[data-theme="dark"] .deploy-steps::before { background: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .deploy-node { background: #1b2640; color: var(--d-t3); box-shadow: inset 0 0 0 1px var(--d-line); }
[data-theme="dark"] .deploy-card { border-color: rgba(74, 160, 255, calc(0.22 + var(--fill, 0) * 0.5)); }
[data-theme="dark"] .deploy-card::before {
  background: linear-gradient(150deg, rgba(74, 160, 255, 0.20), rgba(74, 160, 255, 0.10));
}
