/* ═══════════════════════════════════════════
   Integrated Plant Process — Page Styles
   (loads AFTER styles.css, reuses its variables)
   ═══════════════════════════════════════════ */

.process-page { padding-top: 110px; }

/* ─── Page Hero ─── */
.proc-hero { text-align: center; padding: 40px 0 24px; position: relative; z-index: 2; }
.proc-hero h1 {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: clamp(36px, 5.5vw, 64px); line-height: 1.05; margin-bottom: 18px;
  background: linear-gradient(120deg, var(--white) 30%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.proc-hero p { color: var(--white-70); font-size: 18px; max-width: 720px; margin: 0 auto; }
.live-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(91,175,59,0.12); border: 1px solid rgba(91,175,59,0.35);
  border-radius: 50px; padding: 8px 20px; font-size: 13px; font-weight: 700;
  color: var(--accent); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 28px;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #ff5252;
  box-shadow: 0 0 0 0 rgba(255,82,82,0.6); animation: live-ping 1.6s ease infinite;
}
@keyframes live-ping {
  0% { box-shadow: 0 0 0 0 rgba(255,82,82,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255,82,82,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,82,82,0); }
}

/* ─── Flow Board ─── */
.flow-scroll {
  position: relative; z-index: 2; overflow-x: auto; overflow-y: hidden;
  padding: 40px 0 56px; -webkit-overflow-scrolling: touch;
}
.flow-board {
  display: flex; align-items: stretch; gap: 0; width: max-content;
  min-width: 100%; padding: 0 40px;
}

/* ─── Zone ─── */
.zone {
  display: flex; flex-direction: column; flex-shrink: 0;
  border-radius: 18px; overflow: hidden;
  background: rgba(255,255,255,0.025); border: 1px solid rgba(91,175,59,0.16);
}
.zone-head {
  background: linear-gradient(135deg, var(--primary), #2f7a26);
  padding: 10px 18px; text-align: center;
}
.zone-head .z-num {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; color: rgba(255,255,255,0.7);
  display: block; text-transform: uppercase;
}
.zone-head .z-title {
  font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 700; color: #fff;
  letter-spacing: 0.5px;
}
.zone-body { padding: 28px 22px; display: flex; flex-direction: column; gap: 20px; flex: 1; }

.zone-1 { width: 280px; }
.zone-2 { width: 250px; }
.zone-3 { width: 340px; }
.zone-4 { width: 940px; }

/* ─── Stage Card ─── */
.stage {
  background: rgba(91,175,59,0.07); border: 1px solid rgba(91,175,59,0.2);
  border-radius: 14px; padding: 18px; position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}
.stage.pulse {
  border-color: rgba(91,175,59,0.7);
  box-shadow: 0 0 30px rgba(91,175,59,0.3), inset 0 0 20px rgba(91,175,59,0.05);
}
.stage-tag {
  display: inline-flex; align-items: center; align-self: flex-start;
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px;
  text-transform: uppercase;
}
.stage-tag.end-use { background: #7a5a1f; }
.stage-tag.product { background: #2f7a26; }
.stage-tag.co2 { background: #2b6fa0; }
.stage-head { display: flex; align-items: center; gap: 12px; }
.stage-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  background: rgba(91,175,59,0.12); display: flex; align-items: center; justify-content: center;
}
.stage-icon svg { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.6; }
.stage h4 { font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 700; color: #fff; }
.stage .stage-sub { font-size: 12px; color: var(--white-50); margin-top: 6px; line-height: 1.5; }

.source-list { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.source-list li { font-size: 12.5px; color: var(--white-70); display: flex; align-items: center; gap: 8px; }
.source-list li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ─── Vertical connector (within zone) ─── */
.v-flow {
  align-self: center; width: 3px; height: 30px; position: relative;
  background: rgba(91,175,59,0.2); border-radius: 3px; overflow: hidden;
}
.v-flow::after {
  content: ''; position: absolute; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  animation: v-stream 1.3s linear infinite;
}
@keyframes v-stream { from { top: -40%; } to { top: 100%; } }

/* ─── Horizontal connector (between zones) ─── */
.h-connector {
  flex-shrink: 0; width: 64px; align-self: center;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.h-pipe {
  position: relative; width: 100%; height: 4px; border-radius: 4px;
  background: rgba(91,175,59,0.18); overflow: visible;
}
.h-pipe::before {
  content: ''; position: absolute; inset: 0; border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 50% 100%; animation: h-stream 1.4s linear infinite;
}
@keyframes h-stream { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.h-pipe .pdot {
  position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); transform: translateY(-50%);
  animation: pdot-go 2s linear infinite;
}
.h-pipe .pdot:nth-child(2) { animation-delay: 1s; }
@keyframes pdot-go { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.h-arrow {
  position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  border-left: 11px solid var(--accent);
}

/* ─── Digester graphic ─── */
.digester-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; justify-content: center; }
.raw-gas-label {
  font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 1px;
  text-transform: uppercase; display: flex; align-items: center; gap: 6px;
}
.digester {
  position: relative; width: 200px; height: 230px; margin: 4px auto;
}
.dig-dome {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 150px; height: 80px; border-radius: 75px 75px 0 0;
  background: linear-gradient(180deg, #3a6b2e, #2c5523);
  border: 2px solid rgba(91,175,59,0.5); border-bottom: none;
  box-shadow: inset 0 6px 18px rgba(91,175,59,0.25);
  animation: dome-glow 2.6s ease infinite;
}
@keyframes dome-glow {
  0%,100% { box-shadow: inset 0 6px 18px rgba(91,175,59,0.2), 0 0 0px rgba(91,175,59,0); }
  50% { box-shadow: inset 0 6px 24px rgba(91,175,59,0.45), 0 0 30px rgba(91,175,59,0.3); }
}
.dig-body {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  width: 150px; height: 150px; border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #5a4a2a 0%, #3d3017 100%);
  border: 2px solid rgba(91,175,59,0.4); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.dig-body .dig-name {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px;
  color: rgba(139,195,74,0.85); letter-spacing: 1px; z-index: 2;
}
.dig-gauge {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.1);
  border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: var(--accent); z-index: 3;
}
/* rising bubbles */
.bubble {
  position: absolute; bottom: 10px; border-radius: 50%;
  background: rgba(139,195,74,0.5); animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 0.9; }
  100% { transform: translateY(-130px) scale(1.1); opacity: 0; }
}
.dig-caption { font-size: 11px; color: var(--white-50); text-align: center; line-height: 1.5; max-width: 240px; }

/* ─── Zone 4 tracks ─── */
.tracks { display: flex; flex-direction: column; gap: 18px; flex: 1; justify-content: center; }
.track { position: relative; }
.track-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--white-50); margin-bottom: 8px; padding-left: 4px;
}
.track-label span { color: var(--accent); }
.track-row { display: flex; align-items: stretch; gap: 0; }
.track .stage { width: 168px; flex-shrink: 0; padding: 14px; }
.track .stage h4 { font-size: 13px; }
.track .stage-icon { width: 38px; height: 38px; }
.track .stage-icon svg { width: 22px; height: 22px; }
.track .h-connector { width: 38px; }

/* ─── Outcome banner ─── */
.outcome {
  position: relative; z-index: 2; margin: 0 auto; max-width: 1200px;
  background: linear-gradient(135deg, var(--primary), #2f7a26);
  border-radius: 14px; padding: 22px 32px; text-align: center;
  font-family: 'Poppins', sans-serif; font-weight: 600; color: #fff; font-size: 15px;
  letter-spacing: 0.3px; line-height: 1.6;
}
.outcome strong { color: #e8f5d8; }
.outcome .arrow { color: var(--accent); font-weight: 800; }

/* ─── scroll hint ─── */
.scroll-hint {
  text-align: center; color: var(--white-50); font-size: 12px; margin-top: 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ─── Final product highlight ─── */
.stage.final {
  border-color: rgba(139,195,74,0.7);
  background: rgba(139,195,74,0.12);
  animation: final-glow 2.2s ease-in-out infinite;
}
@keyframes final-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(139,195,74,0); }
  50% { box-shadow: 0 0 30px rgba(139,195,74,0.55), inset 0 0 18px rgba(139,195,74,0.12); }
}
.stage.final h4 { color: #cdec9e; }
.final-star {
  position: absolute; top: -9px; right: -9px; width: 24px; height: 24px;
  border-radius: 50%; background: linear-gradient(135deg, #8BC34A, #5BAF3B);
  color: #0B1D10; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; z-index: 6;
  box-shadow: 0 0 14px rgba(139,195,74,0.8); animation: star-spin 5s linear infinite;
}
@keyframes star-spin { to { transform: rotate(360deg); } }

/* ─── Machine micro-animations ─── */
.icon-mill svg { animation: spin-360 3.5s linear infinite; transform-origin: center; }
.icon-dryer svg { animation: spin-360 4.5s linear infinite; transform-origin: center; }
.icon-cut svg { animation: cut-shake 0.6s ease-in-out infinite; transform-origin: center; }
.icon-tank svg { animation: tank-bob 2.4s ease-in-out infinite; transform-origin: center; }
.icon-mill, .icon-dryer { overflow: hidden; }
@keyframes cut-shake { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes tank-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
/* factory smoke */
.icon-factory { position: relative; overflow: visible; }
.icon-factory::before, .icon-factory::after {
  content: ''; position: absolute; top: 4px; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(200,230,180,0.5); animation: smoke 2.2s ease-out infinite;
}
.icon-factory::before { left: 16px; }
.icon-factory::after { left: 22px; animation-delay: 1.1s; }
@keyframes smoke {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  30% { opacity: 0.7; }
  100% { transform: translateY(-22px) scale(1.4); opacity: 0; }
}
/* CBG cylinder subtle glow fill */
.icon-cylinder svg { animation: cyl-fill 2.5s ease-in-out infinite; }
@keyframes cyl-fill { 0%,100% { filter: drop-shadow(0 0 0 rgba(91,175,59,0)); } 50% { filter: drop-shadow(0 0 6px rgba(91,175,59,0.8)); } }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .proc-hero { padding: 24px 0 12px; }
  .flow-board { flex-direction: column; align-items: stretch; width: 100%; padding: 0 16px; gap: 0; }
  .zone, .zone-1, .zone-2, .zone-3, .zone-4 { width: 100% !important; }
  .h-connector { width: 100%; height: 40px; transform: rotate(90deg); margin: 4px 0; }
  .tracks { gap: 24px; }
  .track-row { flex-direction: column; align-items: stretch; }
  .track .stage { width: 100%; }
  .track .h-connector { width: 100%; height: 34px; }
  .digester { transform: scale(0.95); }
}
