/* ===========================================================
   Triveni Power - From Precision to Prediction.
   Light band (Bechtel-style split):
     Top:  · LHS - title + circular orange arrow CTA
           · RHS - body paragraph
     Below: 4-card horizontal slider with image + caption
   =========================================================== */

.prediction {
  /* Local dark scope so this section reads correctly over the video. */
  --ink:        #FFFFFF;
  --ink-80:     rgba(255, 255, 255, 0.84);
  --ink-60:     rgba(255, 255, 255, 0.62);
  --ink-40:     rgba(255, 255, 255, 0.42);

  position: relative;
  background: #0A0809;
  color: var(--ink);
  padding: clamp(56px, 7vw, 96px) 0 clamp(56px, 7vw, 88px);
  overflow: hidden;
  isolation: isolate;
  min-height: 662px;
}

/* =========================================================
   BACKGROUND - animated CSS Beams (reactbits-style)
   Multiple diagonal cylindrical beams over a black base,
   each shimmers and drifts on its own loop.
   ========================================================= */
.prediction__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

/* Three.js canvas - fills the bg layer */
.prediction__beams-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.prediction__tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Soft vignette + LHS darkening so the title stays readable */
  background:
    radial-gradient(ellipse at 30% 50%,
      rgba(0,0,0,0.40) 0%,
      rgba(0,0,0,0.10) 45%,
      rgba(0,0,0,0.00) 70%),
    linear-gradient(90deg,
      rgba(0,0,0,0.45) 0%,
      rgba(0,0,0,0.20) 45%,
      rgba(0,0,0,0.10) 100%),
    linear-gradient(180deg,
      rgba(0,0,0,0.25) 0%,
      rgba(0,0,0,0.00) 22%,
      rgba(0,0,0,0.00) 70%,
      rgba(0,0,0,0.40) 100%);
}

.prediction__container {
  position: relative;
  z-index: 2;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =========================================================
   TOP SPLIT - title+CTA / body
   ========================================================= */
.prediction__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 3vw, 48px);
  margin-bottom: clamp(32px, 3.5vw, 56px);
}
@media (min-width: 1024px) {
  .prediction__intro {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(48px, 6vw, 96px);
    align-items: start;
  }
}

.prediction__intro-left {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 40px);
  max-width: 620px;
}

.prediction__title {
  font-family: var(--font-display);
  font-size: var(--fs-l);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0;
}
.prediction__title em {
  font-style: normal;
  color: var(--accent);
}

/* .prediction__cta text+color rules moved to css/buttons.css under
   canonical .btn--link kind (per-section override). The orange
   circle badge styles below are unique to this CTA and stay here. */
.prediction__cta {
  align-self: flex-start;
}

.prediction__cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 280ms var(--ease-out),
    transform 280ms var(--ease-out),
    box-shadow 280ms var(--ease-out);
  box-shadow: 0 6px 18px rgba(245, 130, 32, 0.30);
}
.prediction__cta-icon svg { width: 18px; height: 18px; }
.prediction__cta:hover .prediction__cta-icon {
  background: var(--accent-ink);
  transform: translateX(2px);
  box-shadow: 0 10px 22px rgba(245, 130, 32, 0.40);
}

.prediction__intro-right {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.6vw, 22px);
}
.prediction__body {
  font-family: var(--font-display);
  font-size: var(--fs-m);
  font-weight: 400;
  line-height: 1.6;
  color: #FFFFFF;
  margin: 0;
  max-width: 56ch;
}
.prediction__body strong { color: #FFFFFF; font-weight: 400; }

/* Per-card 'Explore' arrow chip - sits top-right of every card,
   links to /digital-ecosystem.html. Same circular-glass treatment
   used elsewhere on the page. */
.prediction__card-cta {
  position: absolute;
  top: clamp(16px, 1.6vw, 22px);
  right: clamp(16px, 1.6vw, 22px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.22);
  color: #FFFFFF;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.prediction__card-cta svg {
  width: 18px;
  height: 18px;
  transition: transform 200ms ease;
}
.prediction__card-cta:hover {
  background: var(--accent, #F58220);
  border-color: var(--accent, #F58220);
  transform: scale(1.05);
}
.prediction__card-cta:hover svg { transform: translate(1px, -1px); }

/* =========================================================
   CARD SLIDER - horizontal track with snap + arrow controls
   ========================================================= */
.prediction__cards {
  position: relative;
  display: flex;
  flex-direction: column;
}

.prediction__cards-head {
  order: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: clamp(20px, 2vw, 28px);
}

/* Mobile - drop the arrows below the cards, right-aligned. */
@media (max-width: 767px) {
  .prediction__cards-head {
    order: 2;
    margin-bottom: 0;
    margin-top: clamp(16px, 4vw, 24px);
    justify-content: flex-end;
  }
}
.prediction__cards-label {
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  color: var(--ink-60);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.prediction__cards-label::before {
  content: "";
  width: 24px;
  height: 1.5px;
  background: var(--accent);
}

.prediction__cards-nav {
  display: flex;
  gap: 10px;
}
.prediction__nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
          backdrop-filter: blur(10px) saturate(160%);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 280ms var(--ease-out),
    border-color 280ms var(--ease-out),
    color 280ms var(--ease-out),
    transform 280ms var(--ease-out);
}
.prediction__nav-btn svg { width: 18px; height: 18px; }
.prediction__nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  transform: translateY(-1px);
}
.prediction__nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.prediction__nav-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Track - snapping horizontal scroll */
.prediction__track {
  display: flex;
  gap: clamp(24px, 2.6vw, 40px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: clamp(8px, 1vw, 12px);
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.prediction__track::-webkit-scrollbar { display: none; }

/* =========================================================
   CARD - image-led with caption overlay
   ========================================================= */
.prediction__card {
  flex: 0 0 auto;
  width: clamp(280px, 84vw, 340px);
  scroll-snap-align: start;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1718;
  aspect-ratio: 3 / 4;            /* portrait — was 4 / 3 landscape */
  isolation: isolate;
  transition: transform 380ms var(--ease-out);
}
@media (min-width: 768px) {
  .prediction__card { width: clamp(320px, 42vw, 420px); }
}
@media (min-width: 1280px) {
  .prediction__card { width: clamp(360px, 28vw, 460px); }
}
.prediction__card:hover { transform: translateY(-4px); }

.prediction__card-media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}
.prediction__card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.02);
  transition: transform 700ms var(--ease-out);
}
.prediction__card:hover .prediction__card-media img {
  transform: scale(1.08);
}
.prediction__card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* Top tint for the corner number */
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.18) 0%,
      rgba(0, 0, 0, 0.00) 22%),
    /* Bottom black patch behind the title text */
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.00)  45%,
      rgba(0, 0, 0, 0.55)  72%,
      rgba(0, 0, 0, 0.92) 100%);
  pointer-events: none;
}

.prediction__card-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: clamp(20px, 2vw, 28px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;       /* card copy anchored to the bottom */
  color: #FFFFFF;
}

.prediction__card-num {
  font-family: var(--font-sans);
  font-feature-settings: "tnum" 1;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.prediction__card-num::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--accent);
}

.prediction__card-title {
  font-family: var(--font-display);
  font-size: var(--fs-m);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #FFFFFF;
  margin: 0;
  max-width: 22ch;
}

/* =========================================================
   DOTS - slider position indicator below the track
   ========================================================= */
.prediction__dots {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: clamp(20px, 2.2vw, 32px);
}
.prediction__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition:
    background 280ms var(--ease-out),
    width 280ms var(--ease-out),
    transform 280ms var(--ease-out);
}
.prediction__dot:hover { background: rgba(255, 255, 255, 0.50); }
.prediction__dot[aria-current="true"] {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}
.prediction__dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .prediction__track { scroll-behavior: auto; }
  .prediction__card,
  .prediction__card-media img,
  .prediction__cta-icon { transition: none !important; transform: none !important; }
}
