/* persopass.io - Crystalline Identity Reactor */
/* Forest Green Crystalline Palette */
/* #0a1a0e Obsidian Base, #1b5e20 Deep Canopy, #2e7d32 Forest Core */
/* #4caf50 Emerald Facet, #81c784 Spring Prism, #c8e6c9 Crystal Frost */
/* #e8f5e9 Pale Facet, #ce93d8 Glitch Magenta, #ffd54f Fracture Gold */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0a1a0e;
    color: #c8e6c9;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Header */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    pointer-events: none;
}

#site-header > * {
    pointer-events: auto;
}

.logo {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #81c784;
    letter-spacing: -0.02em;
}

.nav-hex {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-hex:hover {
    transform: scale(1.15) rotate(30deg);
}

.nav-hex svg polygon {
    transition: stroke 0.3s ease;
}

.nav-hex:hover svg polygon {
    stroke: #ffd54f;
}

/* Hex Overlay Menu */
.hex-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 26, 14, 0.96);
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.hex-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hex-menu-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 500px;
}

.hex-menu-item {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #81c784;
    text-decoration: none;
    letter-spacing: 0.03em;
    padding: 0.8rem 1.5rem;
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.hex-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: #ffd54f;
    transition: width 0.4s ease;
}

.hex-menu-item:hover {
    color: #ffd54f;
    transform: translateX(10px);
}

.hex-menu-item:hover::before {
    width: 100%;
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.progress-dot {
    color: #2e7d32;
    transition: color 0.4s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    cursor: pointer;
}

.progress-dot.active {
    color: #ffd54f;
    transform: rotate(60deg);
}

.progress-dot:hover {
    color: #81c784;
}

/* Z-Pattern Connectors */
.z-connectors {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 500vh;
    z-index: 5;
    pointer-events: none;
}

.z-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.2s ease-out;
}

.z-line.drawn {
    stroke-dashoffset: 0;
}

/* Glitch Canvas */
.glitch-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 80;
    pointer-events: none;
}

/* Facet Sections */
.facet {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #0a1a0e;
}

.facet-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hex-cluster {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.facet-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    padding: 6rem 4rem 4rem;
}

/* Scanlines overlay */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(206, 147, 216, 0.04) 2px,
        rgba(206, 147, 216, 0.04) 3px
    );
}

/* Zoom-Focus transition classes */
.facet.zoom-out {
    transform: scale(1.08);
    filter: blur(2px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.facet.zoom-in {
    transform: scale(1);
    filter: blur(0);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.facet.zoom-in-initial {
    transform: scale(0.95);
    filter: blur(2px);
}

/* Facet 1: Origin */
.facet-origin {
    background: radial-gradient(ellipse at 30% 40%, #0d3310 0%, #0a1a0e 70%);
}

.z-pattern {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.z-top-left {
    align-self: flex-start;
    max-width: 70%;
}

.z-bottom-right {
    align-self: flex-end;
    max-width: 50%;
    text-align: right;
}

.headline-display {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6.5rem);
    color: #e8f5e9;
    letter-spacing: -0.02em;
    line-height: 1.0;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.headline-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.subheadline-italic {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #c8e6c9;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s,
                transform 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.subheadline-italic.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hex cluster origin animation */
.hex-cluster-origin {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hex-cluster-origin.visible {
    opacity: 0.6;
    transform: scale(1);
}

/* Facet 2: Presence */
.facet-presence {
    background: radial-gradient(ellipse at 70% 30%, #0d3310 0%, #0a1a0e 70%);
}

.facet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    height: 100%;
}

.grid-left {
    padding-right: 2rem;
}

.section-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #81c784;
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    color: #c8e6c9;
    margin-bottom: 1.2rem;
    line-height: 1.75;
}

.grid-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rotating-crystal {
    width: 300px;
    height: 300px;
}

.rotating-crystal .crystal-svg {
    width: 100%;
    height: 100%;
    animation: crystal-rotate 120s linear infinite;
}

@keyframes crystal-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Facet 3: Trust */
.facet-trust {
    background: #0a1a0e;
}

.data-rain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.trust-cards-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    z-index: 10;
}

.trust-title {
    margin-bottom: 3rem;
}

.trust-cards {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
}

.trust-card {
    background: rgba(10, 26, 14, 0.8);
    border: 1px solid rgba(76, 175, 80, 0.3);
    padding: 2.5rem 2rem;
    width: 320px;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    backdrop-filter: brightness(1.2) contrast(1.1) saturate(1.3);
    transition: clip-path 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                backdrop-filter 0.4s ease,
                border-color 0.3s ease;
}

.trust-card:hover {
    clip-path: polygon(8% 0%, 102% 0%, 92% 100%, -2% 100%);
    backdrop-filter: brightness(1.4) contrast(1.1) saturate(1.3);
    border-color: #ffd54f;
}

.trust-card-1 { transform: translateY(-20px); }
.trust-card-2 { transform: translateY(20px); }
.trust-card-3 { transform: translateY(-10px); }

.card-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.75rem, 0.9vw, 0.9rem);
    letter-spacing: 0.08em;
    color: #4caf50;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.card-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    color: #c8e6c9;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.card-hash {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #2e7d32;
    letter-spacing: 0.08em;
}

/* Facet 4: Continuity */
.facet-continuity {
    background: radial-gradient(ellipse at 50% 50%, #0d3310 0%, #0a1a0e 70%);
}

.continuity-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

.headline-massive {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    color: #e8f5e9;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
    max-width: 80vw;
    margin-bottom: 3rem;
}

.continuity-indicators {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.continuity-hex {
    color: #2e7d32;
    transition: color 0.4s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.continuity-hex.pulse-active {
    color: #ffd54f;
    transform: scale(1.2);
}

/* Facet 5: Passage */
.facet-passage {
    background: radial-gradient(ellipse at 50% 50%, #0d3310 0%, #0a1a0e 80%);
}

.passage-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

.passage-logo {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 2rem;
    color: #e8f5e9;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
    margin-bottom: 2rem;
}

.passage-hash {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.75rem, 0.9vw, 0.9rem);
    letter-spacing: 0.08em;
    color: #4caf50;
    text-transform: uppercase;
}

.hash-label {
    color: #2e7d32;
}

.hash-value {
    color: #4caf50;
}

.hash-cursor {
    color: #ffd54f;
    animation: cursor-blink 0.8s steps(1) infinite;
}

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

/* Hex cluster for passage - fractured */
.hex-cluster-passage polygon {
    transition: transform 2s ease;
}

/* Fracture lines (glitch-art stripes in narrow columns) */
.facet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    width: 1px;
    height: 100%;
    background: repeating-linear-gradient(
        180deg,
        #1b5e20 0px,
        #1b5e20 4px,
        #0d3310 4px,
        #0d3310 8px
    );
    opacity: 0.3;
    z-index: 2;
    animation: fracture-pulse 4s ease-in-out infinite;
}

.facet::after {
    content: '';
    position: absolute;
    top: 0;
    right: 12%;
    width: 1px;
    height: 100%;
    background: repeating-linear-gradient(
        180deg,
        #0d3310 0px,
        #0d3310 6px,
        #1b5e20 6px,
        #1b5e20 10px
    );
    opacity: 0.25;
    z-index: 2;
    animation: fracture-pulse 5s ease-in-out infinite 1s;
}

@keyframes fracture-pulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

/* Responsive */
@media (max-width: 768px) {
    .facet-content {
        padding: 5rem 2rem 2rem;
    }

    .facet-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .trust-cards {
        flex-direction: column;
        align-items: center;
    }

    .trust-card {
        width: 90%;
    }

    .trust-card-1,
    .trust-card-2,
    .trust-card-3 {
        transform: translateY(0);
    }

    .z-top-left {
        max-width: 100%;
    }

    .z-bottom-right {
        max-width: 80%;
    }

    .progress-indicator {
        right: 0.8rem;
    }

    .continuity-indicators {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hex-menu-cluster {
        flex-direction: column;
        align-items: center;
    }
}
