/* ═══════════════════════════════════════════════════════════════════════════
   BRUSTVER CYBERSECURITY - MAIN STYLES
   Global/shared styles used across all pages
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS VARIABLES & RESET
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Background Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #0f0f16;
    --bg-card-hover: #161620;
    --bg-input: #0d0d14;

    /* Text Colors */
    --text-primary: #e8e8ed;
    --text-secondary: #9494a3;
    --text-muted: #7a7a8e; /* Updated from #5a5a6e for WCAG AA compliance (4.5:1 contrast ratio) */

    /* Accent Colors */
    --accent-cyan: #00d4ff;
    --accent-cyan-dim: #00a8cc;
    --accent-cyan-glow: rgba(0, 212, 255, 0.15);
    --accent-green: #00ff88;
    --accent-green-dim: #00cc6a;
    --accent-orange: #ff6b35;
    --accent-purple: #a855f7;
    --accent-red: #ff4757;
    --accent-yellow: #ffd000;

    /* Border Colors */
    --border-color: #2a2a3a;
    --border-focus: var(--accent-cyan);
    --border-glow: rgba(0, 212, 255, 0.3);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-medium: 300ms ease;
    --transition-slow: 500ms ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACKGROUND EFFECTS
   ═══════════════════════════════════════════════════════════════════════════ */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.5;
    animation: scan 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    /* Fallback for browsers without backdrop-filter support */
    background: rgba(10, 10, 15, 0.95);
    /* Safari support */
    -webkit-backdrop-filter: blur(12px);
    /* Modern browsers */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

/* Enhanced fallback for browsers without backdrop-filter support */
@supports not ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
    .nav {
        background: rgba(10, 10, 15, 0.98);
    }
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-decoration: none;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-bracket { color: var(--text-muted); }
.logo-text { color: var(--accent-cyan); }
.logo-sub { color: var(--text-muted); font-weight: 400; }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-cyan);
    transition: width var(--transition-medium);
}

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

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

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

.btn-nav {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-nav-primary {
    color: var(--bg-primary);
    background: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

.btn-nav-primary:hover {
    background: var(--accent-cyan-dim);
    border-color: var(--accent-cyan-dim);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* Mobile Navigation Open State */
.nav-links.nav-open {
    display: flex;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT & CONTAINERS
   ═══════════════════════════════════════════════════════════════════════════ */
main {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
}

.section-header.centered {
    text-align: center;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.section-header.centered .section-label {
    justify-content: center;
}

.section-header.centered .section-label::before,
.section-header.centered .section-label::after {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--border-color);
    flex: none;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.section-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.section-header.centered .section-subtitle {
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-cyan-dim);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
}

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

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-arrow {
    transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HEADER (for inner pages)
   ═══════════════════════════════════════════════════════════════════════════ */
.page-header {
    padding: 8rem 0 2rem;
    text-align: center;
}

.page-header .hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-sm);
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header .hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mission Box */
.mission-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 4rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 5rem;
}

.mission-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
}

.mission-quote {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    color: var(--text-primary);
    position: relative;
}

.mission-quote::before {
    content: '"';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 5rem;
    color: var(--accent-cyan);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.mission-quote em {
    color: var(--accent-cyan);
    font-style: normal;
}

/* Why Cards */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.why-card {
    padding: 2rem;
    border-left: 2px solid var(--border-color);
    transition: border-color var(--transition-medium);
}

.why-card:hover {
    border-color: var(--accent-cyan);
}

.why-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.why-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.why-desc {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Core Cards */
.core-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.core-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    transition: all var(--transition-medium);
}

.core-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.core-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.core-card:hover::before {
    opacity: 1;
}

.core-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--accent-cyan-glow);
    border: 1px solid rgba(0, 212, 255, 0.2);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.core-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.core-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.core-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.core-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.core-features li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.35rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.core-features li::before {
    content: '✓';
    color: var(--accent-green);
    font-size: 0.75rem;
}

.services-cta {
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FINAL CTA SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
#cta {
    background: var(--bg-primary);
    padding: 6rem 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.cta-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.cta-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-column h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--accent-cyan);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   DJANGO FORM COMPATIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Map Bootstrap form-control to new design */
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:hover {
    border-color: #3a3a4a;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
    background: var(--bg-input);
}

/* Django Messages */
.alert {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.alert-error,
.alert-danger {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(255, 208, 0, 0.1);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.alert-info {
    background: var(--accent-cyan-glow);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Accessibility */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Hide email for spam protection */
span.email {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN - GLOBAL
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .core-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        flex-direction: column;
        padding: 1rem 2rem 2rem;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    section {
        padding: 4rem 0;
    }

    .page-header {
        padding: 6rem 0 2rem;
    }

    .mission-box {
        padding: 2.5rem 1.5rem;
    }

    .cta-box {
        padding: 3rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header .hero-subtitle {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scanline {
        display: none;
    }
}
