@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* Parent Wrapper - Kept stable to prevent pin-spacer recalculation errors */
.prompt-eng {
  /* align-self: center; */
  margin-left: auto;
  margin-right: auto;
  position: relative;
  width: 100%;
  overflow: clip; /* Clean crop on horizontal overflow */
  margin-top: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 1000px) {
  .prompt-eng {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }
}

@media (min-width: 1550px) {
  .prompt-eng {
    max-width: 1420px;
  }
}

@media (min-width: 1650px) {
  .prompt-eng {
    max-width: 1500px;
  }
}

@media (min-width: 1750px) {
  .prompt-eng {
    max-width: 1600px;
  }
}


@media (min-width: 1850px) {
  .prompt-eng {
    max-width: 1700px;
  }
}


/* Pinned Section */
.scroll-section-ai {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
  margin: 0 !important;
  box-sizing: border-box;
}

@media (min-width: 300px) {
  .scroll-section-ai {
    display: flex;
    align-items: center;
    width: 100%;
    height: 45rem;
    overflow: hidden;
    position: relative;
    margin: 0 !important;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
}

@media (min-width: 380px) {
  .scroll-section-ai {
    display: flex;
    align-items: center;
    width: 100%;
    height: 45rem;
    overflow: hidden;
    position: relative;
    margin: 0 !important;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
}

@media (min-width: 550px) {
  .scroll-section-ai {
    display: flex;
    align-items: center;
    width: 100%;
    height: 45rem;
    overflow: hidden;
    position: relative;
    margin: 0 !important;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
}

@media (min-width: 768px) {
  .scroll-section-ai {
    display: flex;
    align-items: flex-start;
    width: 100%;
    height: 45rem;
    overflow: hidden;
    position: relative;
    margin: 0 !important;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
}

@media (min-width: 920px) {
  .scroll-section-ai {
    /* display: flex; */
    /* align-items: center; */
    /* width: 100%; */
    height: 100vh;
    /* overflow: hidden; */
    /* position: relative; */
    /* margin: 0 !important; */
    /* box-sizing: border-box; */
    /* padding: 0; */
    /* margin: 0; */
  }
}

/* Moving Horizontal Container */
.scroll-container-ai {
  display: flex;
  align-items: flex-start;
  width: fit-content;
  margin-top: 30vh;
  padding-left: 1.8rem;
  padding-right: 1.8rem;
  box-sizing: border-box;

  will-change: transform;
  /* Hint to browser to stabilize during GSAP movement */
  touch-action: pan-y; /* Prevents default browser vertical-scrolling interference while dragging horizontally */
}

/* .scroll-container-ai {
  transform: translate3d(0,0,0);
} */

/* Simplified Responsive Paddings */

@media (min-width: 300px) {
  .scroll-container-ai {
    margin-top: 8rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 400px) {
  .scroll-container-ai {
    margin-top: 9rem;
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }
}

@media (min-width: 450px) {
  .scroll-container-ai {
    margin-top: 10rem;
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }
}

@media (min-width: 550px) {
  .scroll-container-ai {
    margin-top: 10rem;
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }
}

@media (min-width: 650px) {
  .scroll-container-ai {
    margin-top: 10rem;
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }
}

@media (min-width: 768px) {
  .scroll-container-ai {
    margin-top: 12rem;
    padding-left: 2rem;
    padding-right: 2rem;
    align-items: flex-start;
    justify-content: flex-start;
    align-content: flex-start;
    justify-items: flex-start;
    justify-self: flex-start;
    align-self: flex-start;
  }
}

@media (min-width: 780px) {
  .scroll-container-ai {
    margin-top: 25vh;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 920px) {
  .scroll-container-ai {
    margin-top: 33vh;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1000px) {
  .scroll-container-ai {
    margin-top: 33vh;
    padding-left: 3rem;
    padding-right: 3.2rem;
  }
}

@media (min-width: 1100px) {
  .scroll-container-ai {
    margin-top: 32vh;
    padding-left: 3rem;
    padding-right: 3.2rem;
  }
}

@media (min-width: 1200px) {
  .scroll-container-ai {
    margin-top: 30vh;
    padding-left: 3rem;
    padding-right: 3.2rem;
  }
}

@media (min-width: 1240px) {
  .scroll-container-ai {
    margin-top: 28.5vh;
    padding-left: 3rem;
    padding-right: 3.2rem;
  }
}

@media (min-width: 1300px) {
  .scroll-container-ai {
    margin-top: 28vh;
    padding-left: 3rem;
    padding-right: 3.2rem;
  }
}

@media (min-width: 1400px) {
  .scroll-container-ai {
    padding-left: 3.5rem;
    /* padding-right: 3.5rem; */
  }
}

/* Cards setup */
.card-ai {
  align-items: flex-start;
  justify-content: flex-start;
  align-content: flex-start;
  justify-items: flex-start;
  justify-self: flex-start;
  align-self: flex-start;
  height: 29rem;
  display: flex;
  flex-direction: column;
  width: 18rem;
  margin-right: 1rem;
  flex-shrink: 0;
  /* CRITICAL: Prevents cards from squishing on resize */
}

@media (max-width: 350px) {
  .card-ai {
    height: 28rem;
    display: flex;
    flex-direction: column;
    width: 16rem;
    margin-right: 0.8rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

@media (min-width: 768px) {
  .card-ai {
    height: 30rem;
    display: flex;
    flex-direction: column;
    width: 18rem;
    margin-right: 1.5rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

@media (min-width: 920px) {
  .card-ai {
    height: 28rem;
    display: flex;
    flex-direction: column;
    width: 18rem;
    margin-right: 1.5rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

@media (min-width: 1000px) {
  .card-ai {
    height: 28rem;
    display: flex;
    flex-direction: column;
    width: 18rem;
    margin-right: 1.5rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

@media (min-width: 1100px) {
  .card-ai {
    height: 28rem;
    display: flex;
    flex-direction: column;
    width: 18rem;
    margin-right: 1.5rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

@media (min-width: 1200px) {
  .card-ai {
    height: 30rem;
    display: flex;
    flex-direction: column;
    width: 18rem;
    margin-right: 1.2rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

@media (min-width: 1300px) {
  .card-ai {
    height: 36rem;
    display: flex;
    flex-direction: column;
    width: 22.5rem;
    margin-right: 1.5rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

@media (min-width: 1650px) {
  .card-ai {
    height: 34rem;
    display: flex;
    flex-direction: column;
    width: 22rem;
    margin-right: 1.5rem;
    flex-shrink: 0; /* CRITICAL: Prevents cards from squishing on resize */
  }
}

.card-ai img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-ai p {
  margin-top: 0.75rem;
  color: #333;
  font-weight: 600;
}

/* Floating Elements (Changed to absolute to lock reliably within GSAP pin-spacer) */

.text-ai {
  position: absolute;
  left: clamp(1.8rem, 4vw, 3rem);
  top: 6vh;
  z-index: 10;
}

@media (min-width: 1400px) {
  .text-ai {
    position: absolute;
    left: clamp(3rem, 4vw, 5rem);
    top: 6vh;
    z-index: 10;
  }
}

@media (min-width: 1550px) {
  .text-ai {
    left: 0;
  }
}

.badge-ai {
  font-family: 'Poppins', sans-serif;
  display: inline-block;
  padding: 6px 16px;
  background: #f5f7f9;
  color: #0f0f0f;
  font-size: 14px;
  border-radius: 20px;
  font-weight: 400;
}

#brush {
  font-size: 1rem;
  rotate: -45deg;
  align-self: flex-start;
  justify-self: flex-start;
}

.top-row {
  display: flex;
  flex-direction: column;
  /* gap: 20px; */
  /* margin-bottom: 1rem; */
}

@media (min-width: 768px) {
  .top-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

/* Typography Scale (Refactored using mathematical fluid clamp) */
.title-ai {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem; /* Reduced from 2.5rem */
  font-weight: 500;
  line-height: 1.2;
  color: #0f172a;
  margin-top: 1rem;
  margin-bottom: 0rem;
}
.path-ai {
  stroke-dasharray: 0;
  stroke-dashoffset: 0;
  visibility: hidden;
}

.label-title-ai {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
}

.label-sub-ai {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
}

@media (min-width: 300px) {
  .title-ai {
    font-size: 1.05rem;
    text-align: left;
    max-width: 77%;
  }
}
@media (min-width: 340px) {
  .title-ai {
    font-size: 1.2rem;
    text-align: left;
    max-width: 90%;
  }
}
@media (min-width: 370px) {
  .title-ai {
    font-size: 1.35rem;
    text-align: left;
    max-width: 87%;
  }
}
@media (min-width: 400px) {
  .title-ai {
    font-size: 1.45rem;
    text-align: left;
    max-width: 90%;
  }
}
@media (min-width: 430px) {
  .title-ai {
    font-size: 1.55rem;
    text-align: left;
    max-width: 90%;
  }
}
@media (min-width: 470px) {
  .title-ai {
    font-size: 1.75rem;
    text-align: left;
    max-width: 87%;
  }
}
@media (min-width: 500px) {
  .title-ai {
    font-size: 1.85rem;
    text-align: left;
    max-width: 85%;
  }
}
@media (min-width: 525px) {
  .title-ai {
    font-size: 1.9rem;
    text-align: left;
    /* max-width: 85%; */
  }
}
@media (min-width: 550px) {
  .title-ai {
    font-size: 1.4rem;
    max-width: 67%;
  }
}

/* Consolidated 613px, 620px, 650px */
@media (min-width: 613px) {
  .title-ai {
    font-size: 1.35rem;
    max-width: 67%;
  }
}

@media (min-width: 670px) {
  .title-ai {
    font-size: 1.47rem;
    max-width: 65%;
  }
}
@media (min-width: 700px) {
  .title-ai {
    font-size: 1.55rem;
    max-width: 67%;
  }
}
@media (min-width: 719px) {
  .title-ai {
    font-size: 1.43rem;
    max-width: 60%;
  }
}
@media (min-width: 834px) {
  .title-ai {
    font-size: 1.5rem;
    max-width: 60%;
  }
}

/* Consolidated 906px, 950px, 1000px, 1075px */
@media (min-width: 906px) {
  .title-ai {
    font-size: 1.7rem;
    max-width: 57%;
  }
}
@media (min-width: 950px) {
  .title-ai {
    max-width: 58%;
  }
}
@media (min-width: 1000px) {
  .title-ai {
    max-width: 55%;
  }
}
@media (min-width: 1075px) {
  .title-ai {
    max-width: 55%;
  }
}

@media (min-width: 1100px) {
  .title-ai {
    font-size: 2rem;
    /* max-width: 54%; */
  }
}
@media (min-width: 1200px) {
  .title-ai {
    font-size: 2rem;
    /* max-width: 52%; */
  }
}
@media (min-width: 1242px) {
  .title-ai {
    font-size: 2.2rem;
    /* max-width: 54%; */
  }
}
@media (min-width: 1292px) {
  .title-ai {
    font-size: 2.2rem;
    /* max-width: 48%; */
  }
}
@media (min-width: 1300px) {
  .title-ai {
    font-size: 2.4rem;
    /* max-width: 46%; */
  }
}

@media (min-width: 1500px) {
  .title-ai {
    font-size: 2.8rem;
    /* max-width: 46%; */
  }
}

.word-aitext {
  /* display: inline-block; */
  line-height: 1.2;
}

.progress-ai {
  color: #c4c4c4;
  position: absolute;
  top: 22vh;
  right: clamp(1.8rem, 4vw, 3rem);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  z-index: 10;
}

.progress-amount-ai {
  margin-left: 0.5rem;
  font-size: 1.2rem;
}

@media (max-width: 1150px) {
  .progress-ai {
    top: 12vw;
  }
}

@media (max-width: 1150px) {
  .progress-ai {
    top: 12vw;
  }
}

@media (max-width: 1050px) {
  .progress-ai {
    top: 14vw;
  }
}

@media (max-width: 900px) {
  .progress-ai {
    top: 14vw;
    font-size: 0.6rem;
  }

  .progress-amount-ai {
    margin-left: 0.5rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 800px) {
  .progress-ai {
    top: 16vw;
    font-size: 0.6rem;
  }

  .progress-amount-ai {
    margin-left: 0.5rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .progress-ai {
    /* This removes the top alignment from the desktop view */
    top: auto;
    bottom: 0vh;
    font-size: 0.8rem;
    right: clamp(1.8rem, 4vw, 3rem);
  }

  .progress-amount-ai {
    margin-left: 0.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 450px) {
  .progress-ai {
    /* This removes the top alignment from the desktop view */
    top: auto;
    bottom: 2vh;
    font-size: 0.8rem;
    right: clamp(1.8rem, 4vw, 3rem);
  }

  .progress-amount-ai {
    margin-left: 0.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 350px) {
  .progress-ai {
    /* This removes the top alignment from the desktop view */
    top: auto;
    bottom: 2vh;
    font-size: 0.7rem;
    right: clamp(1.8rem, 4vw, 3rem);
  }

  .progress-amount-ai {
    margin-left: 0.5rem;
    font-size: 0.8rem;
  }
}

.first-ai {
  width: 100%;
  height: 100vh;
}
/* ==========================================
CLICK INDICATOR
========================================== */

.click-me-ai {
  position: absolute;
  top: 8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: none;
}

/* WRAPPER */
.wrap-ai {
  position: relative;
  width: 120px;
  height: 70px;
  top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================
PULSE CIRCLE
========================================== */

.wrap-ai .click-ai {
  position: absolute;
  top: 0.8rem;
  width: 20px;
  height: 20px;
  left: 38%;
  border-radius: 50%;
  border: 1px solid #000;
  opacity: 0;
  /* delayed start */
  animation: clickPulseAI 2.2s infinite;
}

/* ==========================================
CURSOR ICON
========================================== */

.wrap-ai .fa {
  position: relative;
  z-index: 2;

  color: #00000055;
  font-size: 1.4rem;

  animation: clickCursorAI 2.2s infinite;
}

/* ==========================================
TEXT
========================================== */

.typing-ai {
  position: absolute;
  top: 3rem;
  color: #00000055;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  animation: textRevealAI 2.2s infinite;
}

/* ==========================================
HAND FIRST
========================================== */

@keyframes clickCursorAI {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
  }

  15% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  30% {
    opacity: 1;
    transform: translateY(2px) scale(0.95);
  }

  45% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================
CIRCLE AFTER CLICK
========================================== */

@keyframes clickPulseAI {
  0%,
  25% {
    opacity: 0;
    transform: scale(0);
  }

  35% {
    opacity: 0.8;
    transform: scale(0.2);
  }

  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* ==========================================
TEXT APPEARS AFTER CLICK
========================================== */

@keyframes textRevealAI {
  0%,
  30% {
    opacity: 0;
    transform: translateY(5px);
  }

  40% {
    opacity: 1;
    transform: translateY(0);
  }

  75% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(0);
  }
}
