/* ==== THEME VARIABLES ==== */
:root,
[data-theme="dark"] {
    --bg-color: #05020f;
    --surface: 14, 18, 33;
    /* RGB for rgba */
    --border: rgba(209, 92, 255, 0.3);
    --border-light: rgba(255, 255, 255, 0.05);
    --text-main: #E7EAFF;
    --text-muted: #9AA3C1;
    --neon-primary: #2FF2FF;
    --neon-secondary: #D15CFF;
    --btn-text: #05020f;
    --glitch-offset-x: 4px;
    --glass-bg: rgba(14, 18, 33, 0.4);
    --panel-bg: rgba(5, 2, 15, 0.9);
}

[data-theme="light"] {
    --bg-color: #F4F2F8;
    --surface: 255, 255, 255;
    /* RGB */
    --border: rgba(138, 43, 226, 0.4);
    --border-light: rgba(0, 0, 0, 0.05);
    --text-main: #1A1625;
    --text-muted: #5C5975;
    --neon-primary: #8A2BE2;
    /* Darker purple for light mode */
    --neon-secondary: #008B8B;
    /* Darker cyan */
    --btn-text: #FFFFFF;
    --glitch-offset-x: 2px;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --panel-bg: rgba(244, 242, 248, 0.9);
}

/* ==== RESET & BASE ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

html,
body {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.6;
}

a {
    color: var(--neon-primary);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--neon-secondary);
    text-shadow: 0 0 8px var(--neon-secondary);
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
}

/* ==== GLASSMORPHISM UTILS ==== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-top: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .glass {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* ==== PRELOADER ==== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-line {
    width: 250px;
    height: 2px;
    background: var(--border-light);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 50px;
    height: 100%;
    background: var(--neon-primary);
    box-shadow: 0 0 15px var(--neon-primary);
    animation: loading 1.2s infinite ease-in-out;
}

@keyframes loading {
    0% {
        left: -50px;
    }

    100% {
        left: 100%;
    }
}

/* ==== TOP SYSTEM METRICS PANEL ==== */
.system-panel {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.6rem 5%;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
    font-size: 0.9rem;
    font-family: monospace;
    position: relative;
    z-index: 1000;
}

.panel-btn,
.lang-select {
    background: var(--glass-bg);
    border: 1px solid var(--neon-secondary);
    color: var(--neon-primary);
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.lang-select {
    outline: none;
}

.panel-btn:hover,
.lang-select:hover {
    background: rgba(var(--surface), 0.8);
    box-shadow: 0 0 10px rgba(209, 92, 255, 0.2);
}

/* ==== CANVAS & BACKGROUND ==== */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}

/* ==== NAVBAR ==== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(var(--surface), 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 999;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 4px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    color: var(--text-main);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--neon-primary);
    transition: width 0.3s;
}

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

.btn-outline {
    border: 1px solid var(--neon-secondary);
    padding: 0.6rem 1.8rem;
    border-radius: 6px;
    color: var(--neon-secondary) !important;
    position: relative;
    overflow: hidden;
}

.btn-outline::after {
    display: none;
}

.btn-outline:hover {
    background: rgba(209, 92, 255, 0.15);
    box-shadow: 0 0 20px rgba(209, 92, 255, 0.4);
    color: var(--text-main) !important;
}

/* ==== GLITCH EFFECTS ==== */
.glitch {
    position: relative;
    z-index: 1;
    font-size: 5rem;
    text-shadow: 0 0 25px rgba(47, 242, 255, 0.3);
    color: var(--text-main);
    line-height: 1.1;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

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

.glitch::after {
    left: calc(var(--glitch-offset-x) * -1);
    text-shadow: -3px 0 var(--neon-primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 4s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(12px, 9999px, 86px, 0);
    }

    10% {
        clip: rect(78px, 9999px, 86px, 0);
    }

    20% {
        clip: rect(69px, 9999px, 66px, 0);
    }

    100% {
        clip: rect(21px, 9999px, 20px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    10% {
        clip: rect(2px, 9999px, 14px, 0);
    }

    20% {
        clip: rect(38px, 9999px, 51px, 0);
    }

    100% {
        clip: rect(78px, 9999px, 56px, 0);
    }
}

.glitch-text {
    color: var(--neon-primary);
    position: relative;
}

/* ==== HERO SECTION ==== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    max-width: 1000px;
    animation: slideUp 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin: 2rem auto 3.5rem;
    max-width: 800px;
    line-height: 1.5;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1.2rem 3.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--btn-text) !important;
    background: var(--neon-primary);
    border: none;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    box-shadow: 0 0 20px rgba(47, 242, 255, 0.4);
    position: relative;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    background: var(--neon-secondary);
    box-shadow: 0 10px 30px rgba(209, 92, 255, 0.6);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--neon-primary);
    background: transparent;
    border: 2px solid var(--neon-primary);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    margin-left: 1rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(47, 242, 255, 0.1);
    color: #fff;
}

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

/* ==== SECTIONS COMMON ==== */
.container {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.section-header {
    margin-bottom: 5rem;
    text-align: center;
}

h2.neon-text {
    font-size: 3rem;
    color: var(--text-main);
}

.divider {
    height: 4px;
    width: 80px;
    background: var(--neon-secondary);
    margin: 1.5rem auto;
    box-shadow: 0 0 20px var(--neon-secondary);
    border-radius: 2px;
}

/* ==== ABOUT SECTION (GLASS TEXT BLOCK) ==== */
.about-block {
    text-align: center;
    padding: 4rem;
    margin-bottom: 4rem;
}

.about-block h3 {
    font-size: 2rem;
    color: var(--neon-primary);
    margin-bottom: 2rem;
}

.about-block p {
    font-size: 1.3rem;
    color: var(--text-main);
    max-width: 900px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

/* ==== GRID & SVG CARDS ==== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.card {
    padding: 3rem 2.5rem;
    position: relative;
    border-top: 3px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-10px);
    border-top-color: var(--neon-primary);
}

.card-svg {
    width: 54px;
    height: 54px;
    fill: none;
    stroke: var(--neon-primary);
    stroke-width: 1.5;
    margin-bottom: 2rem;
    transition: transform 0.4s ease;
}

.card:hover .card-svg {
    stroke: var(--neon-secondary);
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.6;
}

.card-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--neon-primary);
    transition: width 0.6s ease;
}

.card:hover .card-border {
    width: 100%;
    box-shadow: 0 0 15px var(--neon-primary);
}

/* ==== ARCHITECTURE WIDE CARDS ==== */
.arch-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.arch-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
    border-left: 4px solid var(--neon-secondary);
}

.arch-card:nth-child(even) {
    flex-direction: row-reverse;
    border-left: none;
    border-right: 4px solid var(--neon-secondary);
    text-align: right;
}

.arch-card .icon-box {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background: rgba(var(--surface), 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-light);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5) inset;
}

.arch-card:hover .icon-box {
    box-shadow: 0 0 30px rgba(47, 242, 255, 0.2) inset, 0 0 20px rgba(209, 92, 255, 0.3);
}

.arch-card h3 {
    font-size: 1.8rem;
    color: var(--neon-primary);
    margin-bottom: 1rem;
}

.arch-card p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ==== SECURITY SECTION ==== */
.security-section {
    padding: 5rem 10%;
    margin-bottom: 6rem;
    position: relative;
    overflow: hidden;
}

.security-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 15px,
            rgba(0, 0, 0, 0.3) 15px,
            rgba(0, 0, 0, 0.3) 30px);
    z-index: -1;
}

[data-theme="light"] .security-section::before {
    background: repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.4),
            rgba(255, 255, 255, 0.4) 15px,
            rgba(230, 230, 230, 0.4) 15px,
            rgba(230, 230, 230, 0.4) 30px);
}

.cyber-text {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    color: var(--neon-secondary);
    line-height: 2.2;
    margin-top: 3rem;
}

.cyber-text span {
    display: block;
    margin-bottom: 1rem;
}

/* ==== ROADMAP TIMELINE ==== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--border-light);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.tl-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.tl-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-color);
    border: 4px solid var(--neon-primary);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 32px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--border-light);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--border-light);
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 32px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--border-light);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--border-light) transparent transparent;
}

.right::after {
    left: -10px;
}

.tl-content {
    padding: 30px;
    position: relative;
}

.tl-content h3 {
    color: var(--neon-secondary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tl-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==== FAQ ACCORDION ==== */
.faq-grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    cursor: pointer;
    overflow: hidden;
}

.faq-q {
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-q::after {
    content: '+';
    font-size: 2rem;
    color: var(--neon-primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-q::after {
    transform: rotate(45deg);
    color: var(--neon-secondary);
}

.faq-a {
    max-height: 0;
    padding: 0 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-a {
    max-height: 300px;
    padding: 0 2rem 1.5rem 2rem;
}

/* ==== LEGAL DOCS ==== */
.doc-container {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 4rem;
}

.doc-container h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--neon-primary);
    text-align: center;
}

.doc-container h2 {
    font-size: 1.8rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--neon-secondary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.doc-container p {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
    line-height: 1.8;
}

/* ==== PROFESSIONAL FOOTER ==== */
footer {
    text-align: center;
    padding: 5rem 2rem 3rem;
    border-top: 1px solid var(--border-light);
    margin-top: 6rem;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.footer-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--neon-primary);
}

.footer-slogan {
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--text-main);
    margin-bottom: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

/* ==== MOBILE RESPONSIVE ADAPTATION ==== */
@media screen and (max-width: 1024px) {
    .glitch {
        font-size: 4rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .arch-card,
    .arch-card:nth-child(even) {
        flex-direction: column;
        text-align: center;
        border: none;
        border-top: 4px solid var(--neon-secondary);
    }
}

@media screen and (max-width: 768px) {
    .glitch {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
    }

    .timeline::after {
        left: 31px;
    }

    .tl-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .tl-container::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--border-light) transparent transparent;
    }

    .left::after,
    .right::after {
        left: 21px;
    }

    .right {
        left: 0%;
    }

    .arch-card {
        padding: 2rem 1rem;
    }

    .security-section {
        padding: 3rem 1.5rem;
    }

    .cyber-text {
        font-size: 1rem;
    }

    .doc-container {
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }

    .doc-container h1 {
        font-size: 2rem;
    }

    .doc-container h2 {
        font-size: 1.4rem;
    }

    .doc-container p {
        font-size: 1.1rem;
    }

    .faq-q {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .faq-a {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

@media screen and (max-width: 480px) {
    .glitch {
        font-size: 2.2rem;
    }

    .system-panel {
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.5rem;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        font-size: 1rem;
        padding: 1rem;
        box-sizing: border-box;
    }

    h2.neon-text {
        font-size: 2rem;
    }

    .card {
        padding: 2rem 1.5rem;
    }
}