/* The Museum Vault Color Palette */
:root {
    /* Locked to pure white to match the video background */
    --vault-bg: #FFFFFF; 
    --obsidian: #1A1A1A;
    --marble-grey: #8A8A8A;
    --bg-default: #FFFFFF;
    --bg-a: #E6F7F2;
    --bg-b: #D8D1E6;
    --bg-c: #F0F0F0;
}

body, html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--vault-bg);
    color: var(--obsidian);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.container > * { animation: fadein 1.5s ease-in-out forwards; }

/* Landing page viewport fit + hero overlap */
body.landing-page {
    justify-content: flex-start;
    overflow: hidden;
}

body.landing-page .container {
    width: min(96vw, 1200px);
    height: 100dvh;
    min-height: 100dvh;
    padding: 1.2rem 2rem 0.7rem;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: start;
    justify-items: center;
    gap: 0.22rem;
    overflow: hidden;
}

body.landing-page .video-wrapper {
    width: 100%;
    max-width: 920px;
    margin-top: 0.2rem;
    margin-bottom: 0;
    transform: none;
    padding-bottom: 0;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

body.landing-page .hero-video {
    width: min(460px, 44vw);
    max-width: 100%;
    max-height: 34dvh;
    transform: translateY(30%) scale(2.6);
    object-fit: contain;
    transform-origin: center center;
}

body.landing-page.video-ready .video-wrapper {
    opacity: 1;
    visibility: visible;
}

body.landing-page .logo-wrapper {
    margin-top: 0.1rem;
    transform: none;
}

body.landing-page p.description,
body.landing-page .waitlist-form {
    transform: none;
    position: relative;
    z-index: 25;
}

body.landing-page .kleio-logo {
    max-width: 210px;
}

body.landing-page p.description {
    max-width: min(760px, 92vw);
    margin: 0.1rem 0 0.28rem;
    line-height: 1.24;
    font-size: clamp(1.2rem, 1.5vw, 1.38rem);
    display: block;
    visibility: visible;
    opacity: 1;
    color: var(--obsidian);
}

body.landing-page .waitlist-form {
    gap: 0.3rem;
}

body.landing-page input[type="email"],
body.landing-page button[type="submit"] {
    width: min(320px, 74vw);
    padding: 0.72rem;
    font-size: 0.72rem;
}

@media (max-height: 860px) {
    body.landing-page .container {
        padding-top: 0.9rem;
        gap: 0.2rem;
    }

    body.landing-page .video-wrapper {
        margin-bottom: 0;
    }

    body.landing-page .hero-video {
        width: min(410px, 40vw);
        max-height: 30dvh;
        transform: translateY(30%) scale(2.6);
    }

    body.landing-page .kleio-logo {
        max-width: 190px;
    }

    body.landing-page p.description {
        font-size: clamp(1.08rem, 1.35vw, 1.26rem);
        line-height: 1.18;
        margin-bottom: 0.2rem;
    }
}

@media (max-height: 760px) {
    body.landing-page .container {
        padding-top: 0.7rem;
        padding-bottom: 0.35rem;
        gap: 0.12rem;
    }

    body.landing-page .video-wrapper {
        margin-bottom: 0;
    }

    body.landing-page .hero-video {
        width: min(330px, 34vw);
        max-height: 24dvh;
        transform: translateY(30%) scale(2.6);
    }

    body.landing-page .kleio-logo {
        max-width: 168px;
    }

    body.landing-page p.description {
        font-size: clamp(0.99rem, 1.24vw, 1.14rem);
        line-height: 1.12;
    }

    body.landing-page input[type="email"],
    body.landing-page button[type="submit"] {
        padding: 0.56rem;
        font-size: 0.64rem;
    }
}

/* Cinematic Video Centralization */
.video-wrapper {
    width: 100%;
    max-width: 700px; /* Lower this number to 600px if you also want to shrink the video size */
    margin-top: 3rem; /* THE NUDGE: This physically brings the video down from the top of the screen */
    margin-bottom: -8rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.hero-video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* --- THE FLOATING MENU ARCHITECTURE --- */
.logo-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.kleio-logo {
    max-width: 280px; 
    height: auto;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    z-index: 5;
    left: -5px; 
}

.kleio-logo:hover { transform: scale(1.05); }

/* The Floating Interactive Nodes */
.wing-node {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    align-items: center;
    z-index: 2;
    white-space: nowrap;
    pointer-events: none;
}

/* Clean math for symmetrical floating placement */
.logo-wrapper.active .wing-node.left {
    opacity: 1;
    visibility: visible;
    transform: translate(calc(-50% - 150px), -50%);
    z-index: 12;
    pointer-events: auto;
}

.logo-wrapper.active .wing-node.right {
    opacity: 1;
    visibility: visible;
    transform: translate(calc(-50% + 150px), -50%);
    z-index: 12;
    pointer-events: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--obsidian);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.3s ease;
}

/* Match branch trigger buttons exactly (Learn More + Social Media) */
.logo-wrapper .wing-node > .menu-item {
    width: 170px;
    justify-content: center;
    color: var(--obsidian);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    font-family: 'Inter', sans-serif;
}
button.menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: auto;
    min-width: 0;
    text-decoration: none;
    color: var(--obsidian);
    font-size: 0.8rem;
    line-height: normal;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: transparent;
    background-color: transparent;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}

.wing-node.left .menu-item:hover { transform: translateX(-5px); }
.wing-node.right .menu-item:hover { transform: translateX(5px); }

/* The GIF Icons */
.menu-icon {
    width: 35px; /* Sized specifically for your new GIF */
    height: auto;
    mix-blend-mode: multiply; /* Erases any white background on the GIF itself */
    transition: transform 0.4s ease;
}

.menu-item:hover .menu-icon { transform: scale(1.2); }

.social-branch {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.logo-wrapper.social-open .social-branch {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--obsidian);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    transition: transform 0.22s ease;
}

.social-item:hover {
    transform: translateX(5px);
}

.social-item .menu-icon {
    width: 30px;
}

@keyframes social-branch-vibrate {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(0.8px) translateY(-0.6px); }
    50% { transform: translateX(-0.8px) translateY(0.6px); }
    75% { transform: translateX(0.6px) translateY(0.3px); }
}

body.landing-page .logo-wrapper.social-open .social-item {
    animation: social-branch-vibrate 1.6s ease-in-out infinite;
}

body.landing-page .logo-wrapper.social-open .social-item:nth-child(2) {
    animation-delay: 0.12s;
}

body.landing-page .logo-wrapper.social-open .social-item:nth-child(3) {
    animation-delay: 0.24s;
}
/* --- DESCRIPTION & FORM --- */
p.description {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--obsidian);
    max-width: 550px;
    margin: 1.4rem 0 2rem;
    filter: url(#liquid-lens);
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    width: 100%;
}

input[type="email"] {
    width: 320px;
    padding: 1.2rem;
    background: transparent;
    border: 1px solid var(--obsidian);
    color: var(--obsidian);
    font-size: 0.85rem;
    outline: none;
    transition: background 0.3s;
}

input[type="email"]:focus { background: rgba(0,0,0,0.02); }

button {
    width: 320px;
    padding: 1.2rem;
    background-color: var(--obsidian);
    color: var(--vault-bg); 
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

button:hover { opacity: 0.9; }

@keyframes fadein {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .hero-video { max-width: 100%; }
    .logo-wrapper.active .wing-node.left { transform: translate(calc(-50% - 95px), -50%); }
    .logo-wrapper.active .wing-node.right { transform: translate(calc(-50% + 95px), -50%); }
    .logo-wrapper .wing-node > .menu-item { width: 120px; }
    .menu-item { font-size: 0.65rem; }
    .menu-icon { width: 28px; }
    .social-item { font-size: 0.58rem; letter-spacing: 0.14em; }
    .social-item .menu-icon { width: 24px; }
}

body.manifesto-page {
    background-color: var(--bg-default);
    transition: background-color 1.2s ease;
    height: 100vh;
    width: 100vw;
    overflow: hidden !important; /* Strict prevent scrolling */
    margin: 0;
    position: relative;
    display: block;
    min-height: 100vh;
}

.manifesto-composition {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: 560px;
}

/* Learn-more viewport lock + composition sizing */
body.manifesto-page .container {
    position: relative;
    height: 100%;
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    gap: 0;
}

body.manifesto-page .manifesto-composition {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 0;
    margin: 0;
    max-width: none;
    z-index: 5;
    pointer-events: auto;
    cursor: default;
}

body.manifesto-page.manifesto-fingers-loading .finger-node {
    opacity: 0;
}

body.manifesto-page.manifesto-fingers-ready .finger-node {
    opacity: 1;
    transition: opacity 0.25s ease;
}

/* Typewriter description positioning (bottom-left) */
.description-container {
    position: absolute;
    bottom: 8%;
    left: 8%;
    width: 35%;
    min-width: 300px;
    pointer-events: none;
    max-width: 450px;
    text-align: left;
    font-size: 1rem;
    line-height: 1.6;
    z-index: 50;
    animation: none !important;
}

body.manifesto-page .container > * {
    animation: none !important;
}

#typewriter-text {
    margin: 0;
    font-weight: 300;
    color: var(--obsidian);
    filter: none;
    white-space: normal;
}

/* Blinking terminal cursor */
#typewriter-text::after {
    content: '|';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

body.typewriter-done #typewriter-text::after {
    opacity: 0;
    animation: none;
}

@media (max-width: 768px) {
    body.manifesto-page .manifesto-composition {
        align-items: start;
        padding-top: 8%;
        box-sizing: border-box;
    }

    .description-container {
        bottom: 4%;
        left: 4%;
        width: 84%;
        min-width: 0;
        max-width: 360px;
    }

    #logo-trigger-reset {
        width: min(320px, 48vh, 74vw);
    }

    .finger-node img {
        width: min(390px, 58vh, 88vw);
    }
}

#logo-trigger-reset {
    width: min(435px, 62vh, 75vw);
    max-width: none;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

#logo-trigger-reset:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.finger-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: signature-pulse 3s infinite ease-in-out;
    pointer-events: none;
}

.finger-node img {
    width: min(500px, 72vh, 88vw);
    height: auto;
    object-fit: contain;
    display: block;
    pointer-events: none;
    transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

/* Learn-more hover overlay (only for specified fingers) */
.finger-node .finger-hover-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 6;
}

.finger-node.is-hovered .finger-hover-gif {
    opacity: 1;
}

.finger-node.signature-node img {
    cursor: pointer;
}

.finger-node.is-hovered img:not(.finger-hover-gif) {
    transform: scale(1.035);
    filter: brightness(1.06) saturate(1.08);
}

/* Finger 1 (node-1) hover-only ARTISTS label */
#node-1 .artists-hover-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(-388%) translateY(-18px);
    pointer-events: none;
    z-index: 9;
    opacity: 0;
    transition: opacity 0.18s ease;
}

#node-1 .artists-hover-label {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--obsidian);
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.25s ease 0s;
    pointer-events: none;
}

#node-1.is-hovered .artists-hover-overlay {
    opacity: 1;
}

#node-1.is-hovered .artists-hover-label {
    opacity: 1;
    transform: scale(1);
}

/* Finger A (node-a) hover-only manifesto overlay */
#node-a .manifesto-hover-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Positioning for the label/line so it stays inside the viewport */
    transform: translate(-50%, -50%) translateX(-77%) translateY(-230px);
    pointer-events: none;
    z-index: 9;
    --mf-line-angle: -18deg;
    --mf-line-width: 18.2vw; /* 30% shorter */
    width: var(--mf-line-width);
}

#node-a .manifesto-hover-line {
    display: none;
}

#node-a .manifesto-hover-label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateX(-6px) translateY(-56%);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--obsidian);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

#node-a.is-hovered .manifesto-hover-overlay {
    transform: translate(-50%, -50%) translateX(-77%) translateY(-230px) scale(1.035);
}

#node-a.is-hovered .manifesto-hover-line {
    display: none;
}

#node-a.is-hovered .manifesto-hover-label {
    opacity: 1;
    transform: translateX(8px) translateY(-58%);
}

/* Finger B (node-b) hover-only TIMELINE label */
#node-b .timeline-hover-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-250px, -150px);
    pointer-events: none;
    z-index: 9;
}

#node-b .timeline-hover-label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateX(-6px) translateY(-56%);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--obsidian);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

#node-b.is-hovered .timeline-hover-overlay {
    transform: translate(-250px, -150px) scale(1.035);
}

#node-b.is-hovered .timeline-hover-label {
    opacity: 1;
    transform: translateX(8px) translateY(-58%);
}

/* Finger C (node-c) hover-only MOODBOARD label */
#node-c .moodboard-hover-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(180%) translateY(-190px);
    pointer-events: none;
    z-index: 9;
    opacity: 0;
    transition: opacity 0.18s ease;
}

#node-c .moodboard-hover-label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--obsidian);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.25s ease 0s;
    pointer-events: none;
}

#node-c.is-hovered .moodboard-hover-overlay {
    opacity: 1;
}

#node-c.is-hovered .moodboard-hover-label {
    opacity: 1;
    transform: translateX(0);
}

#node-1,
#node-b,
#node-a,
#node-c,
#node-d {
    animation-delay: 0s;
}

.manifesto-vault {
    margin-top: 4rem;
}

#manifesto-copy-display {
    text-align: center;
    max-width: 600px;
    font-weight: 300;
    line-height: 1.7;
    filter: url(#liquid-lens);
}

@keyframes signature-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.03);
    }
}

/* --- IDENTITY MANIFEST (STATE MIRROR) --- */
body.identity-page {
    background-color: var(--vault-bg);
}

.back-link {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    text-decoration: none;
    color: var(--obsidian);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    z-index: 50;
}

.identity-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 2rem;
}

.portrait-viewport {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.identity-portrait {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    object-fit: contain;
    max-width: 90%;
    max-height: 90%;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: url(#liquid-lens);
    user-select: none;
    -webkit-user-drag: none;
}

.state-mirror .face-mirror,
.state-psychology .face-psychology,
.state-gallery .face-gallery,
.state-data .face-data {
    opacity: 1;
}

.node-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.4s ease;
    z-index: 10;
}

.node-icon img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

#node-psychology {
    transform: translate(-50%, -50%) translate(-200px, -220px) rotate(-15deg);
}

#node-gallery {
    transform: translate(-50%, -50%) translate(180px, -180px) rotate(15deg);
}

#node-data {
    transform: translate(-50%, -50%) translate(160px, 180px) rotate(-10deg);
}

.node-icon:hover img {
    transform: scale(1.06);
    filter: brightness(1.06) saturate(1.08);
}

.node-icon.locked-node img {
    transform: scale(1.08);
    filter: brightness(1.12) saturate(1.12);
}

.node-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    height: 1px;
    background: #000;
    opacity: 0.9;
    transform-origin: 0 50%;
}

#node-psychology::after {
    width: 240px;
    transform: translate(0, -50%) rotate(35deg);
}

#node-gallery::after {
    width: 220px;
    transform: translate(0, -50%) rotate(145deg);
}

#node-data::after {
    width: 210px;
    transform: translate(0, -50%) rotate(-135deg);
}

.node-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--obsidian);
    z-index: 11;
    pointer-events: none;
}

.node-label.psychology-label {
    transform: translate(-50%, -50%) translate(-305px, -235px);
}

.node-label.gallery-label {
    transform: translate(-50%, -50%) translate(255px, -210px);
}

.node-label.data-label {
    transform: translate(-50%, -50%) translate(85px, 250px);
}

.content-panel {
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.identity-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.identity-logo {
    width: 90px;
    height: auto;
}

.identity-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.08em;
    font-size: 1.4rem;
}

.state-desc {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.state-mirror .desc-mirror,
.state-psychology .desc-psychology,
.state-gallery .desc-gallery,
.state-data .desc-data {
    opacity: 1;
}

.state-desc h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.state-desc p {
    margin: 0;
    font-weight: 300;
    line-height: 1.7;
    max-width: 560px;
    filter: url(#liquid-lens);
}

@media (max-width: 900px) {
    .identity-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .portrait-viewport {
        min-height: 520px;
    }
}

#node-a a {
    pointer-events: none;
    display: block;
}

#node-1 .artists-node-link {
    pointer-events: none;
    display: block;
    text-decoration: none;
}

#node-c .moodboard-node-link {
    pointer-events: none;
    display: block;
    text-decoration: none;
}

#node-1 {
    pointer-events: none;
    cursor: pointer;
}

#node-1 img {
    pointer-events: none;
}

#node-a {
    pointer-events: none;
    cursor: pointer;
}

#node-a img {
    pointer-events: none;
}

#node-c {
    pointer-events: none;
    cursor: pointer;
}

#node-c img {
    pointer-events: none;
}

/* --- CORE STYLES --- */
body {
  margin: 0;
  background-color: #FFFFFF;
  color: #111;
  font-family: "Helvetica Neue", Arial, sans-serif;
  overflow-y: auto;
  overflow-x: hidden;
}

.identity-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* --- BACK LINK --- */
.back-link {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 100;
}

/* --- PORTRAIT VIEWPORT --- */
.portrait-viewport {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-stack {
  position: relative;
  width: 450px;
  height: 600px;
}

.identity-portrait {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* --- FLOATING NODES --- */
.node-icon {
  position: absolute;
  z-index: 20;
  cursor: pointer;
  filter: url(#liquid-lens);
  animation: floatNode 4s ease-in-out infinite;
}

.node-icon img {
  width: 80px;
  height: auto;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.node-icon:hover img, .locked-node img {
  transform: scale(1.25);
}

/* Position cluster */
#node-psychology { top: 12%; left: 8%; animation-delay: 0s; }
#node-gallery { top: 8%; right: 12%; animation-delay: 1s; }
#node-data { bottom: 28%; right: 12%; animation-delay: 2s; }

@keyframes floatNode {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* --- CONTENT PANEL --- */
.content-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 10%;
  text-align: center;
}

.identity-logo {
  width: 100%;
  max-width: 450px;
  margin-bottom: 25px;
}

#dynamic-title {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.manifesto-vault {
  width: 100%;
  max-width: 500px;
}

.state-desc {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.state-desc p {
  line-height: 1.8;
  font-weight: 300;
  color: #444;
  font-size: 1.1rem;
}

/* --- STATE VISIBILITY --- */
.state-mirror .face-mirror, 
.state-psychology .face-psychology,
.state-gallery .face-gallery, 
.state-data .face-data { opacity: 1; }

.state-mirror .desc-mirror, 
.state-psychology .desc-psychology,
.state-gallery .desc-gallery, 
.state-data .desc-data { display: block; opacity: 1; }

/* Effects */
.state-gallery .face-gallery {
  filter: url(#wave-shuffler);
}

/* Responsive Grid */
@media (max-width: 900px) {
  .identity-container { grid-template-columns: 1fr; }
  .portrait-stack { width: 320px; height: 430px; }
}

/* --- FINAL IDENTITY ALIGNMENT OVERRIDE --- */
#identity-manifest-root {
  grid-template-columns: 1.05fr 0.95fr;
}

#identity-manifest-root .portrait-viewport {
  min-height: 100vh;
  overflow: hidden;
}

#identity-manifest-root .portrait-stack {
  width: 540px;
  height: 730px;
  transform: translateY(10%);
}

#identity-manifest-root .identity-portrait {
  object-fit: cover;
  transition: opacity 0.5s ease;
}

#identity-manifest-root .node-icon::before,
#identity-manifest-root .node-icon::after {
  content: none !important;
  display: none !important;
}

#identity-manifest-root .node-icon img {
  width: 74px;
}

#identity-manifest-root #node-psychology {
  top: 17%;
  left: 24%;
  right: auto;
  bottom: auto;
  animation-delay: 0s;
}

#identity-manifest-root #node-gallery {
  top: 16%;
  left: 56%;
  right: auto;
  bottom: auto;
  animation-delay: 1s;
}

#identity-manifest-root #node-data {
  top: 43%;
  left: 53%;
  right: auto;
  bottom: auto;
  animation-delay: 2s;
}

#identity-manifest-root .content-panel {
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0 8%;
  transform: translateY(-2%);
}

#identity-manifest-root .identity-logo {
  max-width: 360px;
  margin-bottom: 12px;
}

#identity-manifest-root #dynamic-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

#identity-manifest-root .manifesto-vault {
  max-width: 620px;
}

#identity-manifest-root .state-desc p {
  font-size: 1rem;
  line-height: 1.7;
  color: #2a2a2a;
  filter: url(#liquid-lens);
}

/* --- Identity page positioning lock (reference match) --- */
.identity-page-container {
  width: 100%;
}

#identity-manifest-root {
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
}

#identity-manifest-root .portrait-viewport {
  min-height: 100vh;
  overflow: hidden;
}

#identity-manifest-root .portrait-stack {
  width: 520px;
  height: 700px;
  transform: translateY(8%);
}

#identity-manifest-root .node-icon::before,
#identity-manifest-root .node-icon::after {
  content: none !important;
  display: none !important;
}

#identity-manifest-root #node-psychology {
  top: 18%;
  left: 8%;
  animation-delay: 0s;
}

#identity-manifest-root #node-gallery {
  top: 16%;
  left: 60%;
  right: auto;
  animation-delay: 1s;
}

#identity-manifest-root #node-data {
  top: 56%;
  left: 58%;
  right: auto;
  bottom: auto;
  animation-delay: 2s;
}

#identity-manifest-root .content-panel {
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
}

/* --- Final frame-safe alignment tune --- */
#identity-manifest-root {
  width: min(1200px, 100%);
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
  min-height: 115vh;
  align-items: stretch;
}

#identity-manifest-root .portrait-viewport {
  position: relative;
  min-height: 115vh;
  overflow: visible;
  align-items: stretch;
  justify-content: flex-start;
  padding: 7rem 0 2.5rem 0;
  box-sizing: border-box;
}

#identity-manifest-root .portrait-stack {
  position: absolute;
  left: 6%;
  bottom: 2.5rem;
  height: calc(100% - 9.5rem);
  max-height: 760px;
  aspect-ratio: 3 / 4;
  width: auto;
  max-width: min(46vw, 560px);
  transform: translateY(0);
  margin-top: 0;
}

#identity-manifest-root .identity-portrait {
  object-fit: contain;
}

#identity-manifest-root .node-icon img {
  width: 73px;
}

#identity-manifest-root #node-psychology {
  top: 14%;
  left: 22%;
}

#identity-manifest-root #node-gallery {
  top: 14%;
  left: 52%;
}

#identity-manifest-root #node-data {
  top: 43%;
  left: 50%;
}

#identity-manifest-root .content-panel {
  min-height: 115vh;
  justify-content: flex-end;
  align-items: center;
  padding: 7rem 6% 2.5rem;
  gap: 0.4rem;
  transform: none;
}

#identity-manifest-root .identity-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
}

#identity-manifest-root .identity-logo {
  max-width: 360px;
  margin-bottom: 0;
}

#identity-manifest-root #dynamic-title {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 1.6px;
  margin: 0 0 10px 0;
}

#identity-manifest-root .manifesto-vault {
  max-width: 500px;
  width: 100%;
  margin-top: 0.5rem;
}

#identity-manifest-root .state-desc p {
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* --- Identity Manifest Scoped Export (authoritative) --- */
body.identity-page {
    margin: 0;
    background-color: #FFFFFF;
    font-family: sans-serif;
    overflow-y: auto;
}

body.identity-page #identity-manifest-root {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

body.identity-page .back-link {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    text-decoration: none;
    color: #111;
    font-weight: 600;
    letter-spacing: 2px;
    z-index: 100;
}

body.identity-page #identity-manifest-root .portrait-viewport {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.identity-page #identity-manifest-root .portrait-stack {
    position: relative;
    width: 450px;
    height: 600px;
    z-index: 10;
}

body.identity-page #identity-manifest-root .identity-portrait {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity, filter;
}

body.identity-page #identity-manifest-root .node-icon {
    position: absolute;
    z-index: 20;
    cursor: pointer;
    filter: url(#liquid-lens);
    animation: floatNode 4s ease-in-out infinite;
    will-change: filter, transform;
}

body.identity-page #identity-manifest-root .node-icon img {
    width: 80px;
    height: auto;
    transition: transform 0.4s ease;
}

body.identity-page #identity-manifest-root .node-icon:hover img,
body.identity-page #identity-manifest-root .locked-node img {
    transform: scale(1.25);
}

body.identity-page #identity-manifest-root #node-psychology { top: 12%; left: 8%; }
body.identity-page #identity-manifest-root #node-gallery { top: 8%; right: 12%; }
body.identity-page #identity-manifest-root #node-data { bottom: 28%; right: 12%; }

body.identity-page #identity-manifest-root .content-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 10%;
}

body.identity-page #identity-manifest-root .identity-logo {
    width: 100%;
    max-width: 450px;
    margin-bottom: 25px;
}

body.identity-page #identity-manifest-root #dynamic-title {
    font-size: 1.8rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 30px;
    font-weight: 300;
}

body.identity-page #identity-manifest-root .state-desc {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.identity-page #identity-manifest-root .state-mirror .face-mirror,
body.identity-page #identity-manifest-root .state-psychology .face-psychology,
body.identity-page #identity-manifest-root .state-gallery .face-gallery,
body.identity-page #identity-manifest-root .state-data .face-data {
    opacity: 1;
}

body.identity-page #identity-manifest-root.state-mirror .face-mirror,
body.identity-page #identity-manifest-root.state-psychology .face-psychology,
body.identity-page #identity-manifest-root.state-gallery .face-gallery,
body.identity-page #identity-manifest-root.state-data .face-data {
    opacity: 1;
}

body.identity-page #identity-manifest-root.state-mirror .desc-mirror,
body.identity-page #identity-manifest-root.state-psychology .desc-psychology,
body.identity-page #identity-manifest-root.state-gallery .desc-gallery,
body.identity-page #identity-manifest-root.state-data .desc-data {
    display: block;
    opacity: 1;
}

body.identity-page #identity-manifest-root.state-gallery .face-gallery {
    filter: url(#wave-shuffler);
}

/* --- FINAL CANONICAL IDENTITY OVERRIDE (conflict killer) --- */
body.identity-page {
    margin: 0 !important;
    background-color: #FFFFFF !important;
    font-family: sans-serif !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    display: block !important;
    min-height: 100vh !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    text-align: initial !important;
}

body.identity-page #identity-manifest-root {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    height: 100vh !important;
    min-height: 100vh !important;
    width: 100% !important;
    align-items: stretch !important;
}

body.identity-page .back-link {
    position: fixed !important;
    top: 1.5rem !important;
    left: 1.5rem !important;
    text-decoration: none !important;
    color: #111 !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    z-index: 100 !important;
}

body.identity-page #identity-manifest-root .portrait-viewport {
    position: relative !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-end !important;
    min-height: 100% !important;
    padding-top: 6.5rem !important;
    padding-bottom: 1.5rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* z-index contract: portraits 10, nodes 20 */
body.identity-page #identity-manifest-root .portrait-stack {
    position: absolute !important;
    left: 6% !important;
    bottom: 1.5rem !important;
    width: min(40vw, 430px) !important;
    height: min(calc(100vh - 8rem), 560px) !important;
    z-index: 10 !important;
}

body.identity-page #identity-manifest-root .identity-portrait {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0 !important;
    transition: opacity 0.5s ease !important;
    will-change: filter, opacity !important;
}

body.identity-page #identity-manifest-root .node-icon {
    position: absolute !important;
    z-index: 20 !important;
    cursor: pointer !important;
    filter: url(#liquid-lens) !important;
    animation: floatNode 4s ease-in-out infinite !important;
    will-change: transform, filter !important;
}

body.identity-page #identity-manifest-root .node-icon img {
    width: 80px !important;
    height: auto !important;
    transition: transform 0.4s ease !important;
}

body.identity-page #identity-manifest-root .node-icon:hover img,
body.identity-page #identity-manifest-root .locked-node img {
    transform: scale(1.25) !important;
}

body.identity-page #identity-manifest-root #node-psychology { top: 20% !important; left: 24% !important; right: auto !important; bottom: auto !important; }
body.identity-page #identity-manifest-root #node-gallery { top: 18% !important; left: 52% !important; right: auto !important; bottom: auto !important; }
body.identity-page #identity-manifest-root #node-data { top: 46% !important; left: 49% !important; right: auto !important; bottom: auto !important; }

body.identity-page #identity-manifest-root .node-icon::before,
body.identity-page #identity-manifest-root .node-icon::after {
    content: none !important;
    display: none !important;
}

body.identity-page #identity-manifest-root .content-panel {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    min-height: 100% !important;
    padding: 6.5rem 5% 1.5rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.identity-page #identity-manifest-root .identity-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 4px !important;
}

body.identity-page #identity-manifest-root .identity-logo {
    width: 100% !important;
    max-width: 340px !important;
    margin-bottom: 10px !important;
}

body.identity-page #identity-manifest-root #dynamic-title {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: clamp(1rem, 2.1vw, 1.7rem) !important;
    letter-spacing: clamp(1px, 0.25vw, 4px) !important;
    text-transform: uppercase !important;
    margin: 0 0 16px 0 !important;
    font-weight: 300 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

body.identity-page #identity-manifest-root .state-desc {
    display: none !important;
    opacity: 0 !important;
    transition: opacity 0.5s ease !important;
    width: 100% !important;
    max-width: 500px !important;
}

body.identity-page #identity-manifest-root.state-mirror .face-mirror,
body.identity-page #identity-manifest-root.state-psychology .face-psychology,
body.identity-page #identity-manifest-root.state-gallery .face-gallery,
body.identity-page #identity-manifest-root.state-data .face-data {
    opacity: 1 !important;
}

body.identity-page #identity-manifest-root.state-mirror .desc-mirror,
body.identity-page #identity-manifest-root.state-psychology .desc-psychology,
body.identity-page #identity-manifest-root.state-gallery .desc-gallery,
body.identity-page #identity-manifest-root.state-data .desc-data {
    display: block !important;
    opacity: 1 !important;
}

body.identity-page #identity-manifest-root.state-gallery .face-gallery {
    filter: url(#wave-shuffler) !important;
}

body.identity-page #identity-manifest-root .state-desc p {
    margin: 0 !important;
    font-size: clamp(0.86rem, 1.2vw, 1rem) !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere !important;
}
