/* =========================================
   gMec Apps - Design System Premium (Ultra Modern)
   ========================================= */

:root {
    /* Color Palette */
    --clr-bg: #020205; /* Deepest black with a hint of blue */
    --clr-surface: rgba(10, 12, 20, 0.4);
    --clr-surface-border: rgba(255, 255, 255, 0.06);
    --clr-surface-light: rgba(255, 255, 255, 0.05);
    
    --clr-primary: #E2E8F0;
    --clr-secondary: #9DC1FB;
    --clr-accent: #3b82f6;
    --clr-accent-glow: rgba(59, 130, 246, 0.4);
    
    --clr-text: #F8FAFC;
    --clr-text-muted: #8B9BB4;
    
    /* Typography */
    --font-main: 'Inter', system-ui, sans-serif;
    
    /* Spacing & Sizes */
    --border-radius-sm: 12px;
    --border-radius: 24px;
    --border-radius-lg: 32px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Subtle Film Grain / Noise Texture */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }
img { max-width: 100%; height: auto; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding { padding: 120px 0; }

/* =========================================
   Background Ambient (Animated Blobs)
   ========================================= */
.bg-glow {
    position: fixed;
    top: -20%; left: -10%;
    width: 80vw; height: 80vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(157, 193, 251, 0.12) 0%, rgba(2, 2, 5, 0) 60%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    animation: drift 20s infinite alternate ease-in-out;
}

.bg-glow-2 {
    top: 30%; left: auto; right: -20%;
    width: 70vw; height: 70vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(2, 2, 5, 0) 60%);
    animation: drift 25s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(10%, 5%); }
}

/* =========================================
   Typography & Gradients
   ========================================= */
.text-gradient {
    background: linear-gradient(135deg, #FFFFFF 10%, #C4DAFC 50%, #7da6ee 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.section-desc {
    color: var(--clr-text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-header { text-align: center; }

/* =========================================
   Buttons (Magnetic / Premium feel)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 100px; /* Fully rounded premium feel */
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.w-full { width: 100%; }

.btn-primary {
    background-color: transparent;
    color: var(--clr-text);
    border: 1px solid var(--clr-surface-border);
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    background-color: var(--clr-surface-light);
    border-color: rgba(255,255,255,0.2);
}

.btn-secondary {
    background-color: rgba(255,255,255,0.03);
    color: var(--clr-text);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-glow {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05), inset 0 0 10px rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: all 0.6s ease;
}

.btn-glow:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 10px 30px var(--clr-accent-glow), inset 0 0 15px rgba(255,255,255,0.2);
}

.btn-glow:hover::after { left: 200%; }

/* =========================================
   Navigation (Glassmorphism solid)
   ========================================= */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 24px 0;
    z-index: 100;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(2, 2, 5, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--clr-surface-border);
    padding: 16px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
}

.logo-accent {
    color: var(--clr-secondary);
}

.desktop-menu { display: flex; align-items: center; gap: 36px; }

.nav-link {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0%; height: 2px;
    background: var(--clr-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover { color: var(--clr-text); }
.nav-link:hover::after { width: 100%; }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--clr-text); cursor: pointer; }

.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: rgba(2, 2, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--clr-surface-border);
    padding: 20px 5%;
}

.mobile-menu.active { display: flex; }
.mobile-link { padding: 16px 0; border-bottom: 1px solid var(--clr-surface-border); color: var(--clr-text); font-weight: 500; }
.mobile-link:last-child { border-bottom: none; }

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    justify-content: center;
    text-align: center;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 0 10px rgba(255,255,255,0.03);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--clr-secondary);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    color: #fff;
    max-width: 1000px;
    margin-inline: auto;
    text-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--clr-text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Perspective Grid (Infinite moving) */
.perspective-grid {
    position: absolute;
    bottom: -150px; left: 0;
    width: 100%; height: 500px;
    background-image: 
        linear-gradient(to right, rgba(157, 193, 251, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(157, 193, 251, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(700px) rotateX(75deg) scale(2.5);
    transform-origin: top center;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 5%, transparent 70%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 5%, transparent 70%);
    z-index: -1;
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 60px; }
}

/* =========================================
   Services Section (Rich Cards)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--clr-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--clr-surface-border);
    padding: 50px 40px;
    border-radius: var(--border-radius);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Inner Glow Effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.service-card > * { position: relative; z-index: 2; }

.service-card:hover {
    border-color: rgba(157, 193, 251, 0.2);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 30px rgba(46, 111, 245, 0.15);
}

.service-card:hover::before { opacity: 1; }

.card-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 30px;
    transition: var(--transition);
}

.service-card:hover .card-icon {
    background: var(--clr-primary);
    color: var(--clr-bg);
    transform: scale(1.1) translateZ(20px);
    box-shadow: 0 10px 20px rgba(196, 218, 252, 0.3);
}

.service-card h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 16px;
    transform: translateZ(30px);
}

.service-card p {
    color: var(--clr-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    transform: translateZ(20px);
}

/* =========================================
   Contact Section
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    background: var(--clr-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--clr-surface-border);
    border-radius: var(--border-radius-lg);
    padding: 80px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* Optional soft highlight on contact form top edge */
.contact-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.contact-info h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.contact-info p {
    color: var(--clr-text-muted);
    margin-bottom: 50px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.contact-method {
    display: flex; align-items: center; gap: 20px;
    color: #fff; font-weight: 500; font-size: 1.1rem;
}

.method-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--clr-primary);
}

.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 10px; }

.form-group label {
    font-size: 0.9rem; font-weight: 500;
    color: var(--clr-primary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: rgba(157, 193, 251, 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 4px rgba(157, 193, 251, 0.1);
}

.form-status {
    padding: 16px; border-radius: var(--border-radius-sm);
    font-size: 0.95rem; display: none; font-weight: 500;
}

.form-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1); color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1); color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: radial-gradient(circle at bottom, rgba(46, 111, 245, 0.05) 0%, transparent 50%);
}

.footer-content {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; margin-bottom: 50px;
}

.footer-desc {
    color: var(--clr-text-muted); margin-top: 20px;
    max-width: 350px; font-size: 1rem;
}

.footer-bottom {
    text-align: center; padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--clr-text-muted); font-size: 0.9rem;
}

/* =========================================
   Animations & Reveals
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1; transform: translateY(0);
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
    .contact-wrapper { grid-template-columns: 1fr; padding: 50px 40px; gap: 50px; }
}

@media (max-width: 768px) {
    .desktop-menu { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-title { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
    .section-padding { padding: 80px 0; }
    .contact-wrapper { padding: 40px 24px; }
}
