:root {
    --c-primary: #804ee4;
    --c-primary-hover: #6a3bc5;
    --c-primary-light: #f4effc;
    --c-text-main: #1d1d21;
    --c-text-muted: #5e5e66;
    --c-bg-base: #ffffff;
    --c-bg-alt: #faf9fd;
    --c-bg-dark: #120c1e;
    --c-border: rgba(128, 78, 228, 0.08);
    --radius-soft: 18px;
    --radius-pill: 100px;
    --radius-inner: 12px;
    --shadow-float: 0 8px 24px rgba(128, 78, 228, 0.08);
    --shadow-subtle: 0 2px 12px rgba(0, 0, 0, 0.03);
    --transition: all 0.25s ease;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--c-text-main);
    background-color: var(--c-bg-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Base Shell */
.cloak {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Crest (Header) */
.crest {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
}

.nexus {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.sigil {
    display: flex;
    align-items: center;
    height: 36px;
    min-width: 0;
}

.sigil img {
    height: 100%;
    width: auto;
    display: block;
}

.mesh {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
    min-width: 0;
}

.wire {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-text-muted);
    position: relative;
    padding: 8px 0;
}

.wire:hover,
.wire.active {
    color: var(--c-primary);
}

.wire::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--c-primary);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.wire:hover::after,
.wire.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Typography */
.apex-mega {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--c-text-main);
    margin: 0 0 1.5rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.apex-major {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 2rem;
    white-space: normal;
}

.apex-minor {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 1rem;
}

.cipher-tunnel {
    font-size: 1.125rem;
    color: var(--c-text-muted);
    margin: 0 0 2rem;
    max-width: 640px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.cipher-muted {
    font-size: 1rem;
    color: var(--c-text-muted);
    margin: 0;
    word-break: break-word;
}

/* Buttons */
.pulse-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: var(--c-primary);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 20px rgba(128, 78, 228, 0.25);
    border: 2px solid var(--c-primary);
    cursor: pointer;
    min-width: 0;
}

.pulse-primary:hover {
    background-color: var(--c-primary-hover);
    border-color: var(--c-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(128, 78, 228, 0.35);
}

.pulse-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: transparent;
    color: var(--c-text-main);
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 2px solid var(--c-border);
    cursor: pointer;
    min-width: 0;
}

.pulse-secondary:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background-color: var(--c-primary-light);
}

.cluster-pulses {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    min-width: 0;
}

/* Portal Split (Hero Variant) */
.portal-split {
    background: linear-gradient(135deg, var(--c-bg-alt) 0%, var(--c-bg-alt) 55%, var(--c-bg-base) 55%, var(--c-bg-base) 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.portal-split .cloak {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4rem;
}

.flare-cipher {
    flex: 1 1 500px;
    min-width: 0;
    z-index: 2;
}

.flare-visual {
    flex: 1 1 400px;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.flare-visual svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(128, 78, 228, 0.15));
    transform: translateY(0);
    transition: var(--transition);
}

.flare-visual:hover svg {
    transform: translateY(-10px);
}

.band-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background-color: var(--c-primary-light);
    color: var(--c-primary);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    margin-bottom: 1.5rem;
}

/* Steps (Aside) */
.stream-steps {
    padding: 5rem 0;
    background-color: var(--c-bg-base);
}

.cluster-matrix {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    min-width: 0;
}

.shard-step {
    flex: 1 1 calc(25% - 24px);
    min-width: 260px;
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--c-border);
    position: relative;
    transition: var(--transition);
}

.shard-step:hover {
    box-shadow: var(--shadow-float);
    border-color: rgba(128, 78, 228, 0.2);
    transform: translateY(-4px);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--c-primary-light);
    color: var(--c-primary);
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

/* Explanation (Comparison Section) */
.orbit-modes {
    padding: 5rem 0;
    background-color: var(--c-bg-alt);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}

.pod-mode {
    flex: 1 1 calc(33.333% - 24px);
    min-width: 300px;
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-subtle);
    border: 1px solid transparent;
    transition: var(--transition);
}

.pod-mode:hover {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-float);
}

.glyph-surface {
    display: inline-flex;
    padding: 16px;
    background-color: var(--c-bg-alt);
    border-radius: var(--radius-inner);
    margin-bottom: 1.5rem;
    color: var(--c-primary);
}

/* Tutorial (Div Layout) */
.tunnel-lan {
    padding: 5rem 0;
    background-color: var(--c-bg-base);
}

.tunnel-split {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    align-items: center;
}

.tunnel-cipher {
    flex: 1 1 400px;
    min-width: 0;
}

.cluster-flow {
    flex: 1 1 500px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drop-lan {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 1.5rem;
    background-color: var(--c-bg-alt);
    border-radius: var(--radius-inner);
    border: 1px solid var(--c-border);
    transition: var(--transition);
}

.drop-lan:hover {
    background-color: #fff;
    box-shadow: var(--shadow-subtle);
    transform: translateX(8px);
}

.drop-lan .glyph {
    color: var(--c-primary);
    flex-shrink: 0;
}

/* Tail (Footer) */
.tail {
    background-color: var(--c-bg-dark);
    padding: 4rem 0 2rem;
    color: #fff;
}

.tail-matrix {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.tail-brand {
    flex: 1 1 240px;
    min-width: 0;
}

.tail-apex {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
}

.tail-cipher {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}

.tail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    min-width: 0;
}

.tail-branch {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 120px;
}

.tail-branch span {
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
}

.tail-branch a {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}

.tail-branch a:hover {
    color: var(--c-primary-light);
}

.tail-under {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.875rem;
}

/* Inline Links */
.wire-inline {
    color: var(--c-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
}
.wire-inline:hover {
    text-decoration-color: var(--c-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .portal-split {
        background: var(--c-bg-alt);
        padding: 4rem 0;
    }
}

@media (max-width: 768px) {
    .mesh {
        display: none; /* In real scenario, a burger menu would replace this */
    }
    
    .portal-split .cloak,
    .tunnel-split {
        flex-direction: column;
        gap: 2rem;
    }

    .apex-mega {
        font-size: 2.2rem;
    }
    
    .shard-step,
    .pod-mode {
        flex: 1 1 100%;
    }
}

.nexus-crest {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--c-text-main);
}
.nexus-crest,
.nexus-crest *,
.nexus-crest *::before,
.nexus-crest *::after {
    box-sizing: border-box;
}

.nexus-crest [role="navigation"],
.nexus-crest div,
.nexus-crest section,
.nexus-crest article,
.nexus-crest aside,
.nexus-crest p,
.nexus-crest h1,
.nexus-crest h2,
.nexus-crest h3,
.nexus-crest h4,
.nexus-crest h5,
.nexus-crest h6,
.nexus-crest a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.nexus-crest p,
.nexus-crest h1,
.nexus-crest h2,
.nexus-crest h3,
.nexus-crest h4,
.nexus-crest h5,
.nexus-crest h6 {
    text-decoration: none;
}

.nexus-crest img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.nexus-crest {
    box-shadow: none;
    filter: none;
    text-shadow: none;
    background-image: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
}

.nexus-crest a.nexus-wire {
    --aisite-shell-nav-padding: 0.5rem 0;
    --aisite-shell-nav-margin: 0;
    --aisite-shell-nav-line-height: normal;
    --aisite-shell-nav-display: inline;
    --aisite-shell-nav-height: auto;
    --aisite-shell-nav-min-height: auto;
}

.nexus-crest a.nexus-wire,
.nexus-crest a.nexus-wire:hover,
.nexus-crest a.nexus-wire:focus,
.nexus-crest a.nexus-wire:active,
.nexus-crest a.nexus-wire.active,
.nexus-crest a.nexus-wire[aria-current="page"] {
    background: transparent;
    border: none;
    border-bottom: none;
    box-shadow: none;
    outline: none;
    text-decoration: none;
    padding: var(--aisite-shell-nav-padding, 0);
    margin: var(--aisite-shell-nav-margin, 0);
    line-height: var(--aisite-shell-nav-line-height, normal);
    display: var(--aisite-shell-nav-display, inline);
    height: var(--aisite-shell-nav-height, auto);
    min-height: var(--aisite-shell-nav-min-height, auto);
}

.nexus-crest{
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 100;
            border-bottom: 1px solid rgba(0,0,0,0.05);
            transition: all 0.25s ease;
        }

.nexus-crest .nexus-nexus{
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            height: 80px;
            max-width: 1240px;
            margin: 0 auto;
            padding: 0 2rem;
        }

.nexus-crest .nexus-nexus > *{
            min-width: 0;
        }

.nexus-crest .nexus-sigil{
            display: flex;
            align-items: center;
        }

.nexus-crest .nexus-sigil img{
            height: 32px;
            width: auto;
            display: block;
        }

.nexus-crest .nexus-mesh{
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 2rem;
        }

.nexus-crest .nexus-mesh > *{
            min-width: 0;
        }

.nexus-crest .nexus-wire{
            text-decoration: none;
            color: #5e5e66;
            font-weight: 500;
            font-size: 0.95rem;
            transition: all 0.25s ease;
            position: relative;
            padding: 0.5rem 0;
        }

.nexus-crest .nexus-wire:hover{
            color: #804ee4;
        }

.nexus-crest .nexus-wire.active{
            color: #804ee4;
            font-weight: 600;
        }

.nexus-crest .nexus-wire.active::after{
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #804ee4;
            border-radius: 2px;
        }

@media (max-width: 768px){.nexus-crest .nexus-nexus{
                height: 70px;
                padding: 0 1.5rem;
            }

.nexus-crest .nexus-mesh{
                display: none; 
            }}

.nexus-crest {
    background: rgb(255, 255, 255);
    background-image: none;
}

.root-tail {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--c-text-main);
}
.root-tail,
.root-tail *,
.root-tail *::before,
.root-tail *::after {
    box-sizing: border-box;
}

.root-tail [role="navigation"],
.root-tail div,
.root-tail section,
.root-tail article,
.root-tail aside,
.root-tail p,
.root-tail h1,
.root-tail h2,
.root-tail h3,
.root-tail h4,
.root-tail h5,
.root-tail h6,
.root-tail a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.root-tail p,
.root-tail h1,
.root-tail h2,
.root-tail h3,
.root-tail h4,
.root-tail h5,
.root-tail h6 {
    text-decoration: none;
}

.root-tail img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.root-tail {
    box-shadow: none;
    filter: none;
    text-shadow: none;
    background-image: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
}

.root-tail a,
.root-tail a:hover,
.root-tail a:focus,
.root-tail a:active {
    background: transparent;
    box-shadow: none;
    outline: none;
    text-decoration: none;
}

.root-tail .root-wire{
            text-decoration: none;
            color: #5e5e66;
            font-weight: 500;
            font-size: 0.95rem;
            transition: all 0.25s ease;
            position: relative;
            padding: 0.5rem 0;
        }

.root-tail .root-wire:hover{
            color: #804ee4;
        }

.root-tail .root-wire.active{
            color: #804ee4;
            font-weight: 600;
        }

.root-tail .root-wire.active::after{
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #804ee4;
            border-radius: 2px;
        }

.root-tail{
            background-color: #0b0714;
            color: rgba(255,255,255,0.6);
            padding: 4rem 2rem 2rem;
            text-align: center;
            font-size: 0.95rem;
        }

.root-tail .root-tail-brand{
            font-size: 1.5rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 1rem;
            letter-spacing: 0.5px;
        }

.root-tail .root-cluster-tail-links{
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 2rem;
            margin-bottom: 2rem;
        }

.root-tail .root-cluster-tail-links > *{ min-width: 0; }

.root-tail .root-wire{
            color: rgba(255,255,255,0.6);
        }

.root-tail .root-wire:hover{
            color: #804ee4;
        }

.root-tail .root-cipher-cipher{
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 2rem;
            max-width: 1240px;
            margin: 0 auto;
        }