/* Hero carousel — cinematic image stage */
.hero-carousel {
    --hero-ink: #193f3c;
    --hero-gold: #c29341;
    --hero-gold-deep: #a07830;
    --hero-brand: #193f3c;
    --hero-pearl: #fbfaf8;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--hero-pearl);
    overflow: hidden;
    background: #f3f1ec;
}

.hero-carousel-stage {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: end start;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    clip-path: inset(0 18% 0 18%);
    transform: scale(1.08);
    transition:
        opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.25s cubic-bezier(0.22, 1, 0.36, 1),
        clip-path 1.15s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.95s;
    pointer-events: none;
    z-index: 0;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transform: scale(1);
    pointer-events: auto;
    z-index: 1;
}

.hero-slide.slide-prev {
    clip-path: inset(12% 0 12% 0);
}

.hero-slide.is-active.slide-prev {
    clip-path: inset(0 0 0 0);
}

.hero-slide-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% center;
    display: block;
    filter: saturate(1.08) contrast(1.04);
}

.hero-slide.is-active.slide-next .hero-slide-media {
    animation: ken-burns-a 8s ease-out both;
}

.hero-slide.is-active.slide-prev .hero-slide-media {
    animation: ken-burns-b 8s ease-out both;
}

@keyframes ken-burns-a {
    from { transform: scale(1.14) translate3d(2%, -1%, 0); }
    to { transform: scale(1) translate3d(0, 0, 0); }
}

@keyframes ken-burns-b {
    from { transform: scale(1.14) translate3d(-2%, 1%, 0); }
    to { transform: scale(1) translate3d(0, 0, 0); }
}

.hero-slide-veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(108deg, rgba(251, 250, 248, 0.92) 0%, rgba(251, 250, 248, 0.55) 38%, rgba(251, 250, 248, 0.08) 66%, transparent 100%),
        linear-gradient(180deg, rgba(251, 250, 248, 0.2) 0%, transparent 34%, rgba(25, 63, 60, 0.28) 100%);
    pointer-events: none;
}

.hero-slide-glow {
    position: absolute;
    inset: -12%;
    background:
        radial-gradient(circle at 74% 34%, rgba(212, 179, 106, 0.34), transparent 44%),
        radial-gradient(circle at 16% 72%, rgba(58, 143, 139, 0.18), transparent 42%);
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

.hero-slide.is-active .hero-slide-glow {
    opacity: 1;
    animation: glow-breathe 6s ease-in-out infinite;
}

.hero-slide-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 48%, transparent 62%);
    transform: translateX(-120%);
    pointer-events: none;
    mix-blend-mode: soft-light;
}

.hero-slide.is-active .hero-slide-shine {
    animation: slide-shine 2.4s ease 0.35s both;
}

@keyframes glow-breathe {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate3d(-1.5%, 1%, 0) scale(1.06); opacity: 1; }
}

@keyframes slide-shine {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
}

.hero-carousel .hero-ornament {
    position: absolute;
    inset: 1rem 1rem 6.8rem;
    border: 1px solid rgba(184, 137, 61, 0.3);
    pointer-events: none;
    z-index: 2;
    animation: frame-glow 5s ease-in-out infinite;
}

.hero-carousel .hero-ornament::before,
.hero-carousel .hero-ornament::after {
    content: "";
    position: absolute;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(192, 150, 69, 0.55);
}

.hero-carousel .hero-ornament::before {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
}

.hero-carousel .hero-ornament::after {
    right: -1px;
    bottom: -1px;
    border-left: 0;
    border-top: 0;
}

@keyframes frame-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-carousel-copy {
    position: relative;
    z-index: 3;
    max-width: 40rem;
    padding: 5.2rem 6vw 9.5rem;
    color: var(--hero-ink);
}

.hero-carousel-copy .eyebrow,
.hero-carousel-copy h1,
.hero-carousel-copy .lede,
.hero-carousel-copy .hero-actions,
.hero-carousel-copy .hero-weave {
    animation: hero-line-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-carousel-copy .eyebrow { animation-delay: 0.05s; }
.hero-carousel-copy h1 { animation-delay: 0.14s; }
.hero-carousel-copy .lede { animation-delay: 0.24s; }
.hero-carousel-copy .hero-actions { animation-delay: 0.34s; }
.hero-carousel-copy .hero-weave { animation-delay: 0.42s; }

@keyframes hero-line-in {
    from { opacity: 0; transform: translate3d(0, 26px, 0); filter: blur(5px); }
    to { opacity: 1; transform: none; filter: none; }
}

.hero-carousel-copy .eyebrow {
    color: var(--hero-gold-deep);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.72rem;
    margin-bottom: 0.85rem;
}

.hero-carousel-copy h1 {
    font-family: "Baskervville", "Cormorant Garamond", serif;
    font-weight: 400;
    font-size: clamp(3.15rem, 7vw, 5.6rem);
    line-height: 0.98;
    margin: 0 0 1.15rem;
    white-space: pre-line;
    color: var(--hero-ink);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    animation: hero-line-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

.hero-carousel-copy .lede {
    color: rgba(36, 28, 24, 0.74);
    font-size: 1.06rem;
    line-height: 1.72;
    max-width: 34rem;
    margin-bottom: 1.5rem;
}

.hero-carousel-copy .btn-ghost {
    background: transparent;
    color: var(--hero-ink);
    border-color: var(--hero-ink);
    backdrop-filter: none;
}

.hero-carousel-copy .btn-gold,
.hero-actions .btn-gold {
    background: #193f3c;
    border-color: #193f3c;
    color: #fbfaf8;
}

.hero-carousel-copy .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-carousel-copy .hero-weave {
    margin: 1.15rem 0 0;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.28rem;
    color: var(--hero-gold-deep);
}

.hero-carousel-rail {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    padding: 0.85rem 4vw 1rem;
    background: linear-gradient(180deg, transparent, rgba(251, 250, 248, 0.9) 35%, rgba(251, 250, 248, 0.97));
    backdrop-filter: blur(10px);
}

.hero-rail-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.35rem;
}

.hero-slide-index {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.55rem;
    color: var(--hero-ink);
    line-height: 1;
}

.hero-rail-label {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(36, 28, 24, 0.55);
}

.hero-play-toggle {
    min-height: 2rem;
    padding: 0 0.7rem;
    border: 1px solid #193f3c;
    background: rgba(251, 250, 248, 0.9);
    color: var(--hero-ink);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
    min-width: 0;
}

.hero-thumb {
    position: relative;
    border: 1px solid #e5e5e5;
    background: #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    aspect-ratio: 16 / 10;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.92);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.hero-thumb-name {
    position: absolute;
    left: 0.45rem;
    bottom: 0.4rem;
    z-index: 2;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fffaf6;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.hero-thumb-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    z-index: 3;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #e8c98a, #b8893d, #2f7d7a);
}

.hero-thumb:hover,
.hero-thumb.is-active {
    border-color: rgba(194, 147, 65, 0.7);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(25, 63, 60, 0.1);
}

.hero-thumb.is-active img,
.hero-thumb:hover img {
    filter: brightness(1.05);
    transform: scale(1.06);
}

@keyframes hero-thumb-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.hero-rail-nav {
    display: flex;
    gap: 0.45rem;
    padding-bottom: 0.35rem;
}

.hero-nav {
    width: 2.55rem;
    height: 2.55rem;
    border: 1px solid #193f3c;
    background: rgba(251, 250, 248, 0.9);
    color: var(--hero-ink);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: none;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.hero-nav:hover {
    transform: translateY(-1px);
    background: #193f3c;
    color: #fbfaf8;
    box-shadow: none;
}

.hero-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(184, 137, 61, 0.12);
    z-index: 5;
    overflow: hidden;
}

.hero-progress span {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    background: linear-gradient(90deg, #e8c98a, #b8893d, #2f7d7a);
    animation-name: hero-progress;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes hero-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Featured product carousel */
.product-carousel {
    padding: 0;
}

.product-carousel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.product-carousel-head h2 {
    font-family: "Baskervville", "Cormorant Garamond", serif;
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    margin: 0.45rem 0 0;
    color: #193f3c;
}

.product-carousel-nav {
    display: flex;
    gap: 0.5rem;
}

.product-carousel-viewport {
    overflow: hidden;
    padding: 0.55rem 0.25rem 1.15rem;
    mask-image: linear-gradient(90deg, transparent 0%, #000 1.5%, #000 97%, transparent 100%);
}

.product-carousel-track {
    display: flex;
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.product-carousel-item {
    flex: 0 0 calc(100% / var(--per-view, 3));
    min-width: 0;
    padding-right: 1.1rem;
    box-sizing: border-box;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.product-carousel-item:hover {
    transform: translateY(-4px);
}

.product-carousel-dots {
    margin-top: 0.4rem;
}

.hero-dots {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
}

.hero-dot {
    position: relative;
    width: 1.65rem;
    height: 0.28rem;
    border-radius: 999px;
    border: 0;
    padding: 0;
    overflow: hidden;
    background: rgba(42, 33, 29, 0.16);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 2.4rem;
    background: rgba(149, 112, 42, 0.22);
}

.hero-dot-fill {
    display: block;
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #e8c98a, #b8893d, #2f7d7a);
}

@media (max-width: 980px) {
    .hero-carousel-rail {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding-bottom: 0.85rem;
    }

    .hero-rail-meta,
    .hero-rail-nav {
        display: none;
    }

    .hero-thumbs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .hero-carousel-copy {
        padding-bottom: 10.5rem;
    }

    .hero-carousel .hero-ornament {
        inset: 1rem 1rem 8.5rem;
    }
}

@media (max-width: 640px) {
    .hero-carousel-copy {
        padding: 4.6rem 5vw 11rem;
        max-width: 100%;
    }

    .hero-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .hero-thumb-name {
        display: none;
    }

    .product-carousel-head {
        flex-direction: column;
        align-items: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide-media,
    .hero-carousel-copy .eyebrow,
    .hero-carousel-copy h1,
    .hero-carousel-copy .lede,
    .hero-carousel-copy .hero-actions,
    .hero-carousel-copy .hero-weave,
    .hero-progress span,
    .hero-thumb-progress,
    .hero-slide-glow,
    .hero-slide-shine,
    .product-carousel-track,
    .product-carousel-item {
        animation: none !important;
        transition: none !important;
    }

    .hero-slide {
        transform: none;
        clip-path: none;
    }
}
