/* Variables & Theme */
:root {
    --bg: #ffffff;
    --fg: #1a1a1a;
    --gray-light: #f5f5f5;
    --gray-med: #e0e0e0;
    --gray-dark: #666666;
    --accent: #000000;
    --mono: 'Courier New', Courier, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--mono);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevents horizontal scroll on mobile */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    /* Increased horizontal padding */
}

/* Background Grid */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--gray-med) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: -1;
}

/* Navigation - Mobile Optimized */
nav {
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-med);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-weight: 900;
    font-size: 1rem;
    border-left: 4px solid var(--accent);
    padding-left: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--fg);
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Enhanced Hero Padding */
.hero {
    padding: 160px 0 120px 0;
    /* Top padding creates a "stage" for the headline */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60vh;
    /* Ensures the hero takes up significant vertical space */
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--fg);
    color: var(--bg);
    font-size: 0.65rem;
    margin-bottom: 20px;
}

h1.typewriter {
    font-size: 2.2rem;
    /* Scaled down for mobile defaults */
    font-weight: bold;
    margin-bottom: 20px;
    border-right: 3px solid var(--accent);
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: typing 2.5s steps(25, end) forwards, blink 0.8s infinite;
}

.hero-desc {
    max-width: 500px;
    color: var(--gray-dark);
    font-size: 1rem;
}

/* Bento Grid - Responsive Stacking */
.section-header {
    margin-top: 60px;
    margin-bottom: 30px;
}

.step {
    font-size: 0.6rem;
    color: var(--gray-dark);
    display: block;
    margin-bottom: 5px;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Desktop layout */
    gap: 15px;
}

.bento-item {
    background: var(--gray-light);
    padding: 30px;
    border: 1px solid var(--gray-med);
    transition: 0.3s;
}

.main-card {
    grid-row: span 2;
}

/* Product Showcase */
.product-showcase {
    display: flex;
    background: var(--fg);
    color: var(--bg);
    padding: 40px;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.product-content {
    flex: 1;
}

.product-visual {
    flex: 1;
    height: 150px;
    background: #222;
    position: relative;
    border: 1px solid #444;
}

/* Desktop Button */
.btn-primary {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;
    background: var(--bg);
    color: var(--fg);
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid var(--bg);
}

/* Footer */
footer {
    padding: 30px 0;
    border-top: 1px solid var(--gray-med);
    font-size: 0.65rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ======================================
   MOBILE MEDIA QUERIES (The Magic Part)
   ====================================== 
*/

@media (max-width: 768px) {
    h1.typewriter {
        font-size: 1.4rem;
        /* Smaller font to fit screen width */
        white-space: normal;
        /* Allow wrap if text is too long */
        width: 100%;
        animation: none;
        /* Disable typewriter on mobile for better UX */
        border-right: none;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a .num {
        display: none;
    }

    /* Hide numbers to save space */

    .bento-grid {
        grid-template-columns: 1fr;
        /* Stack cards vertically */
    }

    .main-card {
        grid-row: auto;
    }

    .product-showcase {
        flex-direction: column;
        /* Stack product info and visual */
        text-align: center;
        padding: 30px 20px;
    }

    .product-visual {
        width: 100%;
    }

    .container {
        padding: 0 25px;
    }

    .hero {
        padding: 80px 20px 60px 20px;
        /* Reduced for mobile but still spacious */
        min-height: auto;
    }

    .contact-card h2 {
        font-size: 1.3rem;
    }

    .email-btn {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink {
    50% {
        border-color: transparent
    }
}