/* ============================================
   Gray Area Ops — Design System
   Architect: Antigravity | 2026-07-18
   ============================================ */

/* Variables & Theme */
:root {
    --bg-dark: #0a0c10;
    --bg-card: #121620;
    --border-color: #1f2735;
    --text-main: #f0f3f6;
    --text-muted: #8b9bb4;
    --primary: #39ff14; /* Neon Green */
    --primary-dim: rgba(57, 255, 20, 0.15);
    --secondary: #00f0ff; /* Neon Cyan */
    --secondary-dim: rgba(0, 240, 255, 0.15);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow-glow: 0 0 20px rgba(57, 255, 20, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(57, 255, 20, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

/* ============================================
   Layout — Header & Navigation
   ============================================ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.glow-text {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

.dim-text {
    color: var(--text-main);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu (Mobile) */
.hamburger-toggle {
    display: none;
}

.hamburger-label {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 110;
}

.hamburger-label span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* ============================================
   Typography & Section Headers
   ============================================ */
h1, h2, h3 {
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 10%;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff 40%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 300;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: var(--bg-dark);
    border: none;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.4);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

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

.btn-secondary:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.btn-nav {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 0.5rem 1.2rem;
}

.btn-nav:hover {
    background: var(--primary-dim);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 6rem 5%;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.badge {
    align-self: flex-start;
    padding: 0.4rem 1rem;
    background: var(--primary-dim);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.1);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* ============================================
   Interactive Terminal Simulator
   ============================================ */
.terminal-container {
    background-color: #05070a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    height: 380px;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: #0b0f15;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.terminal-dot.red { background-color: #ff5f56; }
.terminal-dot.yellow { background-color: #ffbd2e; }
.terminal-dot.green { background-color: #27c93f; }

.terminal-title {
    margin-left: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow-y: auto;
    flex-grow: 1;
    line-height: 1.5;
}

/* Scrollbar styling for terminal */
.terminal-body::-webkit-scrollbar {
    width: 6px;
}

.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.terminal-prompt {
    color: var(--secondary);
    font-weight: 500;
}

.terminal-cmd {
    color: var(--primary);
    font-weight: bold;
}

.terminal-output {
    color: var(--text-muted);
}

.terminal-success {
    color: #10b981;
}

.terminal-error {
    color: #ef4444;
}

/* Blinking cursor */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background-color: var(--primary);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

/* ============================================
   Scroll Entry Animations
   ============================================ */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children cards */
.grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.grid .animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.grid .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }

/* ============================================
   Grids & Cards
   ============================================ */
.grid {
    display: grid;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.grid-three {
    grid-template-columns: repeat(3, 1fr);
}

.grid-two {
    grid-template-columns: 1fr 1fr;
}

.about, .videos, .consulting {
    padding: 8rem 0;
    border-top: 1px solid var(--border-color);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.card p {
    color: var(--text-muted);
    font-weight: 300;
}

.card .btn {
    margin-top: auto;
}

/* ============================================
   Product Badges
   ============================================ */
.product-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 1px;
}

.badge-enterprise {
    background: var(--primary-dim);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--primary);
}

.badge-free {
    background: var(--primary-dim);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--primary);
}

.badge-open-source {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   Video Section
   ============================================ */
.video-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.video-thumbnail {
    background-color: #0b0f15;
    height: 250px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    /* CSS scanline pattern — replaces missing grid-bg.svg */
    background-image:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8)),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(57, 255, 20, 0.03) 2px,
            rgba(57, 255, 20, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 240, 255, 0.02) 2px,
            rgba(0, 240, 255, 0.02) 4px
        );
    background-size: cover, 100% 100%, 100% 100%;
}

.play-btn {
    font-size: 3rem;
    color: var(--text-main);
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
    /* Keyboard focus support */
    border-radius: 50%;
}

.play-btn:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
    opacity: 1;
}

.video-card:hover .play-btn {
    transform: scale(1.1);
    opacity: 1;
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.video-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-muted);
}

.video-info {
    padding: 1.8rem;
}

.video-info h3 {
    margin-bottom: 0.8rem;
    font-size: 1.25rem;
}

.video-info p {
    color: var(--text-muted);
    font-weight: 300;
}

/* ============================================
   Consulting Form Section
   ============================================ */
.consulting-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    align-items: center;
}

.consulting-info h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.consulting-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 300;
}

.features-list {
    list-style: none;
}

.features-list li {
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
}

.consulting-form-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 6px;
}

.consulting-form-container h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.1);
}

/* Form success animation */
.form-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.form-success-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.form-success h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 1rem 0;
    color: var(--primary);
}

.form-success p {
    color: var(--text-muted);
    font-weight: 300;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 5%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #05070a;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

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

/* ============================================
   Responsive — Tablet (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 4rem 5%;
    }
    .consulting-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* ============================================
   Responsive — Mobile (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    .grid-three, .grid-two {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-cta .btn {
        text-align: center;
    }

    .section-header {
        padding: 0 5%;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .about, .videos, .consulting {
        padding: 4rem 0;
    }

    /* Hamburger menu — CSS-only toggle */
    .hamburger-label {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        background-color: rgba(10, 12, 16, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-left: 1px solid var(--border-color);
        transition: right 0.35s ease;
        z-index: 105;
    }

    .hamburger-toggle:checked ~ .nav {
        right: 0;
    }

    /* Animate hamburger → X */
    .hamburger-toggle:checked ~ .hamburger-label span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger-toggle:checked ~ .hamburger-label span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-toggle:checked ~ .hamburger-label span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav .nav-link,
    .nav .btn-nav {
        font-size: 1.1rem;
    }

    /* Overlay behind menu */
    .hamburger-toggle:checked ~ .nav-overlay {
        display: block;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 104;
    }

    .terminal-container {
        height: 300px;
    }
}

/* ============================================
   Focus / Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Skip to content link (visually hidden until focused) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 700;
    z-index: 200;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}
