@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');
@import "flickity.css";

* {
    font-smooth: antialiased;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

html, body {
    padding: 0;
    margin: 0;
    background-color: #000;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 16px;
    line-height: 1.2; 
    color: #fff;
}

body {
    --hero-headline-height: 9em;
    --bottom-nav-height: 5.5em;
    --demo-gallery-height: calc(100vh - var(--hero-headline-height) - var(--bottom-nav-height) - 5em);
}

@media (min-width: 1300px) and (min-height: 800px) {
    body {
        --hero-headline-height: 14em;
        --demo-gallery-height: calc(100vh - var(--hero-headline-height) - var(--bottom-nav-height) - 5em);
    }
}

@media (max-width: 1300px) {
    body {
        --hero-headline-height: 9em;
        --bottom-nav-height: 5.5em;
        --demo-gallery-height: calc(100vh - var(--hero-headline-height) - var(--bottom-nav-height) - 5em);
    }
}

@media (max-width: 800px) {
    body {
        --hero-headline-height: 10.5em;
        --bottom-nav-height: 5em;
        --demo-gallery-height: calc(100vh - var(--hero-headline-height) - var(--bottom-nav-height) - 5em);
    }
}

@media (max-width: 600px) {
    body {
        --hero-headline-height: 8.5em;
        --bottom-nav-height: 5em;
        --demo-gallery-height: calc(100vh - var(--hero-headline-height) - var(--bottom-nav-height) - 5em);
    }
}

@media (max-width: 420px) {
    body {
        --hero-headline-height: 10em;
        --bottom-nav-height: 5em;
        --demo-gallery-height: calc(100vh - var(--hero-headline-height) - var(--bottom-nav-height) - 5em);
    }
}
/* @media (max-width: 1399px) {
    html, body {
        font-size: 16px;
    }
} */

@media (max-width: 999px) {
    html, body {
        font-size: 14px;
    }
}

.intro {
    padding: 2.5em;
}

    @media (max-width: 600px) {
        .intro {
            padding: 1.5em;
        }
    }

h1 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 400;
    line-height: 1.2;
}

h1 br:not(.always) {
    display: none;
}

    @media (min-width: 1300px) and (min-height: 800px) {
        h1 {
            font-size: 2.5em;
        }

        h1 br:not(.always) {
            display: block;
        }
    }

h1 strong {
    font-weight: 700;
}

.solution-type {
    font-size: 0.8em;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
    opacity: 0.75;
    transition: opacity 0.25s ease-out;
}

.is-selected .solution-type {
    opacity: 1
}

h2 {
    font-size: 1.25em;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
}

@media (min-width: 1200px) {
    h2 {
        font-size: 1.5em;
        line-height: 1.2;
    }
}

.slide h2 {
    font-size: 14px;
    line-height: 1.2;
}

@media (min-height: 600px) {
    .slide h2 {
        font-size: 1.25em;
    }
}

@media (min-height: 800px) {
    .slide h2 {
        font-size: 1.5em;
    }
}

@media (min-height: 900px) {
    .slide h2 {
        font-size: 1.75em;
    }
}



.demo-gallery {
    gap: 1.5em;
    overflow: visible;
    margin-top: -1.5em;
}

    .demo-gallery::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 10em;
        height: calc(100% + 6em);
        background: #000;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 78%, rgba(0, 0, 0, 1) 100%);
    }

    @media (max-width: 600px) {
        .demo-gallery::after {
            width: 4em;
        }
        .demo-gallery {
            margin-top: 0;
        }
    }

.demo-gallery,
.flickity-viewport,
.flickity-slider {
    height: var(--demo-gallery-height);
    max-height: 70vh;
}


.slide {
    padding: 3em 0 3em 3em;
    overflow: visible;
    box-sizing: border-box !important;
}

    @media (max-width: 600px) {
        .slide {
            padding: 1.5em 0 1.5em 1.5em;
        }

    }



.dot {
    width: 0.5em;
    height: 0.5em;
    background-color: #fff;
    border-radius: 100%;
    margin-left: 1.25em;
    margin-top: calc(25vh - 0.25em);
}


@property --a {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.demo-item {
    --a:0deg; 
    position: relative;
    border-radius: 1.5em;
    height: var(--demo-gallery-height);
    max-height: calc(70vh - 3em);
    aspect-ratio: 10 / 16;
    position: relative;
    transition:--a 0.5s;
}

@media (orientation: portrait) {
    .demo-item {
        max-height: 50vh;
    }
}

.is-selected .demo-item {
    background: conic-gradient(from var(--a) at 50% 50%, #aa6144, #87df6e, #4EA3D3, #aa6144);
    background: conic-gradient(from var(--a) at 50% 50%, #e3b5c6, #E0A349, #4EA3D3, #E2B4E1);
    animation: spin-gradient 3s linear infinite;
}

.is-selected .demo-item::before {
    content: '';
    position: absolute;
    top: -1em;
    left: -1em;
    width: calc(100% + 2em);
    height: calc(100% + 2em);
    background: conic-gradient(from var(--a) at 50% 50%, #e3b5c6, #E0A349, #4EA3D3, #E2B4E1);
    z-index: 0;
    filter: blur(2em);
    opacity: 0.35;
    border-radius: 2em;
    animation: spin-gradient 3s linear infinite;
}


    @keyframes spin-gradient {
        0% {
            --a:0deg;
        }
       
        
        100% {
            --a:360deg;
        }
    }


    .demo-item .inner {
        background: #000;
        padding: 1.4em;
        border-radius: 1.5em;
        border: 2px solid rgba(255,255,255,0.2);
        border-top: 2px solid rgba(255,255,255,0.3);
        border-bottom: 2px solid rgba(255,255,255,0.1);
        position: absolute;
        top: 0;
        left: 0;
        width: calc(100% );
        height: calc(100% );
        transition: all 0.5s ease-out;
        transition-delay: 0s;
        overflow: hidden;
    }

    @media (min-width: 1200px) {
        .demo-item .inner {
            padding: 1.9em;
        }
    }

    .demo-item .inner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        opacity: 0.2;
        /* filter: grayscale(90%) blur(0) brightness(1); */
        transform-origin: center bottom;
        transition: all 1s ease-out;
        transition-delay: 0.25s;
        border-radius: 1.1em;
    }

    .slide[data-view='haircarefinder'] .demo-item .inner::before {
        background-image: url('../img/haircarefinder.jpg') !important;
        background-position: top 30% left 73%;
        background-size: auto 150%;
    }

    .slide[data-view='skincarefinder'] .demo-item .inner::before {
        background-image: url('../img/skincare.jpg') !important;
        background-position: top 50% left 34%;
        background-size: auto 130%;
    }

    .slide[data-view='fragrancefinder'] .demo-item .inner::before {
        background-image: url('../img/fragrancefinder.jpg') !important;
        background-position: top 37% center;
        background-size: auto 160%;
    }

    .slide[data-view='foundationfinder'] .demo-item .inner::before {
        background-image: url('../img/foundationfinder.jpg') !important;
        background-position: top 80% right 17%;
        background-size: auto 115%;
    }

    .slide[data-view='personalization'] .demo-item .inner::before {
        background-image: url('../img/personalization.jpeg') !important;
        background-position: center center;
        background-size: cover;
    }

    .slide[data-view='inciexplainer'] .demo-item .inner::before {
        background-image: url('../img/inciexplainer.jpg') !important;
        background-position: top 43% right 45%;
        background-size: auto 180%;
    }

    .slide[data-view='cleanbeauty'] .demo-item .inner::before {
        background-image: url('../img/cleanbeauty.jpg') !important;
        background-position: top 18% left 44%;
        background-size: auto 230%;
    }

    .slide[data-view='fragrancenotes'] .demo-item .inner::before {
        background-image: url('../img/fragrancenotes.jpg') !important;
        background-position: top 40% left 66%;
        background-size: auto 175%;
    }

    .demo-item .inner::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 50%;
        background: #000;
        background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
    }

    .is-selected .demo-item .inner::before {
        opacity: 1;
        transform: scale(1);
        filter: grayscale(0%) blur(0px) brightness(1.1);
    }

    .demo-item .inner * {
        position: relative;
        z-index: 1;
    }


    .is-selected .demo-item .inner {
        border-color: #000;
        top: 0.4em;
        left: 0.4em;
        width: calc(100% - 0.8em);
        height: calc(100% - 0.8em);
        border-radius: 1.2em;
        padding: 1em;
    }

    @media (min-width: 1200px) {
        .is-selected .demo-item .inner {
            padding: 1.5em;
        }
    }

    .demo-item .open-demo {
        position: absolute;
        bottom: 1em;
        right: 1em;
        width: 1.5em;
        height: 1.5em;
        background-color: #fff;
        background-image: url('../img/plus.svg');
        background-size: 0.7em;
        background-position: center right 0.4em;
        background-repeat: no-repeat;
        border-radius: 99px;
        opacity: 0.5;
        transition: all 0.25s ease-out;
        transition-delay: 0.3s;
    }

    .is-selected .demo-item .open-demo {
        opacity: 1;
        width: 3.75em;
        padding-left: 0.75em;
    }

    .demo-item .open-demo::before {
        content: attr(data-label);
        color: #000;
        font-weight: 600;
        font-size: 0.8em;
        line-height: 1.8em;
        opacity: 0 !important;
        transform: translateX(-0.5em);
        transition: all 0.25s ease-out;
        transition-delay: 0.3s;
    }

    .is-selected .demo-item .open-demo::before {
        opacity: 1 !important;
        transform: translateX(0);
    }

.demo-view {
    --a:0deg; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #111, #000, #111, #000);
	background-size: 400% 400%;
	animation: gradient 15s ease infinite;
    opacity: 1;
    z-index: 999999;
    overflow: auto;
    overflow-x: hidden;
    transform: scale(0.5);
    transform-origin: top left;
    opacity: 0;
    transition: opacity 0.001s ease-out, all 0.3s ease-out, --a 0.5s;
    border-radius: 1.5em;
    pointer-events: none;
    overflow: hidden;
}

@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.demo-view.is-selected {
    opacity: 1;
    transform: scale(1) translateX(0);
    pointer-events: all;
    top: 1em !important;
    left: 1em !important;
    width: calc(100% - 2em) !important;
    height: calc(100% - 2em) !important;
}

.demo-view iframe {
    opacity: 0 !important;
    transition: opacity 1s ease-out;
    transition-delay: 1s;
    height: 100% !important;
    width: 100% !important;
    position: relative;
    z-index: 1;
}

.demo-view.is-selected iframe {
    opacity: 1 !important;
}

.demo-view.is-selected {
    background: conic-gradient(from var(--a) at 50% 50%, #aa6144, #87df6e, #4EA3D3, #aa6144);
    background: conic-gradient(from var(--a) at 50% 50%, #e3b5c6, #E0A349, #4EA3D3, #E2B4E1);
    animation: spin-gradient 3s linear infinite;
}

.demo-view-inner {
    background: #000;
    position: absolute;
    top: 0.4em;
    left: 0.4em;
    width: calc(100% - 0.8em);
    height: calc(100% - 6em);
    border-radius: 1.2em;
    overflow: hidden;
    border: 0.5em solid rgba(0,0,0,0.5);
    display: none;
}

.demo-view-inner.is-selected {
    display: block;
}

.demo-view-inner[data-view='inciexplainer'],
.demo-view-inner[data-view='cleanbeauty'],
.demo-view-inner[data-view='fragrancenotes'] {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(100px);
    border-color: rgba(255,255,255,0.5)
}

.demo-view-inner[data-view='cleanbeauty'] {
    border: none;
}

.demo-view-inner[data-view='skincarefinder'] {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(100px);
    border: 0;
}

.demo-view-inner[data-view='foundationfinder'] {
    background: #d9c4b4;
    background: url('../img/foundationfinder-intro.png'), linear-gradient(340deg, rgba(217, 196, 180, 1) 0%, rgba(254, 243, 234, 1) 100%);
    background-size: 50% auto, cover;
    background-repeat: no-repeat;
    background-position: center right -100%;
    transition: background-position 0.5s ease-out;
}

.demo-view-inner[data-view='foundationfinder']#current-slide-intro {
    background-position: center right;
}

@media (max-width: 500px) {
    .demo-view-inner[data-view='foundationfinder'] {
        background-position: bottom right -100%;
    }
    
    .demo-view-inner[data-view='foundationfinder']#current-slide-intro {
        background-position: bottom right;
    }
}

.demo-view-inner[data-view='skincarefinder'] {
    background: #0a2b2a;
    background:linear-gradient(340deg, rgba(10, 43, 42, 1) 0%, rgba(15, 54, 52, 1) 100%);
    
}

.demo-view-inner[data-view='skincarefinder']#current-slide-facescan {
    background:linear-gradient(340deg, rgba(10, 43, 42, 1) 0%, rgba(15, 54, 52, 1) 100%);
}


.demo-view-inner[data-view='fragrancefinder'] {
    border-color: rgba(0,0,0,1);
    background: #d9c4b4;
    background: url('../img/fragrance-intro-faded.jpg'), linear-gradient(340deg, rgba(0,0,0, 1) 0%, rgba(20,20,20, 1) 100%);
    background-size: cover, cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 2s ease-out !important;
}

.demo-view-inner[data-view='fragrancefinder']#current-slide-intro {
    background: url('../img/fragrance-intro.jpg'), linear-gradient(340deg, rgba(0,0,0, 1) 0%, rgba(20,20,20, 1) 100%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover, cover;
}

@media (max-width: 500px) {
    .demo-view-inner[data-view='fragrancefinder'] {
        
        background-position: top right;
        background-size: 180% auto, cover;
    }
    
    .demo-view-inner[data-view='fragrancefinder']#current-slide-intro {
        background-position: top right;
        background-size: 180% auto, cover;
    }
}






.demo-view-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/hair.jpg') !important;
    background-size: 200% auto;
    background-position: center left 40%;
    background-repeat: no-repeat;
    /* filter: grayscale(50%); */
    opacity: 0.5;
    display: none
}

.demo-view-close,
.refresh-view {
    position: absolute;
    bottom: 0.4em !important;
    left: 0.4em !important;
    transform: none !important;
    right: unset !important;
    top: unset !important;
    background-color: rgba(0,0,0,0.4) !important;
    border: 0 !important;
    padding-top: 1.8em !important;
    padding-bottom: 1.8em !important;
    height: auto !important;
    /* width: 1.5em;
    height: 1.5em;
    background-color: #fff;
    background-image: url('../img/plus.svg');
    background-size: 0.7em;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 99px;
    transform: rotate(45deg);
    z-index: 9999999;
    cursor: pointer; */
}

.refresh-view {
    left: unset !important;
    right: 0.4em !important;
    width: fit-content !important;
    padding-right: 2.5em !important;
}


.hints {
    display: none;
}

@media (min-width: 700px) {
    .hints.is-selected {
        display: block;
    }
}

.hints.is-selected[data-view='inciexplainer'],
.hints.is-selected[data-view='cleanbeauty'],
.hints.is-selected[data-view='fragrancenotes'] {
    display: flex;
    position: absolute;
    bottom: 0.4em;
    right: 0.4em;
    gap: 0.5em;
    z-index: 10;
}

.hints[data-view='inciexplainer'] .refresh-view,
.hints[data-view='cleanbeauty'] .refresh-view,
.hints[data-view='fragrancenotes'] .refresh-view {
    position: static !important;
    right: unset !important;
    bottom: unset !important;
    left: unset !important;
    top: unset !important;
}

.hints .refresh-view {
    display: block;
}

.hint {
    background: rgba(0,0,0,0.5);
    position: fixed;
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    bottom: 0.4em;
    right: 0.4em;
    height: 4.799em;
    border-radius: 999px;
    z-index: 9999999;
    width: 50%;
    padding-left: 5em;
    padding-right: 1.5em;
    /* pointer-events: none; */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.3);
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
    transform: translateY(150%);
    opacity: 0;
    transition: all 0.4s ease-out;
    transition-delay: 0s;

}

.hint.is-past {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.hint.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.hint.hidden {
    display: none !important;
}

.hint::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0.7em;
    width: 3.4em;
    height: 3.4em;
    background-image: url('../img/inference-chrome.png');
    background-size: 60% auto;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #000;
    border-radius: 999px;
    z-index: 9999999;
    transform: translateY(-50%);
}

.hint-title {
    font-weight: 600;
    margin-bottom: 0.5em;
    display: none;
}

.hint:hover {

}

.filter {
    position: fixed;
    bottom: 2.5em;
    left: 2.5em;
    width: calc(100% - 5em);
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    @media (max-width: 600px) {
        .filter {
            left: 1.5em;
            bottom: 1.5em;
            width: calc(100% - 3em);
        }
    }

.filter-left,
.filter-right {
    display: flex;
    flex-flow: row wrap;
    gap: 2em;
    align-self: flex-end;
    width: calc(45% - 2em);
}

    @media (max-width: 600px) {
        .filter-left,
        .filter-right {
            gap: 1.5em
        }
    }

    .filter-right {
        justify-content: flex-end;
    }

    .filter-item {
        font-size: 0.8em;
        line-height: 1.2;
        font-weight: 600;
        letter-spacing: 0.05em; 
        cursor: pointer;
        position: relative;
        display: flex;
        flex-flow: column;
        gap: 0.5em;
    }

    .filter-item::before {
        content: '';
        position: absolute;
        top: -1em;
        left: -1em;
        width: calc(100% + 2em);
        height: calc(100% + 2em);
        background: rgba(255,255,255,0.1);
        border-radius: 0.7em;
        transition: all 0.25s ease-out;
        opacity: 0;
        transform: scale(0.5);
    }

    .filter-item:hover::before,
    .filter-item.is-active::before {
        opacity: 1;
        transform: scale(1);
    }

    .filter-item img {
        width: 1.5em;
        height: 1.5em;
        margin-right: 0.5em;
    }

    @media (max-width: 999px) {
        .filter-right {
            display: none;
        }
        .filter-left {
            width: calc(100% - 5em);
        }
    }

    @media (max-width: 450px) {
        .filter-left {
            display: none;
        }
    }

.filter .logo {
    background-image: url('../img/inference-chrome.png');
    width: 4em;
    height: 4em;
    background-size: 100% auto;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 0.7em;
    transform: translateY(0.5em);
}

.return-home,
.refresh-view {
    position: absolute;
    top: 50%;
    right: -16em;
    width: 5em;
    height: 5em;
    background: #000 url(../img/arrow-left-solid.svg) no-repeat center left 2em;
    background-size: 1.8em auto;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 5em;
    padding-right: 2em;
    width: fit-content;
    transition: all 0.25s ease-out;
}


.refresh-view {
    background-image:url(../img/sync-solid.svg);
}

.refresh-view.scan-view {
    background-image:url(../img/barcode-scan.svg);
}

.return-home.demo-view-close:hover,
.refresh-view:hover {
    transform: scale(0.95) !important;
}

@media (max-width: 500px) {
    .return-home.demo-view-close {
        width: 4.799em;
        padding-right: 0;
        overflow: hidden;
        background-position: center
    }
}


/* Scanner Modal */
.scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.4s ease;
}

.scanner-modal.is-active {
    opacity: 1;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.scanner-card {
    position: relative;
    width: 90vw;
    max-width: 380px;
    border-radius: 1.8em;
    overflow: hidden;
    background: rgba(18, 18, 20, 0.95);
    border: 1px solid rgba(232, 196, 124, 0.12);
    box-shadow:
        0 1px 0 0 rgba(255,255,255,0.04) inset,
        0 2em 6em -1em rgba(0, 0, 0, 0.7),
        0 0 80px -20px rgba(232, 196, 124, 0.08);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.scanner-modal.is-active .scanner-card {
    transform: translateY(0) scale(1);
}

/* Video area */
.scanner-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.scanner-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    display: block;
}

/* Subtle vignette on video */
.scanner-video-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s;
}

.scanner-modal.is-success .scanner-video-wrap::after {
    opacity: 0.3;
}

/* Scanning guide corners */
.scanner-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 62%;
    height: 38%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
}

.scanner-guide::before,
.scanner-guide::after,
.scanner-guide span::before,
.scanner-guide span::after {
    content: '';
    position: absolute;
    width: 1.6em;
    height: 1.6em;
    border-color: rgba(255, 255, 255, 0.45);
    border-style: solid;
    border-width: 0;
    transition: border-color 0.3s, width 0.3s, height 0.3s;
}

.scanner-guide::before {
    top: 0; left: 0;
    border-top-width: 2px;
    border-left-width: 2px;
    border-top-left-radius: 0.5em;
}

.scanner-guide::after {
    top: 0; right: 0;
    border-top-width: 2px;
    border-right-width: 2px;
    border-top-right-radius: 0.5em;
}

.scanner-guide span::before {
    bottom: 0; left: 0;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-bottom-left-radius: 0.5em;
}

.scanner-guide span::after {
    bottom: 0; right: 0;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-bottom-right-radius: 0.5em;
}

/* Animated scanline — warm amber laser */
.scanner-scanline {
    position: absolute;
    left: 19%;
    width: 62%;
    height: 1px;
    top: 30%;
    pointer-events: none;
    z-index: 2;
    background: rgba(232, 196, 124, 0.7);
    box-shadow:
        0 0 8px 2px rgba(232, 196, 124, 0.3),
        0 0 20px 4px rgba(232, 196, 124, 0.1);
    animation: scanline 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes scanline {
    0%, 100% { top: 31%; opacity: 0.6; }
    50% { top: 69%; opacity: 1; }
}

/* Footer area */
.scanner-footer {
    padding: 1.3em 1.5em 1.4em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3em;
}

.scanner-barcode-icon {
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 0.15em;
    transition: color 0.3s;
}

.scanner-status {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8em;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.scanner-ean {
    font-size: 0.75em;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.25);
    font-variant-numeric: tabular-nums;
    min-height: 1.2em;
    transition: color 0.3s;
}

/* Close button */
.scanner-close {
    position: absolute;
    top: 0.7em;
    right: 0.7em;
    width: 2.6em;
    height: 2.6em;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    padding: 0;
}

.scanner-close:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(0.9);
}

.scanner-close:active {
    transform: scale(0.85);
}

/* Success state */
.scanner-modal.is-success .scanner-guide::before,
.scanner-modal.is-success .scanner-guide::after,
.scanner-modal.is-success .scanner-guide span::before,
.scanner-modal.is-success .scanner-guide span::after {
    border-color: rgba(232, 196, 124, 0.8);
    width: 2em;
    height: 2em;
}

.scanner-modal.is-success .scanner-scanline {
    animation: none;
    top: 50%;
    opacity: 0;
}

.scanner-modal.is-success .scanner-video-wrap {
    box-shadow: inset 0 0 0 2px rgba(232, 196, 124, 0.3);
}

.scanner-modal.is-success .scanner-status {
    color: #e8c47c;
}

.scanner-modal.is-success .scanner-ean {
    color: rgba(232, 196, 124, 0.6);
}

.scanner-modal.is-success .scanner-barcode-icon {
    color: rgba(232, 196, 124, 0.4);
}

/* Success icon */
.scanner-success-icon {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3.8em;
    height: 3.8em;
    background: rgba(18, 18, 20, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(232, 196, 124, 0.25);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.scanner-modal.is-success .scanner-success-icon {
    display: flex;
    animation: successPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Success ripple */
.scanner-modal.is-success .scanner-success-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(232, 196, 124, 0.3);
    animation: successRipple 0.8s cubic-bezier(0, 0, 0.2, 1) 0.15s;
    opacity: 0;
}

@keyframes successRipple {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}