/* =========================================
           1. GLOBAL RESET & VARIABLES
        ========================================= */
        :root {
            /* Colors */
            --accent-color: #9f6bf5;
            --text-white: #ffffff;
            
            /* Animation Physics */
            --fluid-shape: 1.2s cubic-bezier(0.25, 1, 0.5, 1);
            --fluid-move: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
        }

        html, body {
            width: 100%;
            min-height: 100%;
            margin: 0 !important;
            padding: 0 !important;
            overflow-x: hidden !important; 
            background-color: #050210;
            font-family: 'Inter', sans-serif;
            box-sizing: border-box;
            color: #fff;
        }
        
        * { box-sizing: border-box; }

        /* =========================================
           2. HEADER STYLES (Refractive Glass)
        ========================================= */
        #apex-style-header {
            position: fixed;
            top: 0; left: 0; width: 100%;
            z-index: 99999;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            pointer-events: none;
            will-change: transform; 
        }

        .glass-pill-nav {
            pointer-events: auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            
            /* INITIAL STATE: SQUARED */
            width: 100%; max-width: 100%;
            margin-top: 0; padding: 20px 40px; border-radius: 0px;
            transform: translateY(0) translateZ(0); 
            
            background: rgba(5, 2, 15, 0.01);
            backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
            border-bottom: 1px solid rgba(255,255,255,0.05);
            border-top: 0px solid transparent;
            border-left: 0px solid transparent;
            border-right: 0px solid transparent;
            
            /* SYNCHRONIZED TRANSITIONS */
            transition: 
                width var(--fluid-shape),
                border-radius var(--fluid-shape),
                padding var(--fluid-shape), 
                margin-top var(--fluid-shape),
                transform var(--fluid-move), 
                background 1s ease,
                backdrop-filter 1s ease,
                border 1s ease,
                box-shadow 1s ease;
        }

        /* SCROLLED STATE: PILL (The Glass Effect) */
        .glass-pill-nav.scrolled-mode {
            /* Shape & Pos */
            width: 90%; max-width: 1200px;
            border-radius: 50px;
            padding: 10px 20px 10px 30px;
            transform: translateY(20px) translateZ(0);
            
            /* --- REFRACTIVE GLASS EFFECT --- */
            /* Low opacity background to see through */
            background: rgba(20, 20, 30, 0.25); 
            
            /* High blur + Saturation = Optical Distortion Effect */
            backdrop-filter: blur(16px) saturate(120%); 
            -webkit-backdrop-filter: blur(16px) saturate(120%);
            
            /* Borders mimic glass edges */
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-top: 1px solid rgba(255, 255, 255, 0.25); /* Catching light on top */
            border-left: 1px solid rgba(255, 255, 255, 0.15);
            
            box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
        }

        /* Inner Elements */
        .pill-logo img { height: 40px; width: auto; display: block; transition: height var(--fluid-shape); }
        .pill-menu ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
        .pill-menu a { color: var(--text-white); text-decoration: none; font-weight: 500; font-size: 15px; transition: 0.3s; opacity: 0.8; }
        .pill-menu a:hover { color: var(--accent-color); opacity: 1; text-shadow: 0 0 10px rgba(159, 107, 245, 0.6); }

        .header-btn {
            position: relative; display: inline-flex; align-items: center; justify-content: center;
            padding: 12px 30px; text-decoration: none; overflow: hidden; border-radius: 30px;
            background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,0.1);
            transition: padding var(--fluid-shape), background 0.4s ease, border 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
        }
        .btn-text { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 1px; z-index: 2; }
        .liquid-shine { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150%; height: 150%; background: radial-gradient(circle, rgba(159, 107, 245, 0.6) 0%, transparent 60%); opacity: 0; transition: opacity 0.5s ease; z-index: 1; pointer-events: none; }
        .header-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.15); border-color: rgba(255,255,255,0.3); box-shadow: 0 0 20px rgba(159, 107, 245, 0.4); }
        .header-btn:hover .liquid-shine { opacity: 1; }


        /* =========================================
           3. CONTACT STAGE STYLES
        ========================================= */
        .contact-stage {
            position: relative;
            width: 100%;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: radial-gradient(circle at 60% 40%, #1a0530 0%, #000000 80%);
            /* Padding adjustment to clear header */
            padding: 140px 20px 80px 20px; 
            box-sizing: border-box;
            overflow: hidden;
            perspective: 1200px;
            z-index: 1; 
        }

        /* Background Blobs */
        .blob { position: absolute; filter: blur(80px); z-index: 0; opacity: 0.5; animation: moveAndMorph 15s ease-in-out infinite alternate; }
        .blob-1 { width: 500px; height: 500px; background: linear-gradient(45deg, #4f46e5, #9f6bf5); top: 0%; left: 5%; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
        .blob-2 { width: 400px; height: 400px; background: linear-gradient(45deg, #9f6bf5, #ff3d83); bottom: 5%; right: 10%; animation-delay: -5s; animation-duration: 18s; border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
        @keyframes moveAndMorph { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(30px, -30px) rotate(10deg); border-radius: 50%; } 100% { transform: translate(-20px, 20px) rotate(-10deg); } }

        /* --- MAIN GLASS CONTAINER --- */
        #glassCard {
            position: relative;
            width: 100%; max-width: 1100px; min-height: 650px;
            z-index: 2; 
            display: grid;
            grid-template-columns: 320px 1fr;
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
            border: 1px solid rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.2); border-left: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 30px;
            box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6);
            transform-style: preserve-3d; will-change: transform; opacity: 0; 
            animation: entryFade 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.2s;
        }
        @keyframes entryFade { to { opacity: 1; } }

        .glass-glare {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            border-radius: 30px; z-index: 2; pointer-events: none;
            background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
            mix-blend-mode: overlay; opacity: 0.7; will-change: background; 
        }

        /* --- LEFT SIDE --- */
        .info-panel {
            position: relative;
            background-image: url('https://images.unsplash.com/photo-1639322537228-f710d846310a?q=80&w=1600&auto=format&fit=crop');
            background-size: cover; background-position: center;
            padding: 50px 40px; display: flex; flex-direction: column; justify-content: space-between;
            overflow: hidden; border-radius: 30px 0 0 30px; z-index: 3;
        }
        .info-panel::after { content: ''; position: absolute; inset: 0; background: rgba(5, 2, 20, 0.75); backdrop-filter: blur(10px); z-index: 0; }
        .info-content-layer { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }

        .brand-title { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 5px; letter-spacing: -0.5px; line-height: 1.1; background: linear-gradient(to right, #fff, #a5a5a5); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
        .brand-sub { font-size: 1rem; color: #ccc; margin-bottom: 40px; font-weight: 500; }
        .contact-item { margin-bottom: 30px; }
        .c-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: #9f6bf5; font-weight: 700; margin-bottom: 8px; }
        .c-value { color: #fff; font-size: 1.1rem; font-weight: 500; }
        .c-value a { color: #fff; text-decoration: none; position: relative; }
        .c-value a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0%; height: 1px; background: #9f6bf5; transition: 0.3s; }
        .c-value a:hover::after { width: 100%; }

        .social-row { display: flex; gap: 15px; }
        .s-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #fff; transition: 0.3s; cursor: pointer; }
        .s-icon:hover { background: #9f6bf5; border-color: #9f6bf5; transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 20px -5px rgba(159, 107, 245, 0.5); }

        /* --- RIGHT SIDE --- */
        .form-panel { padding: 60px 50px; position: relative; z-index: 3; }

        .type-switch { display: flex; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 5px; width: fit-content; margin-bottom: 50px; position: relative; }
        .switch-btn { width: 120px; height: 38px; display: flex; justify-content: center; align-items: center; border-radius: 12px; color: #888; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: 0.3s; position: relative; z-index: 1; padding: 0; }
        .switch-btn.active { color: #fff; }
        .switch-highlight { position: absolute; top: 5px; left: 5px; width: 120px; height: 38px; background: rgba(255,255,255,0.15); border-radius: 12px; transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); }

        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; row-gap: 35px; }
        .full-width { grid-column: span 2; }
        .input-group { position: relative; }
        .input-field { width: 100%; background: transparent; border: none; border-bottom: 2px solid rgba(255, 255, 255, 0.2); padding: 15px 12px; color: #fff; font-size: 1.1rem; font-family: inherit; outline: none; transition: 0.3s; box-sizing: border-box; }
        .input-label { position: absolute; top: 15px; left: 12px; color: #888; font-size: 1.1rem; font-weight: 500; pointer-events: none; transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); }
        .input-field:focus ~ .input-label, .input-field:valid ~ .input-label, .input-field.has-content ~ .input-label, input[type="email"]:not(:placeholder-shown) ~ .input-label { top: -20px; left: 0; font-size: 0.85rem; color: #9f6bf5; font-weight: 700; letter-spacing: 0.5px; }
        .input-field:focus { border-bottom-color: #9f6bf5; box-shadow: 0 4px 15px -5px rgba(159, 107, 245, 0.3); }
        select.input-field { appearance: none; cursor: pointer; }
        select.input-field option { background: #1a0530; color: #fff; }

        .submit-btn { margin-top: 40px; position: relative; width: 100%; padding: 18px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; font-size: 1.1rem; font-weight: 600; border-radius: 16px; cursor: pointer; overflow: hidden; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 1; display: flex; justify-content: center; align-items: center; }
        .submit-btn::after { content: ""; position: absolute; top: 0; left: -100%; width: 200%; height: 100%; background: linear-gradient(120deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%, transparent 100%); transition: 0.6s; }
        .submit-btn:hover { background: rgba(159, 107, 245, 0.15); border-color: #9f6bf5; box-shadow: 0 0 20px rgba(159, 107, 245, 0.4); transform: translateY(-2px); letter-spacing: 2px; }
        .submit-btn:hover::after { left: 100%; }

        .success-overlay { position: absolute; inset: 0; background: rgba(5, 2, 20, 0.85); backdrop-filter: blur(20px); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 10; opacity: 0; pointer-events: none; transition: 0.5s; border-radius: 30px; }
        .success-overlay.visible { opacity: 1; pointer-events: all; }
        .check-anim { width: 80px; height: 80px; background: #00ff9d; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #000; font-size: 40px; margin-bottom: 25px; box-shadow: 0 0 50px rgba(0, 255, 157, 0.5); transform: scale(0) rotate(-45deg); transition: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
        .success-overlay.visible .check-anim { transform: scale(1) rotate(0deg); transition-delay: 0.1s; }


        /* =========================================
           4. FOOTER STYLES (Fixed Overlap)
        ========================================= */
        .smart-footer {
            width: 100vw; 
            position: relative;
            left: 50%; right: 50%;
            margin-left: -50vw; margin-right: -50vw; margin-bottom: 0 !important;
            margin-top: 0 !important; 
            padding: 60px 20px 40px 20px; 
            z-index: 10;
            background: #050210; 
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            font-family: 'Inter', sans-serif;
            color: #fff;
            box-sizing: border-box;
        }

        .smart-footer::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 60%; height: 1px; background: linear-gradient(90deg, transparent, #9f6bf5, transparent); opacity: 0.5; }
        .footer-container { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 60px; }
        .brand-link { display: inline-block; transition: transform 0.3s ease, opacity 0.3s ease; }
        .brand-link:hover { transform: translateY(-2px); opacity: 0.9; }
        .footer-desc { color: #888; font-size: 0.95rem; line-height: 1.6; max-width: 300px; margin-top: 20px; }
        .footer-heading { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; color: #5d5d6d; font-weight: 700; margin-bottom: 25px; }
        .footer-links { display: flex; flex-direction: column; gap: 15px; }
        .footer-link { color: #ccc; text-decoration: none; font-size: 1rem; transition: 0.3s; width: fit-content; }
        .footer-link:hover { color: #fff; transform: translateX(5px); text-shadow: 0 0 20px rgba(159, 107, 245, 0.6); }
        .footer-socials { display: flex; gap: 15px; margin-top: 5px; }
        .fs-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #fff; transition: all 0.3s ease; cursor: pointer; text-decoration: none; }
        .fs-icon:hover { background: #9f6bf5; border-color: #9f6bf5; transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 20px -5px rgba(159, 107, 245, 0.5); }
        .fs-icon:active { transform: translateY(0px) scale(0.9); box-shadow: none; transition: 0.05s; }
        .footer-bottom { margin-top: 80px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; }
        .copyright { color: #555; font-size: 0.9rem; text-align: center; }


        /* =========================================
           5. MOBILE RESPONSIVENESS (ALL)
        ========================================= */
        @media (max-width: 950px) {
            /* Footer */
            .footer-container { grid-template-columns: 1fr; gap: 40px; }
            .footer-brand, .footer-col, .footer-bottom { text-align: center; justify-content: center; }
            .footer-desc { margin: 0 auto; }
            .footer-links { align-items: center; }
            .footer-socials { justify-content: center; }

            /* Contact Form */
            #glassCard { grid-template-columns: 1fr; width: 100%; min-height: auto; border-radius: 20px; }
            .info-panel { padding: 40px 30px; min-height: 250px; border-radius: 20px 20px 0 0; }
            .form-panel { padding: 40px 30px; }
            .form-grid { grid-template-columns: 1fr; gap: 30px; }
            .full-width { grid-column: span 1; }
            #glassCard { transform: none !important; transition: none; }
            .glass-glare { display: none; }
        }

        @media (max-width: 900px) {
            /* Header */
            .glass-pill-nav { padding: 10px 20px; flex-direction: row; justify-content: space-between; }
            .glass-pill-nav.scrolled-mode { width: 92%; padding: 10px 20px; }
            .pill-menu { display: none; }
            .header-btn { padding: 8px 20px; }
            .pill-logo img { height: 35px; }
        }

/* ---- Form textarea: was inline-styled in the HTML ---- */
#f_msg {
    resize: none;
    height: auto;
    min-height: 50px;
    overflow-y: hidden;
}

/* ---- Success-overlay reset button: was inline-styled ---- */
.reset-msg-btn {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}
.reset-msg-btn:hover {
    background: rgba(159, 107, 245, 0.2);
    border-color: #9f6bf5;
}

/* ---- Native button reset for the type-switch buttons ---- */
.switch-btn {
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
