/* ==========================================================================
   SECTION 02 — CORE ENGINEERING, INTERIORS & UPVC SYSTEMS
   Namespace: .section2 — every selector below is scoped under it.
   Nothing here touches global tags, Bootstrap classes, or other sections.
   ========================================================================== */

.section2 {
  position: relative;
  background: #ffffff;
  font-family: 'Rubik', sans-serif;
  padding: 100px 0;
  overflow: hidden;
}

.section2__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: center;
  min-height: 78vh;
}

/* ---------- LEFT COLUMN ---------- */

.section2__content {
  max-width: 480px;
}

.section2__heading {
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 28px;
  color: #14161a;
}

.section2__heading-line {
  display: block;
}

.section2__heading-line--accent {
  color:  #275d2b !important;
}

.section2__active-readout {
  margin-bottom: 36px;
  min-height: 260px;
}

.section2__stage-number {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color:  #275d2b !important;
}

.section2__stage-title {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 10px 0 16px;
  color: #14161a;
}

.section2__stage-description {
  font-size: 15px;
  line-height: 1.75;
  color: #5c626b;
  margin: 0 0 20px;
}

.section2__labels {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.section2__labels li {
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid #e6e6e6;
  border-radius: 20px;
  color: #3a3d42;
  background: #fafafa;
}

.section2__progress {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
}

.section2__progress-index {
  font-size: 13px;
  font-weight: 600;
  color: #9a9a9a;
  white-space: nowrap;
}

.section2__progress-index span[data-section2-field] {
  color: #14161a;
}

.section2__progress-rail {
  display: flex;
  align-items: center;
}

.section2__progress-node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e2e2e2;
  transition: background 0.3s ease, transform 0.3s ease;
}

.section2__progress-node.is-active {
  background:  #275d2b !important;
  transform: scale(1.15);
}

.section2__progress-line {
  width: 36px;
  height: 2px;
  background: #e2e2e2;
  transition: background 0.3s ease;
}

.section2__progress-line.is-filled {
  background:  #275d2b !important;
}

.section2__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  background: #14161a;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.section2__cta:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.section2__cta.is-emphasized {
  background:  #275d2b !important;
  box-shadow: 0 10px 24px rgba(249, 109, 0, 0.28);
}

.section2__cta-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- RIGHT COLUMN — pinned stage area ---------- */

.section2__stage-area {
  position: relative;
  height: 68vh;
  min-height: 440px;
  max-height: 640px;
  border-radius: 14px;
  overflow: hidden;
  background: #f2f2f2;
}

.section2__gl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.section2__stages {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  z-index: 1;
}

.section2__stg {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

.section2__stg.is-active {
  opacity: 1;
  visibility: visible;
}

.section2__stg-visual {
  margin: 0;
  width: 100%;
  height: 100%;
}

.section2__stg-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text block only rendered visually on mobile/static fallback;
   it always stays in the DOM for accessibility + as the readout source. */
.section2__stg-text {
  display: none;
}

.section2__scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  z-index: 3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s ease;
}

.section2__scroll-hint-icon {
  width: 18px;
  height: 18px;
  animation: section2-bounce 1.6s ease-in-out infinite;
}

.section2__scroll-hint.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes section2-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Mobile CTA hidden on desktop by default */
.section2__mobile-cta {
  display: none;
}

/* ==========================================================================
   MOBILE / TABLET — safe, non-pinned stacked layout
   ========================================================================== */

@media (max-width: 991.98px) {
  .section2 {
    padding: 70px 0;
  }

  /* Safety net: on mobile, stages are visible by default the instant CSS
     loads — GSAP only ever ADDS a fade-in on top of this via gsap.from().
     If section2.js fails to load at all (network hiccup, blocked script,
     etc.) the content is still fully visible and readable, never blank. */
  .section2__stg {
    opacity: 1;
    visibility: visible;
  }

  /* GSAP-free entrance fade: plain CSS transition + a class toggle, no
     tween or timeline involved. See section2.js for why. A stage is
     already fully visible without this — it's a pure enhancement, and
     .section2__stg--pre-reveal is only ever added briefly by JS. */
  .section2__stg {
    transform: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .section2__stg--pre-reveal {
    opacity: 0;
    transform: translateY(24px);
  }

  .section2__inner {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 0 20px;
  }

  .section2__content {
    max-width: none;
  }

  .section2__active-readout,
  .section2__progress,
  .section2__cta {
    display: none;
  }

  .section2__stage-area {
    height: auto;
    max-height: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  .section2__gl-canvas {
    display: none;
  }

  .section2__stg {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    padding: 36px 0;
    border-bottom: 1px solid #ececec;
  }

  .section2__stg:last-child {
    border-bottom: none;
  }

  .section2__stg-text {
    display: block;
    margin-bottom: 18px;
  }

  .section2__stg-visual {
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
  }

  .section2__scroll-hint {
    display: none;
  }

  .section2__mobile-cta {
    display: block;
    text-align: center;
    padding: 30px 20px 0;
  }
}

/* ==========================================================================
   STATIC FALLBACK — no GSAP, or prefers-reduced-motion
   Forces the same safe stacked layout regardless of viewport width.
   ========================================================================== */

.section2--static .section2__active-readout,
.section2--static .section2__progress,
.section2--static .section2__cta {
  display: none;
}

.section2--static .section2__stage-area {
  height: auto;
  max-height: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.section2--static .section2__gl-canvas {
  display: none;
}

.section2--static .section2__stg {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  padding: 36px 0;
  border-bottom: 1px solid #ececec;
}

.section2--static .section2__stg:last-child {
  border-bottom: none;
}

.section2--static .section2__stg-text {
  display: block;
  margin-bottom: 18px;
}

.section2--static .section2__stg-visual {
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
}

.section2--static .section2__scroll-hint {
  display: none;
}

.section2--static .section2__mobile-cta {
  display: block;
  text-align: center;
  padding: 30px 20px 0;
}