@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Professional Regulatory Palette */
    --color-bg-deep: #0a0a0f;
    --color-bg-gradient: linear-gradient(135deg, #0a0a0f 0%, #1a1a24 100%);
    --color-surface: #1a1a24;

    /* Text Hierarchy */
    --color-text-primary: #e8e8e8;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    --color-heading: #ffffff;

    /* Minimal Accent */
    --color-accent: #d4af37;

    /* Borders & Dividers */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-emphasis: rgba(255, 255, 255, 0.12);

    /* Glass Elements */
    --color-glass: rgba(255, 255, 255, 0.03);
    --color-glass-border: rgba(255, 255, 255, 0.08);
    --color-glass-hover: rgba(255, 255, 255, 0.06);

    /* Legacy compatibility - all map to professional colors */
    --color-primary: #d4af37;
    --color-secondary: #ffffff;
    --color-neon-gold: #d4af37;
    --color-neon-red: #d4af37;
    --color-neon-cyan: #ffffff;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-deep);
    background-image: var(--color-bg-gradient);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Canvas Background - Dimmed for Content Clarity */
/* Canvas Background - Removed */

/* Authority Overlay [DISABLED FOR TEST] */
/* body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: -1;
    pointer-events: none;
} */

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
   Glassmorphism Components
   ========================================= */
.glass-panel {
    background: var(--color-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--color-glass-border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.glass-panel:hover {
    background: var(--color-glass-hover);
    border-color: var(--color-border-emphasis);
}

/* Removed decorative neon effects for professional appearance */

/* =========================================
   Layout: Navigation (Orb)
   ========================================= */
.nav-orb {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-neon-gold);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.nav-orb:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

.nav-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.nav-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-links {
    text-align: center;
}

.nav-links a {
    display: block;
    font-size: 3rem;
    font-family: var(--font-heading);
    margin: 20px 0;
    color: transparent;
    -webkit-text-stroke: 1px white;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--color-neon-gold);
    -webkit-text-stroke: 0;
    text-shadow: 0 0 20px var(--color-neon-gold);
}

/* =========================================
   Layout: Authority Header (Replaces Orb)
   ========================================= */
.authority-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(5, 5, 10, 0.95);
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-md);
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-neon-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-sub-text {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: #888;
    padding-left: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-nav ul {
    display: flex;
    gap: 2rem;
}

.auth-nav a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    transition: 0.3s;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.auth-nav a:hover {
    color: var(--color-heading);
    border-color: var(--color-border-emphasis);
}

.top-bar-alert {
    background: var(--color-neon-red);
    color: white;
    text-align: center;
    font-size: 0.8rem;
    padding: 5px;
    font-weight: bold;
    letter-spacing: 1px;
    position: fixed;
    top: 80px;
    /* Below header */
    width: 100%;
    z-index: 900;
}

/* =========================================
   Layout: Hero Section (Adjusted for Video)
   ========================================= */
.hero-v2 {
    height: 90vh;
    /* Reduced height */
    padding-top: 80px;
    /* Clear header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Video Background Layer */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 1;
    /* [TEST] Full Opacity */
    /* opacity: 0.15; */
    /* Subtle visibility per request */
}

/* Dark Overlay for Readability [REMOVED] */
.hero-overlay {
    display: none;
}

/* Content sits on top of overlay */
.hero-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-v2 h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-heading);
    opacity: 0;
    animation: fadeInMoveUp 1s forwards 0.5s;
    letter-spacing: -0.5px;
}

.hero-v2 p {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInMoveUp 1s forwards 0.8s;
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    font-size: 0.8rem;
    letter-spacing: 4px;
    opacity: 0;
    animation: fadeIn 1s forwards 1.5s;
}

/* Removed decorative typography utilities for professional appearance */
/* Compatibility Utilities - No Glow, Just Color */
.neon-text-gold {
    color: var(--color-neon-gold);
}

.neon-text-cyan {
    color: var(--color-heading);
}

.neon-text-red {
    color: var(--color-neon-red);
}

/* =========================================
   Layout: Sections
   ========================================= */
.section-v2 {
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
}

.container-v2 {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    display: inline-block;
    color: var(--color-heading);
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 1px;
    background: var(--color-border);
    margin: 10px auto 0;
}

/* Grid Layouts */
.asym-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

/* Cards */
.feature-card {
    grid-column: span 4;
    padding: 2rem;
    text-align: left;
}

.feature-card.wide {
    grid-column: span 6;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-heading);
}

.product-orb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

/* Product Cards (Professional Style) */
.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1.5rem;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-border-emphasis);
}


.product-image-container {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-image-container img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-heading);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.product-meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-secondary);
    margin-top: auto;
}

.approved-check {
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
}

/* Footer */
.footer-v2 {
    border-top: 1px solid var(--color-glass-border);
    padding: 4rem 2rem;
    text-align: center;
    background: #020202;
    margin-top: var(--spacing-xl);
}

/* Animations */
@keyframes fadeInMoveUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   Registry Layout (Phase 9b Horizontal)
   ========================================= */
.registry-row {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.registry-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-border-emphasis);
}

.registry-thumb {
    width: 100px;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1.5rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.registry-thumb img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.registry-info {
    flex-grow: 1;
}

.registry-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-heading);
    margin-bottom: 0.25rem;
}

.registry-meta {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.registry-status {
    flex-shrink: 0;
    text-align: right;
    margin-left: 1.5rem;
    min-width: 120px;
}

/* Responsive Registry */
@media (max-width: 768px) {
    .registry-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .registry-thumb {
        width: 100%;
        margin-bottom: 1rem;
    }

    .registry-status {
        margin-left: 0;
        margin-top: 1rem;
        text-align: left;
    }
}

/* =========================================
   Overrides for Database Content (Inline Styles)
   ========================================= */
.highlight-box {
    background-color: rgba(255, 68, 68, 0.1) !important;
    border-left: 4px solid #ff4444 !important;
    color: #e8e8e8 !important;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.warning-box {
    background-color: rgba(255, 68, 68, 0.1) !important;
    border-left: 4px solid #ff4444 !important;
    color: #e8e8e8 !important;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

/* Aggressive Fix for Database Content (Force Dark Mode) */
/* Aggressive Fix for Database Content (Force Dark Mode) */
/* 1. Block Elements: Force Dark Background */
.article-content div,
.article-content blockquote,
.article-content section,
.article-content aside,
.article-content pre,
.article-content table,
.article-content tr,
.article-content td,
.article-content th,
.reg-content div,
.reg-content blockquote,
.reg-content section,
.reg-content aside,
.reg-content pre,
.reg-content table,
.reg-content tr,
.reg-content td,
.reg-content th,
.safety-content div,
.safety-content blockquote,
.safety-content section,
.safety-content aside,
.safety-content pre,
.safety-content table,
.safety-content tr,
.safety-content td,
.safety-content th {
    background-color: rgba(30, 30, 30, 0.85) !important;
    /* Higher opacity to ensure white is covered */
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 2. Text Elements: Force Transparent Background (Overrides inline white bg on p/span) */
.article-content p,
.article-content span,
.article-content li,
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6,
.reg-content p,
.reg-content span,
.reg-content li,
.reg-content h1,
.reg-content h2,
.reg-content h3,
.reg-content h4,
.reg-content h5,
.reg-content h6,
.safety-content p,
.safety-content span,
.safety-content li,
.safety-content h1,
.safety-content h2,
.safety-content h3,
.safety-content h4,
.safety-content h5,
.safety-content h6 {
    background-color: transparent !important;
    color: #e8e8e8 !important;
}

/* Force Text Visibility on ALL elements inside content areas */
.article-content,
.article-content *,
.reg-content,
.reg-content *,
.safety-content,
.safety-content * {
    color: #e8e8e8 !important;
}

/* Restore specific colors for links and headers if needed, OR just keep them white for safety */
.article-content a,
.reg-content a,
.safety-content a {
    color: var(--color-neon-gold, #ffd700) !important;
    text-decoration: underline;
}

.article-content strong,
.reg-content strong,
.safety-content strong,
.article-content b,
.reg-content b,
.safety-content b {
    color: #fff !important;
    font-weight: 700 !important;
}

/* Support for common alert classes (Dark Mode mapping) */
.alert-success,
.success-box {
    background-color: rgba(40, 167, 69, 0.2) !important;
    border-left: 4px solid #28a745 !important;
    color: #e8e8e8 !important;
}

.alert-danger,
.error-box {
    background-color: rgba(220, 53, 69, 0.2) !important;
    border-left: 4px solid #dc3545 !important;
    color: #e8e8e8 !important;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-left: 4px solid #ffc107 !important;
    color: #e8e8e8 !important;
}

.highlight-box h4,
.warning-box h4 {
    color: #ff4444 !important;
    margin-top: 0;

    font-family: var(--font-heading);
}

/* =========================================
   Tablet/Laptop Optimization (1200px)
   ========================================= */
@media (max-width: 1200px) {
    .authority-header {
        padding: 0 1rem;
    }

    .auth-sub-text {
        display: none;
        /* Hide subtext to free space */
    }

    .auth-nav ul {
        gap: 1rem;
        /* Tighter links */
    }

    .auth-nav a {
        font-size: 0.8rem;
        /* Slightly smaller text */
        letter-spacing: 0.5px;
    }
}

/* =========================================
   Mobile Responsiveness (UX Improvements)
   ========================================= */
@media (max-width: 768px) {

    /* 1. Header & Navigation (Mobile Menu) */
    .authority-header {
        flex-direction: row;
        justify-content: space-between;
        height: 60px;
        padding: 0 1rem;
        background: rgba(5, 5, 10, 0.98);
        backdrop-filter: blur(15px);
    }

    .auth-brand {
        width: auto;
        margin-bottom: 0;
    }

    .auth-logo-text {
        font-size: 1.2rem;
    }

    .auth-sub-text {
        display: none;
    }

    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-neon-gold);
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1001;
        padding: 0.5rem;
    }

    /* Mobile Navigation Drawer */
    .auth-nav {
        display: none !important;
        /* Hidden by default on mobile */
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(10, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        z-index: 999;
        border-top: 1px solid var(--color-border);
    }

    .auth-nav.active {
        display: flex !important;
    }

    .auth-nav ul {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        width: 100%;
    }

    .auth-nav a {
        font-size: 1.5rem;
        display: block;
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .auth-nav a:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--color-neon-gold);
        border-color: var(--color-neon-gold);
    }

    /* 2. Hero Adjustments */
    .hero-v2 h1 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .hero-v2 p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* 3. Grid Fixes */
    .asym-grid {
        grid-template-columns: 1fr !important;
    }

    .feature-card.glass-panel {
        grid-column: span 1 !important;
        margin-bottom: 1rem;
    }

    .product-orb-grid {
        grid-template-columns: 1fr !important;
        /* Single column on mobile */
        gap: 2rem;
    }

    /* 4. Padding Adjustments */
    .section-v2 {
        padding: 3rem 1rem;
    }

    .container-v2 {
        padding: 0 1rem;
    }
}

/* Base styles for toggle button (hidden on desktop) */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* End of Mobile Responsiveness */