/* About Section Styles */
.about-section {
  min-height: 100vh;
  display: block;
  background: linear-gradient(to right, #7cb518, #008000);
  padding-top: 100px;
  padding-bottom: 80px;
}

.about-container {
  max-width: var(--max-width);
  width: 100%;
  padding: var(--container-padding);
  margin: 0 auto;
}

.about-content {
  max-width: 50%;
}

.about-heading {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #ffffff;
  display: inline-block;
}

/* Animation 2: Letter by Letter - only when in view */
.about-heading .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
}

/* Animation triggers when .in-view class is added */
.about-heading.in-view .letter {
  animation: letterPop 0.5s ease-out forwards;
}

.about-heading.in-view .letter:nth-child(1) { animation-delay: 0s; }
.about-heading.in-view .letter:nth-child(2) { animation-delay: 0.1s; }
.about-heading.in-view .letter:nth-child(3) { animation-delay: 0.2s; }
.about-heading.in-view .letter:nth-child(4) { animation-delay: 0.3s; }
.about-heading.in-view .letter:nth-child(5) { animation-delay: 0.4s; }
.about-heading.in-view .letter:nth-child(6) { animation-delay: 0.5s; }
.about-heading.in-view .letter:nth-child(7) { animation-delay: 0.6s; }

@keyframes letterPop {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-text {
  font-family: 'Space Mono', monospace;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.9;
  color: #ffffff;
  letter-spacing: 0.01em;
  min-height: 200px;
}

/* Streaming text cursor - always visible */
.about-text.stream-text::after {
  content: '|';
  animation: blink 0.8s infinite;
  margin-left: 2px;
  font-weight: 700;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Responsive adjustments - Large Tablet / iPad Landscape */
@media (max-width: 1366px) {
  .about-content {
    max-width: 55%;
  }
  
  .about-heading {
    font-size: 3.5rem;
  }
}

/* Responsive adjustments - Tablet / iPad Portrait */
@media (max-width: 1024px) {
  .about-section {
    padding-top: 90px;
  }
  
  .about-content {
    max-width: 65%;
  }
  
  .about-heading {
    font-size: 3rem;
  }
  
  .about-text {
    font-size: 1.2rem;
  }
  
  .meteor-orbit-container {
    width: 40%;
  }
}

/* Responsive adjustments - Mobile */
@media (max-width: 768px) {
  .about-section {
    padding-top: 80px;
    padding-bottom: 60px;
  }
  
  .about-container {
    display: flex;
    flex-direction: column;
  }
  
  .about-content {
    max-width: 100%;
    position: relative;
    z-index: 10;
  }
  
  .about-heading {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }
  
  /* Force heading letters to be visible on mobile */
  .about-heading .letter {
    opacity: 1 !important;
    transform: translateY(0) !important;
    animation: none !important;
  }
  
  .about-text {
    font-size: 1rem;
    line-height: 1.7;
    min-height: 150px;
    opacity: 1 !important;
  }
}

/* Responsive adjustments - Small Mobile */
@media (max-width: 480px) {
  .about-section {
    padding-top: 60px;
    padding-bottom: 40px;
  }
  
  .about-heading {
    font-size: 2rem;
  }
  
  .about-text {
    font-size: 0.9rem;
    min-height: 120px;
  }
}

/* ========================================
   Meteor Orbit Animation Styles
   ======================================== */

.about-container {
  position: relative;
}

.meteor-orbit-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  pointer-events: auto;
  contain: layout style;
  overflow: visible;
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
}

.meteor-image {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout style;
  /* Position at center - animation will move them */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.meteor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 
    0 0 8px rgba(255, 255, 255, 0.25),
    0 0 16px rgba(255, 255, 255, 0.15),
    0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Initial positions - all start at center, animation moves them */
.meteor-1,
.meteor-2,
.meteor-3 {
  top: 50%;
  left: 50%;
}

/* ========================================
   Meteor Fall Animation - Carrom Coins Style
   Images fall like meteors, bounce, then settle in pyramid: 1 on top, 2 on bottom
   ======================================== */

/* Meteor 1: Falls first with bounce, settles TOP CENTER */
@keyframes meteorFall1 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-600px);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(40px);
  }
  65% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-20px);
  }
  78% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(12px);
  }
  88% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
  }
}

/* Meteor 2: Falls second with bounce, settles BOTTOM LEFT */
@keyframes meteorFall2 {
  0%, 8% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-600px);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(35px);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-18px);
  }
  82% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(10px);
  }
  92% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
  }
}

/* Meteor 3: Falls third with bounce, settles BOTTOM RIGHT */
@keyframes meteorFall3 {
  0%, 16% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-600px);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(30px);
  }
  74% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-15px);
  }
  85% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(8px);
  }
  94% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-3px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
  }
}

/* Carrom coins final positions - Pyramid: 1 on top, 2 on bottom */
/* Meteor 1 (Ai): Top center - moved down to avoid cutoff */
.meteor-1 {
  top: 30%;
  left: 50%;
}

/* Meteor 2 (Ps): Bottom left */
.meteor-2 {
  top: 60%;
  left: 30%;
}

/* Meteor 3 (Ae): Bottom right */
.meteor-3 {
  top: 60%;
  left: 70%;
}

/* Animation states - triggered when section is in view */
.meteor-image.orbiting {
  opacity: 1 !important;
}

.meteor-1.orbiting {
  animation: meteorFall1 1.4s ease-out forwards;
}

.meteor-2.orbiting {
  animation: meteorFall2 1.5s ease-out forwards;
}

.meteor-3.orbiting {
  animation: meteorFall3 1.6s ease-out forwards;
}

.meteor-image.orbiting img {
  box-shadow: 
    0 0 12px rgba(255, 255, 255, 0.35),
    0 0 24px rgba(255, 255, 255, 0.2),
    0 0 36px rgba(124, 181, 24, 0.15),
    0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Carrom physics mode - coins can be pushed by cursor */
.meteor-image.carrom-ready {
  opacity: 1 !important;
  animation: none !important;
  transition: none;
  will-change: transform;
  pointer-events: auto;
  cursor: grab;
}

.meteor-image.carrom-ready img {
  box-shadow: 
    0 0 15px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.2),
    0 0 45px rgba(124, 181, 24, 0.2),
    0 10px 30px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.2s ease;
}

.meteor-image.carrom-ready:hover img {
  box-shadow: 
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.3),
    0 0 60px rgba(124, 181, 24, 0.25),
    0 12px 35px rgba(0, 0, 0, 0.35);
}

/* Legacy classes for backwards compatibility */
.meteor-1.dropping,
.meteor-2.dropping,
.meteor-3.dropping {
  animation: none;
}

.meteor-image.physics-active {
  opacity: 1;
}

/* Responsive adjustments for meteor/carrom */

/* Large Desktop */
@media (max-width: 1400px) {
  .meteor-orbit-container {
    width: 45%;
  }
  
  .meteor-image {
    width: 110px;
    height: 110px;
  }
}

/* Desktop / Large Tablet Landscape */
@media (max-width: 1200px) {
  .meteor-orbit-container {
    width: 42%;
  }
  
  .meteor-image {
    width: 100px;
    height: 100px;
  }
  
  .meteor-1 {
    top: 28%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 58%;
    left: 32%;
  }
  
  .meteor-3 {
    top: 58%;
    left: 68%;
  }
}

/* Tablet Landscape / iPad Pro */
@media (max-width: 1024px) {
  .meteor-orbit-container {
    width: 40%;
    overflow: visible;
  }
  
  .meteor-image {
    width: 90px;
    height: 90px;
  }
  
  .meteor-1 {
    top: 30%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 60%;
    left: 30%;
  }
  
  .meteor-3 {
    top: 60%;
    left: 70%;
  }
}

/* Tablet Portrait / iPad */
@media (max-width: 900px) {
  .meteor-orbit-container {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 280px;
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }
  
  .meteor-image {
    width: 85px;
    height: 85px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
  
  .meteor-1 {
    top: 20%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 58%;
    left: 30%;
  }
  
  .meteor-3 {
    top: 58%;
    left: 70%;
  }
}

/* Mobile Landscape / Large Mobile */
@media (max-width: 768px) {
  .meteor-orbit-container {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 260px;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }
  
  .meteor-image {
    width: 80px;
    height: 80px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
  
  /* Smooth floating animation for mobile */
  .meteor-image.orbiting {
    animation: mobileFloat 4s ease-in-out infinite;
  }
  
  .meteor-1.orbiting {
    animation-delay: 0s;
  }
  
  .meteor-2.orbiting {
    animation-delay: 0.5s;
  }
  
  .meteor-3.orbiting {
    animation-delay: 1s;
  }
  
  @keyframes mobileFloat {
    0%, 100% {
      transform: translate3d(0, 0, 0);
    }
    50% {
      transform: translate3d(0, -12px, 0);
    }
  }
  
  .meteor-image img {
    border-radius: 10px;
  }
  
  /* Carrom coins positions for mobile - Pyramid: 1 on top, 2 on bottom */
  .meteor-1 {
    top: 18%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 58%;
    left: 28%;
  }
  
  .meteor-3 {
    top: 58%;
    left: 72%;
  }
}

/* Standard Mobile */
@media (max-width: 600px) {
  .meteor-orbit-container {
    height: 240px;
    margin-top: 25px;
  }
  
  .meteor-image {
    width: 75px;
    height: 75px;
  }
  
  .meteor-1 {
    top: 15%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 58%;
    left: 26%;
  }
  
  .meteor-3 {
    top: 58%;
    left: 74%;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .meteor-orbit-container {
    height: 220px;
    margin-top: 20px;
  }
  
  .meteor-image {
    width: 68px;
    height: 68px;
  }
  
  /* Carrom coins positions for small mobile - Pyramid: 1 on top, 2 on bottom */
  .meteor-1 {
    top: 12%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 58%;
    left: 24%;
  }
  
  .meteor-3 {
    top: 58%;
    left: 76%;
  }
  
  .meteor-image img {
    border-radius: 8px;
  }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
  .meteor-orbit-container {
    height: 200px;
    margin-top: 15px;
  }
  
  .meteor-image {
    width: 60px;
    height: 60px;
  }
  
  .meteor-1 {
    top: 10%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 58%;
    left: 22%;
  }
  
  .meteor-3 {
    top: 58%;
    left: 78%;
  }
}

/* Very Small Mobile (iPhone SE, etc.) */
@media (max-width: 320px) {
  .meteor-orbit-container {
    height: 180px;
    margin-top: 12px;
  }
  
  .meteor-image {
    width: 52px;
    height: 52px;
  }
  
  .meteor-1 {
    top: 8%;
    left: 50%;
  }
  
  .meteor-2 {
    top: 58%;
    left: 20%;
  }
  
  .meteor-3 {
    top: 58%;
    left: 80%;
  }
  
  .meteor-image img {
    border-radius: 6px;
  }
}
