/* ==========================================================================
   LUMERA WELLNESS – ANIMATION STYLESHEET
   GSAP 3, ScrollTrigger & Micro-interactions
   ========================================================================== */

/* Hardware acceleration & smooth rendering */
.will-animate {
    will-change: transform, opacity;
}

/* Base reveal initial states (progressive enhancement: visible if JS fails) */
.js-loaded .hero-reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
}

.js-loaded .gsap-reveal-up {
    opacity: 0;
    transform: translateY(35px);
}

.js-loaded .gsap-reveal-fade {
    opacity: 0;
}

.js-loaded .gsap-clip-reveal {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
}

/* Image reveal clip-path */
.img-reveal-wrapper {
    position: relative;
    overflow: hidden;
}

.img-reveal-wrapper img {
    transform: scale(1.15);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-reveal-wrapper.in-view img {
    transform: scale(1);
}

/* Shimmer pulse for interactive badges */
@keyframes subtlePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 164, 126, 0.35);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(197, 164, 126, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(197, 164, 126, 0);
    }
}

.pulse-badge {
    animation: subtlePulse 2.8s infinite;
}

/* Floating animation for subtle background elements */
@keyframes softFloat {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

.soft-float {
    animation: softFloat 5s ease-in-out infinite;
}

/* Service Item Image Swap Transitions */
.ke-img-swap {
    animation: keSwapAnim 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes keSwapAnim {
    0% {
        opacity: 0.3;
        transform: scale(0.96);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .js-loaded .hero-reveal-word,
    .js-loaded .gsap-reveal-up,
    .js-loaded .gsap-reveal-fade,
    .js-loaded .gsap-clip-reveal {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }

    .ke-laser-line {
        display: none !important;
    }
}

/* ==========================================================================
   FINAL MOBILE REPAIR – PAGE HERO, SERVICES NAV, HEADER & SERVICE CARDS
   Added after visual review of the 471px mobile screenshot.
   ========================================================================== */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    /* Consistent mobile floating header: logo left, compact hamburger right */
    #main-header,
    #main-header.is-scrolled {
        position: fixed;
        top: 10px;
        left: 12px;
        right: 12px;
        transform: none;
        width: auto;
        max-width: none;
        height: 64px;
        min-height: 64px;
        padding: 0 16px;
        border-radius: 40px;
        display: flex;
        align-items: center;
        background: rgba(255,255,255,.97);
        z-index: 100001;
        box-sizing: border-box;
    }
    #main-header .header-inner {
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    #main-header .header-logo {
        display: flex !important;
        flex: 0 1 auto;
        align-items: center;
        min-width: 0;
    }
    #main-header .header-logo img {
        display: block;
        width: auto;
        height: 38px;
        max-width: 145px;
        object-fit: contain;
    }
    #main-header .header-actions {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        margin-left: auto;
    }
    #main-header .mobile-toggle {
        display: flex !important;
        position: relative;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        flex: 0 0 44px !important;
        padding: 10px !important;
        margin: 0 !important;
        gap: 5px;
        align-items: center;
        justify-content: center;
        border: 0 !important;
        border-radius: 50% !important;
        background: transparent !important;
        box-shadow: none !important;
        appearance: none;
    }
    #main-header .mobile-toggle span {
        width: 24px;
        height: 2px;
        min-height: 2px;
        border-radius: 2px;
        background: #171417;
    }

    /* The actual page uses page-hero-banner, not the generic .page-hero class. */
    .page-hero-banner {
        width: 100%;
        min-height: 0;
        padding: 112px 20px 34px;
        margin: 0;
        overflow: hidden;
        box-sizing: border-box;
        background: #f7f0e9;
        text-align: left;
    }
    .page-hero-content {
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        min-width: 0;
    }
    .page-hero-banner .breadcrumb-nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 7px;
        margin: 0 0 14px;
        font-size: 10px;
        line-height: 1.5;
        letter-spacing: 1.4px;
    }
    .page-hero-banner .subheading-tag {
        display: block;
        margin: 0 0 10px;
        font-size: 10px;
        line-height: 1.5;
        letter-spacing: 1.5px;
    }
    .page-hero-banner h1 {
        max-width: 100%;
        margin: 0 0 12px;
        font-size: clamp(30px, 8vw, 42px);
        line-height: 1.08;
        letter-spacing: -1.2px;
        overflow-wrap: normal;
    }
    .page-hero-banner p {
        max-width: 620px;
        margin: 0;
        font-size: clamp(14px, 3.8vw, 17px);
        line-height: 1.65;
        overflow-wrap: break-word;
    }

    /* Services category bar becomes a single horizontal swipe row, not four narrow columns. */
    .services-category-bar {
        position: sticky;
        top: 74px;
        z-index: 90;
        width: 100%;
        padding: 12px 0 !important;
        overflow: hidden;
        box-sizing: border-box;
    }
    .services-category-inner {
        width: 100%;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 16px;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 9px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        touch-action: pan-x pan-y;
    }
    .services-category-inner::-webkit-scrollbar { display: none; }
    .services-category-link,
    .services-category-inner .filter-btn {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        align-items: center;
        justify-content: center;
        width: auto !important;
        max-width: none !important;
        min-height: 42px;
        padding: 10px 15px !important;
        border-radius: 999px;
        white-space: nowrap !important;
        word-break: keep-all;
        overflow-wrap: normal !important;
        line-height: 1.2;
        font-size: 12px;
    }

    /* Service category sections and cards */
    #hair-services, #skin-services, #body-services, #beauty-services {
        width: 100%;
        max-width: 100%;
        padding: 48px 18px !important;
        box-sizing: border-box;
        scroll-margin-top: 126px;
    }
    #hair-services > div, #skin-services > div,
    #body-services > div, #beauty-services > div {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-inline: auto;
    }
    #hair-services > div > div:first-child,
    #skin-services > div > div:first-child,
    #body-services > div > div:first-child,
    #beauty-services > div > div:first-child {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 26px !important;
    }
    #hair-services h2, #skin-services h2,
    #body-services h2, #beauty-services h2 {
        margin: 0;
        font-size: clamp(27px, 7.5vw, 36px);
        line-height: 1.12;
        letter-spacing: -.8px;
        overflow-wrap: normal;
    }
    #hair-services > div > div:first-child p,
    #skin-services > div > div:first-child p,
    #body-services > div > div:first-child p,
    #beauty-services > div > div:first-child p {
        width: 100%;
        max-width: 100% !important;
        margin: 0;
        font-size: 14px;
        line-height: 1.65;
    }
    #hair-services [style*="grid-template-columns"],
    #skin-services [style*="grid-template-columns"],
    #body-services [style*="grid-template-columns"],
    #beauty-services [style*="grid-template-columns"] {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
        gap: 16px !important;
    }
    #hair-services [style*="border-radius: 24px"],
    #skin-services [style*="border-radius: 24px"],
    #body-services [style*="border-radius: 24px"],
    #beauty-services [style*="border-radius: 24px"] {
        width: 100%;
        min-width: 0;
        padding: 24px 22px !important;
        border-radius: 20px !important;
        box-sizing: border-box;
    }
    #hair-services h3, #skin-services h3,
    #body-services h3, #beauty-services h3 {
        font-size: clamp(21px, 5.8vw, 26px) !important;
        line-height: 1.2;
        overflow-wrap: break-word;
    }
    #hair-services p, #skin-services p,
    #body-services p, #beauty-services p {
        max-width: 100%;
        font-size: 14px !important;
        line-height: 1.65 !important;
    }
    #hair-services .btn, #skin-services .btn,
    #body-services .btn, #beauty-services .btn {
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }

    /* Keep all content inside the viewport */
    main, main > section, footer, .footer-container,
    .footer-col, .contact-form-card, .consultation-form-card {
        min-width: 0;
        max-width: 100%;
    }
    h1, h2, h3, p, a, span { overflow-wrap: break-word; }
    img { max-width: 100%; }
}

@media (max-width: 380px) {
    #main-header { left: 8px; right: 8px; padding-inline: 12px; }
    #main-header .header-logo img { max-width: 122px; height: 34px; }
    .page-hero-banner { padding: 106px 16px 30px; }
    #hair-services, #skin-services, #body-services, #beauty-services {
        padding-inline: 15px !important;
    }
    #hair-services [style*="border-radius: 24px"],
    #skin-services [style*="border-radius: 24px"],
    #body-services [style*="border-radius: 24px"],
    #beauty-services [style*="border-radius: 24px"] {
        padding: 21px 18px !important;
    }
}


/* Services and subpage hero styles (shared desktop/tablet foundation) */
.page-hero-banner {
    width: 100%;
    padding: 150px clamp(24px, 6vw, 90px) 64px;
    background: #f7f0e9;
    color: #171417;
    box-sizing: border-box;
    overflow: hidden;
}
.page-hero-content {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}
.page-hero-banner .breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: #b58b61;
    font-size: 11px;
    letter-spacing: 1.6px;
}
.page-hero-banner .breadcrumb-nav a { color: inherit; text-decoration: none; }
.page-hero-banner .subheading-tag {
    display: block;
    margin-bottom: 12px;
    color: #b58b61;
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}
.page-hero-banner h1 {
    margin: 0 0 16px;
    color: #171417;
    font-size: clamp(36px, 4.5vw, 62px);
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -1.8px;
}
.page-hero-banner p {
    max-width: 760px;
    margin: 0;
    color: #5f5754;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
}


/* Mobile: vertical page scrolling drives the horizontal treatment rail.
   No manual horizontal swipe and no visible horizontal scrollbar. */
@media (max-width: 768px) {
    #premium-treatments.hscroll-section {
        width: 100%;
        height: 100svh;
        min-height: 100svh;
        max-height: 100svh;
        padding: 0 !important;
        overflow: hidden;
        display: block;
        box-sizing: border-box;
    }
    #premium-treatments .hscroll-pin {
        width: 100%;
        height: 100svh;
        min-height: 100svh;
        max-height: 100svh;
        padding: 92px 0 28px;
        gap: 20px;
        justify-content: center;
        overflow: hidden;
        box-sizing: border-box;
    }
    #premium-treatments .hscroll-header {
        width: 100%;
        padding-inline: 18px;
        flex: 0 0 auto;
        align-items: flex-end;
        gap: 10px;
    }
    #premium-treatments .hscroll-header h2 {
        font-size: clamp(23px, 6vw, 30px);
        line-height: 1.08;
    }
    #premium-treatments .hscroll-eyebrow {
        margin-bottom: 7px;
        font-size: 9px;
        letter-spacing: 1.4px;
    }
    #premium-treatments .hscroll-header .btn {
        min-height: 36px;
        padding: 8px 12px;
        font-size: 10px;
        white-space: nowrap;
    }
    #premium-treatments .hscroll-viewport,
    #premium-treatments.is-horizontal-ready .hscroll-viewport {
        display: block;
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        overflow: hidden !important;
        padding: 0;
        margin: 0;
        scrollbar-width: none !important;
        -ms-overflow-style: none;
        touch-action: pan-y;
    }
    #premium-treatments .hscroll-viewport::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    #premium-treatments .hscroll-track {
        display: flex;
        width: max-content !important;
        min-width: 100%;
        gap: 12px;
        padding: 0 18px;
        align-items: stretch;
        will-change: transform;
    }
    #premium-treatments .v-card,
    #premium-treatments .hscroll-card {
        width: min(58vw, 228px);
        flex: 0 0 min(58vw, 228px);
        height: clamp(245px, 62vw, 285px);
        min-height: 0;
        max-height: 285px;
        border-radius: 18px;
        scroll-snap-align: none;
    }
    #premium-treatments .v-card-content,
    #premium-treatments .hscroll-card-content {
        padding: 15px;
    }
    #premium-treatments .v-card-title,
    #premium-treatments .hscroll-card-title {
        font-size: clamp(16px, 4.2vw, 19px);
        line-height: 1.2;
    }
}
@media (max-width: 380px) {
    #premium-treatments .hscroll-pin {
        padding-top: 84px;
        gap: 16px;
    }
    #premium-treatments .hscroll-header { padding-inline: 15px; }
    #premium-treatments .hscroll-track { padding-inline: 15px; gap: 10px; }
    #premium-treatments .v-card,
    #premium-treatments .hscroll-card {
        width: 60vw;
        flex-basis: 60vw;
        height: 238px;
    }
}
