/*
Theme Name: Dream Eye Digital
Theme URI: https://www.dreameyedigital.com/
Author: Dream Eye Digital Engineering
Author URI: https://www.dreameyedigital.com/
Description: The official enterprise theme for Dream Eye Digital. AI-first digital transformation, custom software, and dedicated team solutions.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: dreameye
*/
/* Critical Base Styles to prevent FOUC (Flash of Unstyled Content) */
html, body {
    margin: 0;
    padding: 0;
    background-color: #FFFFFF; /* Instantly paints the correct background */
    color: #334155; /* Instantly applies correct text color */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Hide all content until the main wrapper is ready, but only if JS is disabled */
/* This ensures screen readers and crawlers see the content instantly */
.no-js .site-main {
    opacity: 0;
}

/* Prevent horizontal scroll during initial load */
body {
    overflow-x: hidden;
}

/* Ensure the header has a background immediately to prevent flash of transparent nav */
header#nav {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
}

:root {
    --blue: #1D4ED8;
    --blue-dark: #1E40AF;
    --navy: #0F172A;
    --white: #FFFFFF;
    --light: #F8FAFC;
    --border: #E2E8F0;
    --text: #334155;
    --muted: #64748B;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #FFFFFF;
    color: var(--text);
    overflow-x: hidden;
}

.display { letter-spacing: -0.04em; line-height: 0.98; }
.h-tight { letter-spacing: -0.035em; line-height: 1.05; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }

/* Buttons */
.btn-primary {
    background: var(--blue);
    color: white;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.2), 0 4px 12px -2px rgba(29, 78, 216, 0.25);
}
.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.2), 0 8px 20px -4px rgba(29, 78, 216, 0.35);
}
.btn-secondary {
    background: white;
    color: var(--navy);
    border: 1px solid var(--border);
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-secondary:hover {
    border-color: #CBD5E1;
    background: var(--light);
    transform: translateY(-1px);
}

/* Cards */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-4px);
    border-color: #CBD5E1;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 12px 32px -12px rgba(15,23,42,0.12);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Nav */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }

/* FAQ Accordion */
.faq-item .faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.open .faq-body { max-height: 300px; }
.faq-item .faq-icon { transition: transform 0.3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* Modal */
.modal-overlay {
    transition: opacity 0.3s ease;
}
.modal-content {
    animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Pulse */
@keyframes dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}
.dot-pulse { animation: dot-pulse 2s ease-in-out infinite; }

/* Mesh Background */
.mesh-bg {
    background-image: 
        radial-gradient(at 12% 18%, rgba(29, 78, 216, 0.06) 0px, transparent 50%),
        radial-gradient(at 88% 8%, rgba(59, 130, 246, 0.05) 0px, transparent 45%),
        radial-gradient(at 78% 92%, rgba(29, 78, 216, 0.04) 0px, transparent 50%);
}

/* Accessibility & Focus */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 4px;
}
::selection { background: rgba(29, 78, 216, 0.15); color: var(--navy); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 3D Hero Scene */
.scene-3d-wrap {
    position: relative;
    width: 100%;
    height: 320px;
    perspective: 1200px;
    margin: 0 auto;
}
.scene-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene-3d-layer {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.layer-core {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #1D4ED8, #1E40AF);
    box-shadow: 0 20px 50px -10px rgba(29, 78, 216, 0.4);
    border-radius: 24px;
    transform: translateZ(40px);
}
.layer-glass-1 {
    width: 180px;
    height: 100px;
    top: 20%;
    left: 10%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.15);
    border-radius: 16px;
    transform: translateZ(80px);
    animation: float-a 6s ease-in-out infinite;
}
.layer-glass-2 {
    width: 160px;
    height: 90px;
    bottom: 15%;
    right: 10%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.15);
    border-radius: 16px;
    transform: translateZ(60px);
    animation: float-b 7s ease-in-out infinite;
}

@keyframes float-a { 0%, 100% { transform: translateZ(80px) translateY(0); } 50% { transform: translateZ(80px) translateY(-10px); } }
@keyframes float-b { 0%, 100% { transform: translateZ(60px) translateY(0); } 50% { transform: translateZ(60px) translateY(10px); } }

/* Contact Page Map */
.map-embed {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: 0;
    filter: grayscale(100%) invert(92%) contrast(90%);
    border-radius: 16px;
}

/* 3D Card Tilt */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.tilt-card .tilt-inner {
    transform: translateZ(40px);
}
.tilt-card .tilt glare {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,0.4), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.tilt-card:hover .tilt-glare {
    opacity: 1;
}

/* Animated Process Line */
.process-line-bg {
    stroke: #E2E8F0;
    stroke-width: 2;
}
.process-line-fill {
    stroke: #1D4ED8;
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

/* Hero 3D Canvas */
#hero-3d-container {
    pointer-events: none;
}
#hero-3d-container canvas {
    display: block;
}

/* Strict Header Logo Size Override */
header#nav .custom-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    max-height: 36px !important; 
    line-height: 0 !important;
}

header#nav .custom-logo-link img.custom-logo {
    max-height: 36px !important;
    height: 36px !important; /* Forces strict height */
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* Desktop sizing */
@media (min-width: 1024px) {
    header#nav .custom-logo-link {
        max-height: 40px !important;
    }
    header#nav .custom-logo-link img.custom-logo {
        max-height: 40px !important;
        height: 40px !important;
    }
}

/* Subtle blue glow behind the 3D hero canvas */
#hero-3d-container {
    background: radial-gradient(circle at 50% 50%, rgba(241, 245, 249, 0.8) 0%, rgba(255, 255, 255, 0) 60%);
}

/* 3D Process Section */
.process-node {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-node:hover {
    transform: translateZ(120px) translateY(-8px) !important;
}

.process-node:hover .bg-blue-50,
.process-node:hover .bg-brand-blue {
    box-shadow: 0 10px 40px -10px rgba(29, 78, 216, 0.4);
}

@media (max-width: 1023px) {
    /* Flatten 3D on mobile for usability */
    #process-3d-inner {
        transform: none !important;
    }
    .process-node {
        transform: none !important;
    }
    .process-node:hover {
        transform: translateY(-4px) !important;
    }
}