/* Dark Tech Variables & Reset */
:root {
    --bg-base: #050505;
    --bg-surface: rgba(10, 12, 16, 0.75);
    --bg-glass: rgba(10, 12, 16, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --border-color: #1f2937;
    --accent: #00f0ff; /* Neon Cyan */
    --accent-glow: 0 0 20px rgba(0, 240, 255, 0.4);
    --error-color: #ff3366; /* Neon Red for system errors */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Subtle Tech Grid Background Overlay */
.tech-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

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

/* Navigation - Glassmorphism & Fixed Padding */
nav {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0; 
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem; 
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

/* Logo Link Styling */
.logo a {
    text-decoration: none;
    color: inherit;
    transition: text-shadow 0.3s ease;
}

.logo a:hover {
    text-shadow: var(--accent-glow);
}

.accent-text { color: var(--accent); }

/* Hero Section */
.hero {
    position: relative;
    padding: 16rem 0 12rem;
    background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(5,5,5,0.7) 0%, rgba(5,5,5,1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(255,255,255,0.1);
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-secondary);
    margin: 0 auto 3rem auto;
    font-weight: 400;
}

/* Buttons */
.button-group { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.button-group .btn {
    width: 320px; 
    max-width: 100%;
    text-align: center; 
}

.btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border-radius: 2px;
}

.btn-primary { 
    background-color: var(--accent); 
    color: #000; 
    border: 1px solid var(--accent); 
    box-shadow: var(--accent-glow);
}

.btn-primary:hover { 
    background-color: #fff; 
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    transform: translateY(-2px); 
}

.btn-secondary { 
    background-color: transparent; 
    color: #fff; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
}

.btn-secondary:hover { 
    background-color: rgba(255, 255, 255, 0.05); 
    border-color: var(--accent); 
    color: var(--accent);
    transform: translateY(-2px); 
}

/* Services Section - SERVER ROOM BACKGROUND */
.services-section { 
    padding: 6rem 0 8rem; 
    position: relative; 
    z-index: 2; 
    background-image: 
        linear-gradient(rgba(5, 5, 5, 0.9), rgba(5, 5, 5, 0.95)), 
        url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?auto=format&fit=crop&w=1920&q=80'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Tech Card Styling & Layout */
.service-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: transparent;
    transition: background 0.4s ease;
    z-index: 10;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), var(--accent-glow);
    background: rgba(10, 12, 16, 0.9);
}

.service-card:hover::before {
    background: var(--accent);
}

/* Grayscale to Color Hover Effect */
.service-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    margin: 0; 
}

.service-image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(to top, rgba(10, 12, 16, 1), transparent);
    pointer-events: none;
}

.service-image img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%) contrast(1.2) brightness(0.7);
    transition: all 0.6s ease;
}

.service-card:hover .service-image img { 
    filter: grayscale(0%) contrast(1.1) brightness(1);
    transform: scale(1.05); 
}

/* Bulletproof Text Padding */
.card-content { 
    padding: 2.5rem; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Fallback padding */
.service-card > h2,
.service-card > p {
    padding: 0 2.5rem;
}

.service-card > h2, .card-content h2 { 
    margin-top: 2rem; 
    font-size: 1.3rem; 
    font-weight: 600; 
    margin-bottom: 1rem; 
    color: #fff;
    letter-spacing: 0.02em;
}

.card-content h2 { margin-top: 0; }

/* Flex-grow 1 applied here to align the feature lists */
.service-card > p, .card-content p { 
    color: var(--text-secondary); 
    margin-bottom: 1.5rem; 
    font-size: 0.95rem; 
    flex-grow: 1; 
}

.feature-list { 
    list-style: none; 
    margin-top: auto; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    padding-top: 1.5rem;
    margin-left: 2.5rem;
    margin-right: 2.5rem;
    margin-bottom: 2.5rem;
}

.card-content .feature-list {
    margin-left: 0; margin-right: 0; margin-bottom: 0;
}

.feature-list li { 
    font-size: 0.9rem; 
    color: #d1d5db; 
    margin-bottom: 0.8rem; 
    display: flex; 
    align-items: flex-start; 
}

.feature-list li::before { 
    content: "/>"; 
    margin-right: 0.8rem; 
    color: var(--accent); 
    font-family: monospace; 
    font-weight: bold; 
}

/* Contact Form - GLOBAL NETWORK BACKGROUND */
.contact-section { 
    padding: 8rem 0 10rem; 
    text-align: center; 
    position: relative; 
    z-index: 2; 
    background-image: 
        linear-gradient(rgba(5, 5, 5, 0.95), rgba(5, 5, 5, 0.85)), 
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1920&q=80'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.contact-container { max-width: 600px; margin: 0 auto; position: relative; z-index: 3; }
.contact-container h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 1rem; }
.contact-container p { color: var(--text-secondary); margin-bottom: 3rem; }

.form-group { margin-bottom: 1.5rem; text-align: left; position: relative; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    border-radius: 2px;
    font-family: monospace; 
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder, .form-group textarea::placeholder { color: #4b5563; }

.form-group input:focus, .form-group textarea:focus {
    outline: none; 
    border-color: var(--accent); 
    background-color: rgba(10, 12, 16, 0.9);
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.1);
}

/* Inline Error State Styling */
.form-group input.error-state, .form-group textarea.error-state {
    border-color: var(--error-color);
    box-shadow: inset 0 0 10px rgba(255, 51, 102, 0.2);
}

.form-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-family: monospace;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.form-error.active {
    opacity: 1;
    transform: translateY(0);
}

.contact-form button { width: 100%; padding: 1.2rem; font-family: inherit; margin-top: 1rem; }

/* AJAX Success Message Styling */
.hidden { display: none !important; }

.form-success {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 3rem 2rem;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.form-success.active {
    opacity: 1;
    transform: translateY(0);
}

.form-success h3 {
    color: var(--accent);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-success p {
    color: #d1d5db;
    font-size: 1rem;
}

/* Footer */
footer { 
    padding: 3rem 0; 
    text-align: center; 
    color: #4b5563; 
    font-size: 0.85rem; 
    font-family: monospace; 
    border-top: 1px solid var(--border-color);
    background: var(--bg-base);
    position: relative;
    z-index: 10;
}

/* Animation Classes */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero { padding: 8rem 0 6rem; }
    
    .button-group {
        flex-direction: column;
        width: 100%;
    }
    .button-group .btn {
        width: 100%;
    }
    
    .services-section { padding: 4rem 0 5rem; }
    .contact-section { padding: 5rem 0 6rem; }
    
    .card-content { padding: 1.5rem; }
    .service-card > h2, .service-card > p { padding: 0 1.5rem; }
    .feature-list { margin-left: 1.5rem; margin-right: 1.5rem; margin-bottom: 1.5rem; }
    .services-grid { gap: 1.5rem; }
    .container { padding: 0 1.5rem; }
    
    .services-section, .contact-section, .hero { background-attachment: scroll; }
}