/* --- Color System (Dual Mode) --- */
:root {
    --brand-bg: #ffffff;
    --brand-surface: #f9f9f9;
    --brand-text: #18181b;
    --brand-muted: #71717a;
    --brand-border: rgba(0, 0, 0, 0.08);
}

.dark {
    --brand-bg: #0a0a0a;
    --brand-surface: #121212;
    --brand-text: #f4f4f5;
    --brand-muted: #a1a1aa;
    --brand-border: rgba(255, 255, 255, 0.08);
}

/* --- Inversion Cursor --- */
#cursor-inverter {
    position: fixed;
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 40;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform;
}

.show-inverter #cursor-inverter {
    transform: translate(-50%, -50%) scale(1);
}

/* --- Glassmorphism --- */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark .glass-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Outline Text Effect --- */
.outline-text {
    color: transparent !important;
    -webkit-text-stroke: 1px var(--brand-text);
    transition: all 0.5s ease;
}

.show-inverter .outline-text {
    -webkit-text-stroke: 1px transparent;
}

/* --- Performance Optimization --- */
.reveal-up, .image-mask img, .parallax-text, #cursor, #cursor-follower {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translate3d(0,0,0); /* Force Hardware Acceleration */
}

/* --- Optimized Noise Texture (Static for Performance) --- */
.noise-bg {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.04;
    pointer-events: none;
    z-index: 99;
}

/* --- Custom Cursor --- */
#cursor, #cursor-follower {
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.cursor-hover #cursor-follower {
    width: 60px;
    height: 60px;
    background-color: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

/* --- Smooth Scroll (Lenis) --- */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

/* --- Float Animation --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

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

/* --- Navigation (Optimized) --- */
nav {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

nav.scrolled {
    background-color: var(--brand-bg) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--brand-border);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

/* --- Mobile Specific Refinements --- */
@media (max-width: 768px) {
    .parallax-text { display: none; }
    
    .reveal-up {
        opacity: 1 !important;
        transform: none !important;
    }

    .py-40 { padding-top: 5rem; padding-bottom: 5rem; }
    .py-60 { padding-top: 8rem; padding-bottom: 8rem; }
    
    h1 { font-size: 3rem !important; line-height: 1.1 !important; }
}

/* --- Animations Base --- */
.gsap-reveal { opacity: 0; }

.image-mask {
    overflow: hidden;
    position: relative;
    background: var(--brand-surface);
}

.image-mask img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Cinematic Reveal Base --- */
.cinematic-heading .block.overflow-hidden {
    overflow: hidden;
    padding: 0.15em 0.1em;
    margin: -0.15em -0.1em;
}

.reveal-item {
    display: inline-block;
    will-change: transform, opacity;
}

/* --- Scroll Progress --- */
#progressContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

#progressBar {
    height: 100%;
    background: #d4af37;
    width: 0%;
    transform-origin: left;
}

/* --- Parallax Typography (Refined) --- */
.parallax-text {
    position: absolute;
    font-size: 20vw;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    text-transform: uppercase;
}

/* --- Sticky Quick Enquiry Button (Vertical Text) --- */
.quick-enquiry-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, #d4af37 0%, #c9a227 100%);
    color: #0a0a0a;
    text-decoration: none;
    padding: 16px 10px;
    border-radius: 8px 0 0 8px;
    box-shadow: -4px 4px 20px rgba(212, 175, 55, 0.3),
                0 0 40px rgba(212, 175, 55, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}


.quick-enquiry-btn:hover {
    padding: 18px 12px;
    box-shadow: -6px 6px 30px rgba(212, 175, 55, 0.4),
                0 0 60px rgba(212, 175, 55, 0.2);
}

.quick-enquiry-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
	transform: rotate(-90deg);
}

.quick-enquiry-btn:hover .quick-enquiry-icon {
    transform: scale(1.15);
}

.quick-enquiry-text {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    transition: all 0.3s ease;
}

.quick-enquiry-btn:hover .quick-enquiry-text {
    letter-spacing: 0.25em;
}

/* Pulse animation for attention */
.quick-enquiry-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-enquiry-btn:hover::before {
    opacity: 1;
}

/* Subtle pulse effect */
@keyframes enquiry-pulse {
    0%, 100% { box-shadow: -4px 4px 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(212, 175, 55, 0.1); }
    50% { box-shadow: -4px 4px 25px rgba(212, 175, 55, 0.5), 0 0 50px rgba(212, 175, 55, 0.2); }
}

.quick-enquiry-btn {
    animation: enquiry-pulse 3s ease-in-out infinite;
}

.quick-enquiry-btn:hover {
    animation: none;
}

/* --- Mobile Optimization for Quick Enquiry (Vertical Text) --- */
@media (max-width: 768px) {
    .quick-enquiry-btn {
        top: 50%;
        transform: translateY(-50%);
        right: 0;
        padding: 12px 8px;
        gap: 10px;
        border-radius: 6px 0 0 6px;
    }
    
    .quick-enquiry-btn:hover {
        padding: 12px 8px;
    }
    
    .quick-enquiry-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .quick-enquiry-text {
        font-size: 8px;
        letter-spacing: 0.15em;
    }
}

/* Smaller screens */
@media (max-width: 380px) {
    .quick-enquiry-btn {
        padding: 10px 6px;
        gap: 8px;
    }
    
    .quick-enquiry-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .quick-enquiry-text {
        font-size: 7px;
    }
}

/* Landscape mode adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .quick-enquiry-btn {
        padding: 8px 6px;
        gap: 6px;
    }
    
    .quick-enquiry-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .quick-enquiry-text {
        font-size: 7px;
    }
}
