/* ===================================================================
   UNIVERSAL PRODUCTS — WOW Animation Layer
   Award-winning micro-interactions, reveals, and cinematic moments
   =================================================================== */

/* ===================================================================
   1. PAGE LOAD — Luxury Curtain Reveal
   =================================================================== */

#up-curtain {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0E0B08;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.7s cubic-bezier(0.76,0,0.24,1), transform 0.9s cubic-bezier(0.76,0,0.24,1);
    transform-origin: top;
}

#up-curtain.lifted {
    opacity: 0;
    transform: translateY(-100%);
}

#up-curtain-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    animation: curtainLogoIn 0.6s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

@keyframes curtainLogoIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

#up-curtain-wordmark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #EDE7DA;
}

#up-curtain-bar {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C59B51, transparent);
    animation: curtainBarExpand 0.8s cubic-bezier(0.16,1,0.3,1) 0.5s forwards;
}

@keyframes curtainBarExpand {
    to { width: 160px; }
}

#up-curtain-sub {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #C59B51;
    opacity: 0;
    animation: fadeIn 0.5s ease 1s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

/* ── Custom cursor removed ── */


/* ===================================================================
   3. SECTION CLIP-PATH REVEALS — cinematic wipe
   =================================================================== */

.clip-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1);
}

.clip-reveal.revealed {
    clip-path: inset(0 0% 0 0);
}

/* Fade + rise for text blocks */
.text-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1),
                transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.text-reveal.revealed { opacity: 1; transform: translateY(0); }

/* Stagger children inside a reveal group */
.reveal-group .text-reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal-group .text-reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal-group .text-reveal:nth-child(3) { transition-delay: 0.25s; }
.reveal-group .text-reveal:nth-child(4) { transition-delay: 0.35s; }
.reveal-group .text-reveal:nth-child(5) { transition-delay: 0.45s; }

/* ===================================================================
   4. PRODUCT CARD — Magnetic Shimmer Border
   =================================================================== */

.product-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        var(--card-angle, 135deg),
        rgba(197,155,81,0) 0%,
        rgba(197,155,81,0.5) 40%,
        rgba(197,155,81,0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.product-card:hover::after {
    opacity: 1;
}

/* Mouse-tracked radial glow inside card */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(197,155,81,0.09),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

.product-card:hover::before { opacity: 1; }

/* Card entrance — slide up with spring */
.product-card {
    transition:
        transform 0.45s cubic-bezier(0.16,1,0.3,1),
        box-shadow 0.45s cubic-bezier(0.16,1,0.3,1),
        border-color 0.3s ease !important;
}

/* ===================================================================
   5. HERO SECTION — Cinematic Text Entrance
   =================================================================== */

.hero-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.hero-word-inner {
    display: inline-block;
    animation: heroWordRise 1s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes heroWordRise {
    from { transform: translateY(105%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.hero-word:nth-child(1) .hero-word-inner { animation-delay: 0.1s; }
.hero-word:nth-child(2) .hero-word-inner { animation-delay: 0.22s; }
.hero-word:nth-child(3) .hero-word-inner { animation-delay: 0.34s; }
.hero-word:nth-child(4) .hero-word-inner { animation-delay: 0.46s; }
.hero-word:nth-child(5) .hero-word-inner { animation-delay: 0.58s; }

/* ===================================================================
   6. ANIMATED GOLD COUNTER NUMBERS
   =================================================================== */

.wow-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

/* ===================================================================
   7. BRASS SHIMMER SWEEP — section headers & buttons
   =================================================================== */

.shimmer-text {
    background: linear-gradient(
        105deg,
        #D9B36E 0%,
        #F7E7CE 35%,
        #C59B51 50%,
        #F7E7CE 65%,
        #D9B36E 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerSweepText 3.5s linear infinite;
}

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

/* ===================================================================
   8. ANIMATED UNDERLINE ON SECTION TITLES (scroll-triggered)
   =================================================================== */

.wow-underline {
    position: relative;
    display: inline-block;
}

.wow-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #D9B36E, #C59B51, #9E7934);
    border-radius: 9999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.75s cubic-bezier(0.16,1,0.3,1);
}

.wow-underline.revealed::after {
    transform: scaleX(1);
}

/* ===================================================================
   9. RIPPLE EFFECT — on buttons & CTAs
   =================================================================== */

.up-ripple-host {
    position: relative;
    overflow: hidden;
}

.up-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    pointer-events: none;
    transform: scale(0);
    animation: upRippleAnim 0.65s cubic-bezier(0.4,0,0.2,1) forwards;
}

@keyframes upRippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ===================================================================
   10. SCROLL PROGRESS BAR — top of viewport
   =================================================================== */

#up-scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #C59B51, #F7D070, #C59B51);
    background-size: 200% 100%;
    animation: shimmerSweepText 2s linear infinite;
    z-index: 99999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ===================================================================
   11. FLOATING AMBIENT ORBS — background depth
   =================================================================== */

.up-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: orbDrift 20s ease-in-out infinite alternate;
}

@keyframes orbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -20px) scale(1.05); }
    66%  { transform: translate(-20px, 15px) scale(0.97); }
    100% { transform: translate(15px, -30px) scale(1.03); }
}

/* ===================================================================
   12. CARD GRID — staggered entrance
   =================================================================== */

.product-card.card-entering {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
}

.product-card.card-entered {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.7s cubic-bezier(0.16,1,0.3,1),
        transform 0.7s cubic-bezier(0.16,1,0.3,1),
        box-shadow 0.45s cubic-bezier(0.16,1,0.3,1),
        border-color 0.3s ease !important;
}

/* ===================================================================
   13. GLINT ON IMAGES — sweeping light ray
   =================================================================== */

.product-card .product-media::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255,255,255,0.08) 50%,
        transparent 70%
    );
    z-index: 2;
    pointer-events: none;
    transition: left 0s;
}

.product-card:hover .product-media::before {
    left: 125%;
    transition: left 0.7s cubic-bezier(0.4,0,0.2,1);
}

/* ===================================================================
   14. SECTION ENTRANCE — clip from bottom
   =================================================================== */

.section-rise {
    opacity: 0;
    transform: translateY(60px);
    transition:
        opacity 1s cubic-bezier(0.16,1,0.3,1),
        transform 1s cubic-bezier(0.16,1,0.3,1);
}

.section-rise.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
   15. TILT CARD — 3D perspective tilt on hover
   =================================================================== */

.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    will-change: transform;
}

/* ===================================================================
   16. MOBILE — disable heavy effects
   =================================================================== */

@media (max-width: 768px) {
    #up-curtain-wordmark { font-size: 1.3rem; letter-spacing: 0.12em; }
    .up-cursor-dot,
    .up-cursor-ring { display: none; }
    body.has-custom-cursor,
    body.has-custom-cursor * { cursor: auto !important; }
    .hero-word-inner { animation-duration: 0.7s; }
}

@media (prefers-reduced-motion: reduce) {
    .shimmer-text { animation: none; -webkit-text-fill-color: #D9B36E; }
    .hero-word-inner { animation: none; opacity: 1; transform: none; }
    #up-curtain { display: none; }
    #up-scroll-bar { display: none; }
}
