/* ==========================================
   WATERFALL LIFECYCLE — Our Process Section
   ========================================== */
.hww-section {
  padding: 100px 0 120px;
  background: #080808;
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
}

.hww-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.04) 0%, transparent 65%);
  pointer-events: none;
}

.hww-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.hww-header {
  text-align: center;
  margin-bottom: 60px;
}

.hww-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0fae52ff;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.hww-label::before,
.hww-label::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: #0fae52ff;
  opacity: .5;
}

.hww-label.vis {
  opacity: 1;
  transform: translateY(0);
}

.hww-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 400;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease .1s, transform .7s ease .1s;
}

.hww-title.vis {
  opacity: 1;
  transform: translateY(0);
}

.hww-pillars {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
  max-width: 1100px;
  margin: 40px auto 0;
}

.hww-pillar {
  flex: 1;
  min-width: 280px;
  max-width: 340px;
  display: flex;
  gap: 18px;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.hww-pillar.vis {
  opacity: 1;
  transform: translateY(0);
}

.hww-pillar:nth-child(2) {
  transition-delay: 0.15s;
}

.hww-pillar:nth-child(3) {
  transition-delay: 0.3s;
}

.hww-pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4AF37;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hww-pillar-content h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.hww-pillar-content p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
}


/* ==========================================
   WATERFALL GANTT CHART
   ========================================== */
.wf-chart {
  background: #0a0c0a;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: auto;
  min-height: 800px;
  padding-bottom: 40px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.4),
    0 30px 80px rgba(0, 0, 0, 0.3);
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* Scroll indicator hint for mobile */
.wf-chart::after {
  content: '← Scroll to view timeline →';
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
}

/* ---------- Week Column Headers ---------- */
.wf-week-headers {
  display: flex;
  background: #0D0F0D;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wf-label-spacer {
  width: 56px;
  flex-shrink: 0;
  background: #0D0F0D;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.wf-weeks {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}

.wf-weeks span {
  padding: 14px 0;
  text-align: center;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.wf-weeks span:last-child {
  border-right: none;
}


/* ---------- Row ---------- */
.wf-row {
  display: flex;
  height: 140px;
  /* Balanced height */
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wf-row:last-child {
  border-bottom: none;
}


/* ---------- Phase Label (left) ---------- */
.wf-phase {
  width: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #0D0F0D;
}

.wf-phase::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent);
}

.wf-phase span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}


/* ---------- Track (grid area) ---------- */
.wf-track {
  flex: 1;
  position: relative;
  padding: 8px 0;
  display: flex;
  align-items: center;
  /* Dark grid lines every 10% */
  background-image: repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.06) 0px,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent);
  background-size: 10% 100%;
}


/* ---------- Bar (animated) ---------- */
.wf-bar {
  position: absolute;
  left: var(--bar-left);
  height: calc(100% - 12px);
  width: 0;
  overflow: hidden;
  transition: width 1.2s cubic-bezier(.4, 0, .2, 1);
  border-radius: 0;
}

.wf-bar.anim {
  width: var(--bar-width);
  /* animates to full */
}


/* ---------- Bar Fill (card) ---------- */
.wf-bar-fill {
  min-width: 220px;
  height: 100%;
  background: #15201a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 12px 16px 12px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow:
    inset 5px 0 0 var(--accent),
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.wf-bar.anim .wf-bar-fill {
  border-color: rgba(255, 255, 255, 0.1);
}

.wf-bar-fill:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}


/* ---------- Week Badge ---------- */
.wf-badge {
  display: inline-block;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: 0;
  width: fit-content;
  font-family: var(--font-body);
}


/* ---------- Icon ---------- */
.wf-bar-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: .85rem;
  transition: all .3s ease;
}

.wf-bar-fill:hover .wf-bar-icon {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
}


/* ---------- Title ---------- */
.wf-bar-fill h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-top: auto;
}


/* ==========================================
   WATERFALL — RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .wf-row {
    min-height: 95px;
  }
}

@media (max-width: 768px) {
  .hww-section {
    padding: 80px 0;
  }

  .wf-chart {
    border-radius: 12px;
    overflow-x: auto;
  }

  .wf-chart::after {
    display: block;
  }

  /* Force minimum width on inner elements to prevent squeezing */
  .wf-week-headers,
  .wf-row,
  .wf-grid-bg {
    min-width: 900px;
  }

  .wf-label-spacer,
  .wf-phase {
    width: 44px;
  }

  .wf-phase span {
    font-size: .5rem;
  }

  .wf-row {
    min-height: 90px;
  }

  .wf-bar-fill {
    min-width: 160px;
    padding: 10px 14px;
  }

  .wf-bar-fill h4 {
    font-size: .85rem;
  }

  .wf-bar-icon {
    width: 26px;
    height: 26px;
    font-size: .75rem;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {

  .wf-label-spacer,
  .wf-phase {
    width: 34px;
  }

  .wf-phase span {
    font-size: .45rem;
    letter-spacing: .15em;
  }

  .wf-weeks span {
    font-size: .48rem;
    padding: 10px 0;
  }

  .wf-row {
    min-height: 80px;
  }

  .wf-bar-fill {
    min-width: 130px;
    padding: 8px 10px;
  }

  .wf-badge {
    font-size: .48rem;
    padding: 2px 6px;
  }

  .wf-bar-fill h4 {
    font-size: .72rem;
  }

  .wf-bar-icon {
    width: 22px;
    height: 22px;
    font-size: .65rem;
    top: 8px;
    right: 8px;
  }
}

/* Custom Scrollbar for the chart */
.wf-chart::-webkit-scrollbar {
  height: 6px;
}

.wf-chart::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.wf-chart::-webkit-scrollbar-thumb {
  background: rgba(15, 174, 82, 0.3);
  border-radius: 10px;
}

.wf-chart::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 174, 82, 0.5);
}