/* ==========================================================================
   CYBERPUNK STYLING - CEREBRI SENSUS CORP
   ========================================================================== */

/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800;900&family=Rajdhani:wght@500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* CSS Variables */
:root {
    --bg-dark: #07080c;
    --bg-card: rgba(13, 16, 26, 0.75);
    --border-color: rgba(0, 240, 255, 0.2);
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff007f;
    --neon-yellow: #adff2f;
    --neon-green: #00ff66;
    --neon-red: #ff3b30;
    --text-white: #f5f6fa;
    --text-gray: #a3a8c3;
    --font-heading: 'Orbitron', sans-serif;
    --font-cyber: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    position: relative;
    min-height: 100vh;
}

/* Background Cyber Grid Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    pointer-events: none;
    z-index: 1;
}

/* Scanlines overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.15;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-magenta);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--neon-magenta);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* Interactive Canvas Background */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: auto;
    opacity: 0.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

/* Tech Underline for Headings */
h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    box-shadow: 0 0 10px var(--neon-cyan);
}

p {
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 1.2rem;
}

/* Cyber Utilities */
.neon-text-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.neon-text-magenta {
    color: var(--neon-magenta);
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.6);
}

.neon-text-yellow {
    color: var(--neon-yellow);
    text-shadow: 0 0 8px rgba(173, 255, 47, 0.6);
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--neon-magenta);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--neon-cyan), 0 1px var(--neon-yellow);
    clip: rect(85px, 450px, 140px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

/* Grid & Layout System */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

section {
    padding: 8rem 0;
    border-bottom: 1px solid rgba(0, 240, 255, 0.05);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(7, 8, 12, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1.5px solid var(--border-color);
    z-index: 999;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-decoration: none;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.logo span {
    color: var(--neon-magenta);
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    font-family: var(--font-cyber);
    font-size: 1.1rem;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-white);
    letter-spacing: 1px;
    transition: var(--transition-speed);
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: var(--transition-speed);
    box-shadow: 0 0 8px var(--neon-cyan);
}

nav a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

nav a:hover::after {
    width: 100%;
    left: 0;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-content .subtitle {
    font-family: var(--font-cyber);
    font-size: 1.4rem;
    color: var(--neon-cyan);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.btn-cyber {
    font-family: var(--font-cyber);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--bg-dark);
    background: var(--neon-cyan);
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    position: relative;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    transition: var(--transition-speed);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    display: inline-block;
    text-decoration: none;
}

.btn-cyber:hover {
    background: var(--neon-magenta);
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.6);
    transform: scale(1.03);
}

/* BSI Dashboard Widget (Mockup) */
.bsi-dashboard {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.bsi-dashboard::before {
    content: "TELEMETRY OVERWATCH";
    position: absolute;
    top: 5px;
    right: 10px;
    font-family: var(--font-cyber);
    font-size: 0.7rem;
    color: var(--border-color);
    letter-spacing: 1px;
}

.bsi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.2);
    padding-bottom: 0.8rem;
}

.bsi-title {
    font-family: var(--font-cyber);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-cyber);
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    animation: pulse-border 2s infinite ease-in-out;
}

.status-indicator.warning {
    background: rgba(173, 255, 47, 0.1);
    border: 1px solid var(--neon-yellow);
    color: var(--neon-yellow);
}

.status-indicator.alert {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: pulse-dot 1.5s infinite ease-in-out;
}

.bsi-main-metric {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.bsi-value {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    line-height: 1;
}

.bsi-unit {
    font-family: var(--font-cyber);
    font-size: 1.5rem;
    color: var(--text-gray);
}

/* Signal Graph Area */
.graph-container {
    height: 120px;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

#telemetry-chart {
    width: 100%;
    height: 100%;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.metric-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 240, 255, 0.1);
    padding: 0.8rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
}

.metric-val {
    font-family: var(--font-cyber);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-top: 0.2rem;
}

/* Science Section */
.science-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.science-visual {
    position: relative;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.05);
}

.science-tag {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-dark);
    padding: 0 0.5rem;
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    border-left: 2px solid var(--neon-cyan);
    border-right: 2px solid var(--neon-cyan);
}

.signal-list {
    margin-top: 1.5rem;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.signal-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-cyber);
    font-size: 1rem;
}

.signal-icon {
    color: var(--neon-magenta);
    text-shadow: 0 0 5px var(--neon-magenta);
}

/* Cyber Card Styling */
.cyber-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    transition: var(--transition-speed);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.cyber-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    transition: var(--transition-speed);
}

.cyber-card:hover {
    border-color: rgba(255, 0, 127, 0.4);
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.15);
    transform: translateY(-5px);
}

.cyber-card:hover::after {
    background: var(--neon-magenta);
    box-shadow: 0 0 8px var(--neon-magenta);
}

.card-num {
    position: absolute;
    top: 10px;
    right: 15px;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    opacity: 0.05;
    color: var(--neon-cyan);
}

/* Phased Strategy Cards Grid */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.phase-tag {
    display: inline-block;
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--neon-magenta);
    border: 1px solid var(--neon-magenta);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

/* VP Shunt Monitor Highlights */
.shunt-highlight-box {
    margin-top: 4rem;
    background: linear-gradient(135deg, rgba(13,16,26,0.9) 0%, rgba(20,25,40,0.6) 100%);
    border: 2px solid var(--neon-magenta);
    border-radius: 8px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 0 30px rgba(255,0,127,0.1);
}

.shunt-highlight-box::before {
    content: "CRITICAL PIPELINE FEATURE";
    position: absolute;
    top: -12px;
    left: 30px;
    background: var(--bg-dark);
    padding: 0 0.8rem;
    font-family: var(--font-cyber);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-magenta);
    letter-spacing: 2px;
}

.shunt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 1.5rem;
}

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

.shunt-feature-item {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.8rem;
}

.shunt-feature-icon {
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-weight: 900;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}

.service-card {
    height: 100%;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Terminal Console UI */
.terminal-card {
    background: #020305;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.05);
    overflow: hidden;
    margin-top: 3rem;
}

.terminal-header {
    background: rgba(13, 16, 26, 0.9);
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-bullets {
    display: flex;
    gap: 6px;
}

.terminal-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

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

.terminal-title {
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    color: var(--text-gray);
    letter-spacing: 1px;
}

.terminal-body {
    padding: 1.5rem;
    height: 350px;
    overflow-y: auto;
    font-family: var(--font-cyber);
    font-size: 1rem;
    color: var(--neon-green);
    text-shadow: 0 0 3px rgba(0, 255, 102, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.terminal-output {
    white-space: pre-wrap;
    line-height: 1.4;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-prompt {
    color: var(--neon-cyan);
    font-weight: 700;
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--neon-green);
    font-family: var(--font-cyber);
    font-size: 1rem;
    width: 100%;
}

/* Contact Footer Section */
.contact-section {
    text-align: center;
}

.contact-box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.05);
}

.contact-email {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--neon-cyan);
    text-decoration: none;
    margin: 2rem 0;
    display: inline-block;
    letter-spacing: 1px;
    transition: var(--transition-speed);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.contact-email:hover {
    color: var(--neon-magenta);
    text-shadow: 0 0 15px rgba(255, 0, 127, 0.6);
    transform: scale(1.02);
}

footer {
    padding: 3rem 0;
    text-align: center;
    background: rgba(7, 8, 12, 0.95);
    border-top: 1px solid rgba(0, 240, 255, 0.05);
    z-index: 10;
    position: relative;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.footer-copy {
    font-family: var(--font-cyber);
    font-size: 0.85rem;
    color: rgba(163, 168, 195, 0.5);
    letter-spacing: 1px;
}

/* Keyframes */
@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }
    10% {
        clip: rect(112px, 9999px, 76px, 0);
    }
    20% {
        clip: rect(85px, 9999px, 5px, 0);
    }
    30% {
        clip: rect(27px, 9999px, 115px, 0);
    }
    40% {
        clip: rect(76px, 9999px, 13px, 0);
    }
    50% {
        clip: rect(118px, 9999px, 99px, 0);
    }
    60% {
        clip: rect(15px, 9999px, 142px, 0);
    }
    70% {
        clip: rect(93px, 9999px, 83px, 0);
    }
    80% {
        clip: rect(54px, 9999px, 120px, 0);
    }
    90% {
        clip: rect(2px, 9999px, 47px, 0);
    }
    100% {
        clip: rect(68px, 9999px, 112px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(76px, 9999px, 116px, 0);
    }
    11% {
        clip: rect(12px, 9999px, 55px, 0);
    }
    22% {
        clip: rect(90px, 9999px, 3px, 0);
    }
    33% {
        clip: rect(134px, 9999px, 122px, 0);
    }
    44% {
        clip: rect(5px, 9999px, 97px, 0);
    }
    55% {
        clip: rect(112px, 9999px, 63px, 0);
    }
    66% {
        clip: rect(45px, 9999px, 141px, 0);
    }
    77% {
        clip: rect(83px, 9999px, 2px, 0);
    }
    88% {
        clip: rect(119px, 9999px, 88px, 0);
    }
    100% {
        clip: rect(28px, 9999px, 135px, 0);
    }
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 4px currentColor;
    }
    50% {
        box-shadow: 0 0 10px currentColor;
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

/* Responsiveness */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .science-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .shunt-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 0 1rem;
    }
    nav {
        display: none; /* In a real app we'd build a burger, but we keep it simple or use compact menu */
    }
    section {
        padding: 4rem 0;
    }
    .container {
        padding: 0 1rem;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
}
