/* =====================================================================
   D.MARETTI — enhancements: gallery lightbox, scroll reveal, hover polish
   Keeps the existing minimal / editorial look; only adds subtle motion.
   ===================================================================== */

:root {
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ------------------------------------------------------------------ */
/* 1. Scroll reveal                                                    */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-ready [data-reveal],
    .reveal-ready .reveal {
        transition: opacity 0.8s var(--ease-out),
            transform 0.8s var(--ease-out);
        transition-delay: var(--reveal-delay, 0ms);
    }
    .reveal-ready [data-reveal]:not(.is-in),
    .reveal-ready .reveal:not(.is-in) {
        opacity: 0;
        transform: translateY(22px);
        will-change: opacity, transform;
    }
}

/* ------------------------------------------------------------------ */
/* 2. Image load fade-in                                               */
/* ------------------------------------------------------------------ */
.img-fade {
    opacity: 0;
    transition: opacity 0.9s ease;
}
.img-fade.is-loaded {
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .img-fade {
        opacity: 1 !important;
        transition: none !important;
    }
}

/* ------------------------------------------------------------------ */
/* 3. Hover micro-interactions                                         */
/* ------------------------------------------------------------------ */

/* Product grid cards (category / country / home "New Collection") */
.grid.products .card {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}
.grid.products .card img {
    transition: transform 0.75s var(--ease-out), opacity 0.9s ease;
}
.grid.products .card:hover img {
    transform: scale(1.045);
}
.grid.products .card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.45s ease;
    pointer-events: none;
}
.grid.products .card:hover::after {
    background: rgba(0, 0, 0, 0.06);
}
/* subtle "expand" affordance */
.grid.products .card::before {
    content: '+';
    position: absolute;
    z-index: 3;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #171717;
    font-family: 'SF Pro Display', system-ui, sans-serif;
    font-size: 24px;
    line-height: 40px;
    text-align: center;
    opacity: 0;
    transform: translateY(8px) scale(0.85);
    transition: opacity 0.35s ease, transform 0.4s var(--ease-out);
    pointer-events: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}
.grid.products .card:hover::before {
    opacity: 1;
    transform: none;
}

/* Tiles (home "Find Your Style") */
.tile {
    cursor: pointer;
}
.tile .tile-img {
    transition: transform 0.75s var(--ease-out), opacity 0.9s ease;
}
.tile:hover .tile-img {
    transform: scale(1.05);
}
.tile .t-title {
    transition: color 0.25s ease;
}
.tile:hover .t-title {
    color: var(--accent-ink);
}

/* Mosaic countries (home) */
.mos-item img {
    transition: transform 0.9s var(--ease-out);
}
.mos-item:hover img {
    transform: scale(1.06);
}
.mos-item .mos-title {
    transition: transform 0.4s var(--ease-soft);
}
.mos-item:hover .mos-title {
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    transition: transform 0.2s var(--ease-soft), box-shadow 0.25s ease,
        background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}
.btn:active {
    transform: translateY(0);
}
.btn-accent:hover {
    box-shadow: 0 12px 26px rgba(230, 196, 175, 0.5);
}

/* Header + nav */
.logo img {
    transition: opacity 0.25s ease;
}
.logo:hover img {
    opacity: 0.82;
}
.nav-link {
    transition: opacity 0.2s ease, color 0.2s ease;
}
.nav-link:hover {
    opacity: 0.6;
}
.lang-switcher button {
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.lang-switcher button:hover {
    border-color: #111;
}

/* Hero controls */
.arrow {
    transition: background 0.25s ease, transform 0.2s var(--ease-soft);
}
.arrow:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}
.hero-dots button {
    transition: background 0.3s ease, transform 0.2s var(--ease-soft);
}
.hero-dots button:hover {
    transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
    .grid.products .card:hover img,
    .tile:hover .tile-img,
    .mos-item:hover img,
    .btn:hover {
        transform: none;
    }
}

/* ------------------------------------------------------------------ */
/* 4. Lightbox                                                         */
/* ------------------------------------------------------------------ */
html.lb-lock,
html.lb-lock body {
    overflow: hidden;
}

.lb {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}
.lb.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.32s ease;
}

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 11, 10, 0.9);
    -webkit-backdrop-filter: blur(10px) saturate(118%);
    backdrop-filter: blur(10px) saturate(118%);
}

.lb-stage {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: min(92vw, 1400px);
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb.is-open .lb-stage {
    animation: lbStageIn 0.55s var(--ease-out);
}
@keyframes lbStageIn {
    from {
        transform: scale(0.94);
        opacity: 0.5;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

.lb-img {
    display: block;
    max-width: min(92vw, 1400px);
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateX(var(--from-x, 0)) scale(0.986);
    transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
    will-change: opacity, transform;
    -webkit-user-select: none;
    user-select: none;
}
.lb-img.is-ready {
    opacity: 1;
    transform: none;
}

.lb-nav,
.lb-close {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background 0.25s ease, border-color 0.25s ease,
        transform 0.25s var(--ease-soft), color 0.25s ease;
}
.lb-nav svg,
.lb-close svg {
    width: 22px;
    height: 22px;
}
.lb-nav {
    width: 56px;
    height: 56px;
    top: 50%;
    transform: translateY(-50%);
}
.lb-prev {
    left: clamp(12px, 3vw, 34px);
}
.lb-next {
    right: clamp(12px, 3vw, 34px);
}
.lb-close {
    width: 46px;
    height: 46px;
    top: clamp(14px, 2.4vw, 26px);
    right: clamp(14px, 2.4vw, 26px);
}
.lb-nav:hover,
.lb-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.lb-nav:hover {
    transform: translateY(-50%) scale(1.07);
}
.lb-close:hover {
    transform: scale(1.07);
}
.lb-nav:active {
    transform: translateY(-50%) scale(0.95);
}
.lb-close:active {
    transform: scale(0.95);
}

.lb-counter {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: clamp(14px, 2.4vw, 26px);
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    font-family: 'Bebas', system-ui, sans-serif;
    letter-spacing: 0.14em;
    font-size: 20px;
    pointer-events: none;
}
.lb-counter .lb-sep {
    margin: 0 0.45em;
    opacity: 0.5;
}
.lb-caption {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: calc(clamp(14px, 2.4vw, 26px) + 30px);
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    letter-spacing: 0.02em;
    padding: 0 24px;
    pointer-events: none;
}

@media (max-width: 600px) {
    .lb-nav {
        width: 44px;
        height: 44px;
    }
    .lb-prev {
        left: 10px;
    }
    .lb-next {
        right: 10px;
    }
    .lb-img {
        max-width: 94vw;
        max-height: 80vh;
    }
    .lb-counter {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lb,
    .lb-img,
    .lb-nav,
    .lb-close {
        transition: opacity 0.2s ease !important;
    }
    .lb-img {
        transform: none !important;
    }
    .lb.is-open .lb-stage {
        animation: none !important;
    }
}
