@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-dark: #050b14;
    --primary-blue: #003a7a;        /* Deep blue from logo */
    --accent-blue: #008cd6;         /* Cyan/water blue from logo */
    --primary-green: #1b6e1b;       /* Dark green from logo */
    --light-green: #689f38;         /* Light green from logo */
    --silver: #a0acbc;              /* Border silver from logo */
    --gradient-blue: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    --gradient-green: linear-gradient(135deg, var(--primary-green), var(--light-green));
    --text-main: #111827;
    --text-muted: #4b5563;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    /* Removed overflow: hidden so you can scroll! */
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* This perspective enables the 3D transforms */
    perspective: 1500px;
    position: relative;
}

/* =======================================================
   3D Particle Background Setup (Kept as requested)
   ======================================================= */
#canvas {
    position: fixed; /* so it stays during scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Dynamic Glow Spheres Setup */
.glow-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.45;
    animation: drift 25s infinite alternate ease-in-out;
}

.sphere-1 {
    width: 650px; height: 650px;
    background: radial-gradient(circle, rgba(0,77,153,0.8), transparent);
    top: -200px; left: -200px;
}

.sphere-2 {
    width: 550px; height: 550px;
    background: radial-gradient(circle, rgba(34,139,34,0.6), transparent);
    bottom: -150px; right: -150px;
    animation-delay: -5s;
}

.sphere-3 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(0,162,232,0.6), transparent);
    top: 30%; left: 40%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(150px, 80px) scale(1.15); }
}

/* =======================================================
   3D Scene Container & Grid Card
   ======================================================= */
.scene {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    position: relative;
    padding: 60px 20px; /* added top/bottom padding for mobile scrolling */
}

/* 3D Main Card Container */
.card-3d {
    width: 90%;
    max-width: 950px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 5px; 
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.8),
        0 0 50px rgba(0, 162, 232, 0.2),
        inset 0 0 40px rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    will-change: transform;
}

.card-3d.transitioning {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3D Silver/Metallic Border Ring representing the Logo Border */
.card-border {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(160,172,188,0.5) 50%, rgba(255,255,255,0.7) 100%);
    z-index: -1;
    transform: translateZ(-2px);
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* 
  THIS IS WHERE THE THEME BECOMES "LOGO COLORED". 
  Background is glowing light, text is logo colored.
*/
.card-content {
    background: #ffffff; /* pure white background inside just like the logo */
    border-radius: 25px;
    padding: 5rem 5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform-style: preserve-3d;
    box-shadow: inset 0 0 30px rgba(160, 172, 188, 0.1);
}

/* =======================================================
   Enhanced Floating Logo Section
   ======================================================= */
.logo-wrapper {
    position: relative;
    margin-bottom: 2rem;
    padding: 10px;
    background: transparent;
    border-radius: 10px;
    /* Logo pops out heavily */
    transform: translateZ(90px); 
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.logo-wrapper:hover {
    transform: translateZ(120px) scale(1.05);
}

/* Glowing shadow around logo itself */
.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(circle, rgba(0,162,232,0.3) 0%, transparent 70%);
    filter: blur(25px);
    opacity: 0.8;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.logo-wrapper:hover .logo-glow { opacity: 1; filter: blur(35px); background: radial-gradient(circle, rgba(139,195,74,0.3) 0%, transparent 70%); }

.logo {
    max-width: 450px;
    width: 100%;
    display: block;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.15));
    border-radius: 15px; /* helps with image edge anomalies */
}

/* =======================================================
   3D Typographic Elements (Logo Colors)
   ======================================================= */
.text-content {
    /* Text pops out midway */
    transform: translateZ(50px);
    width: 100%;
}

.company-title {
    margin-bottom: 2rem;
    line-height: 1.25;
}

.gradient-text {
    font-size: 3.8rem;
    font-weight: 800;
    /* Blue to Green gradient matching Logo */
    background: linear-gradient(to right, var(--primary-blue), var(--accent-blue), var(--light-green), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    text-shadow: 0 10px 20px rgba(0, 162, 232, 0.15);
}

.company-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-blue);
    display: inline-block;
    margin-top: 10px;
    text-transform: uppercase;
}

/* =======================================================
   Hover Pop Tags
   ======================================================= */
.tags-3d {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 2.5rem 0;
    transform-style: preserve-3d;
}

.tag {
    background: #ffffff;
    border: 2px solid var(--accent-blue);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Tags slightly floating */
    transform: translateZ(25px);
}

.tag i {
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.tag:hover {
    transform: translateZ(50px) translateY(-5px);
    background: var(--gradient-blue);
    border-color: transparent;
    box-shadow: 0 15px 25px rgba(0, 162, 232, 0.25);
    color: #fff;
}
.tag:hover i {
    color: #fff;
}

/* Sustainability Tag Green */
.tag:nth-child(2) { border-color: var(--light-green); color: var(--primary-green); }
.tag:nth-child(2) i { color: var(--light-green); }
.tag:nth-child(2):hover {
    background: var(--gradient-green);
    border-color: transparent;
    box-shadow: 0 15px 25px rgba(139, 195, 74, 0.3);
    color: #fff;
}

/* Innovation Tag Blue */
.tag:nth-child(3) { border-color: var(--primary-blue); color: var(--primary-blue); }
.tag:nth-child(3) i { color: var(--primary-blue); }
.tag:nth-child(3):hover {
    background: linear-gradient(135deg, #004d99, #002244);
    border-color: transparent;
    box-shadow: 0 15px 25px rgba(0, 77, 153, 0.3);
    color: #fff;
}

/* =======================================================
   Modern Alert / Feature Box
   ======================================================= */
.construction-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid rgba(160, 172, 188, 0.3);
    border-left: 5px solid var(--accent-blue);
    border-radius: 18px;
    padding: 1.8rem 2.5rem;
    margin: 0 auto;
    max-width: 680px;
    text-align: left;
    transform: translateZ(35px);
    transition: transform 0.4s ease, border-left-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}

.construction-box:hover {
    transform: translateZ(55px);
    border-left-color: var(--light-green);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.pulsing-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(0, 162, 232, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    color: var(--accent-blue);
    margin-right: 25px;
    position: relative;
    flex-shrink: 0;
}

.pulsing-circle::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    animation: ripple 2.5s infinite ease-out;
}

@keyframes ripple {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.construction-text h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
    color: var(--primary-blue);
    font-weight: 800;
}

.construction-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 500;
}

/* =======================================================
   Dynamic 3D Contact Button Footer
   ======================================================= */
.card-footer {
    width: 100%;
    margin-top: 3.5rem;
    border-top: 1px solid rgba(160, 172, 188, 0.3);
    padding-top: 3rem;
    transform: translateZ(60px);
}

.contact-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--silver);
    letter-spacing: 3px;
    margin-bottom: 1.2rem;
}

.btn-3d {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 1.2rem 3.5rem;
    border-radius: 50px;
    /* Use Logo blue to green gradient */
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 15px 25px rgba(0, 77, 153, 0.25),
        inset 0 2px 2px rgba(255,255,255,0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

/* Light Swipe Effect */
.btn-3d::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.7s ease;
}

.btn-3d:hover {
    transform: translateY(-5px) scale(1.03) translateZ(30px);
    background: linear-gradient(135deg, var(--accent-blue), var(--light-green));
    box-shadow: 
        0 25px 45px rgba(34, 139, 34, 0.3),
        0 0 30px rgba(0, 162, 232, 0.3),
        inset 0 2px 2px rgba(255,255,255,0.5);
    color: white; /* ensure color stays white */
}

.btn-3d:hover::before { left: 100%; }

/* =======================================================
   Responsive Design Handling
   ======================================================= */
@media (max-width: 1024px) {
    .card-content { padding: 4rem 3rem; }
    .gradient-text { font-size: 3rem; }
    .logo { max-width: 350px; }
}

@media (max-width: 768px) {
    /* Base fixes to ensure background and body cover the screen perfectly */
    html, body { overflow-x: hidden; width: 100%; }
    
    .scene { padding: 20px 10px; min-height: 100vh; }

    .card-3d { 
        transform: none !important; 
        margin: 0; 
        width: 100%; 
        border-radius: 20px;
    }
    
    .card-content { padding: 2rem 1.2rem; border-radius: 18px; }
    .card-border { border-radius: 20px; }

    /* Zero out Z-translations for mobile to prevent overflow */
    .logo-wrapper, .text-content, .tags-3d, .tag, .construction-box, .card-footer {
        transform: none !important;
    }
    
    .logo { max-width: 250px; margin: 0 auto; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); }
    .logo-wrapper { padding: 0; margin-bottom: 1.5rem; background: none; }
    .logo-glow { display: none; } /* Disable heavy glow on mobile to avoid boxed look */
    
    .gradient-text { font-size: 2rem; line-height: 1.2; }
    .company-title { margin-bottom: 1.5rem; }
    .company-subtitle { font-size: 0.8rem; letter-spacing: 1.5px; line-height: 1.4; display: block; margin-top: 8px; }
    
    /* Tags layout optimized for row placement on mobile */
    .tags-3d { flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; flex-direction: row; }
    .tag { padding: 0.5rem 0.8rem; font-size: 0.75rem; border-width: 1.5px; gap: 5px; }
    .tag i { font-size: 0.9rem; }
    
    /* Construction box layout fixed (removed left border for top border) */
    .construction-box { 
        flex-direction: column; 
        text-align: center; 
        padding: 1.5rem 1rem; 
        border-left: none;
        border-top: 4px solid var(--accent-blue);
        border-radius: 15px;
        margin: 0 auto;
    }
    .pulsing-circle { margin-right: 0; margin-bottom: 15px; width: 55px; height: 55px; font-size: 1.4rem; }
    .construction-text h2 { font-size: 1.3rem; }
    .construction-text p { font-size: 0.95rem; }
    
    /* Footer & Button optimized */
    .card-footer { padding-top: 2rem; margin-top: 2.5rem; }
    .contact-label { font-size: 0.85rem; letter-spacing: 2px; }
    .btn-3d { font-size: 1.15rem; padding: 1rem; width: 100%; justify-content: center; }
}
