/* ======================================
   GLOBAL THEME — RED / BLACK / GLASS
====================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #0c0c0f;
    color: #f5f5f5;
    padding-top: 80px;
    overflow-x: hidden;
    position: relative;
}

/* Animated Noise Texture Overlay */

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

/* Subtle Red Gradient Glow */

body::before {
    content: "";
    position: fixed;
    width: 900px;
    height: 900px;
    top: -250px;
    right: -200px;
    background: radial-gradient(circle, rgba(220,38,38,0.18), transparent 65%);
    filter: blur(140px);
    animation: floatGlow 14s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes floatGlow {
    0% { transform: translateY(0px); }
    100% { transform: translateY(120px); }
}

/* Particle Background */

#particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(rgba(255, 60, 60, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: particleMove 60s linear infinite;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

@keyframes particleMove {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}


/* Sections with smooth reveal */

.section {
    padding: 120px 0;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s ease;
    position: relative;
    z-index: 2;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* NAVBAR */

.navbar {
    background: rgba(12,12,15,0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-link {
    color: #d4d4d8 !important;
    margin-left: 25px;
}

.nav-link:hover {
    color: #ef4444 !important;
}

.btn-primary-custom {
    background: #dc2626;
    border: none;
    padding: 10px 26px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s ease;
}

.btn-primary-custom:hover {
    background: #b91c1c;
}

/* HERO */

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    text-align: left;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
}

.hero h1 span {
    color: #ef4444;
}

.hero p {
    color: #a1a1aa;
    max-width: 600px;
    margin-top: 20px;
}

/* Glass Cards */

.glass-card {
    background: rgba(20,20,24,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 50px;
    transition: 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.glass-card:hover {
    transform: translateY(-12px);
    border-color: rgba(239,68,68,0.5);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Services Grid */
/* Desktop → 4 in one row, Tablet → 2 per row, Mobile → 1 per row */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Parallax Depth Layer */

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, transparent, #0c0c0f);
    top: 0;
    z-index: 1;
}

/* Footer */

.footer {
    padding: 60px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #71717a;
}

/* Architecture Flow */

.arch-quote {
    font-size: 1.4rem;
    font-style: italic;
    max-width: 900px;
    margin: 0 auto;
    color: #ff3c3c;
    line-height: 1.6;
}

@media (min-width: 1200px) {
    .arch-quote {
        white-space: nowrap;
    }
}

.architecture-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.flow-layer {
    position: relative;
    cursor: pointer;
    padding: 15px 25px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeInUp 1s ease forwards;
}

.flow-layer::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.flow-layer:hover::after {
    opacity: 1;
    bottom: -55px;
}
    

.flow-connector {
    height: 2px;
    flex: 1;
    background: linear-gradient(90deg, transparent, #ff3c3c, transparent);
    animation: pulse 2s infinite;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.tech-item {
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    transition: 0.3s ease;
    font-weight: 500;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255,60,60,0.25);
}

/* Layered Stack */

.stack-container {
    max-width: 600px;
    margin: auto;
}

.stack-layer {
    padding: 15px;
    margin: 8px 0;
    text-align: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform-style: preserve-3d;
}

.stack-layer:hover {
    box-shadow: 0 10px 40px rgba(255, 60, 60, 0.2);
}

/* Animations */

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}