/* Intro Section 1 */
.intro-1-text {
  text-align: center;
  font-family: Inter;
  font-size: 32px;
  font-style: normal;
  font-weight: 400;
  line-height: 75%;
  letter-spacing: -0.64px;
}

/* Intro Section 2 */
.intro-2-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intro-2-title {
  text-align: center;
  font-family: Inter;
  font-size: 40px;
  font-style: normal;
  font-weight: 600;
  line-height: 100%;
  letter-spacing: -0.4px;
}

/* Hero Section */
.hero-container {
  width: 100%;
  max-width: 584px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-title {
  text-align: center;
  font-family: Inter;
  font-size: 80px;
  font-style: normal;
  font-weight: 700;
  line-height: 90%;
  letter-spacing: -3.2px;
}

.hero-desc {
  text-align: center;
  font-family: Inter;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 133.333%;
  letter-spacing: -0.24px;
}

.btn-primary {
  text-align: center;
  font-family: Inter;
  font-size: 20px;
  font-style: normal;
  font-weight: 800;
  line-height: 100%;
  letter-spacing: -0.4px;
  text-transform: uppercase;
  color: white;
  border-radius: 4px;
  background: #f70f0f;
  box-shadow: 0 -4px 0 0 #9f0000 inset;
  display: inline-flex;
  padding: 20px 32px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: none;
  cursor: pointer;
}

/* Selection Section */
.selection-container {
  width: 100%;
  max-width: 776px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.card {
  min-height: 440px;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-title {
  text-align: center;
  font-family: Inter;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: -0.2px;
  text-transform: uppercase;
}

.card-description {
  opacity: 0.8;
  text-align: center;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: -0.14px;
}

.btn-card {
  text-align: center;
  font-family: Inter;
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
  line-height: 125%;
  letter-spacing: -0.32px;
  text-transform: uppercase;
  color: white;
  border-radius: 4px;
  background: #f70f0f;
  box-shadow: 0 -4px 0 0 #9f0000 inset;
  display: inline-flex;
  padding: 16px 32px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: none;
  cursor: pointer;
}

/* Ready to Play Section */
#ready-to-play {
  overflow: hidden;
}

.ready-bg-image {
  position: absolute;
  bottom: 0;
  height: 40vh;
  width: 100%;
  object-fit: cover;
  object-position: bottom;
}

.ready-screens-container {
  position: absolute;
  height: 60vh;
  width: 100%;
  top: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 40px;
  padding: 0 calc(50vw - 25vw);
  transition: transform 2s cubic-bezier(0.25, 0.1, 0.25, 1);
  perspective: 1200px;
  perspective-origin: center;
  will-change: transform;
  z-index: 1;
}

.ready-screens-container.carousel-active {
  justify-content: flex-start;
  padding: 0;
}

/* Initial state before carousel activation */
.ready-screens-container:not(.carousel-active) .screen-window {
  opacity: 0;
  transform: translateY(20px);
}

.screen-window {
  background-color: white;
  height: 50vh;
  width: 50vw;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.screen-window.active {
  opacity: 1;
}

/* Slide entrance from left (when going right/prev) */
.screen-window.slide-in-left {
  animation: slideInLeft 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Slide entrance from right (when going left/next) */
.screen-window.slide-in-right {
  animation: slideInRight 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideInLeft {
  0% {
    transform: translateX(-100px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    transform: translateX(100px);
  }
  100% {
    transform: translateX(0);
  }
}

/* Slide entrance animations */
.screen-window:nth-child(1) {
  transition-delay: 0s;
}

.screen-window:nth-child(2) {
  transition-delay: 0.1s;
}

.screen-window:nth-child(3) {
  transition-delay: 0.2s;
}

.screen-header {
  padding: 6px;
  border-bottom: 0.711px solid rgba(0, 0, 0, 0.08);
}

.screen-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.screen-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-window-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.ready-person-image {
  position: absolute;
  bottom: 0;
  height: 50vh;
  object-fit: contain;
}

.gesture-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
}

.gesture-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gesture-title {
  text-align: center;
  font-family: Inter;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 83.333%;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  opacity: 0.8;
}

.gesture-subtitle {
  text-align: center;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 142.857%;
  letter-spacing: -0.14px;
  opacity: 0.8;
}

.gesture-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.gesture-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gesture-image {
  width: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.camera-instruction {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.instruct.intro-1-text {
  color: #fff;
  text-align: center;
  font-family: Inter;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%; /* 24px */
  letter-spacing: -0.16px;
  opacity: 0.6;
}

.intro-1-text.delay-1 {
  font-size: 24px;
  letter-spacing: 4px;
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  animation: loadingDots 2s infinite steps(4, end);
  opacity: 1; /* Ensure visibility */
}

@keyframes loadingDots {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  25% {
    clip-path: inset(0 66% 0 0);
  }
  50% {
    clip-path: inset(0 33% 0 0);
  }
  75% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}

.intro-2-text {
  text-align: center;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 142.857%;
  letter-spacing: -0.14px;
  opacity: 0.8;
}

.instruction-title {
  text-align: center;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 142.857%;
  letter-spacing: -0.14px;
  opacity: 0.8;
}

.instruction-text {
  text-align: center;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 142.857%;
  letter-spacing: -0.14px;
  opacity: 0.8;
}

.ready-btn-container {
  width: 100%;
  max-width: 444px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-ready {
  width: auto;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 125%;
  letter-spacing: -0.16px;
  text-transform: uppercase;
  display: flex;
  padding: 16px 32px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-radius: 4px;
  background: #f70f0f;
  box-shadow: 0 -4px 0 0 #9f0000 inset;
  border: none;
  cursor: pointer;
}

.screen-window-header {
  padding: 6px;
  border-bottom: 0.711px solid rgba(0, 0, 0, 0.08);
}

.screen-window-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.screen-window-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.gesture-instruction-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.instruction-image {
  width: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.instruction-description {
  text-align: center;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 142.857%;
  letter-spacing: -0.14px;
  opacity: 0.8;
}

/* Animation States */
.ready-bg-image {
  transition: object-position 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ready-bg-image.repositioned {
  object-position: center 30vh !important;
}

.ready-screens-container {
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ready-screens-container.expanded {
  height: 100vh !important;
}

.ready-person-image {
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
  transform-origin: center bottom;
}

.ready-person-image.zoomed {
  transform: scale(1.5) translateY(10vh);
  opacity: 0;
}

.screen-window {
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
    width 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.screen-window.expanded {
  height: 75vh !important;
  width: 75vw !important;
}

/* Debug/* Gesture Instructions UI */
.gesture-instruction-container {
  position: absolute;
  top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.gesture-instruction-container.visible {
  opacity: 1;
  pointer-events: all;
}

.gesture-icons-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gesture-hand-icon {
  animation: handWiggle 2s ease-in-out infinite;
  transform-origin: bottom center;
}

.gesture-text {
  color: #fff;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  opacity: 0.8;
}

@keyframes handWiggle {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-20deg);
  }
  75% {
    transform: rotate(20deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
/* Debug Popup Styles */
.back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  color: white;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.project-info-container {
  position: absolute;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.project-info-container.visible {
  opacity: 1;
  pointer-events: all;
}

.project-category {
  color: #fff;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  letter-spacing: -0.14px;
  text-transform: uppercase;
  opacity: 0.8;
}

.project-title {
  color: #fff;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  letter-spacing: -0.24px;
}
/* Debug Popup Styles */
.debug-popup {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 240px;
  height: 180px;
  background: black;
  border: 4px solid white;
  border-radius: 20px;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.debug-popup.hidden {
  display: none;
}

.debug-video-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.debug-video-container video {
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}

#debug-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}

/* Gesture Loading Overlay */
.gesture-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  color: white;
  gap: 16px;
  backdrop-filter: blur(4px);
}

.gesture-loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-out {
  opacity: 0 !important;
  transition: opacity 0.5s ease-out;
  pointer-events: none;
}

/* Project Navigation */
.project-navigation {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  pointer-events: none; /* Let clicks pass through spacer */
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-navigation.visible {
  opacity: 1;
}

.nav-btn {
  border: none;
  color: white;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  pointer-events: auto; /* Re-enable clicks for buttons */
  padding: 12px 24px;
  transition: all 0.3s ease;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

.nav-center-spacer {
  flex-grow: 1;
}

/* Update project info to not overlap */
.project-info-container {
  bottom: 40px; /* Adjust if needed to align with buttons */
}
