/* =========================================
   Global Variables & Premium Palette
   ========================================= */
:root {
    --bg-dark: #0b0f19;
    --card-bg: rgba(20, 27, 45, 0.7);
    --royal-blue: #1d4ed8;
    --sky-blue: #38bdf8;
    --purpleish: #7c3aed;
    --pastel-green: #86efac;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.08);
}

/* =========================================
   Resets & Typography
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

body {
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.text-gradient {
    /* 1. Expand the color palette for a richer flow */
    background: linear-gradient(
        135deg, 
        var(--sky-blue), 
        var(--pastel-green), 
        var(--purpleish), 
        var(--sky-blue)
    );
    
    /* 2. Stretch the background so there is room to animate it */
    background-size: 300% 300%;
    
    /* 3. Clip the background to the text shape */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* 4. Apply the continuous flowing animation */
    animation: flowGradient 6s ease infinite;
}

/* 5. Define the movement of the gradient */
@keyframes flowGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* =========================================
   Ambient Background Animations
   ========================================= */
.glow-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
}

.orb-1 {
    top: -100px;
    right: -50px;
    background: var(--purpleish);
}

.orb-2 {
    top: 500px;
    left: -100px;
    background: var(--royal-blue);
}

/* =========================================
   Global Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(12px);
    background: rgba(11, 15, 25, 0.75);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 2rem;
}

.nav-logo {
    height: 80px;
    width: auto;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--sky-blue);
}

/* =========================================
   Buttons & Calls to Action
   ========================================= */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal-blue), var(--purpleish));
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--sky-blue);
}

/* =========================================
   Global Animations & Layouts
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* =========================================
   Premium Global Footer
   ========================================= */
.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 5rem 2rem 2rem;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Responsive collapse for tablets */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* Responsive collapse for mobile */
@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.footer-logo {
    height: 100px;
    margin-bottom: 1.5rem;
    display: block;
}

.mission-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 320px;
    font-size: 0.95rem;
}

/* The subtle system operational ping */
.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(134, 239, 172, 0.05);
    border: 1px solid rgba(134, 239, 172, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    color: var(--pastel-green);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--pastel-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--pastel-green);
    animation: ping 2s infinite cubic-bezier(0, 0, 0.2, 1);
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--sky-blue);
    padding-left: 5px;
}

.location-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    padding: 0;
    margin: 0;
    display: inline;
    font-weight: 600;
}

.social-links a:hover {
    padding-left: 0;
    color: var(--purpleish);
}

/* Bottom Bar */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.built-with {
    color: rgba(156, 163, 175, 0.5) !important;
    font-family: monospace;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   TECHPOINT AGENCY - RESPONSIVE ARCHITECTURE
   Mobile-First & Desktop Collapse Breakpoints
   ========================================================================== */

/* --------------------------------------------------------------------------
   BREAKPOINT 1: Tablets & Small Laptops (Max Width: 1024px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
    /* Compress main container widths */
    .container {
        width: 90%;
        max-width: 900px;
    }

    /* Reduce massive hero typography slightly */
    h1 {
        font-size: 2.8rem;
    }

    /* Convert 4-column grids (like the footer) to 2 columns */
    .footer-container, 
    .services-grid, 
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* --------------------------------------------------------------------------
   HAMBURGER ICON BASE STYLES (Drawn here, hidden until mobile)
   -------------------------------------------------------------------------- */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 999; /* Keeps it above the sliding menu */
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #ffffff; /* White lines for dark theme */
}

/* --------------------------------------------------------------------------
   BREAKPOINT 2: Mobile Phones & Portrait Tablets (Max Width: 768px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    /* GLOBAL SPACING */
    section {
        padding: 4rem 0; /* Reduce vertical padding on mobile */
    }

    /* TYPOGRAPHY */
    h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    h2 {
        font-size: 1.8rem;
    }

    /* NAVIGATION BAR (Mobile Menu State) */
    .hamburger-menu {
        display: block; /* Show hamburger icon */
    }

    .nav-btn {
        display: none; /* Hide the Deploy/CTA button on small screens */
    }

    /* Slide-out Menu Panel */
    .nav-links {
        position: fixed;
        left: -100%; /* Start completely hidden off the left side */
        top: 70px; /* Adjust this to match your navbar height */
        flex-direction: column;
        background-color: #0a0a0a; /* Dark background matching theme */
        width: 100%;
        text-align: center;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 2rem 0;
        z-index: 998;
        display: flex; 
    }

    /* When JS adds the 'active' class, slide it in */
    .nav-links.active {
        left: 0; 
    }

    /* Clean spacing for the anchor tags on mobile */
    .nav-links a {
        display: block;
        margin: 1.5rem 0;
        font-size: 1.2rem;
    }

    /* Animate Hamburger into an 'X' */
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* ALIGNMENT GRIDS & FLEXBOXES */
    /* Stack elements vertically instead of side-by-side */
    .about-flex,
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    /* CONTACT PAGE SPECIFICS */
    /* Collapse the split-screen contact layout */
    .contact-container {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }
    
    .info-card {
        width: 100%;
        margin-bottom: 2rem;
    }

    .form-wrapper {
        width: 100%;
    }

    /* Form Rows (e.g., Name and Company side-by-side) */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        width: 100%;
    }

    /* FOOTER COLLAPSE */
    /* Convert 2 columns down to a single vertical stack */
    .footer-container,
    .services-grid, 
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    /* Center social icons in footer */
    .footer-col .social-links,
    .footer-col .location-text a {
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   BREAKPOINT 3: Small Mobile Devices (Max Width: 480px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 480px) {
    /* Compress edges even further for tiny screens */
    .container {
        width: 95%;
    }

    h1 {
        font-size: 1.8rem;
    }

    /* Make buttons full width for easier thumb tapping */
    .btn {
        width: 100%;
        text-align: center;
        display: block;
        margin-bottom: 1rem;
    }
    
    .info-card {
        padding: 1.5rem; /* Slightly less padding inside cards */
    }
}
/* Hide the mobile CTA on desktop by default */
.mobile-cta {
    display: none;
}

/* Hide the desktop CTA on mobile */
@media screen and (max-width: 768px) {
    .desktop-cta {
        display: none !important;
    }
    
    /* Show the mobile CTA when the menu is active */
    .mobile-cta {
        display: block;
        margin: 1.5rem auto; /* Centers it in the dropdown */
        width: 80%; /* Makes it span nicely across the menu */
    }
}
@media screen and (max-width: 768px) {
    .desktop-cta {
        display: none !important;
    }
    
    /* Increased specificity to override .nav-links a */
    .nav-links a.mobile-cta {
        display: block;
        margin: 1.5rem auto !important; 
        width: 80%;
        text-align: center;
    }
}
@media screen and (max-width: 480px) {
    /* Reduce container padding to free up horizontal space */
    .nav-container {
        padding: 0.5rem 1rem !important;
    }
    
    /* Scale the logo down so it stops pushing the hamburger out of bounds */
    .nav-logo {
        height: 45px !important; 
    }
}
/* Prevent horizontal scroll globally on mobile */
html, body {
    overflow-x: hidden;
}

@media screen and (max-width: 768px) {
    .arch-case, .arch-visual {
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Shrink the visual nodes to fit the screen */
    .node-network, .pipeline-network {
        transform: scale(0.85);
        transform-origin: center center;
        max-width: 100vw;
    }
    
    .tech-badges {
        flex-wrap: wrap;
        justify-content: center;
    }
}
@media screen and (max-width: 768px) {
    /* Center the block-level logo image */
    .footer-logo {
        margin: 0 auto 1.5rem auto !important; 
    }
    
    /* Center the paragraph text below the logo */
    .mission-text {
        margin: 0 auto 1.5rem auto;
    }

    /* Center the status dot badge */
    .footer-status {
        margin: 0 auto;
        display: flex;
        justify-content: center;
        width: fit-content;
    }

    /* Override the inline display: flex to center the map icon and text */
    .footer-col .location-text a {
        justify-content: center !important;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    /* Stack the hero buttons and add spacing */
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem; /* This creates the perfect space between them */
        width: 100%;
    }
    
    /* Ensure the buttons stretch to fill the mobile screen uniformly */
    .hero-actions .btn {
        width: 100%;
        margin-bottom: 0; /* Resets any margins so 'gap' handles the spacing */
    }
}