html {
  scroll-behavior: smooth;
}

/* initial hidden state */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
  will-change: opacity, transform;
}

/* when element enters viewport */
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* slightly stagger children inside each section */
.timeline-item .reveal:nth-child(1) {
  transition-delay: 0.05s;
}
.timeline-item .reveal:nth-child(2) {
  transition-delay: 0.15s;
}
.timeline-item .reveal:nth-child(3) {
  transition-delay: 0.25s;
}

/* GLOBAL RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden; /* no horizontal scroll by default */
}

.page {
  position: relative;
  min-height: 100vh;
  padding: 60px 8px 80px;
}

/* CENTER LINE + SCROLL DOT */
.timeline-line {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #ffffff33;
  pointer-events: none;
  z-index: 0;
}

.timeline-dot {
  position: fixed;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 12px rgba(255,255,255,0.9),
    0 0 24px rgba(255,255,255,0.7);
  animation: flicker 1.2s infinite alternate;
  z-index: 1;
  pointer-events: none;
}

@keyframes flicker {
  0% {
    opacity: 0.8;
    box-shadow:
      0 0 8px rgba(255,255,255,0.7),
      0 0 18px rgba(255,255,255,0.4);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 14px rgba(255,255,255,1),
      0 0 28px rgba(255,255,255,0.9);
  }
  100% {
    opacity: 0.7;
    box-shadow:
      0 0 10px rgba(255,255,255,0.7),
      0 0 22px rgba(255,255,255,0.6);
  }
}

/* TIMELINE SECTIONS */
.timeline {
  position: relative;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 0 8px;
  z-index: 2;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  min-height: 0;
  padding: 32px 0;
}

/* default: left text, right video */
.timeline-left {
  text-align: right;
  padding-right: 16px;
  position: relative;
}

.timeline-right {
  padding-left: 16px;
}

.timeline-left h2 {
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-left h3 {
  font-size: 24px;
  letter-spacing: 2px;
  font-weight: 700;
}

.timeline-left p {
  font-size: 13px;
  margin-top: 10px;
  color: #bbbbbb;
}

/* connector from text to center line */
.timeline-left::before,
.timeline-left::after {
  content: "";
  position: absolute;
  right: -16px;
  background: #fff;
}

.timeline-left::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: 40px;
}

.timeline-left::after {
  width: 18px;
  height: 2px;
  top: 43px;
}

/* REVERSED ITEMS: right text, left video */
.timeline-item.reverse .timeline-left {
  order: 2;
  text-align: left;
  padding-right: 0;
  padding-left: 16px;
}

.timeline-item.reverse .timeline-right {
  order: 1;
  padding-left: 0;
  padding-right: 16px;
}

.timeline-item.reverse .timeline-left::before,
.timeline-item.reverse .timeline-left::after {
  right: auto;
  left: -16px;
}

/* VIDEO FRAMES */
.video-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow:
    0 0 0 1px #ffffff22,
    0 10px 25px rgba(0,0,0,0.8);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-frame:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px #ffffff55,
    0 16px 32px rgba(0,0,0,0.9);
}

.video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.download-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1),
    rgba(0,0,0,0.55)
  );
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.video-frame:hover .download-label {
  opacity: 1;
}

.download-label span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: rgba(0,0,0,0.5);
}

/* Highlight active item */
.timeline-item.active .timeline-left h3 {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,0.7);
}
.timeline-item.active .timeline-left::before {
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(255,255,255,0.9);
}

/* small phones */
@media (max-width: 480px) {
  .timeline-left h3 { font-size: 20px; }
  .timeline-left h2 { font-size: 14px; }
  .timeline-left p  { font-size: 12px; }
}

/* NIMISH ZOOM HERO */
.zoom-name-section {
  position: relative;
  height: 500vh;      /* how long the zoom runs */
  background: #ffffff;
  color: #000000;
}

.zoom-name-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-name-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* the word that zooms (wrapper) */
.zoom-name-word {
  font-size: clamp(32px, 8vw, 80px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform-origin: center center;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* inline SVG logo */
.zoom-name-svg {
  display: block;
  width: clamp(160px, 28vw, 420px);
  height: auto;
  shape-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* content shown after zoom */
.zoom-name-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  color: #ffffff;
  padding: 0 16px;
  pointer-events: none;
}

.zoom-name-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 12px;
}

.zoom-name-desc {
  max-width: 520px;
  font-size: 14px;
  line-height: 1.6;
  color: #dddddd;
}

/* Fullscreen black fade overlay for zoom hero (no blur) */
.zoom-fade-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;          /* JS animates 0 → 1 */
  pointer-events: none;
  will-change: opacity;
  transition: opacity 0s;
}

/* VIDEO POPUP OVERLAY */
.video-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.video-overlay.is-open {
  display: flex;
}

.video-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
}

.video-overlay-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-overlay-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* top-right close button */
.video-overlay-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* make video frames clickable buttons */
.video-frame {
  border: none;
  background: none;
  padding: 0;
}
