/* 
   MG Creations - Ultra-Premium Dark Theme v3
   Author: MG Creations
*/

:root {
    --bg-color: #030303;
    --bg-secondary: #080808;
    --card-bg: rgba(30, 30, 30, 0.4);
    /* Much more visible base */
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #cccccc;
    /* Lighter muted text for better readiblity */

    /* Neon Palette */
    --primary: #00fff2;
    /* Electric Cyan */
    --secondary: #d500f9;
    /* Vivid Purple */
    --accent: #ff0055;
    /* Cyber Pink */

    --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-text: linear-gradient(90deg, #fff, var(--primary), var(--secondary));

    --glass-border: 1px solid rgba(255, 255, 255, 0.05);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: #030303;
    /* Fallback */
}

body {
    background-color: #030303;
    /* Fallback */
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Noise Texture Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    width: 40px;
    height: 40px;
}

/* Background Ambient Glow */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -2;
    animation: floatingGlow 15s infinite alternate;
}

body::before {
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    top: -20%;
    left: -10%;
}

body::after {
    background: radial-gradient(circle, var(--primary), transparent 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes floatingGlow {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Utilities */
.container {
    max-width: 1400px;
    /* Wider for more cinematic feel */
    margin: 0 auto;
    padding: 0 40px;
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 255, 242, 0.4);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

ul {
    list-style: none;
}

/* Magnetic Buttons */
.btn-magnetic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    border-radius: 100px;
    font-weight: 500;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    transition: all 0.1s;
    /* Fast transition for magnetic feel */
    cursor: none;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    /* Cyan hover instead of white */
    z-index: -1;
    transition: transform 0.4s var(--ease-out-expo);
    transform: scaleX(0);
    transform-origin: left;
}

.btn-primary:hover {
    color: #000;
    border-color: #fff;
}

.btn-primary:hover::before {
    transform: scaleX(1);
}

.btn-secondary {
    color: var(--text-muted);
    margin-left: 20px;
}

.btn-secondary:hover {
    color: #fff;
}

.w-100 {
    width: 100%;
    margin-top: 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 0;
    z-index: 1000;
    transition: padding 0.4s var(--ease-out-expo), background 0.4s;
    mix-blend-mode: difference;
    color: white;
}

.navbar.scrolled {
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    mix-blend-mode: normal;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 50px;
    align-items: center;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    position: relative;
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s;
    margin-top: 4px;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.hero-content {
    text-align: center;
    max-width: 1000px;
    z-index: 2;
    transform-style: preserve-3d;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: -2px;
    color: var(--text-main);
    mix-blend-mode: normal;
    opacity: 1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Services Section */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    margin-bottom: 100px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 300px;
    text-align: right;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    perspective: 2000px;
    /* Essential for 3D tilt */
}

.service-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.1s, box-shadow 0.3s, border-color 0.3s, background 0.3s;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.service-card:hover {
    border-color: var(--primary);
    background: rgba(40, 40, 40, 0.8);
    box-shadow: 0 20px 40px -20px rgba(0, 255, 242, 0.3);
}

/* Inner content needs to pop out */
.card-content {
    transform: translateZ(40px);
}

.icon-box {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 40px;
    display: inline-block;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.service-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

/* Contact Section */
.contact {
    position: relative;
    overflow: hidden;
}

/* Ambient glow specifically for contact */
.contact::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    opacity: 0.1;
    z-index: 0;
    filter: blur(80px);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.contact-info .section-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.contact-details {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.1rem;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.contact-item-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Premium Form Card */
.contact-form-wrapper {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-text);
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Ultra-Premium Submit Button */
.contact-form .btn-primary {
    background: var(--gradient-main);
    border: none;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 20px 40px;
    border-radius: 50px;
    width: 100%;
    margin-top: 10px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 30px -10px var(--secondary);
}

.contact-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    z-index: -1;
    transition: opacity 0.3s;
    opacity: 0;
}

.contact-form .btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px var(--primary);
    color: #fff;
    border-color: transparent;
}

.contact-form .btn-primary:hover::before {
    opacity: 1;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.success-message i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
    text-shadow: 0 0 20px rgba(0, 255, 242, 0.5);
}

.success-message h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
}

.success-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.success-message i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
    text-shadow: 0 0 20px rgba(0, 255, 242, 0.5);
}

.success-message h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
}

.success-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    padding: 100px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.social-links {
    display: flex;
    gap: 30px;
}

.social-links a {
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .section-subtitle {
        text-align: left;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .container {
        padding: 0 25px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* Canvas Background - Fixed Z-Index */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Behind everything */
    pointer-events: none;
    opacity: 0.3;
}

/* Infinite Marquee */
.marquee-container {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
    /* User requested rotation back */
    transform: rotate(-10deg) scale(1);
    /* Attempt to fix blurriness with hardware acceleration hints */
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    margin: 40px 0;
}

.marquee-track {
    display: flex;
    width: fit-content;
    animation: marqueeScroll 40s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    margin: 0 40px;
    text-transform: uppercase;
    transition: color 0.5s;
    animation: textHighlight 3s infinite alternate;
}

.marquee-content .separator {
    color: var(--primary);
    -webkit-text-stroke: 0;
    font-size: 1.5rem;
    animation: none;
    /* Removed box-shadow per user request ("point shadow looks not good") */
    box-shadow: none;
    border-radius: 50%;
}

.marquee-container:hover .marquee-content span {
    animation-play-state: paused;
    color: #fff;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    /* Even brighter on hover */
    cursor: default;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-25%);
    }
}

@keyframes textHighlight {
    0% {
        color: transparent;
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
        text-shadow: none;
    }

    100% {
        color: #fff;
        -webkit-text-stroke: 1px #fff;
        /* Increased brightness: larger and stronger shadow */
        text-shadow: 0 0 25px rgba(255, 255, 255, 0.9);
    }
}