:root {
    --bg: #030608;
    --panel: #081014;
    --panel-strong: #0c151b;
    --line: rgba(137, 255, 46, 0.28);
    --line-violet: rgba(132, 63, 255, 0.34);
    --text: #eef4f1;
    --muted: #9aa8a5;
    --green: #8dff37;
    --green-dark: #39d844;
    --violet: #8c43ff;
    --cyan: #00a9ff;
    --shadow: 0 20px 70px rgba(0, 0, 0, 0.48);
    --header-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 20%, rgba(0, 169, 255, 0.16), transparent 28%),
        radial-gradient(circle at 82% 14%, rgba(140, 67, 255, 0.18), transparent 24%),
        linear-gradient(180deg, #000 0%, var(--bg) 48%, #000 100%);
    font-family: "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

img {
    max-width: 100%;
    display: block;
}

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

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--header-height);
    border-bottom: 1px solid var(--line);
    background: rgba(3, 6, 8, 0.86);
    backdrop-filter: blur(16px);
    transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
    background: rgba(3, 6, 8, 0.96);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.5);
}

.header-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: clamp(1rem, 2vw, 1.35rem);
}

.brand span span {
    color: var(--violet);
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line-violet);
    box-shadow: 0 0 20px rgba(140, 67, 255, 0.38);
    object-fit: cover;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
    color: var(--green);
    border-color: var(--line);
    background: rgba(141, 255, 55, 0.08);
    outline: none;
}

.site-nav a.is-active {
    box-shadow: inset 0 -2px 0 var(--green), 0 0 22px rgba(141, 255, 55, 0.16);
    text-shadow: 0 0 14px rgba(141, 255, 55, 0.45);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: none;
    place-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    background: rgba(141, 255, 55, 0.08);
    color: var(--green);
    cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
    width: 20px;
    height: 2px;
    background: currentColor;
}

.site-main {
    flex: 1 0 auto;
}

.hero {
    position: relative;
    min-height: 100svh;
    isolation: isolate;
    display: grid;
    align-items: end;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 169, 255, 0.24);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.38) 52%, rgba(0, 0, 0, 0.74)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(3, 6, 8, 0.9));
}

.hero-content {
    padding: clamp(64px, 10vw, 132px) 0 58px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    position: relative;
    max-width: 760px;
    margin-bottom: 14px;
    font-size: clamp(3.2rem, 11vw, 8rem);
    line-height: 0.9;
    text-shadow: 0 0 24px rgba(141, 255, 55, 0.45);
}

h1 span {
    color: var(--violet);
    text-shadow: 0 0 24px rgba(140, 67, 255, 0.58);
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.glitch-title::before {
    color: var(--cyan);
    text-shadow: -3px 0 16px rgba(0, 169, 255, 0.7);
}

.glitch-title::after {
    color: var(--violet);
    text-shadow: 3px 0 16px rgba(140, 67, 255, 0.7);
}

body.is-glitching .glitch-title {
    animation: title-glitch 900ms steps(2, end) both;
}

body.is-glitching .glitch-title::before {
    opacity: 0.76;
    animation: title-glitch-before 900ms steps(2, end) both;
}

body.is-glitching .glitch-title::after {
    opacity: 0.72;
    animation: title-glitch-after 900ms steps(2, end) both;
}

@keyframes title-glitch {
    0%, 100% {
        transform: none;
        filter: none;
    }
    10% {
        transform: translateX(-2px);
        filter: brightness(1.35);
    }
    18% {
        transform: translateX(3px) skewX(-3deg);
    }
    32% {
        transform: translateX(-4px);
    }
    46% {
        transform: translateX(2px) skewX(2deg);
        filter: contrast(1.4);
    }
    62% {
        transform: translateX(-1px);
    }
}

@keyframes title-glitch-before {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: none;
    }
    12% {
        clip-path: inset(8% 0 72% 0);
        transform: translate(-7px, -2px);
    }
    26% {
        clip-path: inset(42% 0 36% 0);
        transform: translate(5px, 1px);
    }
    48% {
        clip-path: inset(68% 0 10% 0);
        transform: translate(-5px, 2px);
    }
    70% {
        clip-path: inset(18% 0 58% 0);
        transform: translate(3px, -1px);
    }
}

@keyframes title-glitch-after {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: none;
    }
    8% {
        clip-path: inset(76% 0 4% 0);
        transform: translate(6px, 2px);
    }
    22% {
        clip-path: inset(16% 0 62% 0);
        transform: translate(-4px, -1px);
    }
    44% {
        clip-path: inset(52% 0 25% 0);
        transform: translate(7px, 1px);
    }
    64% {
        clip-path: inset(30% 0 45% 0);
        transform: translate(-3px, 2px);
    }
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.hero-copy,
.section-copy,
.contact-panel p,
.service-card p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-copy {
    max-width: 560px;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 1px solid var(--line);
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.btn-primary {
    color: #041006;
    background: linear-gradient(135deg, var(--green), #d5ff83);
    box-shadow: 0 0 30px rgba(141, 255, 55, 0.28);
}

.btn-ghost {
    color: var(--text);
    background: rgba(140, 67, 255, 0.12);
    border-color: var(--line-violet);
}

.section {
    min-height: 100svh;
    padding: clamp(56px, 8vw, 92px) 0;
    display: flex;
    align-items: center;
}

.status-section {
    background:
        linear-gradient(rgba(141, 255, 55, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 169, 255, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(8, 16, 20, 0.94), rgba(3, 6, 8, 0.94));
    background-size: 38px 38px, 38px 38px, auto;
}

.section-heading {
    max-width: 620px;
    margin-bottom: 26px;
}

.signal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 16px;
    align-items: stretch;
}

.terminal-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 169, 255, 0.34);
    background: linear-gradient(180deg, rgba(2, 8, 10, 0.96), rgba(3, 6, 8, 0.92));
    box-shadow: var(--shadow), inset 0 0 46px rgba(0, 169, 255, 0.06);
}

.terminal-bar {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(0, 169, 255, 0.24);
    background: rgba(0, 0, 0, 0.34);
}

.terminal-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(141, 255, 55, 0.42);
}

.terminal-bar span:nth-child(2) {
    background: var(--violet);
    box-shadow: 0 0 14px rgba(140, 67, 255, 0.42);
}

.terminal-bar span:nth-child(3) {
    background: var(--cyan);
    box-shadow: 0 0 14px rgba(0, 169, 255, 0.42);
}

.terminal-bar strong {
    min-width: 0;
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.terminal-panel pre {
    margin: 0;
    padding: clamp(18px, 3vw, 28px);
    overflow-x: auto;
}

.terminal-panel code {
    color: #cfe9df;
    font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
    font-size: clamp(0.82rem, 1.4vw, 0.98rem);
    line-height: 1.7;
    white-space: pre;
}

.terminal-panel code span {
    color: var(--green);
    text-shadow: 0 0 16px rgba(141, 255, 55, 0.48);
}

.status-grid,
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.signal-metrics {
    grid-template-columns: 1fr;
}

.status-card,
.service-card,
.contact-panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(12, 21, 27, 0.88), rgba(4, 9, 12, 0.88));
    box-shadow: var(--shadow);
}

.status-card {
    min-height: 124px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.status-card span {
    color: var(--muted);
    font-weight: 700;
}

.status-card strong {
    color: var(--green);
    font-size: clamp(1.12rem, 2vw, 1.38rem);
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.status-card small {
    color: var(--muted);
    font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
    font-size: 0.82rem;
}

.split-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

.lore-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 30%, rgba(140, 67, 255, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(3, 6, 8, 0.9), rgba(0, 0, 0, 0.95));
}

.code-ghosts {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.code-ghosts::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 6, 8, 0.9), rgba(3, 6, 8, 0.08) 46%, rgba(3, 6, 8, 0.88)),
        linear-gradient(180deg, rgba(3, 6, 8, 0.82), transparent 34%, rgba(3, 6, 8, 0.82));
    z-index: 1;
}

.code-ghosts span {
    position: absolute;
    z-index: 0;
    display: inline-block;
    max-width: min(760px, 92vw);
    color: rgba(141, 255, 55, 0.38);
    font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
    font-size: clamp(0.88rem, 1.55vw, 1.12rem);
    line-height: 1.4;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(141, 255, 55, 0.52);
    mix-blend-mode: screen;
    opacity: 0;
    animation: code-ghost 16s ease-in-out infinite;
}

.code-ghosts span:nth-child(1) {
    top: 14%;
    left: 6%;
    animation-delay: 0s;
}

.code-ghosts span:nth-child(2) {
    top: 24%;
    right: 3%;
    color: rgba(0, 169, 255, 0.34);
    text-shadow: 0 0 20px rgba(0, 169, 255, 0.5);
    animation-delay: 2.5s;
}

.code-ghosts span:nth-child(3) {
    top: 42%;
    left: 12%;
    color: rgba(140, 67, 255, 0.36);
    text-shadow: 0 0 20px rgba(140, 67, 255, 0.5);
    animation-delay: 5s;
}

.code-ghosts span:nth-child(4) {
    top: 62%;
    right: 9%;
    animation-delay: 7.5s;
}

.code-ghosts span:nth-child(5) {
    top: 76%;
    left: 2%;
    color: rgba(0, 169, 255, 0.32);
    text-shadow: 0 0 20px rgba(0, 169, 255, 0.46);
    animation-delay: 10s;
}

.code-ghosts span:nth-child(6) {
    top: 8%;
    right: 22%;
    animation-delay: 12.5s;
}

.code-ghosts span:nth-child(7) {
    top: 84%;
    right: 18%;
    color: rgba(140, 67, 255, 0.34);
    text-shadow: 0 0 20px rgba(140, 67, 255, 0.48);
    animation-delay: 15s;
}

.code-ghosts span:nth-child(8) {
    top: 52%;
    right: 35%;
    animation-delay: 17.5s;
}

.code-ghosts span:nth-child(9) {
    top: 33%;
    left: 34%;
    color: rgba(0, 169, 255, 0.32);
    text-shadow: 0 0 20px rgba(0, 169, 255, 0.46);
    animation-delay: 20s;
}

@keyframes code-ghost {
    0%, 12%, 100% {
        opacity: 0;
        transform: translate3d(0, 16px, 0) skewX(-4deg);
        filter: blur(1px);
    }
    22%, 58% {
        opacity: 1;
        transform: translate3d(0, 0, 0) skewX(-4deg);
        filter: blur(0);
    }
    72% {
        opacity: 0;
        transform: translate3d(0, -12px, 0) skewX(-4deg);
        filter: blur(1px);
    }
}

.service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
    min-height: 190px;
    padding: 22px;
    border-color: rgba(0, 169, 255, 0.28);
}

.service-card h3 {
    color: var(--green);
}

.contact-section {
    position: relative;
    overflow: hidden;
    padding-top: clamp(56px, 8vw, 92px);
    background:
        radial-gradient(circle at 18% 70%, rgba(0, 169, 255, 0.12), transparent 28%),
        radial-gradient(circle at 78% 32%, rgba(140, 67, 255, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.96), rgba(3, 6, 8, 0.94));
}

.contact-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(3, 6, 8, 0.62), rgba(3, 6, 8, 0.86));
    pointer-events: none;
}

.echo-wave {
    position: absolute;
    left: -18vw;
    right: -18vw;
    top: 50%;
    z-index: 0;
    height: clamp(170px, 24vw, 290px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.4vw, 18px);
    transform: translateY(-50%);
    opacity: 0.48;
    filter: hue-rotate(0deg) saturate(1.35);
    animation: echo-spectrum 11s linear infinite, echo-drift 18s ease-in-out infinite;
    pointer-events: none;
}

.echo-wave span {
    width: clamp(5px, 0.75vw, 10px);
    height: 34%;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff3df2, #8c43ff 34%, #00a9ff 68%, #8dff37);
    box-shadow:
        0 0 18px rgba(140, 67, 255, 0.48),
        0 0 34px rgba(0, 169, 255, 0.24);
    transform-origin: center;
    animation: echo-bar 2.2s ease-in-out infinite;
}

.echo-wave span:nth-child(2n) {
    height: 52%;
    animation-delay: -0.25s;
}

.echo-wave span:nth-child(3n) {
    height: 74%;
    animation-delay: -0.55s;
}

.echo-wave span:nth-child(4n) {
    height: 42%;
    animation-delay: -0.85s;
}

.echo-wave span:nth-child(5n) {
    height: 88%;
    animation-delay: -1.15s;
}

.echo-wave span:nth-child(7n) {
    height: 28%;
    animation-delay: -1.45s;
}

.contact-panel {
    position: relative;
    z-index: 1;
    min-height: 150px;
    padding: clamp(24px, 4vw, 42px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-color: var(--line-violet);
    backdrop-filter: blur(10px);
}

.contact-panel p {
    margin-bottom: 0;
}

@keyframes echo-bar {
    0%, 100% {
        transform: scaleY(0.48);
        opacity: 0.42;
    }
    38% {
        transform: scaleY(1.14);
        opacity: 0.92;
    }
    62% {
        transform: scaleY(0.72);
        opacity: 0.64;
    }
}

@keyframes echo-spectrum {
    0% {
        filter: hue-rotate(0deg) saturate(1.35);
    }
    100% {
        filter: hue-rotate(360deg) saturate(1.35);
    }
}

@keyframes echo-drift {
    0%, 100% {
        transform: translate3d(-4vw, -50%, 0);
    }
    50% {
        transform: translate3d(4vw, -50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .echo-wave,
    .echo-wave span {
        animation: none;
    }
}

.site-footer {
    flex: 0 0 auto;
    min-height: 76px;
    border-top: 1px solid var(--line);
    background: #020405;
}

.footer-inner {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.footer-inner p {
    margin-bottom: 0;
}

.footer-inner p:first-child {
    color: var(--text);
    font-weight: 800;
}

.footer-brand span {
    color: var(--violet);
    text-shadow: 0 0 16px rgba(140, 67, 255, 0.64);
}

.scroll-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 45;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: rgba(3, 6, 8, 0.9);
    box-shadow: 0 0 26px rgba(141, 255, 55, 0.22), var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top:hover,
.scroll-top:focus-visible {
    border-color: var(--line-violet);
    box-shadow: 0 0 30px rgba(140, 67, 255, 0.28), var(--shadow);
    outline: none;
    transform: translateY(-3px);
}

.scroll-top img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px rgba(141, 255, 55, 0.6));
    pointer-events: none;
}

@media (max-width: 860px) {
    :root {
        --header-height: 68px;
    }

    .nav-toggle {
        display: grid;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 10px);
        display: grid;
        gap: 6px;
        padding: 12px;
        border: 1px solid var(--line);
        background: rgba(3, 6, 8, 0.98);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 160ms ease, transform 160ms ease;
    }

    .site-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a {
        width: 100%;
    }

    .hero-bg {
        object-position: 54% center;
    }

    .status-grid,
    .service-grid,
    .split-layout,
    .signal-layout {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .brand {
        font-size: 1rem;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    .hero-content {
        padding-bottom: 36px;
    }

    .btn {
        width: 100%;
    }
}
