/* ==========================================================================
   VIYAN 3D EXPERIENCE STYLES
   Cutting-edge 3D Perspective, Holographic Glare, Floating Mesh & Interactive Visuals
   ========================================================================== */

/* 1. Ambient 3D Cursor Glow */
#cursor-glow-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 160, 36, 0.12) 0%, rgba(0, 242, 254, 0.06) 45%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    will-change: transform;
    filter: blur(12px);
}

/* 2. Hero Canvas Container */
.hero-3d-canvas-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.hero-3d-canvas-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Very light left-edge tint for text readability — animation visible everywhere */
    background: linear-gradient(90deg, rgba(7, 13, 30, 0.65) 0%, rgba(7, 13, 30, 0.30) 30%, transparent 55%);
    pointer-events: none;
    z-index: 2;
}

#hero-3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 1;
}

/* Hero Typography Contrast */
.hero-section h1 {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

.hero-section p.lead {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85) !important;
}

.hero-section .badge-3d-float {
    background: rgba(7, 13, 30, 0.85) !important;
    backdrop-filter: blur(12px);
}

/* Hero Section Spacing & Layout */
.hero-section {
    min-height: 650px;
    background: #070d1e;
}

.hero-content-wrap {
    min-height: 650px;
    display: flex;
    align-items: center;
}

@media (max-width: 991px) {
    .hero-content-wrap {
        padding: 60px 0 65px !important;
        min-height: auto;
    }
}

/* 3. 3D Tilt Card Base & Layers */
.card-3d-tilt {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1200px;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    will-change: transform;
}

.card-3d-tilt-inner {
    transform-style: preserve-3d;
    height: 100%;
    position: relative;
}

/* Subtle Cards for Interactive Widgets (Calculator & Comparison) */
.card-subtle-calc, .card-subtle-compare {
    transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.25s ease;
    border-radius: 16px;
    height: 100%;
    position: relative;
}

.card-subtle-calc:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 242, 254, 0.18);
}

.card-subtle-compare:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(229, 160, 36, 0.18);
}

/* Elements that pop forward in 3D space */
.card-3d-tilt [data-depth="high"] {
    transform: translateZ(45px);
    transform-style: preserve-3d;
    transition: transform 0.2s ease;
}

.card-3d-tilt [data-depth="med"] {
    transform: translateZ(28px);
    transform-style: preserve-3d;
    transition: transform 0.2s ease;
}

.card-3d-tilt [data-depth="low"] {
    transform: translateZ(15px);
    transform-style: preserve-3d;
    transition: transform 0.2s ease;
}

/* Dynamic Specular Glare */
.card-3d-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.22) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 5;
    mix-blend-mode: overlay;
}

.card-3d-tilt:hover .card-3d-glare {
    opacity: 1;
}

/* 4. Floating Holographic 3D Badges */
.badge-3d-float {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(16, 31, 74, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 160, 36, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: float3d 5s ease-in-out infinite;
    transform-style: preserve-3d;
    max-width: 100%;
}

.badge-3d-float.secondary {
    animation-delay: -2.5s;
    border-color: rgba(0, 242, 254, 0.4);
}

@media (max-width: 768px) {
    .badge-3d-float {
        animation: none !important;
        transform: none !important;
        font-size: 0.8rem;
    }
    .card-3d-tilt {
        transform: none !important;
        perspective: none !important;
    }
}

@keyframes float3d {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
    }
    50% {
        transform: translateY(-12px) rotateX(6deg) rotateY(-4deg);
    }
}

/* 3D Levitating Hero Real Estate Emblem */
.hero-emblem-3d-wrap {
    position: relative;
    display: inline-block;
    perspective: 800px;
}

.hero-emblem-3d {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffd700 0%, #b8860b 60%, #4a3500 100%);
    box-shadow: 
        0 15px 35px rgba(229, 160, 36, 0.45),
        inset 0 -4px 10px rgba(0,0,0,0.6),
        inset 0 4px 10px rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate3dEmblem 12s linear infinite;
    transform-style: preserve-3d;
}

@keyframes rotate3dEmblem {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    50% { transform: rotateY(180deg) rotateX(-10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}

/* 5. INTERACTIVE 3D REAL ESTATE PLOT LAYOUT VISUALIZER */
.plot-viewer-3d-section {
    position: relative;
    padding: 80px 0;
    background: radial-gradient(circle at 50% 30%, rgba(16, 31, 74, 0.8) 0%, rgba(5, 11, 24, 0.98) 80%);
    border-top: 1px solid rgba(229, 160, 36, 0.25);
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    overflow: hidden;
}

/* Perspective stage for the 3D Master Plan */
.plot-3d-stage {
    perspective: 1400px;
    perspective-origin: 50% 35%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 10px;
}

.plot-3d-board {
    position: relative;
    width: 100%;
    max-width: 960px;
    background: linear-gradient(135deg, rgba(14, 26, 61, 0.92) 0%, rgba(6, 14, 34, 0.96) 100%);
    border-radius: 28px;
    border: 2px solid rgba(229, 160, 36, 0.4);
    box-shadow: 
        0 40px 80px -15px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(229, 160, 36, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 35px;
    transform-style: preserve-3d;
    transform: rotateX(24deg) rotateZ(-6deg);
    transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.6s ease;
}

.plot-3d-board.mode-top {
    transform: rotateX(0deg) rotateZ(0deg);
}

.plot-3d-board.mode-dramatic {
    transform: rotateX(36deg) rotateZ(-14deg);
}

/* 3D Depth Base / Layer beneath the board */
.plot-3d-board::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 34px;
    background: rgba(0, 242, 254, 0.08);
    transform: translateZ(-25px);
    z-index: -1;
    filter: blur(15px);
}

/* Plot Avenue & Roads inside 3D grid */
.plot-road-horizontal {
    height: 38px;
    background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
    border-radius: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.25);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translateZ(6px);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

/* Individual 3D Interactive Plot Tiles */
.plot-tile-3d {
    position: relative;
    background: rgba(16, 31, 74, 0.75);
    border: 1.5px solid rgba(0, 242, 254, 0.35);
    border-radius: 12px;
    padding: 16px 14px;
    cursor: pointer;
    transform-style: preserve-3d;
    transform: translateZ(10px);
    transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    min-height: 105px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.plot-tile-3d:hover {
    transform: translateZ(40px) scale(1.05);
    border-color: #ffd700;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(255, 215, 0, 0.4);
    z-index: 50;
    background: rgba(26, 47, 107, 0.95);
}

.plot-tile-3d.status-premium {
    border-color: rgba(229, 160, 36, 0.5);
    background: linear-gradient(135deg, rgba(229, 160, 36, 0.12) 0%, rgba(16, 31, 74, 0.8) 100%);
}

.plot-tile-3d.status-booked {
    border-color: rgba(239, 68, 68, 0.4);
    opacity: 0.7;
    cursor: not-allowed;
}

.plot-tile-3d.status-booked:hover {
    transform: translateZ(15px);
    box-shadow: none;
}

.plot-tile-number {
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.plot-tile-size {
    font-size: 0.7rem;
    color: #cbd5e1;
    font-weight: 600;
}

.plot-tile-badge {
    font-size: 0.62rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

/* 3D Plot Detail Popup Card */
.plot-info-box-3d {
    background: rgba(7, 13, 30, 0.95);
    border: 1.5px solid #ffd700;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 160, 36, 0.3);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

/* 6. Scroll 3D Reveal Observer */
.reveal-3d {
    opacity: 0;
    transform: perspective(1000px) rotateX(15deg) translateY(40px) scale(0.96);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-3d.active {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0px) scale(1);
}

/* Stagger delay helpers */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* 7. Shimmer 3D Light Sweep */
.shimmer-sweep {
    position: relative;
    overflow: hidden;
}

.shimmer-sweep::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: skewX(-25deg);
    animation: shimmerSweep 6s infinite;
}

@keyframes shimmerSweep {
    0% { left: -150%; }
    25%, 100% { left: 150%; }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .plot-3d-board {
        transform: rotateX(16deg) rotateZ(-4deg);
        padding: 20px;
    }
    #cursor-glow-3d {
        display: none !important; /* disabled on touch devices for battery */
    }
    .card-3d-tilt {
        transform: none !important;
        transform-style: flat !important;
        perspective: none !important;
    }
    .card-3d-tilt-inner {
        transform: none !important;
        transform-style: flat !important;
    }
    .card-3d-tilt [data-depth] {
        transform: none !important;
    }
    .card-3d-glare {
        display: none !important;
    }
}
