/* 
 * Style overrides and enhancements for Face Harmony Static HTML5
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #542d32;
}

/* ==========================================================================
   Custom Animations
   ========================================================================== */

@keyframes spin-slow {

  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 15s linear infinite;
}

/* ==========================================================================
   Hero Carousel
   ========================================================================== */

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 1;

  opacity: 0;

  transition:
    opacity 1000ms ease-in-out,
    transform 1000ms ease-in-out;

  transform: scale(1.02);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;

  transform: scale(1);
  pointer-events: auto;
}

/* ==========================================================================
   Before / After Slider
   ========================================================================== */

.clip-fore {
  position: absolute;
  inset: 0;

  height: 100%;
  overflow: hidden;

  transition: width 120ms linear;
}

.divider-border,
.divider-handle {
  transition: left 120ms linear;
}

/* ==========================================================================
   Accordion
   ========================================================================== */

.accordion-content {
  max-height: 0;
  overflow: hidden;

  transition:
    max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-content.expanded {
  max-height: 1000px;
}

/* ==========================================================================
   Phase Panels
   ========================================================================== */

.phase-panel {
  display: none;
  opacity: 0;

  transform: translateY(12px);

  transition:
    opacity 450ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-panel.flex,
.phase-panel.active {
  display: flex;

  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Testimonial Slider
   ========================================================================== */

.testimonial-card {
  display: none;

  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.testimonial-card.active {
  display: block;

  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

#mobile-menu {
  transition:
    opacity 650ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   FAQ Arrow Animation
   ========================================================================== */

.faq-arrow-icon {
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Detail Panel
   ========================================================================== */

#diagnosis-panel {
  transition:
    all 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base Keyframes
   ========================================================================== */

@keyframes fade-up {

  0% {
    opacity: 0;
    transform: translateY(16px);
  }

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

@keyframes fade-in {

  0% {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* ==========================================================================
   Animation Classes
   ========================================================================== */

.animate-fade-up {
  animation: fade-up 750ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
  animation: fade-in 450ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   Animation Delays
   ========================================================================== */

.delay-75 {
  animation-delay: 75ms;
}

.delay-150 {
  animation-delay: 150ms;
}

.delay-220 {
  animation-delay: 220ms;
}

.delay-300 {
  animation-delay: 300ms;
}

/* ==========================================================================
   Optional Performance Improvements
   ========================================================================== */

.hero-slide,
.testimonial-card,
.phase-panel,
.nurture-card,
#diagnosis-panel,
#mobile-menu {
  will-change: transform, opacity;
}

/* ==========================================================================
   Better Touch Experience
   ========================================================================== */

#before-after-comparer {
  touch-action: none;
  user-select: none;
}

.divider-handle {
  cursor: ew-resize;
}

.faq-v2-answer.hidden {
  display: none;
}

.faq-v2-icon {
  transition: transform .3s ease;
}