/* SlideShow – Reusable cinematic slide sequence */

/* ============================================
   BADGE & BULLETS (InviteWelcome feature highlights)
   ============================================ */
.slideshow-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.slideshow-bullets {
    list-style: none;
    padding: 0;
    margin: 1rem auto 0;
    max-width: 420px;
    text-align: left;
}

.slideshow-bullets li {
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    padding: 0.3rem 0;
}

.slideshow-bullets li::before {
    content: "✓  ";
    color: #7fffb2;
    font-weight: 700;
}

/* ============================================
   LIGHT-BACKGROUND SLIDE VARIANT
   ============================================ */
.slide-on-light .slideshow-subtitle {
    color: rgba(15, 52, 96, 0.85);
}

/* ============================================
   TEXT SIZE MODIFIERS
   ============================================ */
.slideshow-title--sm
.slideshow-title--md  { font-size: clamp(1.8rem, 5.5vw, 3.5rem); }
.slideshow-title--lg  { font-size: clamp(3rem, 9vw, 6.5rem); }
.slideshow-title--xl  { font-size: clamp(3.5rem, 11vw, 8rem); }

.slideshow-subtitle--sm  { font-size: clamp(0.75rem, 1.8vw, 1rem); }
.slideshow-subtitle--md  { font-size: clamp(0.9rem, 2.3vw, 1.4rem); }
.slideshow-subtitle--lg  { font-size: clamp(1.6rem, 4.5vw, 2.5rem); }
.slideshow-subtitle--xl  { font-size: clamp(2rem, 5.5vw, 3.2rem); }

.slideshow-bullets--sm li  { font-size: clamp(0.75rem, 1.8vw, 0.9rem); }
.slideshow-bullets--md li  { font-size: clamp(0.9rem, 2.3vw, 1.1rem); }
.slideshow-bullets--lg li  { font-size: clamp(1.1rem, 3vw, 1.4rem); }
.slideshow-bullets--xl li  { font-size: clamp(1.3rem, 3.5vw, 1.7rem); }

/* ============================================
   CONTAINER
   ============================================ */
.slideshow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-intro-sequence, 2000);
    overflow: hidden;
    font-family: var(--font-system, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif);
    animation: slideshow-bgFadeIn 0.8s ease-in-out;
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.slideshow-container.slideshow-phase-complete {
    background: transparent;
    animation: slideshow-fadeOut 0.6s ease-out forwards;
}

/* ============================================
   SLIDE CONTENT
   ============================================ */
.slideshow-slide {
    text-align: center;
    color: white;
    width: 100%;
    max-width: 900px;
    padding: 2rem;
}

.slideshow-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Icon */
.slideshow-icon {
    font-size: clamp(4rem, 12vw, 8rem);
    margin-bottom: 0.5rem;
    animation: slideshow-iconBounce 1.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

/* Title */
.slideshow-title {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 900;
    margin: 0;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    line-height: 1.2;
    animation: slideshow-titlePulse 2s ease-in-out infinite alternate;
}

/* Title color variants – must follow .slideshow-title to win the cascade */
.slideshow-title--color-light {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.97);
    color: rgba(255, 255, 255, 0.97);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    animation: none;
}

.slideshow-title--color-dark {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #0f3460;
    color: #0f3460;
    text-shadow: none;
    animation: none;
}

/* Subtitle */
.slideshow-subtitle {
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 700px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideshow-subtextFadeIn 1s ease-out 0.3s both;
}

/* Image */
.slideshow-image-wrapper {
    max-width: 350px;
    width: 60%;
    animation: slideshow-imageFadeIn 1s ease-out 0.2s both;
}

.slideshow-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
}

/* ============================================
   TRANSITIONS (reuse intro-sequence keyframes)
   ============================================ */
.slideshow-slide.transition-fly-top {
    animation: flyInFromTop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               flyOutToBottom 0.6s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
    animation-delay: 0s, calc(var(--phase-duration, 3s) - 0.6s);
}

.slideshow-slide.transition-fly-bottom {
    animation: flyInFromBottom 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               flyOutToTop 0.6s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
    animation-delay: 0s, calc(var(--phase-duration, 3s) - 0.6s);
}

.slideshow-slide.transition-fly-left {
    animation: flyInFromLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               flyOutToRight 0.6s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
    animation-delay: 0s, calc(var(--phase-duration, 3s) - 0.6s);
}

.slideshow-slide.transition-fly-right {
    animation: flyInFromRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               flyOutToLeft 0.6s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
    animation-delay: 0s, calc(var(--phase-duration, 3s) - 0.6s);
}

.slideshow-slide.transition-zoom-in {
    animation: zoomInFromSmall 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               zoomOutToLarge 0.6s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
    animation-delay: 0s, calc(var(--phase-duration, 3s) - 0.6s);
}

.slideshow-slide.transition-zoom-out {
    animation: zoomInFromLarge 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               zoomOutToSmall 0.6s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
    animation-delay: 0s, calc(var(--phase-duration, 3s) - 0.6s);
}

.slideshow-slide.transition-fade-in {
    animation: slideshow-fadeInSlide 1s ease-in-out forwards,
               slideshow-fadeOutSlide 0.6s ease-out forwards;
    animation-delay: 0s, calc(var(--phase-duration, 3s) - 0.6s);
}

/* ============================================
   SKIP BUTTON
   ============================================ */
.slideshow-skip-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.3rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2001;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.slideshow-skip-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.slideshow-skip-button:active {
    transform: translateY(0);
}

.slideshow-skip-button i {
    font-size: 1rem;
    animation: slideshow-chevronPulse 1.5s ease-in-out infinite;
}

/* ============================================
   PROGRESS DOTS
   ============================================ */
.slideshow-progress {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 2001;
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dot.active {
    background: #ffd700;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.slideshow-dot.past {
    background: rgba(255, 255, 255, 0.65);
}

.slideshow-dot.past:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

/* ============================================
   COMPONENT-SCOPED KEYFRAMES
   ============================================ */
@keyframes slideshow-bgFadeIn {
    from { filter: brightness(0.6); }
    to   { filter: brightness(1); }
}

@keyframes slideshow-fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes slideshow-titlePulse {
    from { transform: scale(1); }
    to   { transform: scale(1.03); }
}

@keyframes slideshow-subtextFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideshow-imageFadeIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideshow-chevronPulse {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(5px); }
}

@keyframes slideshow-fadeInSlide {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideshow-fadeOutSlide {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.05); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .slideshow-slide {
        padding: 1.5rem;
    }

    .slideshow-content-centered {
        gap: 1.25rem;
    }

    .slideshow-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .slideshow-subtitle {
        font-size: clamp(1.15rem, 4.5vw, 1.7rem);
    }

    .slideshow-icon {
        font-size: clamp(3rem, 15vw, 6rem);
    }

    .slideshow-image-wrapper {
        width: 50%;
    }

    .slideshow-skip-button {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.65rem 1.2rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .slideshow-slide {
        padding: 1rem;
    }

    .slideshow-title {
        font-size: clamp(1.8rem, 12vw, 3.5rem);
    }

    .slideshow-subtitle {
        font-size: clamp(1.05rem, 5vw, 1.5rem);
    }

    .slideshow-icon {
        font-size: clamp(2.5rem, 18vw, 5rem);
    }

    .slideshow-image-wrapper {
        width: 45%;
    }

    .slideshow-skip-button {
        bottom: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }

    .slideshow-skip-button i {
        font-size: 0.9rem;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .slideshow-container {
        min-height: -webkit-fill-available;
        height: -webkit-fill-available;
    }

    .slideshow-skip-button {
        -webkit-appearance: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        background-clip: padding-box;
    }
}

/* Landscape phones */
@media (max-height: 600px) and (orientation: landscape) {
    .slideshow-slide {
        padding: 1rem;
    }

    .slideshow-content-centered {
        gap: 1rem;
    }

    .slideshow-title {
        font-size: clamp(1.8rem, 7vw, 3.5rem);
    }

    .slideshow-subtitle {
        font-size: clamp(1rem, 3vw, 1.6rem);
    }

    .slideshow-icon {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .slideshow-skip-button {
        bottom: 0.75rem;
        right: 0.75rem;
        padding: 0.5rem 0.9rem;
        font-size: 0.7rem;
    }
}
