/* ========== Entrance Animations ========== */

/* Generic fade-up (replaces motion initial={opacity:0,y:20} animate={opacity:1,y:0}) */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Larger fade-up for hero visual (y:40) */
@keyframes fade-up-lg {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slide in from left (ProblemSolution column A) */
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Slide in from right (ProblemSolution column B) */
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Scale-in for feature grid items */
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* Spring scale for HowItWorks payoff */
@keyframes spring-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Tooltip slide from left */
@keyframes tooltip-in {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ========== Infinite Animations ========== */

/* Features Pillar 1: wobble for "Manual" boxes */
@keyframes wobble-1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%      { transform: translate(10px, -10px) rotate(-2deg); }
  66%      { transform: translate(-5px, 5px) rotate(1deg); }
}
@keyframes wobble-2 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-5px, 15px); }
  66%      { transform: translate(8px, -5px); }
}

/* Features Pillar 3: injection drop */
@keyframes injection-drop {
  0%       { transform: translateY(-50px) scale(0.8); opacity: 0; }
  35%      { transform: translateY(0) scale(1); opacity: 1; }
  65%      { transform: translateY(0) scale(1); opacity: 1; }
  100%     { transform: translateY(0) scale(1); opacity: 0; }
}

/* HowItWorks: pulsing dots */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

/* ========== Aurora blob drift (hero background) ========== */
@keyframes blob-drift-1 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(50px, -40px); }
  66%      { transform: translate(-30px, 25px); }
}
@keyframes blob-drift-2 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-60px, 45px); }
  66%      { transform: translate(35px, -25px); }
}
@keyframes blob-drift-3 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(40px, -30px); }
  66%      { transform: translate(-45px, 35px); }
}
@keyframes blob-drift-4 {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-35px, 30px); }
  66%      { transform: translate(50px, -40px); }
}

/* ========== Scroll-triggered animation classes ========== */

/* Elements start hidden, JS adds .animate-in when visible */
.reveal { opacity: 0; }
.reveal.animate-in { animation-fill-mode: forwards; }

/* Stagger delays (applied via explicit classes) */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* ========== Slider (Features Pillar 2) ========== */
.slider-container { cursor: ew-resize; user-select: none; }

/* ========== HowItWorks tab transitions ========== */
.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fade-up 0.3s ease forwards;
}

/* ========== Showcase Carousel ========== */
.showcase-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.5rem 0.25rem;
  scroll-padding: 0.25rem;
}
.showcase-track::-webkit-scrollbar { display: none; }
.showcase-track:focus { outline: none; }
.showcase-track:focus-visible {
  outline: 2px solid #102a43;
  outline-offset: 4px;
  border-radius: 2px;
}

.showcase-card {
  flex: 0 0 calc(33.333% - 1rem);
  scroll-snap-align: start;
  position: relative;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  background: #fff;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.showcase-card:focus-visible {
  outline: 2px solid #102a43;
  outline-offset: 2px;
}

.showcase-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f0f4f8;
  position: relative;
}
.showcase-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.showcase-overlay {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: #102a43;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  pointer-events: none;
  font-family: Inter, sans-serif;
}
.showcase-card:hover .showcase-overlay,
.showcase-card:focus-visible .showcase-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Arrow buttons */
.showcase-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #102a43;
  z-index: 10;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.showcase-arrow:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.showcase-arrow:focus-visible {
  outline: 2px solid #102a43;
  outline-offset: 2px;
}
.showcase-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.showcase-arrow-prev { left: -1.25rem; }
.showcase-arrow-next { right: -1.25rem; }
@media (min-width: 768px) {
  .showcase-arrow { display: inline-flex; }
}

/* Pagination dots */
.showcase-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #bcccdc;
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.showcase-dot.active {
  background: #102a43;
  transform: scale(1.3);
}
.showcase-dot:focus-visible {
  outline: 2px solid #102a43;
  outline-offset: 3px;
}

/* Tablet: 2.2 visible */
@media (max-width: 1024px) {
  .showcase-card { flex: 0 0 calc(45.45% - 0.75rem); }
}
/* Mobile: ~1.17 visible (.17 peek) */
@media (max-width: 640px) {
  .showcase-card { flex: 0 0 85%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .showcase-track { scroll-behavior: auto; }
  .showcase-card,
  .showcase-overlay,
  .showcase-arrow,
  .showcase-dot { transition: none; }
}

