/* ==========================================
    ULTRA-LUXURY KINETIC ANIMATIONS
========================================== */

/* Elegant Fade Up and Fade Out */
.framer-reveal {
    opacity: 0;
    transform: translate3d(0, 60px, 0) scale(0.98);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.framer-reveal.is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* 3D Kinetic Card Reveal */
.framer-card {
    opacity: 0;
    transform: perspective(1200px) rotateX(15deg) translate3d(0, 100px, 0) scale(0.92);
    transform-origin: top center;
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.framer-card.is-revealed {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) translate3d(0, 0, 0) scale(1);
}

/* Magnetic Hover Interaction Classes */
.magnetic-btn {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.magnetic-btn:hover {
    transform: scale(1.05) translateY(-2px);
}

/* Cinematic Image Reveal Box */
.cinematic-img-box {
    position: relative;
    overflow: hidden;
}

.cinematic-img-box > div {
    transform: scale(1.1);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
    will-change: transform;
}

.cinematic-img-box.is-revealed > div {
    transform: scale(1);
}

.cinematic-img-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #F8F5F0; /* Soft Warm Cream instead of harsh black */
    z-index: 10;
    transform-origin: right; /* Wipe to the right */
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.cinematic-img-box.is-revealed::before {
    transform: scaleX(0);
}


/* ==========================================
    PRELOADER
========================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
    text-align: center;
    overflow: visible;
    width: 100%;
    padding: 0 10px;
}

.loader-text {
    font-family: var(--font-accent);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-red);
    opacity: 0;
    transform: translateY(20px);
    animation: textReveal 1.2s var(--ease-luxury) forwards;
}

.loader-line {
    width: 0;
    height: 2px;
    background-color: var(--gold);
    margin: 10px auto 0;
    animation: lineGrow 1.5s var(--ease-luxury) forwards 0.5s;
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineGrow {
    to {
        width: 120px;
    }
}

.hide-preloader {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================
    SPA VIEW CONTAINER 
========================================== */
#app-view {
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#app-view.fading {
    opacity: 0;
}

/* ==========================================
    AAAYAN SVG LOGO SCALABLE SYSTEM
========================================== */
/* FIX Bug1+Bug2: min-width ensures SVG never collapses; overflow:visible ensures text is never clipped */
.brand-logo-svg {
    height: 50px;
    width: auto;
    min-width: 220px;
    overflow: visible;
    display: block;
}

/* Standalone Icon for Preloader / Favicon */
.loader-logo-svg {
    width: 95%;
    max-width: min(95vw, 900px);
    height: auto;
    max-height: 150px;
    margin: 0 auto 20px auto;
    display: block;
    overflow: visible;  /* FIX Bug1: prevent SVG from clipping brand name text */
    opacity: 0;
    transform: translateY(20px);
    animation: loaderLogoIn 0.8s var(--ease-luxury) forwards;
}

@keyframes loaderLogoIn {
    to { opacity: 1; transform: translateY(0); }
}

.brand-wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 38px;
    letter-spacing: 14px;
}

.brand-wordmark.light-text { fill: url(#textGradLight); }

.brand-tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 7px;
}

.brand-tagline.light-tagline { fill: #0284c7; }

/* FIX: Issue 1 — Start ringBreathe from full opacity so rings don't appear tiny/faded on page refresh */
@keyframes ringBreathe {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.03);
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

.ring-outer {
    transform-origin: 50px 50px;
    animation: ringBreathe 4s ease-in-out infinite;
}

.ring-inner {
    transform-origin: 50px 50px;
    animation: ringBreathe 4s ease-in-out infinite;
    animation-delay: 1.3s;
}

/* Text visibility removed from here so wordmark always shows */

/* ==========================================
    ELEGANT SECTION HEADERS
========================================== */
.elegant-section-header {
    margin-bottom: 60px;
    text-align: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10%; /* More spacing on left/right */
}

.elegant-section-header h2 {
    font-family: var(--font-accent);
    color: var(--primary-red);
    font-size: 56px;
    font-weight: 400;
    margin-bottom: 25px;
}

.elegant-subtitle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.elegant-subtitle {
    color: var(--gold);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.elegant-line {
    height: 1px;
    width: 100px;
    background: rgba(196, 163, 90, 0.4);
}

/* FIX: Mobile centering — reduce padding so subtitle row fits without overflowing */
@media (max-width: 768px) {
    .elegant-section-header {
        padding: 0 5%;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .elegant-section-header h2 {
        font-size: 42px;
        margin-bottom: 15px;
        text-align: center;
    }

    /* FIX: Stack subtitle row vertically so both Suits and Sectors look identical —
       gold line above text, centered subtitle, gold line below text */
    .elegant-subtitle-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 12px;
    }

    /* FIX: Short centered horizontal rule, not a side-flanking line */
    .elegant-line {
        width: 50px;
        flex-shrink: 0;
        margin: 0 auto;
    }

    /* FIX: Hide the line that appears AFTER the subtitle text — only keep the one between title and text */
    .elegant-subtitle-row .elegant-line:last-child {
        display: none;
    }

    .elegant-subtitle {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }
}
