/* Shared Custom Styles for public pages */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

.glass-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.1);
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

.liquid-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FF9933;
    /* vibrant-saffron */
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
    border-radius: 2px;
}

.liquid-underline:hover::after,
.active-nav-link::after,
.active-link::after,
.active-link::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-hover:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.liquid-mask {
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.lotus-divider {
    position: relative;
    height: 1px;
    width: 100%;
    background: linear-gradient(to right, transparent, #FFD700 50%, transparent);
    margin: 2rem 0;
}

.lotus-divider::after {
    content: 'filter_vintage';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fbfbe2;
    /* temple surface color */
    padding: 0 1rem;
    color: #FFD700;
    font-size: 1.5rem;
}

.glass-panel,
.glass-card {
    background: rgba(251, 251, 226, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.liquid-accent {
    background: linear-gradient(135deg, #800000 0%, #b22b1d 100%);
}

@layer utilities {
    .glass-blur {
        @apply backdrop-blur-md bg-white/10;
    }

    .fade-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .fade-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .floating {
        animation: float 6s ease-in-out infinite;
    }

    @keyframes float {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-15px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .liquid-underline {
        position: relative;
    }

    .liquid-underline::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: theme('colors.vibrant-saffron');
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
        border-radius: 2px;
    }

    .liquid-underline:hover::after,
    .active-nav-link::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Entrance Screen ─────────────────────────────── */
#entrance-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fbfbe2;            /* surface / temple-cream */
    overflow: hidden;
    pointer-events: all;
}

/* Radial gold-glow pulse behind the logo */
#entrance-overlay::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.25) 0%, transparent 70%);
    animation: entrance-pulse 2s ease-in-out infinite;
}

@keyframes entrance-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.7; }
    50%       { transform: scale(1.3); opacity: 1;   }
}

/* The logo wrapper */
#entrance-logo {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #FFD700;
    background: rgba(245,245,220,0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 40px rgba(255,215,0,0.45),
                0 0 80px rgba(255,153,51,0.2);

    /* Initial state: tiny + invisible → animate in */
    opacity: 0;
    transform: scale(0.2) rotate(-30deg);
    animation: entrance-logo-in 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

@keyframes entrance-logo-in {
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Inner spinning ring 1 */
#entrance-logo .ring1 {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255,153,51,0.5);
    animation: spin-cw 2.5s linear 1.1s infinite;
}

/* Inner spinning ring 2 */
#entrance-logo .ring2 {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255,153,51,0.5);
    animation: spin-ccw 3s linear 1.1s infinite;
}

@keyframes spin-cw  { to { transform: rotate(360deg);  } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }

/* Outer orbit ring */
#entrance-logo .orbit {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px dashed rgba(255,215,0,0.35);
    animation: spin-cw 8s linear infinite;
    opacity: 0;
    transition: opacity 0.4s;
}

#entrance-logo.active .orbit {
    opacity: 1;
}

/* Lotus dot particles */
#entrance-logo .particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FFD700;
    opacity: 0;
}

/* Eight petals spread outward */
#entrance-logo .particle:nth-child(1)  { animation: particle-burst 0.6s ease-out 1.1s forwards; --angle: 0deg;   }
#entrance-logo .particle:nth-child(2)  { animation: particle-burst 0.6s ease-out 1.2s forwards; --angle: 45deg;  }
#entrance-logo .particle:nth-child(3)  { animation: particle-burst 0.6s ease-out 1.3s forwards; --angle: 90deg;  }
#entrance-logo .particle:nth-child(4)  { animation: particle-burst 0.6s ease-out 1.2s forwards; --angle: 135deg; }
#entrance-logo .particle:nth-child(5)  { animation: particle-burst 0.6s ease-out 1.1s forwards; --angle: 180deg; }
#entrance-logo .particle:nth-child(6)  { animation: particle-burst 0.6s ease-out 1.2s forwards; --angle: 225deg; }
#entrance-logo .particle:nth-child(7)  { animation: particle-burst 0.6s ease-out 1.3s forwards; --angle: 270deg; }
#entrance-logo .particle:nth-child(8)  { animation: particle-burst 0.6s ease-out 1.2s forwards; --angle: 315deg; }

@keyframes particle-burst {
    0%   { opacity: 1; transform: translate(0,0) scale(1); }
    100% {
        opacity: 0;
        transform:
            translateX(calc(cos(var(--angle)) * 90px))
            translateY(calc(sin(var(--angle)) * 90px))
            scale(0.3);
    }
}

/* Subtitle text */
#entrance-tagline {
    position: absolute;
    bottom: calc(50% - 130px);
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Libre Caslon Text', serif;
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #8f4e00;          /* secondary */
    opacity: 0;
    transform: translateY(10px);
    animation: entrance-tag-in 0.6s ease-out 1.5s forwards;
}

@keyframes entrance-tag-in {
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Phase 2: fly to nav ────────────────────────────── */

/* When JS adds .flying, the logo smoothly moves to the nav position.
   JS will set --dx, --dy, --scale via inline style, then apply this class. */
#entrance-logo.flying {
    will-change: transform, opacity;
    /* all keyframe animations are cancelled — JS drives transform directly */
    animation: none !important;
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.25s ease 0.55s;   /* fade out just as it arrives */
}

/* Overlay background fades out independently while logo flies */
#entrance-overlay.bg-clearing {
    transition: background 0.55s ease, backdrop-filter 0.55s ease;
    background: transparent !important;
    pointer-events: none;
}

/* Pulse also gone */
#entrance-overlay.bg-clearing::before {
    display: none;
}

/* Tagline fades away when flight starts */
#entrance-tagline.fade-away {
    transition: opacity 0.3s ease;
    opacity: 0 !important;
}

/* Hide body scroll while entrance is playing */
body.entrance-active {
    overflow: hidden;
}