/**
 * Sopdetties - sopdetties.com/app
 * starfish landing, carousel, and demo arcs
 */

/* ==========================================
   STARFISH LANDING SECTION
   ========================================== */

.starfish-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  z-index: 1;
}

/* Text Styles */
.title-text {
  font-family: 'PT Serif', serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 3.3em;
  color: #DCD5E6;
  font-weight: 700;
  text-align: center;
  margin: 0;
  padding: 0.3em 20px 0.5em;
  position: relative;
  z-index: 2;
}

.subtitle-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5em;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  margin: 0;
  padding: 0 20px 1em;
  position: relative;
  z-index: 2;
}

/* Phone container styles */
.phone-container {
  width: 100%;
  text-align: center;
  margin-top: 10em;
  margin-bottom: 3em;
  position: relative;
  z-index: 2;
  pointer-events: none;
  
  /* Animation properties */
  opacity: 0;
  animation: fadeIn 1s ease-out 0.3s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.phone-container img {
  width: auto;
  height: auto;
  max-height: 500px;
  display: inline-block;
}

/* Starfish styles */
.starfish {
  position: absolute;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: filter 0.3s ease;
  z-index: 1;
  
  /* Fade in animation */
  opacity: 0;
  animation: starfishFadeIn 1.2s ease-out forwards;
}

@keyframes starfishFadeIn {
  to {
    opacity: 1;
  }
}

.starfish:active {
  cursor: grabbing;
  filter: brightness(1.2);
}

.starfish img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.starfish-inner {
  width: 100%;
  height: 100%;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
  }
  25% {
    transform: translateY(-8px) rotate(1deg);
  }
  50% { 
    transform: translateY(-12px) rotate(2deg); 
  }
  75% {
    transform: translateY(-8px) rotate(1deg);
  }
}

/* ==========================================
   APP PROMO CAROUSEL SECTION
   ========================================== */

/* Main carousel wrapper - full bleed */
.sopdet-app-promo-carousel-wrapper {
    width: 100%;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Main carousel track - exact copy of testimonials behavior */
.sopdet-app-promo-carousel {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding: 30px 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    
    scroll-behavior: smooth;
    scroll-snap-type: none;
    
    touch-action: pan-y pan-x;
    overscroll-behavior-x: contain;
    
    /* True transparency fade on edges - works with any background */
    -webkit-mask-image: linear-gradient(to right, 
        transparent 0%, 
        black 80px, 
        black calc(100% - 80px), 
        transparent 100%);
    mask-image: linear-gradient(to right, 
        transparent 0%, 
        black 80px, 
        black calc(100% - 80px), 
        transparent 100%);
}

/* Active drag state */
.sopdet-app-promo-carousel:active {
    cursor: grabbing;
}

/* Hide scrollbars while maintaining functionality */
.sopdet-app-promo-carousel::-webkit-scrollbar {
    display: none;
}

.sopdet-app-promo-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Individual slide */
.sopdet-app-promo-slide {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: opacity 0.3s ease;
}

/* Title styling - exact specs */
.sopdet-app-promo-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.9em;
    letter-spacing: 0.8px;
    color: #1F1E1E;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    max-width: 350px; /* Narrower text box for neatness */
    word-wrap: break-word;
}

/* Image container */
.sopdet-app-promo-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sopdet-app-promo-image img {
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease-in, transform 0.3s ease;
    cursor: pointer;
}

.sopdet-app-promo-image img.loaded {
    opacity: 1;
}

.sopdet-app-promo-image img:hover {
    transform: scale(1.03);
}

.sopdet-app-promo-image img:active {
    transform: scale(0.97);
}

/* Simple image modal with scale animation */
.sopdet-app-promo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sopdet-app-promo-modal.active {
    display: flex;
    animation: fadeInBackground 0.2s ease forwards;
}

@keyframes fadeInBackground {
    to {
        background: rgba(0, 0, 0, 0.80);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

.sopdet-app-promo-modal img {
    max-width: 85%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    transform: scale(0.85);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.sopdet-app-promo-modal.active img {
    transform: scale(1);
    opacity: 1;
}

/* ==========================================
   CAROUSEL RESPONSIVE BREAKPOINTS
   Exact match to testimonials pattern
   ========================================== */

/* Desktop Large (1600px+) - 3.5 slides visible */
@media (min-width: 1600px) {
    .sopdet-app-promo-slide {
        width: calc((100% - (20px * 3.5)) / 3.5);
        min-width: calc((100% - (20px * 3.5)) / 3.5);
    }
    
    .sopdet-app-promo-carousel {
        padding: 30px 0 30px 10px;
    }
}

/* Desktop (1200px - 1599px) - 2.5 slides visible */
@media (min-width: 1200px) and (max-width: 1599px) {
    .sopdet-app-promo-slide {
        width: calc((100% - (20px * 2.5)) / 2.5);
        min-width: calc((100% - (20px * 2.5)) / 2.5);
    }
    
    .sopdet-app-promo-carousel {
        padding: 30px 0 30px 20px;
    }
}

/* Tablet (992px - 1199px) - 2 slides visible */
@media (min-width: 992px) and (max-width: 1199px) {
    .sopdet-app-promo-slide {
        width: calc((100% - (20px * 2)) / 2);
        min-width: calc((100% - (20px * 2)) / 2);
    }
    
    .sopdet-app-promo-carousel {
        padding: 25px 0 25px 20px;
    }
    
    .sopdet-app-promo-title {
        font-size: 1.9em;
    }
}

/* Tablet Small (768px - 991px) - 2 slides visible */
@media (min-width: 768px) and (max-width: 991px) {
    .sopdet-app-promo-slide {
        width: calc((100% - (18px * 2)) / 2);
        min-width: calc((100% - (18px * 2)) / 2);
    }
    
    .sopdet-app-promo-carousel {
        padding: 25px 0 25px 15px;
        gap: 18px;
    }
    
    .sopdet-app-promo-title {
        font-size: 1.8em;
        max-width: 320px;
    }
    
    .sopdet-app-promo-image img {
        max-height: 450px;
    }
}

/* Mobile (576px - 767px) - ONE centered slide with scroll snap */
@media (min-width: 576px) and (max-width: 767px) {
    .sopdet-app-promo-carousel {
        scroll-snap-type: x mandatory;
        padding: 20px 5%; /* 5% padding on each side to center 90% width slides */
        gap: 20px;
        
        /* Remove fade on mobile */
        -webkit-mask-image: none;
        mask-image: none;
    }
    
    .sopdet-app-promo-slide {
        width: 90%;
        min-width: 90%;
        scroll-snap-align: center;
    }
    
    .sopdet-app-promo-title {
        font-size: 1.7em;
        max-width: 280px;
    }
    
    .sopdet-app-promo-image img {
        max-height: 480px;
    }
}

/* Mobile Small (under 576px) - ONE centered slide with scroll snap */
@media (max-width: 575px) {
    .sopdet-app-promo-carousel {
        scroll-snap-type: x mandatory;
        padding: 20px 7.5%; /* 7.5% padding on each side to center 85% width slides */
        gap: 20px;
        
        /* Remove fade on mobile */
        -webkit-mask-image: none;
        mask-image: none;
    }
    
    .sopdet-app-promo-slide {
        width: 85%;
        min-width: 85%;
        scroll-snap-align: center;
    }
    
    .sopdet-app-promo-title {
        font-size: 1.7em;
        letter-spacing: 0.6px;
        max-width: 260px;
    }
    
    .sopdet-app-promo-image img {
        max-height: 480px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sopdet-app-promo-carousel,
    .sopdet-app-promo-slide {
        transition: none;
        scroll-behavior: auto;
    }
}

/* Focus state for accessibility */
.sopdet-app-promo-slide:focus {
    outline: 2px solid #BC903C;
    outline-offset: 2px;
}

/* ==========================================
   DEMO ARC VISUALIZATIONS SECTION
   ========================================== */

.demo-arc-wrapper {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-arc-item {
    flex: 1;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.demo-arc-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.demo-arc-item:nth-child(2) {
    transition-delay: 0.2s;
}

.demo-arc-item:nth-child(3) {
    transition-delay: 0.4s;
}

.demo-label-pill {
    background: #BC903C;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.demo-circle-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-degree-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.demo-degree-number {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'PT Serif', serif;
    line-height: 1;
    color: #FEFCFF;
}

.demo-phase-description {
    color: #DCD5E6;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .demo-arc-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 5rem;
    }
    
    .demo-arc-item {
        max-width: 300px;
    }
    
    .demo-circle-wrapper {
        width: 240px;
        height: 240px;
        margin-bottom: 1.75rem;
    }
    
    .demo-degree-number {
        font-size: 2.5rem;
    }
    
    .demo-phase-description {
        font-size: 1rem;
    }
}