/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox-image {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 48px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.2);
}

/* ============================================
   READ MORE BUTTONS (Team slide)
   ============================================ */
button.read-more {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Montserrat", Helvetica;
  font-weight: 500;
  text-align: justify;
  letter-spacing: 0;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

button.read-more:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* ============================================
   CLOCK ANIMATION (Solution Flow Slide)
   ============================================ */
.clock-slide {
  width: 1920px;
  height: 1080px;
  background-color: #f6fded;
  position: relative;
  overflow: hidden;
}

.clock-slide .clock-ground {
  position: absolute;
  left: -40px;
  bottom: -170px;
  width: 2000px;
  height: 360px;
  background: rgba(217, 217, 217, 0.5);
  border-radius: 1000px / 180px;
}

.clock-slide .slide-logo {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 178px;
  height: 178px;
  object-fit: cover;
}

.clock-slide .slide-title-bar {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 1260px;
  padding: 18px 48px;
  background-color: rgba(146, 235, 26, 0.4);
  border-radius: 24px;
  font-family: "Montserrat", Helvetica;
  font-weight: 600;
  color: var(--green-dark-2);
  font-size: 62px;
  line-height: 1;
  text-align: center;
}

.clock-circle-bg {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 24px 48px rgba(22, 30, 11, 0.12);
}

.clock-circle-bg--outer {
  width: 700px;
  height: 700px;
  background-color: rgba(22, 30, 11, 1);
  border: 1px solid rgba(215, 232, 194, 0.9);
}

.clock-circle-bg--mid {
  width: 620px;
  height: 620px;
  background-color: rgba(60, 71, 45, 0.85);
}

.clock-circle-bg--inner {
  width: 548px;
  height: 548px;
  background-color: rgba(96, 109, 81, 0.78);
}

.clock-circle-core {
  position: absolute;
  top: 56%;
  left: 50%;
  width: 500px;
  height: 500px;
  transform: translate(-50%, -50%);
  opacity: 0.96;
}

/* Avatar positions (8 positions like clock: 12, 1:30, 3, 4:30, 6, 7:30, 9, 10:30) */
.clock-avatars {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 820px;
  height: 820px;
}

.clock-avatar {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.clock-avatar.active {
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.9), 0 0 24px rgba(141, 198, 63, 0.55);
}

.clock-avatar-icon {
  width: 64px;
  height: 64px;
}

.clock-avatar--green {
  background: rgba(51, 110, 0, 0.14);
  border-color: rgba(51, 110, 0, 0.35);
}

.clock-avatar--orange {
  background: rgba(228, 109, 5, 0.14);
  border-color: rgba(228, 109, 5, 0.35);
}

.clock-avatar--cyan {
  background: rgba(5, 206, 228, 0.14);
  border-color: rgba(5, 206, 228, 0.35);
}

.clock-avatar--blue {
  background: rgba(5, 57, 228, 0.14);
  border-color: rgba(5, 57, 228, 0.35);
}

.clock-avatar--red {
  background: rgba(167, 1, 1, 0.14);
  border-color: rgba(167, 1, 1, 0.35);
}

/* Position each avatar around the circle */
.clock-avatar:nth-child(1) { top: 10px; left: 50%; transform: translateX(-50%); }
.clock-avatar:nth-child(2) { top: 120px; right: 78px; }
.clock-avatar:nth-child(3) { top: 360px; right: 0; transform: translateY(-50%); }
.clock-avatar:nth-child(4) { bottom: 116px; right: 88px; }
.clock-avatar:nth-child(5) { bottom: 10px; left: 50%; transform: translateX(-50%); }
.clock-avatar:nth-child(6) { bottom: 116px; left: 88px; }
.clock-avatar:nth-child(7) { top: 360px; left: 0; transform: translateY(-50%); }
.clock-avatar:nth-child(8) { top: 120px; left: 78px; }

.clock-avatar.active:nth-child(1) { transform: translateX(-50%) scale(1.16); }
.clock-avatar.active:nth-child(3) { transform: translateY(-50%) scale(1.16); }
.clock-avatar.active:nth-child(5) { transform: translateX(-50%) scale(1.16); }
.clock-avatar.active:nth-child(7) { transform: translateY(-50%) scale(1.16); }
.clock-avatar.active:nth-child(2),
.clock-avatar.active:nth-child(4),
.clock-avatar.active:nth-child(6),
.clock-avatar.active:nth-child(8) { transform: scale(1.16); }

/* Rotating hand (solar panel + text) */
.clock-hand-container {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 820px;
  height: 820px;
  pointer-events: none;
}

.clock-hand {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.clock-hand::before {
  content: "";
  position: absolute;
  top: -300px;
  left: -1px;
  width: 2px;
  height: 300px;
  background: linear-gradient(180deg, rgba(141, 198, 63, 0.85) 0%, rgba(141, 198, 63, 0.12) 100%);
}

.clock-hand::after {
  content: "";
  position: absolute;
  top: -308px;
  left: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #00fd00;
  box-shadow: 0 0 18px rgba(0, 253, 0, 0.45);
}

.solar-panel {
  position: absolute;
  width: 170px;
  height: 110px;
  top: -365px;
  left: -85px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.clock-step-counter {
  position: absolute;
  top: -332px;
  left: 98px;
  width: 40px;
  height: 58px;
  background: #03236a;
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", Helvetica;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
}

/* Green dots ring */
.clock-dots {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
}

.clock-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00fd00;
  opacity: 0;
  transition: opacity 0.5s ease;
  box-shadow: 0 0 14px rgba(0, 253, 0, 0.3);
}

.clock-dot.visible {
  opacity: 1;
}

/* Text callout */
.clock-callout {
  position: absolute;
  max-width: 300px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(141, 198, 63, 0.3);
  box-shadow: 0 16px 30px rgba(22, 30, 11, 0.12);
  font-family: "Montserrat", Helvetica;
  font-weight: 600;
  color: var(--green-dark-2);
  font-size: 20px;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.clock-callout.visible {
  opacity: 1;
}

/* Bottom nav bar for clock slide */
.clock-slide .slide-footer {
  position: absolute;
  bottom: 34px;
  left: 60px;
  right: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clock-slide .slide-footer .nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--logo-cta-highlights);
  font-family: "Montserrat", Helvetica;
  font-weight: 600;
  color: var(--logo-cta-highlights);
  font-size: 28px;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
}

.clock-slide .clock-site-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--logo-cta-highlights);
  border-radius: 10px;
  font-family: "Montserrat", Helvetica;
  font-weight: 600;
  color: var(--text);
  font-size: 28px;
  text-decoration: none;
}

.clock-slide .clock-site-link-icon {
  width: 40px;
  height: 40px;
  background: url(../assets/img/shared/language.svg) no-repeat center / contain;
}

/* ============================================
   COUNTER ANIMATIONS (Problem + Ask slides)
   ============================================ */
.counter-container {
  overflow: hidden;
}

.counter-digits {
  transition: transform 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Animation trigger when slide is in view */
.slide.in-view .counter-digits {
  animation: counterRoll 2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.counter-roll {
  --counter-target: 0;
  --counter-step: 100px;
  --counter-delay: 0s;
  --counter-duration: 1.8s;
  transform: translateY(0);
  transition: transform var(--counter-duration) cubic-bezier(0.22, 1, 0.36, 1) var(--counter-delay);
  will-change: transform;
}

.problem .counter-roll {
  --counter-step: 153.6px;
}

.the-ask .counter-roll {
  --counter-step: 115.2px;
}

.slide.in-view .counter-roll {
  transform: translateY(calc(var(--counter-step) * var(--counter-target) * -1));
}

/* ============================================
   SLIDE REVEAL ANIMATIONS
   ============================================ */
.slide-anim-target {
  --slide-anim-x: 0px;
  --slide-anim-y: 52px;
  --slide-anim-scale: 0.985;
  --slide-anim-duration: 760ms;
  --slide-anim-delay: 0s;
  --slide-anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  translate: var(--slide-anim-x) var(--slide-anim-y);
  scale: var(--slide-anim-scale);
  transition-property: opacity, translate, scale;
  transition-duration: var(--slide-anim-duration), var(--slide-anim-duration), var(--slide-anim-duration);
  transition-timing-function: var(--slide-anim-ease), var(--slide-anim-ease), var(--slide-anim-ease);
  transition-delay: var(--slide-anim-delay), var(--slide-anim-delay), var(--slide-anim-delay);
  will-change: opacity, translate, scale;
}

.slide.in-view .slide-anim-target {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

@media (prefers-reduced-motion: reduce) {
  .counter-roll {
    transition: none;
  }

  .slide-anim-target {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    transition: none;
    will-change: auto;
  }
}
