/* ========================================
   HUT Landing Page - Custom Styles
   Brand Colors:
   - Primary Orange: #ea580c
   - Tan/Straw: #d4a373
   - Tan Dark: #8c6b4a
   - Background: #f8fafc
   - Text Primary: #0f172a
   ======================================== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed nav */
}

/* Remove default details marker (cross-browser) */
details summary::-webkit-details-marker {
  display: none;
}

details summary {
  list-style: none;
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Scroll-triggered fade in */
.feature-card,
.task-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.feature-card.animate-in,
.task-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for task items */
.task-item:nth-child(1) { transition-delay: 0.05s; }
.task-item:nth-child(2) { transition-delay: 0.1s; }
.task-item:nth-child(3) { transition-delay: 0.15s; }
.task-item:nth-child(4) { transition-delay: 0.2s; }
.task-item:nth-child(5) { transition-delay: 0.25s; }

/* Stagger animation for feature cards */
.feature-card:nth-child(1) { transition-delay: 0.05s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.15s; }
.feature-card:nth-child(4) { transition-delay: 0.2s; }
.feature-card:nth-child(5) { transition-delay: 0.25s; }
.feature-card:nth-child(6) { transition-delay: 0.3s; }

/* Hover lift on feature cards */
.feature-card:hover {
  transform: translateY(-4px);
}

/* Phone mockup subtle float */
.hero-phone {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ========================================
   PHONE CAROUSEL
   ======================================== */

#phone-carousel {
  user-select: none;
}

#carousel-track {
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  padding: 0 2px; /* Prevent edge clipping */
  box-sizing: border-box;
}

.carousel-screenshot-frame {
  height: 420px;
}

.carousel-screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

@media (min-width: 640px) {
  .carousel-screenshot-frame {
    height: 460px;
  }
}

.carousel-dot {
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot:hover {
  opacity: 0.8;
}

.carousel-dot.active {
  width: 0.625rem; /* w-2.5 */
  height: 0.625rem; /* h-2.5 */
  background-color: #ea580c;
}

#carousel-prev,
#carousel-next {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#carousel-prev:hover,
#carousel-next:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#carousel-prev:active,
#carousel-next:active {
  transform: translateY(-50%) scale(0.95);
}

/* Slide transition */
#carousel-label {
  transition: opacity 0.3s ease;
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
  .hero-phone {
    animation: none; /* Disable float on mobile for performance */
  }
}

/* ========================================
   SELECTION COLOR
   ======================================== */

::selection {
  background-color: #fed7aa;
  color: #0f172a;
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========================================
   FAQ ACCORDION ANIMATION
   ======================================== */

details[open] summary ~ * {
  animation: accordion-open 0.3s ease-out;
}

@keyframes accordion-open {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
