/* ============ PROCESS CARDS SECTION ============ */
.process-section {
  padding: 8rem 0 12rem;
}

.process-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.process-card {
  position: sticky;
  padding: 3rem 2.5rem 2.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  overflow: hidden;
}

.process-card:hover {
  background: var(--surface);
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.process-card:nth-child(1) { top: 20rem; z-index: 10; }
.process-card:nth-child(2) { top: 22.5rem; z-index: 11; }
.process-card:nth-child(3) { top: 25rem; z-index: 12; }

.process-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.process-num-pill {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.35rem 1.2rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border-bottom-right-radius: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.process-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.process-title {
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.process-duration {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--fg-2);
  margin-bottom: 0;
}

.process-desc {
  color: var(--fg-2);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0;
  padding-top: 0.2rem;
}

.process-deliver {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg-3);
  width: 100%;
}

.process-deliver .tick {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.process-deliver .tick::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

.process-split-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.process-left-sticky {
  flex: 0 0 100%;
  width: 100%;
  position: sticky;
  top: 5.2rem;
  z-index: 20;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  align-self: start;
}

.process-right-cards {
  flex: 0 0 100%;
  width: 100%;
  z-index: 22;
}

/* ============ PROCESS FAN OVERLAYS ============ */
.process-fan-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.process-fan-card {
  width: 300px;
  height: auto;
  background: #000;
  border: 1px solid #1a241e;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  opacity: 0;
  transform: scale(0.9) translateY(40px);
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s ease, 
              border-color 0.3s ease;
}

.process-fan-wrapper:hover .process-fan-card.active {
  opacity: 0.4;
}

.process-fan-wrapper .process-fan-card.active:hover {
  transform: translateY(-10px) scale(1.02) !important;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
  border-color: rgba(165, 243, 161, 0.3);
  opacity: 1;
  z-index: 10 !important;
}

.pfc-1 { z-index: 1; margin-right: -10px; }
.pfc-2 { z-index: 2; margin-right: -5px; }
.pfc-3 { z-index: 3; margin-left: -5px; }
.pfc-4 { z-index: 4; margin-left: -10px; }

.process-fan-card.active.pfc-1 {
  opacity: 1;
  transform: rotate(-9deg) translateY(20px) scale(1);
  pointer-events: auto;
}

.process-fan-card.active.pfc-2 {
  opacity: 1;
  transform: rotate(-3deg) translateY(0px) scale(1);
  pointer-events: auto;
}

.process-fan-card.active.pfc-3 {
  opacity: 1;
  transform: rotate(3deg) translateY(0px) scale(1);
  pointer-events: auto;
}

.process-fan-card.active.pfc-4 {
  opacity: 1;
  transform: rotate(9deg) translateY(20px) scale(1);
  pointer-events: auto;
}

.pfc-num {
  font-family: var(--mono);
  font-size: 3.1rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1;
  margin-top: -10px;
  margin-left: -5px;
  opacity: 0.9;
}

.pfc-bottom h3 {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.pfc-bottom p {
  font-size: 1.05rem;
  color: var(--fg-3);
  line-height: 1.5;
  margin: 0;
}

.process-connector {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.process-connector.active {
  opacity: 1;
}

.process-connector path {
  stroke-dasharray: 6 6;
  animation: connector-flow 1.5s linear infinite;
}

@keyframes connector-flow {
  to {
    stroke-dashoffset: -12;
  }
}

.pc-1 {
  top: -20px;
  left: calc(50% - 340px);
  transform: rotate(10deg);
}

.pc-2 {
  bottom: -11px;
  left: calc(50% - 60px);
  transform: rotate(-30deg);
}

.pc-3 {
  top: 10px;
  right: calc(50% - 352px);
  transform: rotate(16deg);
}

@media (max-width: 1200px) {
  .process-fan-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3rem 2rem !important;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: stretch;
    justify-items: center;
  }
  .process-fan-card {
    transform: none !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 320px !important;
    height: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .process-connector {
    display: none !important;
  }
  .process-fan-card-thumbnail {
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 12px !important;
  }
  .process-fan-wrapper .process-fan-card.active:hover .process-fan-card-thumbnail {
    transform: translateY(-4px) !important;
  }
}

@media (max-width: 1200px) and (min-width: 769px) {
  .pfc-1 { order: 1; }
  .pfc-2 { order: 2; }
  .pfc-4 { order: 3; }
  .pfc-3 { order: 4; }

  /* 1 -> 2 connector (horizontal right) */
  .pfc-1::after {
    content: '';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2px;
    border-top: 2px dashed var(--accent);
    opacity: 0.6;
    z-index: 1;
  }

  /* 2 -> 3 connector (vertical down) */
  .pfc-2::after {
    content: '';
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 3rem;
    border-left: 2px dashed var(--accent);
    opacity: 0.6;
    z-index: 1;
  }

  /* 3 -> 4 connector (horizontal left) */
  .pfc-3::after {
    content: '';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2px;
    border-top: 2px dashed var(--accent);
    opacity: 0.6;
    z-index: 1;
  }
}

@media (max-width: 768px) {
  .process-fan-wrapper {
    grid-template-columns: 1fr !important;
    max-width: 400px;
    gap: 2rem !important;
  }
  .process-fan-card {
    max-width: 100% !important;
  }
  .pfc-1, .pfc-2, .pfc-3, .pfc-4 {
    order: unset !important;
  }

  /* Connectors on mobile: vertical lines between 1->2, 2->3, 3->4 */
  .pfc-1::after,
  .pfc-2::after,
  .pfc-3::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 2rem;
    border-left: 2px dashed var(--accent) !important;
    border-top: none !important;
    right: auto !important;
    opacity: 0.6;
    z-index: 1;
  }
}

@media (max-width: 900px) {
  .process-section{
    padding: 4rem 0;
  }
  .process-split-wrapper {
    flex-direction: column;
    gap: 2rem;
  }
  .process-left-sticky {
    position: relative;
    top: 0;
    margin-bottom: 0rem;
    padding: 0;
  }
  .process-card {
    position: relative !important;
    top: auto !important;
    padding: 3.1rem 1.5rem !important;
  }
  .process-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .process-deliver {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Process Fan Card Thumbnail - Funky and Tilted */
.process-fan-card-thumbnail {
  position: relative;
  width: calc(100% + 50px);
  min-height: 160px;
  left: 50%;
  border-radius: 12px;
  border: 1px solid rgba(114, 207, 109, 0.15); /* Theme accent color border */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 
              0 0 15px rgba(114, 207, 109, 0.05);
  transform: rotate(-3deg) rotateY(6deg) rotateX(3deg) translateX(-50%);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.6s ease, 
              box-shadow 0.6s ease;
  overflow: hidden;
  background: rgba(20, 20, 20, 0.5);
  margin-top: 0.5rem;
  margin-bottom: 2.25rem;
  transition: all 0.3s ease;
}

.process-fan-wrapper .process-fan-card.active:hover .process-fan-card-thumbnail {
  margin-top: 1.25rem;
  transform: rotate(0deg) translate3d(0, -6px, 12px) translateX(-50%);
  border-color: rgba(114, 207, 109, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
              0 0 25px rgba(114, 207, 109, 0.1);
              transition: all 0.3s ease;
}

.process-fan-card-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain; /* Contain mode ensures illustrations are not cropped */
  border-radius: 11px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-fan-wrapper .process-fan-card.active:hover .process-fan-card-thumbnail img {
  transform: scale(1.06);
}