/* ================================================================
   NIRUGENIX TECHNOLOGIES - INNER SITE STYLES
================================================================ */

:root {
    --pri: #818cf8;
    --acc: #c084fc;
    --bg: #060b18;
    --bg-soft: #0d1427;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-strong: rgba(255, 255, 255, 0.06);
    --txt: #f0f4ff;
    --muted: rgba(240, 244, 255, 0.62);
    --bdr: rgba(255, 255, 255, 0.08);
    --glow: rgba(129, 140, 248, 0.26);
    --success: #34d399;
    --danger: #f87171;
    --warning: #60a5fa;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.hacker-mode {
    --pri: #22c55e;
    --acc: #4ade80;
    --bg: #010a01;
    --bg-soft: #061106;
    --glow: rgba(34, 197, 94, 0.24);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", system-ui, sans-serif;
    color: var(--txt);
    background:
        radial-gradient(circle at top, rgba(129, 140, 248, 0.12), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(192, 132, 252, 0.08), transparent 28%),
        linear-gradient(180deg, #050914 0%, var(--bg) 24%, #040814 100%);
    line-height: 1.65;
    overflow-x: hidden;
    transition: background 0.6s var(--ease), color 0.3s var(--ease);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
    pointer-events: none;
    opacity: 0.28;
    z-index: -3;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.syncopate {
    font-family: "Syncopate", sans-serif;
    text-transform: uppercase;
}

.mono {
    font-family: "JetBrains Mono", monospace;
}

.caps {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    font-size: 0.68rem;
}

::-webkit-scrollbar {
    width: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--pri), var(--acc));
    border-radius: 999px;
}

#bg-canvas,
#noise-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#bg-canvas {
    z-index: -2;
    opacity: 0.26;
}

#noise-canvas {
    z-index: -1;
    opacity: 0.05;
}

@media (pointer: fine) {
    body {
        cursor: none;
    }
}

@media (pointer: coarse) {
    #c-dot,
    #c-ring {
        display: none !important;
    }
}

#c-dot,
#c-ring {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 9999;
}

#c-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--pri);
    box-shadow: 0 0 14px var(--glow);
}

#c-ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(129, 140, 248, 0.55);
    border-radius: 999px;
    z-index: 9998;
    transition: width 0.25s var(--spring), height 0.25s var(--spring), border-color 0.2s var(--ease);
}

body.cursor-hover #c-dot {
    width: 5px;
    height: 5px;
    background: #fff;
}

body.cursor-hover #c-ring {
    width: 48px;
    height: 48px;
    border-color: var(--pri);
}

body.m-click #c-dot {
    transform: scale(0.75);
}

.nav-glass {
    background: rgba(6, 11, 24, 0.84);
    backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid var(--bdr);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.18), rgba(192, 132, 252, 0.18));
    border: 1px solid rgba(129, 140, 248, 0.2);
    box-shadow: 0 12px 30px -14px var(--glow);
    overflow: hidden;
}

.nav-link {
    position: relative;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    white-space: nowrap;
    opacity: 0.66;
    transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 0;
    height: 1px;
    background: var(--pri);
    transition: width 0.25s var(--ease);
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--pri);
}

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

.icon-btn,
.btn-primary,
.btn-secondary,
.btn-ghost {
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}

.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--bdr);
    background: rgba(255, 255, 255, 0.02);
    color: var(--txt);
}

.icon-btn:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    border-color: var(--pri);
    color: var(--pri);
    transform: translateY(-2px);
}

.nav-glass .icon-btn {
    width: 2.35rem;
    height: 2.35rem;
}

.nav-glass [data-open-terminal].btn-secondary {
    padding: 0.82rem 1.12rem;
    font-size: 0.63rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.92rem 1.45rem;
    font-size: 0.69rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pri), var(--acc));
    color: #fff;
    box-shadow: 0 20px 40px -22px var(--glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px -22px var(--glow);
}

.btn-secondary,
.btn-ghost {
    border: 1px solid var(--bdr);
    background: rgba(255, 255, 255, 0.03);
}

.btn-ghost {
    background: transparent;
}

.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 2rem;
    width: min(64rem, 92vw);
    height: 28rem;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(129, 140, 248, 0.18) 0%, rgba(129, 140, 248, 0.08) 32%, transparent 72%);
    filter: blur(12px);
    pointer-events: none;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10rem -14rem auto;
    width: 24rem;
    height: 24rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.12), transparent 70%);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.2);
    background: rgba(129, 140, 248, 0.08);
    color: var(--pri);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.eyebrow-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--pri);
    box-shadow: 0 0 10px var(--glow);
}

.card-glass {
    background: rgba(13, 20, 39, 0.62);
    border: 1px solid var(--bdr);
    border-radius: 1.6rem;
    backdrop-filter: blur(16px) saturate(1.25);
    box-shadow: 0 22px 70px -50px rgba(0, 0, 0, 0.95);
    transition: transform 0.32s var(--ease), border-color 0.32s var(--ease), box-shadow 0.32s var(--ease), background 0.32s var(--ease);
}

.card-glass:hover {
    transform: translateY(-4px);
    border-color: rgba(129, 140, 248, 0.28);
    box-shadow: 0 28px 70px -45px var(--glow);
}

.metric-card {
    padding: 1.4rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--bdr);
}

.route-card {
    position: relative;
    display: block;
    overflow: hidden;
}

.route-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.16), transparent 55%, rgba(192, 132, 252, 0.12));
    opacity: 0;
    transition: opacity 0.32s var(--ease);
    pointer-events: none;
}

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

.route-card > * {
    position: relative;
    z-index: 1;
}

.route-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--pri);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.route-copy {
    color: var(--muted);
    font-size: 0.92rem;
}

.route-arrow {
    transition: transform 0.24s var(--ease), color 0.24s var(--ease);
}

.route-card:hover .route-arrow {
    transform: translateX(4px);
    color: var(--pri);
}

.timeline-card,
.quote-card {
    position: relative;
    overflow: hidden;
}

.timeline-card::after,
.quote-card::after {
    content: "";
    position: absolute;
    left: 1.4rem;
    right: 1.4rem;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.32), transparent);
}

.quote-card::before {
    content: "\201C";
    position: absolute;
    top: 0.85rem;
    left: 1.2rem;
    font-family: "Syncopate", sans-serif;
    font-size: 2.6rem;
    line-height: 1;
    color: rgba(129, 140, 248, 0.18);
}

.metric-value {
    font-family: "Syncopate", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.1;
}

.metric-label {
    margin-top: 0.55rem;
    color: rgba(240, 244, 255, 0.58);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    font-weight: 700;
}

.section-copy {
    color: var(--muted);
    font-size: 0.98rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bdr);
    color: rgba(240, 244, 255, 0.82);
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--pri);
    background: rgba(129, 140, 248, 0.08);
    border: 1px solid rgba(129, 140, 248, 0.16);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--pri), var(--acc));
    box-shadow: 0 16px 30px -18px var(--glow);
}

.field {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--bdr);
    border-radius: 1rem;
    color: var(--txt);
    padding: 0.92rem 1rem;
    outline: none;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.field:focus {
    border-color: var(--pri);
    box-shadow: 0 0 0 3px var(--glow);
}

.field::placeholder {
    color: rgba(240, 244, 255, 0.34);
}

select.field {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--pri) 50%), linear-gradient(135deg, var(--pri) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

textarea.field {
    resize: vertical;
}

.status-box {
    display: none;
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--bdr);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.status-box.show {
    display: block;
}

.status-box[data-state="success"] {
    border-color: rgba(52, 211, 153, 0.24);
    background: rgba(52, 211, 153, 0.08);
    color: #b8f3da;
}

.status-box[data-state="error"] {
    border-color: rgba(248, 113, 113, 0.24);
    background: rgba(248, 113, 113, 0.08);
    color: #fecaca;
}

.status-box[data-state="info"] {
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(96, 165, 250, 0.08);
    color: #bfdbfe;
}

.process-step {
    position: relative;
    padding: 1.5rem;
}

.process-step::before {
    content: attr(data-step);
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: "Syncopate", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    color: rgba(240, 244, 255, 0.18);
}

.faq-card {
    overflow: hidden;
}

.faq-toggle {
    width: 100%;
    background: transparent;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.faq-icon {
    transition: transform 0.25s var(--spring), color 0.25s var(--ease);
}

.faq-toggle[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    color: var(--pri);
}

.faq-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.32s var(--ease), opacity 0.24s var(--ease);
}

.faq-body.open {
    opacity: 1;
}

.footer-link {
    color: rgba(240, 244, 255, 0.68);
    transition: color 0.2s var(--ease);
}

.footer-link:hover {
    color: var(--pri);
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-socials .icon-btn {
    width: 2.35rem;
    height: 2.35rem;
}

.terminal-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.terminal-modal.active {
    display: flex;
}

.terminal-window {
    width: min(880px, 100%);
    border-radius: 1.4rem;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.16);
    background: rgba(4, 10, 24, 0.96);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.72);
}

.terminal-topbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--bdr);
}

.terminal-light {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
}

#term-output {
    height: min(48vh, 24rem);
    overflow-y: auto;
    padding: 1rem 1rem 0;
    font-size: 0.86rem;
    color: #d7e0ff;
}

.term-line {
    margin-bottom: 0.55rem;
    word-break: break-word;
}

.term-line.muted {
    color: rgba(215, 224, 255, 0.58);
}

.term-line.accent {
    color: var(--pri);
}

.assistant-root {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9800;
}

.assistant-toggle {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.96), rgba(147, 51, 234, 0.96));
    color: #fff;
    box-shadow: 0 24px 46px -24px var(--glow);
}

.assistant-panel {
    position: absolute;
    right: 0;
    bottom: 4.4rem;
    width: min(380px, calc(100vw - 2rem));
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.18);
    background: rgba(6, 11, 24, 0.96);
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.72);
    display: none;
}

.assistant-panel.open {
    display: block;
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.assistant-messages {
    max-height: 20rem;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.assistant-message {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.assistant-message.user {
    align-items: flex-end;
}

.assistant-message-label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(240, 244, 255, 0.42);
}

.assistant-bubble {
    max-width: 92%;
    padding: 0.8rem 0.95rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(240, 244, 255, 0.9);
    font-size: 0.88rem;
    line-height: 1.55;
}

.assistant-message.user .assistant-bubble {
    background: rgba(129, 140, 248, 0.12);
    border-color: rgba(129, 140, 248, 0.2);
}

.assistant-suggestions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
    overflow-x: auto;
}

.assistant-suggestion {
    flex: 0 0 auto;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--bdr);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(240, 244, 255, 0.78);
    font-size: 0.72rem;
}

.assistant-input-row {
    display: flex;
    gap: 0.65rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.assistant-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid var(--bdr);
    background: rgba(255, 255, 255, 0.04);
    color: var(--txt);
    padding: 0.8rem 1rem;
    outline: none;
}

.assistant-input:focus {
    border-color: var(--pri);
}

body.modal-open {
    overflow: hidden;
}

#site-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(129, 140, 248, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(5, 9, 20, 0.98), rgba(6, 11, 24, 0.98));
    z-index: 10050;
    transition: opacity 0.42s var(--ease), visibility 0.42s var(--ease);
}

#site-loader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-ring {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--pri);
    border-right-color: var(--acc);
    animation: loader-spin 0.82s linear infinite;
}

.loader-copy {
    color: rgba(240, 244, 255, 0.7);
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.nav-portal-btn {
    padding: 0.82rem 1.05rem;
    font-size: 0.63rem;
}

.signal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 16px 34px -28px rgba(0, 0, 0, 0.8);
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(240, 244, 255, 0.86);
}

.signal-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.55);
    animation: signal-pulse 1.8s ease-in-out infinite;
}

@keyframes signal-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.38;
    }
}

.home-hero-title {
    font-size: clamp(2.8rem, 6.4vw, 5.85rem);
    line-height: 0.94;
}

.hero-gradient {
    display: inline-flex;
    align-items: center;
    min-height: 1.1em;
    background: linear-gradient(90deg, var(--pri), var(--acc), #38bdf8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: hero-shine 6s linear infinite;
}

.hero-gradient::after {
    content: "|";
    margin-left: 0.08em;
    color: var(--pri);
    -webkit-text-fill-color: var(--pri);
    animation: hero-caret 1s step-end infinite;
}

@keyframes hero-shine {
    to {
        background-position: 200% center;
    }
}

@keyframes hero-caret {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-console {
    position: relative;
    overflow: hidden;
}

.hero-console::before {
    content: "";
    position: absolute;
    inset: -18% auto auto 58%;
    width: 16rem;
    height: 16rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.18), transparent 72%);
    filter: blur(6px);
    pointer-events: none;
}

.hero-console-lines {
    display: grid;
    gap: 0.8rem;
}

.hero-console-line,
.hero-surface,
.portal-step {
    border-radius: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.hero-console-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
}

.hero-console-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(240, 244, 255, 0.44);
}

.hero-console-value {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    color: var(--pri);
}

.hero-surface {
    padding: 1rem;
}

.home-counter {
    display: inline-block;
    min-width: 2ch;
}

.portal-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.portal-feature-icon {
    width: 2.8rem;
    height: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    border: 1px solid rgba(129, 140, 248, 0.22);
    background: rgba(129, 140, 248, 0.08);
    color: var(--pri);
    flex-shrink: 0;
}

.portal-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(12px);
    z-index: 10020;
}

.portal-modal.active {
    display: flex;
}

.portal-shell {
    width: min(1040px, 100%);
    max-height: min(90vh, 980px);
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(129, 140, 248, 0.16);
    background: rgba(4, 10, 24, 0.98);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.78);
}

.portal-topbar {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.portal-body {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
}

.portal-sidebar {
    padding: 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background:
        radial-gradient(circle at top, rgba(129, 140, 248, 0.14), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.portal-steps {
    display: grid;
    gap: 0.85rem;
}

.portal-step {
    padding: 0.95rem 1rem;
}

.portal-main {
    padding: 1.25rem;
}

.portal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.portal-tab {
    border: 1px solid var(--bdr);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(240, 244, 255, 0.76);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.portal-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(129, 140, 248, 0.28);
    color: var(--pri);
}

.portal-tab.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--pri), var(--acc));
    color: #fff;
    box-shadow: 0 20px 38px -24px var(--glow);
}

.portal-pane {
    display: none;
    gap: 1rem;
}

.portal-pane.active {
    display: grid;
}

.portal-grid {
    display: grid;
    gap: 1rem;
}

.portal-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

[data-reveal].on {
    opacity: 1;
    transform: none;
}

@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;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1024px) {
    .nav-link::after {
        display: none;
    }
}

@media (max-width: 768px) {
    body::before {
        background-size: 52px 52px;
        opacity: 0.18;
    }

    .page-hero::before {
        width: 32rem;
        height: 18rem;
        top: 4rem;
    }

    .assistant-root {
        right: 0.9rem;
        bottom: 0.9rem;
    }

    .assistant-panel {
        width: min(360px, calc(100vw - 1rem));
    }

    .hero-console::before {
        inset: auto auto 0 50%;
        transform: translateX(-50%);
    }

    .portal-body {
        grid-template-columns: 1fr;
    }

    .portal-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
    }

    .assistant-panel {
        right: -0.2rem;
        bottom: 4.2rem;
    }

    #term-output {
        height: 18rem;
    }

    .signal-badges {
        gap: 0.5rem;
    }

    .signal-badge {
        width: 100%;
        justify-content: center;
    }

    .portal-grid.two {
        grid-template-columns: 1fr;
    }

    .portal-main,
    .portal-sidebar {
        padding: 1rem;
    }
}

:root {
    --scroll-progress: 0;
}

body::after {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    width: calc(var(--scroll-progress, 0) * 100%);
    height: 2px;
    background: linear-gradient(90deg, var(--pri), var(--acc), #38bdf8);
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.46);
    z-index: 10060;
    pointer-events: none;
}

#matrix-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -4;
    opacity: 0.18;
}

#bg-canvas {
    opacity: 0.2;
}

body {
    background:
        radial-gradient(circle at 16% 18%, rgba(56, 189, 248, 0.08), transparent 20%),
        radial-gradient(circle at 84% 12%, rgba(129, 140, 248, 0.14), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(192, 132, 252, 0.08), transparent 36%),
        linear-gradient(180deg, #050914 0%, var(--bg) 24%, #040814 100%);
}

body.hacker-mode {
    background:
        radial-gradient(circle at 16% 18%, rgba(34, 197, 94, 0.08), transparent 20%),
        radial-gradient(circle at 84% 12%, rgba(74, 222, 128, 0.12), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(34, 197, 94, 0.08), transparent 36%),
        linear-gradient(180deg, #010603 0%, var(--bg) 24%, #010a01 100%);
}

.nav-glass {
    background: rgba(6, 11, 24, 0.72);
    box-shadow: 0 18px 52px -36px rgba(2, 6, 23, 0.9);
}

.page-hero::before {
    background:
        radial-gradient(circle, rgba(129, 140, 248, 0.2) 0%, rgba(129, 140, 248, 0.1) 34%, transparent 72%),
        radial-gradient(circle at 70% 24%, rgba(56, 189, 248, 0.1), transparent 32%);
    filter: blur(18px);
}

.page-hero::after {
    width: 28rem;
    height: 28rem;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.16), transparent 70%);
    opacity: 0.92;
}

.card-glass,
.metric-card,
.hero-console-line,
.hero-surface,
.portal-step,
.status-box {
    box-shadow: 0 28px 80px -56px rgba(15, 23, 42, 0.92);
}

.card-glass:hover,
.metric-card:hover {
    box-shadow: 0 34px 82px -46px rgba(129, 140, 248, 0.34);
}

.metric-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
        rgba(255, 255, 255, 0.02);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.45), transparent);
    opacity: 0.72;
}

.hero-console,
.portal-shell,
.terminal-window,
.assistant-panel {
    background:
        radial-gradient(circle at top right, rgba(129, 140, 248, 0.12), transparent 28%),
        rgba(4, 10, 24, 0.94);
}

.route-card::before,
.timeline-card::after,
.quote-card::after {
    opacity: 0.9;
}

.signal-badge {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.03);
}

.assistant-toggle {
    box-shadow: 0 26px 52px -24px rgba(99, 102, 241, 0.6);
}

.featured-track {
    border-color: rgba(129, 140, 248, 0.24);
    background:
        radial-gradient(circle at top, rgba(129, 140, 248, 0.18), transparent 36%),
        linear-gradient(160deg, rgba(55, 48, 163, 0.24), rgba(76, 29, 149, 0.18));
}

.home-proof-grid .quote-card {
    height: 100%;
}

.status-chip-grid {
    display: grid;
    gap: 0.9rem;
}

.status-chip {
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.status-chip-label {
    color: rgba(240, 244, 255, 0.42);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.status-chip-value {
    margin-top: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
}

@media (max-width: 1023px) {
    #mobile-menu {
        position: fixed;
        top: 4rem;
        left: 0.75rem;
        right: 0.75rem;
        z-index: 9950;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 1.25rem;
        background: rgba(6, 11, 24, 0.92) !important;
        backdrop-filter: blur(18px) saturate(1.2);
        box-shadow: 0 30px 80px -42px rgba(2, 6, 23, 0.95);
    }
}

@media (max-width: 768px) {
    #matrix-canvas {
        opacity: 0.12;
    }

    .hero-console,
    .portal-shell,
    .terminal-window,
    .assistant-panel {
        background:
            radial-gradient(circle at top, rgba(129, 140, 248, 0.1), transparent 24%),
            rgba(4, 10, 24, 0.96);
    }
}
