/* ============================================
   PILLARS.CSS — THE ECOSYSTEM INFRASTRUCTURE
   ============================================ */

.pillars-section {
  padding: 140px 0;
  background: linear-gradient(180deg, #020807 0%, #000000 100%);
  position: relative;
  overflow: hidden;
}

/* --- Deep Atmosphere --- */
.pillars-bg-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.radial-engine-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 70vh;
  background: radial-gradient(circle, rgba(0, 229, 200, 0.07) 0%, transparent 70%);
  filter: blur(120px);
  z-index: 1;
}

.noise-overlay {
  position: absolute;
  inset: 0;
  background: url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: 0.03;
  z-index: 2;
}

/* --- Header Section --- */
.pillars-head {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  z-index: 5;
}

.mini-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 5px;
  color: var(--teal);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.infrastructure-title {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.05em;
}

.gold-green-glow {
  background: linear-gradient(90deg, #f3d47a, #00e5c8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(0, 229, 200, 0.25));
}

.pillars-subtext {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 580px;
  margin: 25px auto 0;
  line-height: 1.6;
}

/* --- THE CAROUSEL SYSTEM --- */
.carousel-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 20px 0;
}

/* Cinematic Edge Fades */
.edge-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  z-index: 20;
  pointer-events: none;
}

.edge-mask.left { 
  left: 0; 
  background: linear-gradient(to right, #000 15%, transparent 100%); 
}
.edge-mask.right { 
  right: 0; 
  background: linear-gradient(to left, #000 15%, transparent 100%); 
}

/* Track Motion */
.carousel-track {
  display: flex;
  gap: 24px;
  width: max-content;
  will-change: transform;
}

.track-left {
  animation: scroll-left 45s linear infinite;
}

.track-right {
  animation: scroll-right 45s linear infinite;
}

/* Paused until scroll-trigger hits */
.carousel-track {
  animation-play-state: paused;
}

.animate-start .carousel-track {
  animation-play-state: running;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* --- THE PREMIUM CARD --- */
.infra-card {
  width: 340px;
  height: 440px;
  flex-shrink: 0;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #080f0d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.infra-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.8s ease, opacity 0.6s ease;
}

.infra-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top, 
    rgba(0, 0, 0, 0.95) 0%, 
    rgba(0, 0, 0, 0.4) 50%, 
    transparent 100%
  );
  z-index: 2;
}

.infra-content {
  position: absolute;
  bottom: 0;
  padding: 35px;
  width: 100%;
  z-index: 5;
}

.infra-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.infra-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s ease;
}

.infra-icon {
  position: absolute;
  top: 35px;
  right: 35px;
  color: var(--teal);
  opacity: 0.3;
  transform: scale(0.8);
  transition: all 0.4s ease;
  z-index: 5;
}

/* --- INTERACTIVITY --- */
.infra-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--teal);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 200, 0.15);
}

.infra-card:hover .infra-img {
  transform: scale(1.1);
  opacity: 0.8;
}

.infra-card:hover .infra-desc {
  opacity: 1;
  transform: translateY(0);
}

.infra-card:hover .infra-icon {
  opacity: 1;
  transform: scale(1);
}

/* Fade on hover effect for neighboring cards */
.carousel-track:hover .infra-card:not(:hover) {
  opacity: 0.4;
  filter: grayscale(0.5) blur(2px);
}

/* Reveal Logic */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.v {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Fixes */
@media (max-width: 768px) {
  .infra-card { width: 280px; height: 380px; }
  .infrastructure-title { font-size: 38px; }
}