/* =========================================================
   Process Timeline — Dark cinematic section
   Scoped to #process so nothing leaks out.
   ========================================================= */

#process {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 40px 0 30px;
  background: transparent;
  color: #0b1220;
  --pr-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Background orbs */
.proc-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
  z-index: 0;
}
.proc-orb--1 { width: 520px; height: 520px; top: -160px; left:  -180px; background: radial-gradient(circle, rgba(3,151,70,0.30), transparent 70%); }
.proc-orb--2 { width: 480px; height: 480px; bottom: -160px; right: -160px; background: radial-gradient(circle, rgba(52,211,153,0.28), transparent 70%); }
.proc-orb--3 { width: 340px; height: 340px; top: 40%; left: 50%; background: radial-gradient(circle, rgba(3,151,70,0.18),  transparent 70%); }

/* Subtle grid texture (light) */
#process::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 80% at 50% 40%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(60% 80% at 50% 40%, #000 30%, transparent 90%);
  pointer-events: none;
  z-index: 1;
}

#process .container {
  position: relative;
  z-index: 2;
  max-width: 1240px;
}

/* -------- Header -------- */
.proc-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}
.proc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(15,23,42,0.08);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #475569;
  opacity: 0;
}
.proc-pill svg { color: #039746; }
.proc-title {
  margin: 18px 0 14px;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #0b1220;
}
.proc-title__word {
  display: inline-block;
  margin-right: 0.25em;
}
.proc-title__word--grad {
  /* background: linear-gradient(135deg, #039746 0%, #34d399 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; */
  color: #039746;
}
.proc-sub {
  font-size: 1rem;
  color: #475569;
  max-width: 580px;
  margin: 0 auto;
  opacity: 0;
}

/* -------- Timeline area -------- */
.proc-timeline {
  position: relative;
  margin-top: 40px;
}
.proc-flow-h, .proc-flow-v { position: absolute; pointer-events: none; z-index: 1; }
.proc-flow-h {
  display: block;
  top: 28px;
  left: 0; right: 0;
  width: 100%;
  height: 64px;
}
.proc-flow-v { display: none; }

/* -------- Cards grid -------- */
.proc-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
}

/* -------- Card -------- */
.proc-card {
  position: relative;
  padding: 22px 20px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px -10px rgba(15,23,42,0.08);
  transition: transform 0.5s var(--pr-ease), box-shadow 0.5s var(--pr-ease), border-color 0.5s var(--pr-ease);
  will-change: transform;
}
.proc-card::after {
  /* gradient ring overlay on hover */
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  transition: background 0.5s var(--pr-ease), opacity 0.5s var(--pr-ease);
  opacity: 0;
}
.proc-card:hover::after {
  background: linear-gradient(135deg, rgba(3,151,70,0.85), rgba(52,211,153,0.7));
  opacity: 1;
}
.proc-card:hover {
  border-color: rgba(3, 151, 70, 0.25);
  box-shadow: 0 30px 60px -22px rgba(3, 151, 70, 0.22), 0 14px 30px -10px rgba(15, 23, 42, 0.10);
}

.proc-spot {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--pr-ease);
}
.proc-card__inner { position: relative; z-index: 1; }
.proc-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.proc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.06);
  background: #f8fafc;
}
.proc-icon svg { width: 20px; height: 20px; }
.proc-icon--brand,
.proc-icon--violet,
.proc-icon--cyan,
.proc-icon--amber,
.proc-icon--emerald,
.proc-icon--rose {
  background: rgba(3, 151, 70, 0.10);
  border-color: rgba(3, 151, 70, 0.25);
  color: #039746;
}

.proc-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #94a3b8;
  text-transform: uppercase;
}
.proc-card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0b1220;
  line-height: 1.3;
  min-height: 2.6em;          /* reserves space for 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proc-card__desc {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #475569;
  min-height: 4.65em;         /* reserves space for 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.proc-tag {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 6px;
}

/* -------- CTA banner -------- */
.proc-cta {
  position: relative;
  margin-top: 64px;
  padding: 40px 44px;
  border-radius: 28px;
  background: linear-gradient(135deg, #039746, #34d399);
  border: 1px solid rgba(255,255,255,0.18);
  overflow: hidden;
  opacity: 0;
  color: #ffffff;
}
.proc-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.4;
  pointer-events: none;
}
.proc-cta__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  gap: 28px;
}
.proc-cta__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: #ffffff;
}
.proc-cta__title .grad { color: #ffffff; }
.proc-cta__sub {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(203, 213, 225, 0.9);
  max-width: 520px;
}
.proc-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

/* CTA buttons */
.proc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.25s var(--pr-ease), box-shadow 0.3s var(--pr-ease), background 0.3s var(--pr-ease);
  will-change: transform;
}
.proc-btn--primary {
  background: #ffffff;
  color: #039746;
  box-shadow: 0 14px 28px -12px rgba(0,0,0,0.35);
}
.proc-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(0,0,0,0.45); }
.proc-btn--ghost {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: #ffffff;
  backdrop-filter: blur(8px);
}
.proc-btn--ghost:hover { background: rgba(255,255,255,0.12); }

/* -------- Responsive -------- */
@media (max-width: 1199px) {
  .proc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proc-flow-h { display: none; }
}
@media (max-width: 767px) {
  .proc-grid {
    grid-template-columns: 1fr;
    padding-left: 56px;
    gap: 22px;
  }
  .proc-card { width: 100%; max-width: 100%; }
  .proc-flow-h,
  .proc-flow-v { display: none; }

  /* Pure CSS vertical timeline */
  .proc-timeline { position: relative; }
  .proc-timeline::before {
    content: "";
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #039746 0%, #34d399 100%);
    opacity: 0.85;
    z-index: 1;
  }
  /* Traveling dot that runs continuously top → bottom */
  .proc-timeline::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #03a84e;
    box-shadow: 0 0 0 5px rgba(3,168,78,0.25), 0 0 14px 4px rgba(3,168,78,0.45);
    z-index: 4;
    animation: procDotTravel 6s linear infinite, procDotGlow 1.6s ease-in-out infinite;
  }
  @keyframes procDotTravel {
    0%   { top: 0; }
    100% { top: calc(100% - 15px); }
  }
  @keyframes procDotGlow {
    0%,100% { box-shadow: 0 0 0 5px rgba(3,168,78,0.25), 0 0 14px 4px rgba(3,168,78,0.45); }
    50%     { box-shadow: 0 0 0 8px rgba(3,168,78,0.15), 0 0 20px 6px rgba(3,168,78,0.6); }
  }

  /* Connector node next to each card */
  .proc-card::before {
    content: "";
    position: absolute;
    left: -40px;
    top: 28px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #03a84e;
    box-shadow: 0 0 0 4px rgba(3,168,78,0.12);
    z-index: 3;
    transform: scale(0.4);
    opacity: 0;
    transition: transform 0.6s var(--pr-ease), opacity 0.6s var(--pr-ease), background 0.6s var(--pr-ease), box-shadow 0.6s var(--pr-ease);
  }
  .proc-card.is-in::before {
    background: #03a84e;
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(3,168,78,0.18), 0 6px 14px -4px rgba(3,168,78,0.45);
    animation: procDotPop 0.8s var(--pr-ease) 0.15s both;
  }
  @keyframes procDotPop {
    0%   { transform: scale(0.4); }
    55%  { transform: scale(1.35); }
    100% { transform: scale(1); }
  }

  /* Entrance: keyframe-based alternating slide + scale */
  .proc-card.is-in {
    animation: procCardInRight 0.85s var(--pr-ease) both;
  }
  .proc-card:nth-child(even).is-in {
    animation: procCardInLeft 0.85s var(--pr-ease) both;
  }
  @keyframes procCardInRight {
    0%   { opacity: 0; transform: translate3d(60px, 20px, 0) scale(0.94); }
    100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }
  @keyframes procCardInLeft {
    0%   { opacity: 0; transform: translate3d(-60px, 20px, 0) scale(0.94); }
    100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }

  /* Inner micro-reveal */
  .proc-card.is-in .proc-icon        { animation: procIconSpin 0.9s var(--pr-ease) 0.15s both; }
  .proc-card.is-in .proc-num         { animation: procFadeUp 0.55s var(--pr-ease) 0.25s both; }
  .proc-card.is-in .proc-card__title { animation: procFadeUp 0.55s var(--pr-ease) 0.30s both; }
  .proc-card.is-in .proc-card__desc  { animation: procFadeUp 0.55s var(--pr-ease) 0.38s both; }
  .proc-card.is-in .proc-tags        { animation: procFadeUp 0.55s var(--pr-ease) 0.45s both; }
  @keyframes procFadeUp {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
  }
  @keyframes procIconSpin {
    0%   { transform: rotate(-90deg) scale(0.7); }
    100% { transform: rotate(0deg) scale(1); }
  }

  .proc-cta { padding: 32px 24px; }
  .proc-cta__grid { grid-template-columns: 1fr; }
  .proc-cta__actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .proc-orb { animation: none !important; }
  .proc-pill, .proc-sub, .proc-cta { opacity: 1 !important; }
}
