@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Syne:wght@500;700;800&display=swap");

:root {
    --bg: #040608;
    --bg-soft: #0a1110;
    --panel: rgba(8, 19, 16, 0.72);
    --panel-border: rgba(143, 255, 196, 0.28);
    --text: #d6ffe6;
    --muted: #9ad8b3;
    --accent: #90ffbb;
    --accent-strong: #4cff95;
    --shadow: rgba(108, 255, 171, 0.28);
}

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

html,
body {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.abyss {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(89, 255, 167, 0.11), transparent 48%),
        radial-gradient(circle at 82% 85%, rgba(89, 189, 255, 0.11), transparent 45%),
        radial-gradient(circle at 50% 50%, var(--bg-soft) 0%, var(--bg) 62%);
    z-index: 0;
}

#network-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.site-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem 1rem;
}

.brand {
    font-family: "Syne", sans-serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    text-shadow:
        0 0 10px rgba(144, 255, 187, 0.8),
        0 0 30px rgba(144, 255, 187, 0.6),
        0 0 60px rgba(144, 255, 187, 0.4),
        0 0 100px rgba(144, 255, 187, 0.3);
    animation: brand-glow 7s ease-in-out infinite;
}

@keyframes brand-glow {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(144, 255, 187, 0.6),
            0 0 30px rgba(144, 255, 187, 0.4),
            0 0 60px rgba(144, 255, 187, 0.3),
            0 0 100px rgba(144, 255, 187, 0.2);
    }
    50% {
        text-shadow:
            0 0 10px rgba(144, 255, 187, 1),
            0 0 40px rgba(144, 255, 187, 0.8),
            0 0 80px rgba(144, 255, 187, 0.5),
            0 0 120px rgba(144, 255, 187, 0.4);
    }
}

.tab-nav {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: 1rem 0 1.5rem;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.tab-nav button {
    background: none;
    border: none;
    font-family: "Syne", sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 180ms ease;
    opacity: 0;
    animation: fade-in 2.5s ease-out 1.2s forwards, float 12s ease-in-out infinite;
    animation-delay: 1.2s, 0s;
}

.tab-nav button:nth-child(2) {
    animation-delay: 1.2s, 4s;
}

.tab-nav button:nth-child(3) {
    animation-delay: 1.2s, 8s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(2px, -2px);
    }
    50% {
        transform: translate(-1px, -3px);
    }
    75% {
        transform: translate(-2px, -1px);
    }
}

.tab-nav button:hover {
    color: var(--accent);
}

.tab-nav button.active {
    color: var(--accent);
}

.tab-nav button.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--shadow);
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

main {
    position: relative;
    z-index: 10;
    width: min(1100px, 100% - 2rem);
    margin: 2rem auto 4rem;
    display: grid;
    gap: 1.25rem;
}

.main-content {
    margin-bottom: 1.25rem;
}

.main-content:empty,
.secondary-content:empty {
    display: none;
}

.main-content .panel {
    min-height: 200px;
    animation: content-fade-in 0.4s ease-out;
}

.secondary-content .panel {
    animation: content-fade-in 0.4s ease-out;
}

@keyframes content-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content.fading-out,
.secondary-content.fading-out {
    animation: content-fade-out 0.4s ease-out forwards;
}

@keyframes content-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.secondary-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.secondary-content .panel {
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.secondary-content .panel:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35), 0 0 20px var(--shadow);
}

.secondary-content .panel h2 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.secondary-content .panel p {
    font-size: 0.9rem;
}

.secondary-content .capability-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.secondary-content .capability-card {
    padding: 0.75rem;
}

.secondary-content .capability-card h3 {
    font-size: 0.95rem;
}

.secondary-content .capability-card p {
    font-size: 0.85rem;
}

.secondary-content .depth-markers {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.secondary-content .marker {
    padding: 0.5rem;
}

.secondary-content .marker-value {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.secondary-content .marker-label {
    font-size: 0.65rem;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 1rem;
    padding: clamp(1.2rem, 2.5vw, 2rem);
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
}

h1,
h2,
h3 {
    font-family: "Syne", sans-serif;
    line-height: 1.14;
}

h2 {
    font-size: clamp(1.35rem, 3.3vw, 2rem);
    letter-spacing: 0.04rem;
    color: var(--text);
}

.panel p {
    margin-top: 0.65rem;
    color: var(--muted);
}

.capability-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.capability-card {
    background: rgba(4, 12, 10, 0.8);
    border: 1px solid rgba(143, 255, 196, 0.2);
    border-radius: 0.9rem;
    padding: 1rem;
}

.capability-card h3 {
    color: var(--accent);
    font-size: 1.1rem;
}

.capability-card p {
    margin-top: 0.45rem;
    font-size: 0.94rem;
}

.depth-markers {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.marker {
    text-align: center;
    padding: 0.9rem;
    border-radius: 0.8rem;
    background: rgba(2, 10, 8, 0.72);
    border: 1px solid rgba(143, 255, 196, 0.18);
}

.marker-value {
    display: block;
    font-size: clamp(1.85rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--shadow);
}

.marker-label {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: var(--muted);
}

.whisper {
    position: fixed;
    font-size: 1rem;
    color: rgba(123, 255, 182, 0.56);
    opacity: 0;
    animation: whisper-fade 10s ease-in-out infinite;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    z-index: 4;
}

.whisper-1 {
    top: 26%;
    right: 11%;
    animation-delay: 0s;
}

.whisper-2 {
    top: 70%;
    left: 8%;
    animation-delay: 5s;
}

.whisper-3 {
    top: 62%;
    right: 8%;
    animation-delay: 10s;
}

.noscript-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 30;
    background: rgba(1, 7, 5, 0.95);
    border: 1px solid rgba(143, 255, 196, 0.45);
    color: var(--text);
    padding: 0.7rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.84rem;
}

@keyframes whisper-fade {
    0%,
    32%,
    68%,
    100% {
        opacity: 0;
    }
    48%,
    56% {
        opacity: 0.7;
    }
}

.zen-dock {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 25;
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
}

.zen-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.simulation-label {
    min-width: 8.5rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(143, 255, 196, 0.22);
    border-radius: 999px;
    background: rgba(4, 6, 8, 0.58);
    backdrop-filter: blur(10px);
    color: var(--muted);
    font-family: "Syne", sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.08rem;
    text-align: center;
    text-transform: uppercase;
}

.zen-step,
.zen-toggle {
    position: fixed;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(143, 255, 196, 0.3);
    background: rgba(4, 6, 8, 0.6);
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 200ms ease, background 200ms ease;
}

.zen-step,
.zen-toggle {
    position: static;
}

.zen-step {
    color: var(--muted);
    font-family: "Syne", sans-serif;
    font-size: 1.35rem;
    line-height: 1;
}

.zen-step:hover,
.zen-toggle:hover {
    border-color: var(--accent);
    background: rgba(4, 6, 8, 0.8);
}

.zen-step:disabled {
    opacity: 0.35;
    cursor: default;
}

.zen-icon {
    width: 18px;
    height: 18px;
    border: 2px solid var(--muted);
    border-radius: 50%;
    position: relative;
    transition: border-color 200ms ease, transform 200ms ease;
}

.zen-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--muted);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: background 200ms ease;
}

.zen-toggle:hover .zen-icon {
    border-color: var(--accent);
}

.zen-toggle:hover .zen-icon::before {
    background: var(--accent);
}

main {
    opacity: 1;
    transition: opacity 0.8s ease;
}

body.zen-mode main {
    opacity: 0;
    pointer-events: none;
}

body.zen-mode .whisper {
    display: none;
}

body.zen-mode .zen-icon {
    transform: scale(1.2);
    border-color: var(--accent);
}

body.zen-mode .zen-icon::before {
    background: var(--accent);
}

@media (max-width: 900px) {
    .capability-grid,
    .depth-markers {
        grid-template-columns: 1fr;
    }

    .secondary-content {
        grid-template-columns: 1fr;
    }

    .secondary-content .depth-markers {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 620px) {
    .whisper {
        display: none;
    }

    .zen-dock {
        right: 1rem;
        bottom: 1rem;
        gap: 0.45rem;
    }

    .simulation-label {
        min-width: 7rem;
        font-size: 0.68rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    #network-canvas,
    .whisper {
        display: none;
    }
}
