/* ========================================
   NOVRIX ELITE - INSTITUTIONAL TERMINAL
   Bloomberg/Reuters-Grade Landing Page
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700;800;900&family=Roboto+Mono:wght@400;500;600;700&display=swap');

/* ========================================
   ADAPTIVE VISUAL ENGINE
   ======================================== */

:root {
    /* Light Mode (Pure White Foundation) */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-tertiary: #FAFAFA;
    --text-primary: #0A0A0A;
    --text-secondary: #404040;
    --text-tertiary: #737373;
    --accent-crimson: #AE0F32;
    --accent-cyber-green: #00FF00;
    --grid-color: rgba(10, 10, 10, 0.08);
    --border-color: rgba(10, 10, 10, 0.12);
    --shadow-light: rgba(0, 0, 0, 0.04);
    --shadow-medium: rgba(0, 0, 0, 0.08);
    --shadow-heavy: rgba(0, 0, 0, 0.16);
}

html.dark-theme {
    /* Dark Mode (Obsidian Canvas) */
    --bg-primary: #000000;
    --bg-secondary: #0A0A0A;
    --bg-tertiary: #121212;
    --text-primary: #FFFFFF;
    --text-secondary: #D0D0D0;
    --text-tertiary: #A0A0A0;
    --accent-crimson: #D62E56;
    --accent-cyber-green: #00FF00;
    --grid-color: rgba(214, 46, 86, 0.12);
    --border-color: rgba(214, 46, 86, 0.2);
    --shadow-light: rgba(214, 46, 86, 0.15);
    --shadow-medium: rgba(214, 46, 86, 0.25);
    --shadow-heavy: rgba(214, 46, 86, 0.35);
}

/* ========================================
   TECHNICAL BLUEPRINT GRID (40px)
   ======================================== */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* ========================================
   COMMAND CENTER HERO
   ======================================== */

.command-center-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 2rem 8rem;
    margin-top: 140px;
    animation: heroFadeIn 1.5s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    animation: canvasPulse 8s ease-in-out infinite;
}

@keyframes canvasPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    animation: fadeIn 1.5s ease-out 2s backwards;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    font-weight: 500;
}

.trust-icon {
    font-size: 1rem;
    filter: grayscale(0.3);
}

/* Feature Strip */
.feature-strip {
    padding: 4rem 2rem;
    background: rgba(174, 15, 50, 0.02);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

html.dark-theme .feature-strip {
    background: rgba(214, 46, 86, 0.05);
    border-top-color: rgba(214, 46, 86, 0.2);
    border-bottom-color: rgba(214, 46, 86, 0.2);
    box-shadow: inset 0 1px 0 rgba(214, 46, 86, 0.1);
}

.feature-strip-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(7, auto);
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.feature-highlight {
    text-align: center;
    animation: fadeInUp 1s ease-out backwards;
}

.feature-highlight:nth-child(1) { animation-delay: 0.2s; }
.feature-highlight:nth-child(3) { animation-delay: 0.4s; }
.feature-highlight:nth-child(5) { animation-delay: 0.6s; }
.feature-highlight:nth-child(7) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-number {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-crimson);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(174, 15, 50, 0.2);
}

html.dark-theme .feature-number {
    text-shadow: 0 0 30px rgba(214, 46, 86, 0.5);
}

.feature-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

.feature-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, var(--border-color), transparent);
}

.neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    animation: canvasPulse 8s ease-in-out infinite;
}

@keyframes canvasPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
}

.terminal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(174, 15, 50, 0.08);
    border: 1.5px solid var(--accent-crimson);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.2s backwards, badgeGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.terminal-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(174, 15, 50, 0.1), transparent);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }
    100% {
        transform: translateX(100%) translateY(100%);
    }
}

@keyframes badgeGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(174, 15, 50, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(174, 15, 50, 0.4), 0 0 40px rgba(174, 15, 50, 0.2);
    }
}

html.dark-theme .terminal-badge {
    background: rgba(214, 46, 86, 0.12);
    box-shadow: 0 0 30px rgba(214, 46, 86, 0.3);
}

html.dark-theme .terminal-badge::before {
    background: linear-gradient(45deg, transparent, rgba(214, 46, 86, 0.2), transparent);
}

.badge-id {
    color: var(--text-primary);
    font-weight: 600;
}

.badge-status {
    color: var(--accent-cyber-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.trinity-headline {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(4rem, 12vw, 12rem);
    font-weight: 900;
    line-height: 0.9;
    margin: 0;
    letter-spacing: -0.02em;
    padding-right: 0.6rem;
}

.headline-word {
    display: inline-block;
    padding-right: 0.1em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-crimson) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUpHeavy 1.2s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    width: fit-content;
}

.headline-word:first-child {
    animation-delay: 0.4s;
}

.headline-word:last-child {
    animation-delay: 1s;
}

html.dark-theme .headline-word {
    filter: drop-shadow(0 0 40px rgba(214, 46, 86, 0.4));
}

.headline-connector {
    display: block;
    font-size: 0.25em;
    font-weight: 300;
    letter-spacing: 1em;
    opacity: 0.3;
    margin: 1rem 0;
    animation: slideUpHeavy 1.2s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.7s;
}

@keyframes slideUpHeavy {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 1rem;
    margin-bottom: 0;
    animation: fadeIn 1.5s ease-out 1.2s backwards;
}

.hero-cta {
    animation: fadeIn 1.5s ease-out 1.5s backwards;
}

/* ========================================
   ENTER TERMINAL BUTTON
   ======================================== */

.btn-terminal {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    margin-top: 2.5rem;
    background: linear-gradient(135deg, var(--accent-crimson) 0%, #8B0A1E 100%);
    color: #FFFFFF;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid var(--accent-crimson);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-shadow: 
        0 4px 20px rgba(174, 15, 50, 0.3),
        0 0 40px rgba(174, 15, 50, 0.2);
}

html.dark-theme .btn-terminal {
    background: linear-gradient(135deg, var(--accent-crimson) 0%, #FF1744 100%);
    box-shadow: 
        0 4px 30px rgba(214, 46, 86, 0.5),
        0 0 60px rgba(214, 46, 86, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-terminal:hover::before {
    transform: translateX(100%);
}

.btn-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50px);
    }
}

.btn-terminal:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(174, 15, 50, 0.5),
        0 0 80px rgba(174, 15, 50, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.2);
    border-color: #FF1744;
}

html.dark-theme .btn-terminal:hover {
    box-shadow: 
        0 20px 80px rgba(214, 46, 86, 0.6),
        0 0 100px rgba(255, 107, 157, 0.5),
        0 10px 50px rgba(214, 46, 86, 0.4);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-terminal:hover .btn-arrow {
    transform: translateX(5px);
}

/* ========================================
   TRINITY PILLAR CARDS (Glassmorphic)
   ======================================== */

.trinity-pillars-section {
    padding: 8rem 2rem;
    position: relative;
    z-index: 10;
}

.pillars-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.pillar-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pillar-card-glass {
    position: relative;
    padding: 3rem 2.5rem;
    /* Slightly darker glass in light mode so cards read with more contrast */
    background: rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    cursor: pointer;
}

html.dark-theme .pillar-card-glass {
    background: rgba(0, 0, 0, 0.3);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-crimson) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.pillar-card-glass:hover .card-glow {
    opacity: 0.15;
    animation: glowRotate 4s linear infinite;
}

@keyframes glowRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

html.dark-theme .pillar-card-glass:hover .card-glow {
    opacity: 0.25;
}

.card-border-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--accent-crimson), transparent, var(--accent-crimson)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.6s ease;
    animation: rotateBorder 4s linear infinite;
    pointer-events: none;
}

@keyframes rotateBorder {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

.pillar-card-glass:hover .card-border-gradient {
    opacity: 0.6;
}

.pillar-card-glass:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 80px var(--shadow-heavy);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-number {
    font-family: 'Roboto Mono', monospace;
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-crimson);
    /* stronger baseline opacity for improved legibility */
    opacity: 0.80;
    line-height: 1;
    margin-bottom: 1.5rem;
    transition: all 0.45s ease;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pillar-card-glass:hover .card-number {
    opacity: 0.55;
    transform: scale(1.1);
    text-shadow: 0 0 30px var(--accent-crimson);
}

html.dark-theme .card-number {
    opacity: 0.45;
}

html.dark-theme .pillar-card-glass:hover .card-number {
    opacity: 0.65;
    text-shadow: 0 0 40px var(--accent-crimson), 0 0 60px rgba(214, 46, 86, 0.5);
}

.card-title {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    text-transform: uppercase;
}

.card-description {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    letter-spacing: 0.01em;
}

.card-metrics {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.card-link {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-crimson);
    display: inline-block;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pillar-card-link:hover .card-link {
    transform: translateX(10px);
    letter-spacing: 0.18em;
}

html.dark-theme .card-link {
    text-shadow: 0 0 20px rgba(214, 46, 86, 0.4);
}

/* ========================================
   HEATMAP SECTION
   ======================================== */

.heatmap-section {
    padding: 8rem 2rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border-color);
}

html.dark-theme .heatmap-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid rgba(214, 46, 86, 0.2);
    box-shadow: inset 0 1px 0 rgba(214, 46, 86, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.heatmap-container {
    max-width: 1200px;
    margin: 0 auto;
}

.heatmap-svg {
    width: 100%;
    height: auto;
    display: block;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.legend-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.legend-gradient {
    width: 300px;
    height: 8px;
    background: linear-gradient(90deg, #DC2626, #F59E0B, #FDE047, #84CC16, #10B981);
    border-radius: 4px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .pillars-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .command-center-hero {
        padding: 8rem 2rem 6rem;
    }
}

@media (max-width: 768px) {
    .ticker-tape {
        font-size: 0.65rem;
    }
    
    .trinity-headline {
        font-size: clamp(3rem, 10vw, 8rem);
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
    }
    
    .btn-terminal {
        padding: 1.25rem 2.5rem;
        font-size: 0.8rem;
    }
    
    .card-metrics {
        flex-direction: column;
        gap: 1rem;
    }
    
    .legend-gradient {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .command-center-hero {
        padding: 6rem 1rem 4rem;
    }
    
    .pillar-card-glass {
        padding: 2rem 1.5rem;
    }
    
    .heatmap-section {
        padding: 4rem 1rem;
    }
}
