:root {
    --bg-0: #07131d;
    --bg-1: #0d2332;
    --bg-2: #12384a;
    --panel: rgba(7, 19, 29, 0.72);
    --panel-border: rgba(128, 214, 255, 0.28);
    --ink: #e5f6ff;
    --muted: #9ec3d3;
    --accent: #4df5c8;
    --accent-2: #7ce7ff;
    --danger: #ff8d8d;
    --ok: #93ffa8;
    --warning: #ffe085;
    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(77, 245, 200, 0.18), transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(124, 231, 255, 0.14), transparent 45%),
        linear-gradient(130deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
    color: var(--ink);
    line-height: 1.5;
}

.grid-noise::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 5vw;
    border-bottom: 1px solid rgba(158, 195, 211, 0.22);
    background: rgba(4, 14, 22, 0.74);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand strong {
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.94rem;
}

.nav a:hover,
.nav a.active {
    color: var(--ink);
    border-color: rgba(124, 231, 255, 0.4);
    background: rgba(124, 231, 255, 0.08);
}

main {
    width: min(1180px, 92vw);
    margin: 0 auto;
    padding: 44px 0 70px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-2);
}

.section-title::before {
    content: "";
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
}

.hero {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 34px;
    align-items: center;
    padding: 30px 0 54px;
}

.hero h1 {
    font-size: clamp(2rem, 4.2vw, 3.7rem);
    line-height: 1.04;
    margin: 0;
    max-width: 16ch;
}

.hero p {
    margin: 18px 0 26px;
    color: var(--muted);
    max-width: 55ch;
    font-size: 1.06rem;
}

.chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    border-radius: 999px;
    border: 1px solid rgba(124, 231, 255, 0.35);
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--ink);
    background: rgba(5, 30, 44, 0.52);
}

.glow-stage {
    position: relative;
    aspect-ratio: 1;
    max-width: 440px;
    margin-inline: auto;
    display: grid;
    place-items: center;
}

.glow-orbit,
.glow-orbit-2,
.glow-orbit-3 {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(124, 231, 255, 0.34);
    animation: spin 13s linear infinite;
}

.glow-orbit {
    inset: 12%;
}

.glow-orbit-2 {
    inset: 24%;
    animation-direction: reverse;
    animation-duration: 19s;
}

.glow-orbit-3 {
    inset: 35%;
    animation-duration: 10s;
}

.glow-core {
    width: 56%;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 30%, rgba(124, 231, 255, 0.95), rgba(77, 245, 200, 0.85) 52%, rgba(9, 34, 46, 0.95) 78%);
    box-shadow: 0 0 26px rgba(124, 231, 255, 0.72), 0 0 72px rgba(77, 245, 200, 0.28);
    animation: pulse 3.2s ease-in-out infinite;
}

.glow-core img {
    width: 44%;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.7));
}

.card-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.panel {
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border);
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 18px;
}

.panel h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.panel p {
    margin: 0;
    color: var(--muted);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.kpi {
    background: rgba(4, 29, 41, 0.7);
    border: 1px solid rgba(124, 231, 255, 0.24);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.kpi small {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
}

.kpi strong {
    display: block;
    margin-top: 8px;
    font-size: 1.46rem;
}

.status {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 0.82rem;
    color: var(--muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 12px rgba(147, 255, 168, 0.65);
}

.diagram-wrap {
    overflow: auto;
}

.diagram {
    width: 100%;
    min-width: 860px;
    border: 1px solid rgba(124, 231, 255, 0.25);
    border-radius: var(--radius-lg);
    background: rgba(4, 17, 28, 0.75);
    padding: 18px;
}

.node {
    fill: rgba(8, 43, 61, 0.95);
    stroke: rgba(124, 231, 255, 0.72);
    stroke-width: 1.6;
    rx: 12;
}

.node-title {
    fill: #ddf7ff;
    font-size: 14px;
    font-weight: 700;
}

.node-sub {
    fill: #9ec3d3;
    font-size: 12px;
}

.path-line {
    stroke: #7ce7ff;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 8 6;
    animation: dash 1.8s linear infinite;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(124, 231, 255, 0.3);
    border-radius: 10px;
    background: rgba(2, 23, 34, 0.86);
    color: var(--ink);
    padding: 11px 12px;
    font-family: inherit;
    font-size: 0.95rem;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    border: 0;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #033143;
    cursor: pointer;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.step {
    border: 1px solid rgba(124, 231, 255, 0.24);
    border-radius: var(--radius-sm);
    padding: 12px;
    background: rgba(4, 22, 34, 0.74);
}

.step span {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(124, 231, 255, 0.14);
    color: var(--accent-2);
    font-size: 0.74rem;
    text-transform: uppercase;
}

.badge-green { background: rgba(34,197,94,0.18); color: #22c55e; }
.badge-red   { background: rgba(239,68,68,0.18);  color: #ef4444; }
.badge-yellow{ background: rgba(245,158,11,0.18); color: #f59e0b; }
.badge-muted { background: rgba(124,231,255,0.10); color: var(--muted); }

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    padding-top: 28px;
}

.flash-item {
    margin: 8px 0;
    color: var(--muted);
}

.flash-success {
    color: var(--ok);
}

.flash-error {
    color: var(--danger);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: -28;
    }
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .glow-stage {
        max-width: 340px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 12px 4vw;
    }

    .brand strong {
        font-size: 0.85rem;
    }

    .nav {
        width: 100%;
    }

    .nav a {
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.82rem;
    }

    .kpi strong {
        font-size: 1.2rem;
    }
}
