/* Data Transformation Scroll Animation - RESPONSIVE */

/* CSS Custom Properties */
:root {
  --transformation-title-size: clamp(1.5rem, 4vw, 3.5rem);
  --transformation-desc-size: clamp(0.95rem, 2vw, 1.25rem);
  --transformation-stat-size: clamp(1.75rem, 5vw, 2.75rem);
}

.data-transformation-scroll {
  position: relative;
  min-height: 400vh;
  padding-top: 0;
  margin-top: 0; /* No overlap - appears after hero animation completes */
  background: var(--bg-primary);
  z-index: 1; /* Below hero */
}


.transformation-pinned-container {
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12rem 4rem 4rem 4rem;
  gap: 5rem;
  max-width: 1600px;
  margin: 0 auto;
}

.transformation-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #e66300;
  margin-bottom: 1.5rem;
}

.transformation-eyebrow-green {
  color: #e66300;
}

.transformation-text-layer h2 {
  font-size: var(--transformation-title-size);
  font-weight: 700;
  color: #1A1D23;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.transformation-title-green {
  color: #1A1D23;
}

.transformation-content-area {
  flex: 1;
  max-width: 600px;
  position: relative;
  height: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  z-index: 20;
}

.transformation-text-layer {
  width: 100%;
  will-change: transform, opacity;
  min-height: 400px;
  position: relative;
  z-index: 20;
}

.transformation-problem-layer {
  opacity: 1;
}

.transformation-solution-layer {
  position: absolute;
  opacity: 0;
}


.transformation-description {
  font-size: var(--transformation-desc-size);
  line-height: 1.7;
  color: #5A5F6B;
  margin-bottom: 1.5rem;
}

.transformation-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
}

.transformation-stat-number {
  font-size: var(--transformation-stat-size);
  font-weight: 700;
  color: #e66300;
}

.transformation-stat-green {
  color: #e66300;
}

.transformation-stat-text {
  font-size: 0.9rem;
  color: #7A7F8A;
  margin-top: 0.5rem;
}

.transformation-visual-area {
  flex: 1;
  max-width: min(50vw, 700px);
  aspect-ratio: 1 / 1;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: -80px;
  z-index: 5;
}

/* Loop elements with premium touches */
.transformation-loop-node {
  position: absolute;
  width: 90px; /* Overridden by JS */
  height: 90px; /* Overridden by JS */
  background: linear-gradient(135deg, #e66300 0%, #ff8c00 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  color: #FFFFFF;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: filter 0.3s ease;
  will-change: transform, opacity;
}

.transformation-loop-icon {
  width: 35%;
  height: 35%;
  min-width: 24px;
  min-height: 24px;
  max-width: 36px;
  max-height: 36px;
}

.transformation-loop-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Animated stroke for connectors */
.transformation-loop-connector {
  stroke: rgba(230, 99, 0, 0.5);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}

/* Hub core with premium gradient */
.transformation-hub-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; /* Default, overridden by JS */
  height: 120px; /* Default, overridden by JS */
  background: linear-gradient(135deg, #e66300 0%, #ff8c00 50%, #e66300 100%);
  background-size: 200% 200%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  z-index: 10;
  will-change: transform, opacity;
}

.transformation-hub-core.active {
  animation: gradientShift 8s ease infinite, gentlePulse 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes gentlePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

.transformation-hub-core-icon {
  width: 40%;
  height: 40%;
  min-width: 32px;
  min-height: 32px;
  max-width: 48px;
  max-height: 48px;
}

.transformation-hub-core-icon svg {
  width: 100%;
  height: 100%;
  fill: #FFFFFF;
}

/* Hub system wrapper for rotation */
.transformation-hub-system {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Connection lines from hub to outputs */
.transformation-hub-connection {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.5px;
  background: rgba(230, 99, 0, 0.5);
  transform-origin: 0 0;
  opacity: 0;
  margin-left: -0.75px;
  margin-top: -0.75px;
  z-index: 1;
}

/* Cardinal directions - top, right, bottom, left */
.transformation-hub-connection-cardinal {
  height: 265px; /* Default, overridden by JS */
}

/* Diagonal directions */
.transformation-hub-connection-diagonal {
  height: 241px; /* Default, overridden by JS */
}


/* Hub outputs with light theme styling */
.transformation-hub-output {
  position: absolute;
  left: 0; /* Overridden by JS */
  top: 0; /* Overridden by JS */
  width: 70px; /* Default, overridden by JS */
  height: 70px; /* Default, overridden by JS */
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #e66300;
  font-weight: 600;
  opacity: 0;
  z-index: 15;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease;
  will-change: transform, opacity;
}

.transformation-hub-output:hover {
  transform: scale(1.1);
}

.transformation-hub-output-icon {
  width: 40%;
  height: 40%;
  min-width: 24px;
  min-height: 24px;
  max-width: 32px;
  max-height: 32px;
}

.transformation-hub-output-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #e66300;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .transformation-pinned-container {
    flex-direction: column;
    gap: 3.5rem;
    padding: 6rem 2rem 3rem 2rem;
    align-items: center;
  }

  .transformation-content-area {
    max-width: 100%;
    text-align: center;
    order: 2;
    align-items: center;
  }

  .transformation-text-layer {
    text-align: center;
  }

  .transformation-visual-area {
    order: 1;
    max-width: min(65vw, 550px);
    width: 100%;
    margin-top: 0;
  }

  .transformation-text-layer h2 {
    font-size: 2.25rem;
  }

  .transformation-description {
    font-size: 1.15rem;
  }

  .transformation-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .transformation-pinned-container {
    height: 100vh; /* Full viewport height */
    padding: 5rem 1.5rem 1rem 1.5rem;
    gap: 1rem;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto; /* Allow scrolling within if content exceeds */
  }

  .transformation-content-area {
    align-items: center;
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .transformation-text-layer {
    text-align: center;
    min-height: auto;
    position: relative !important; /* Override absolute positioning */
    opacity: 1 !important; /* Make both layers visible */
  }

  .transformation-solution-layer {
    border-top: 1px solid rgba(230, 99, 0, 0.2);
    padding-top: 2rem;
  }

  .transformation-text-layer h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
  }

  .transformation-eyebrow {
    font-size: 0.65rem;
    margin-bottom: 0.35rem;
  }

  .transformation-description {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  .transformation-stats {
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.75rem;
  }

  .transformation-stat-number {
    font-size: 1.35rem;
    margin-bottom: 0.15rem;
  }

  .transformation-stat-text {
    font-size: 0.7rem;
  }

  .transformation-visual-area {
    max-width: min(70vw, 280px);
    margin-top: 0.5rem;
    order: 2;
  }
}

@media (max-width: 600px) {
  .transformation-pinned-container {
    padding: 2.5rem 1rem 2rem 1rem;
    gap: 2rem;
  }

  .transformation-text-layer h2 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .transformation-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .transformation-stats {
    gap: 1.25rem;
    margin-top: 1.5rem;
  }

  .transformation-stat-number {
    font-size: 1.75rem;
  }

  .transformation-stat-text {
    font-size: 0.8rem;
  }

  .transformation-visual-area {
    max-width: min(90vw, 420px);
  }
}

@media (max-width: 480px) {
  .transformation-pinned-container {
    padding: 2rem 1rem 1.5rem 1rem;
    gap: 1.75rem;
  }

  .transformation-text-layer h2 {
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: 0.85rem;
  }

  .transformation-eyebrow {
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
  }

  .transformation-description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
  }

  .transformation-stats {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
    margin-top: 1.25rem;
  }

  .transformation-stat {
    text-align: center;
  }

  .transformation-stat-number {
    font-size: 1.6rem;
  }

  .transformation-stat-text {
    font-size: 0.75rem;
  }

  .transformation-visual-area {
    max-width: min(92vw, 380px);
  }
}
