:root {
    --bg-color: #040714;
    --text-primary: #e0e6ed;
    --text-muted: #8a9ba8;
    --accent-gold: #d4af37;
    --accent-gold-glow: rgba(212, 175, 55, 0.4);
    --accent-cyber: #00f3ff;
    
    --font-heading: 'Cinzel', serif;
    --font-heading-decorative: 'Cinzel Decorative', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 1. The Sentient Aura Engine Canvas */
#auraCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through */
    opacity: 0.8;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    box-shadow: inset 0 0 150px rgba(0,0,0,0.9);
    pointer-events: none;
    z-index: 1;
}

/* 2. Navigation */
nav {
    position: fixed;
    top: 2rem;
    left: 0;
    width: 100%;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 50;
    pointer-events: none; /* Allows canvas interaction through empty header space */
}

.logo-container {
    pointer-events: auto;
    display: flex;
    align-items: center;
    perspective: 1000px; /* Cinematic Parallax */
}

.logo-wrapper {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 25px rgba(212,175,55,0.7), inset 0 0 15px rgba(0,0,0,0.9);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    animation: magical-float 4s ease-in-out infinite alternate;
}

@keyframes magical-float {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-8px) scale(1.02); }
}

.logo-wrapper:hover {
    animation: none; /* Pause float on hover */
    transform: scale(1.1) translateZ(20px) !important;
    box-shadow: 0 0 40px rgba(212,175,55,1), 0 0 60px rgba(0, 243, 255, 0.4);
    border-color: var(--accent-cyber);
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15); /* Trims the white background edge inside the circle */
}

.nav-title {
    margin-left: 1.5rem;
    font-family: var(--font-heading-decorative);
    font-size: 2.2rem;
    color: var(--accent-gold);
    letter-spacing: 5px;
    text-transform: uppercase;
}

.glow-text {
    text-shadow: 0 0 20px var(--accent-gold-glow), 0 0 40px rgba(212, 175, 55, 0.1);
}

.nav-links {
    pointer-events: auto;
    display: flex;
    gap: 2rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50px;
    padding: 0.8rem 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s ease, box-shadow 0.4s ease;
}

.nav-links:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyber);
    box-shadow: 0 20px 40px rgba(0, f3, ff, 0.2);
}

.nav-item {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-item:hover {
    color: var(--accent-cyber);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

/* 2.1 Dropdown Mechanics */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(4, 7, 20, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.3);
    min-width: 250px;
    box-shadow: 0px 8px 30px 0px rgba(0,0,0,0.9);
    backdrop-filter: blur(16px);
    z-index: 100;
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px);
}

.dropdown-content a {
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    transition: background 0.2s, color 0.2s, text-shadow 0.2s;
}

.dropdown-content a:hover {
    background: rgba(212, 175, 55, 0.05);
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.cta-button {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-gold);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--accent-gold-glow);
}

/* 2.1 Quantum State UI Superposition */
.quantum-superposition {
    animation: quantum-flicker 0.4s infinite alternate;
}

.quantum-superposition:hover {
    animation: none; /* Collapses the superposition on hover */
    background: var(--accent-cyber);
    color: var(--bg-color);
    border-color: var(--accent-cyber);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
}

@keyframes quantum-flicker {
    0% {
        border-color: var(--accent-gold);
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
        transform: translate(0px, 0px) scale(1);
    }
    100% {
        border-color: var(--accent-cyber);
        text-shadow: 0 0 15px rgba(0, 243, 255, 0.7);
        transform: translate(1px, -1px) scale(1.02);
    }
}

/* 2.2 Bio-Rhythmic Reading Pulse and Vulture Watermark */
#bioRhythmPulse {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, rgba(4,7,20,0) 70%);
    z-index: 1;
    pointer-events: none;
    animation: bio-pulse 4s ease-in-out infinite alternate;
}

.mythology-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    max-width: 900px;
    max-height: 900px;
    background-image: url('assets/logo.png');
    background-size: cover;
    background-position: center;
    opacity: 0.12; /* Powerful faint glow */
    filter: grayscale(100%) contrast(200%) sepia(100%) hue-rotate(15deg) brightness(0.8);
    pointer-events: none;
    /* Mask out the harsh white square edge and blend perfectly */
    -webkit-mask-image: radial-gradient(circle at center, black 35%, transparent 48%);
    mask-image: radial-gradient(circle at center, black 35%, transparent 48%);
}

@keyframes bio-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* 2.3 The Labyrinthine Wisdom Thread */
#wisdomThread {
    position: fixed;
    top: 0;
    left: 2vw;
    width: 50px;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}

#threadPath {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 0.1s linear;
}

/* 2.4 Time Dilation Layer */
.time-dilation-layer {
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center center;
    perspective: 1500px;
}

/* 3. The Quantum Monoliths (Accordion Layer) */
.quantum-monoliths {
    position: relative;
    z-index: 5;
    display: flex;
    width: 95vw;
    height: 65vh;
    margin: 22vh auto 0 auto;
    gap: 1rem;
    max-width: 1800px;
}

.monolith {
    position: relative;
    flex: 1; /* Thin resting state */
    border-radius: 16px;
    background: rgba(4, 7, 20, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
    transition: flex 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.7s ease, border-color 0.4s ease, box-shadow 0.7s ease;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-end;
}

.monolith:hover {
    flex: 5; /* Massive horizontal expansion */
    background: rgba(4, 7, 20, 0.8);
    border-color: var(--accent-gold);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), inset 0 0 40px rgba(212, 175, 55, 0.05);
}

.subscribe-monolith:hover {
    border-color: var(--accent-cyber);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), inset 0 0 40px rgba(0, 243, 255, 0.05);
}

/* Vertical Pillar Label */
.monolith-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 8px;
    text-transform: uppercase;
    display: flex;
    flex-direction: row-reverse; /* Put number at top when rotated */
    align-items: center;
    gap: 15px;
    transition: all 0.5s ease;
    white-space: nowrap;
    opacity: 1;
}

.monolith-label span {
    font-family: var(--font-heading-decorative);
    font-size: 2.5rem;
    color: var(--accent-gold);
}

.monolith:hover .monolith-label {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) translateX(-50px);
}

/* Expanded Content Container */
.monolith-content {
    opacity: 0;
    transform: translateY(40px);
    width: 100%;
    min-width: 500px;
    padding: 3rem;
    padding-bottom: 4rem;
    background: linear-gradient(to top, rgba(4,7,20,1) 0%, rgba(4,7,20,0) 100%);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0s;
}

.monolith:hover .monolith-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s; /* Wait for flex expansion to finish */
}

/* Monolith Background Watermark */
.monolith-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    z-index: -1;
    filter: grayscale(100%) sepia(100%) hue-rotate(15deg) brightness(1.2);
    transition: transform 1s ease-out, opacity 0.5s ease;
    pointer-events: none;
}

.monolith:hover .monolith-watermark {
    transform: translate(-50%, -46%) scale(1.05);
    opacity: 0.15;
}

/* Typography Resets for Monoliths */
.monolith .hero-title, .monolith .section-title, .monolith .cta-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #d4af37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.monolith .text-body {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.6;
    max-width: 80%;
}
/* Monolith staggered entrance */
@keyframes monolith-rise {
    0%  { opacity: 0; transform: translateY(60px) scaleY(0.92); }
    100%{ opacity: 1; transform: translateY(0)   scaleY(1);    }
}

.monolith {
    animation: monolith-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.quantum-monoliths .monolith:nth-child(1) { animation-delay: 0.05s; }
.quantum-monoliths .monolith:nth-child(2) { animation-delay: 0.15s; }
.quantum-monoliths .monolith:nth-child(3) { animation-delay: 0.25s; }
.quantum-monoliths .monolith:nth-child(4) { animation-delay: 0.35s; }

/* Golden hairline accent at bottom of monolith frame */
.quantum-monoliths::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 5%;
    width: 90%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
    opacity: 0.4;
    pointer-events: none;
}

/* Ensure monolith watermark fills its div */
.monolith-watermark {
    background-size: cover;
    background-position: center;
}

/* Glowing top edge on each pillar */
.monolith::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gold);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 16px 16px 0 0;
}

.monolith:hover::after {
    opacity: 1;
}

.subscribe-monolith::after {
    background: var(--accent-cyber);
}

.ethereal-element {
    opacity: 0;
    transform: translateY(100px) scale(0.95);
    filter: blur(10px);
}

.ethereal-element.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* 2.6 Ephemeral Digital Dust Degradation */
.digital-dust {
    opacity: 0;
    transform: translateY(-50px) scale(0.9) skewX(2deg);
    filter: blur(8px) contrast(150%);
    text-shadow: 0 -20px 20px var(--accent-gold), 0 0 5px var(--accent-cyber);
    pointer-events: none;
}

.hero {
    margin-top: 5vh;
}

.hero-title, .section-title, .cta-title {
    font-family: var(--font-heading);
    background: linear-gradient(135deg, #ffffff 0%, #d4af37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
}

.cta-title {
    font-size: 3rem;
}

.text-body {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

.large-cta {
    margin-top: 3rem;
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

/* 4. Cognitive Typographic Unfolding (Decipher Text) */
.decipher-text {
    /* To be controlled by JS */
    display: inline-block;
    transition: opacity 0.3s;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color); 
}
::-webkit-scrollbar-thumb {
    background: var(--accent-gold); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyber); 
}
