/* ==========================================================
   DIGIMENTRA VISION - SCROLL SCRUBBING CANVAS DESIGN SYSTEM
   ========================================================== */

/* Modern Fonts & General Reset */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #05070a;
    font-family: 'Inter', sans-serif;
    color: #f8fafc; /* Bright high-contrast white-silver font */
    scroll-behavior: auto; /* Managed by GSAP */
}

/* Custom Scrollbar for premium feel */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #05070a;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Ambient Floating Glow Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    mix-blend-mode: screen;
}

/* Canvas Container & Object Cover Styling */
.sticky-canvas-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 5;
    background-color: #05070a;
    pointer-events: none;
}

/* Dark legibility vignette overlay */
.bg-radial-vignette {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    background: radial-gradient(circle, rgba(5, 7, 10, 0.45) 0%, rgba(5, 7, 10, 0.8) 100%),
                linear-gradient(to bottom, rgba(5, 7, 10, 0.5) 0%, rgba(5, 7, 10, 0.25) 50%, rgba(5, 7, 10, 0.7) 100__);
    mix-blend-mode: multiply;
}

.vision-canvas {
    display: block;
    width: 100%;
    height: 100%;
    transform: translateZ(0); /* Force GPU acceleration */
    will-change: transform;
}

/* Content Overlays Structure */
.vision-copy {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height to prevent browser bar overlap */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 15;
    pointer-events: none; /* Allows scrolling & interacting through it */
    opacity: 0; /* Animated via GSAP */
    will-change: opacity, transform;
}

/* Ensure interactive subelements in copy can receive hover/click */
.vision-copy * {
    pointer-events: auto;
}

/* Gold Dust Particles System */
.gold-dust-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.gold-dust {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.8) 0%, rgba(212, 175, 55, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
    animation: driftUp 18s linear infinite;
    opacity: 0.5;
}

@keyframes driftUp {
    0% {
        transform: translateY(110vh) translateX(0) scale(0.6);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-10vh) translateX(60px) scale(1.3);
        opacity: 0;
    }
}

/* Refined Glass Form UI (Cam Kırılması details) */
.glass-input {
    background: rgba(5, 7, 10, 0.82); /* Darker backplate for absolute legibility */
    border: 1.5px solid rgba(255, 255, 255, 0.15); /* Stronger border contrast */
    border-bottom: 2.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px); /* Heavy blur to abstract busy background */
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff; /* High contrast white text */
    font-size: 0.875rem;
}

.glass-input::placeholder {
    color: #cbd5e1; /* Bright slate-300 placeholder for visibility */
}

.glass-input:focus {
    background: rgba(5, 7, 10, 0.92);
    border-color: rgba(212, 175, 55, 0.5);
    border-bottom-color: #d4af37; /* Warm Gold highlight */
    box-shadow: 0 8px 28px -2px rgba(212, 175, 55, 0.2);
    outline: none;
}

.glass-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.035);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    z-index: 1;
}

.glass-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.glass-btn:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 30px -5px rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

.glass-btn:hover::before {
    opacity: 1;
}

/* Spinner for Initial Loader */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loader logo pulsing animation */
@keyframes logoPulse {
    0% { transform: scale(0.96); filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.15)); }
    50% { transform: scale(1.02); filter: drop-shadow(0 0 28px rgba(212, 175, 55, 0.35)); }
    100% { transform: scale(0.96); filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.15)); }
}
.logo-pulse {
    animation: logoPulse 2.5s ease-in-out infinite;
}

/* Toast Notifications styling */
.toast {
    background: rgba(10, 15, 25, 0.88);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-left: 4px solid #d4af37;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-size: 0.825rem;
    font-family: 'Outfit', sans-serif;
    transform: translateX(120%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
    opacity: 0;
    pointer-events: auto;
}
.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Reduced Motion Fallback Styling */
@media (prefers-reduced-motion: reduce) {
    html, body {
        scroll-behavior: smooth !important;
    }
    
    .sticky-canvas-wrapper {
        position: absolute !important;
        height: 100% !important;
        opacity: 0.15 !important;
        z-index: 0 !important;
    }
    
    .vision-canvas {
        object-fit: cover !important;
    }
    
    .vision-scroll {
        height: auto !important;
    }
    
    .vision-copy {
        position: relative !important;
        height: auto !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        padding: 20vh 1.5rem !important;
        inset: auto !important;
        width: 100% !important;
    }
    
    .vision-contact {
        position: relative !important;
        height: auto !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        padding: 20vh 1.5rem !important;
        inset: auto !important;
        width: 100% !important;
    }
}

/* --- Responsive Contact Footer & Layout Overrides --- */
.contact-footer {
    bottom: 24px;
    width: calc(100% - 3rem) !important;
}

@media (max-width: 1024px) {
    #slide-contact {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto !important;
        padding-top: 2.5rem !important;
        padding-bottom: 7.5rem !important; /* Large bottom clearance to prevent any footer clipping on mobile */
    }

    #slide-contact .grid {
        width: 100% !important;
        flex-shrink: 0 !important;
        margin-bottom: 2rem !important; /* Spacing between form and footer */
    }

    .contact-footer {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        margin-top: auto !important; /* Pushes to the bottom if viewport is taller than content */
        padding-bottom: 1.5rem !important;
        padding-top: 1rem !important;
        gap: 0.5rem !important;
        flex-direction: column !important;
    }
}

/* Height-based viewport adjustments for short screens */
@media (max-height: 740px) and (max-width: 1024px) {
    #slide-contact {
        padding-top: 3rem !important;
    }
    #slide-contact .grid {
        gap: 0.75rem !important;
    }
}
