/* Nitra Solutions - Precision Industrialism Design System v2 */

/* ========== BASE ========== */
html { scroll-behavior: smooth; }
::selection { background-color: #00d4ff; color: #0a0a0a; }
body { overflow-x: hidden; }

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ========== BACKGROUNDS ========== */
.chevron-mask { clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%); }
.kinetic-cut { clip-path: polygon(0 0, 100% 0, 100% 90%, 95% 100%, 0 100%); }

.tactical-grid {
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.chevron-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20L10 10L0 0V20Z' fill='%23a7c8ff' fill-opacity='0.03'/%3E%3C/svg%3E");
}

.dot-grid {
    background-image: radial-gradient(circle, rgba(0, 212, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hardware-gradient { background: linear-gradient(180deg, #00d4ff 0%, #003366 100%); }

/* Scanline overlay */
.scanline { position: relative; }
.scanline::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 212, 255, 0.012) 2px, rgba(0, 212, 255, 0.012) 4px);
    pointer-events: none;
}

/* Noise texture */
.noise { position: relative; }
.noise::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ========== TYPOGRAPHY ========== */
.text-gradient {
    background: linear-gradient(135deg, #00d4ff, #a7c8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-syntax {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ========== GLOW EFFECTS ========== */
.glow-border {
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.1);
    transition: box-shadow 0.4s ease;
}
.glow-border:hover {
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.35), 0 0 40px rgba(0, 212, 255, 0.08);
}

.glow-cyan {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2), 0 0 60px rgba(0, 212, 255, 0.05);
}

.glow-btn:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35), 0 8px 32px rgba(0, 212, 255, 0.15);
}

/* ========== MOBILE NAV ========== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.mobile-menu.open { transform: translateX(0); }

/* ========== SCROLL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 100ms; }
.stagger > *:nth-child(3) { transition-delay: 200ms; }
.stagger > *:nth-child(4) { transition-delay: 300ms; }
.stagger > *:nth-child(5) { transition-delay: 400ms; }
.stagger > *:nth-child(6) { transition-delay: 500ms; }

/* ========== ANIMATED COUNTER ========== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== KEYFRAMES ========== */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.animate-float { animation: float 4s ease-in-out infinite; }

/* Line that grows on scroll */
.line-grow {
    width: 0;
    transition: width 1.2s ease-out;
}
.line-grow.visible { width: 100%; }

/* Nav scroll state */
.nav-scrolled {
    background: rgba(10, 10, 10, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}

/* ========== QUOTE MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 101;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-panel.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Form inputs */
.form-input {
    width: 100%;
    background: #151515;
    border: 1px solid #2a2a2a;
    padding: 12px 16px;
    color: #eaeaea;
    font-family: 'Inter', system-ui;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.form-input::placeholder { color: #555555; }
.form-input:focus {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23555555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Success state */
.form-success {
    animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
