/* === Palette Reference ===
   #0f0e17 - Void Charcoal
   #1e1b4b - Abyssal Indigo
   #312e81 - Deep Indigo
   #6d28d9 - Vivid Violet
   #c4b5fd - Ether Lavender
   #6ee7b7 - Seafoam Breath
   #fde68a - Pale Gold Trace
   #fecdd3 - Mist Rose
   #f5f3ff - Opal White
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0f0e17;
    color: #f5f3ff;
    overflow-x: hidden;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    letter-spacing: 0.02em;
    line-height: 1.75;
}

/* === Noise Canvas === */
#noise-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    transition: opacity 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === Opening Section === */
.section-opening {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.title-group {
    text-align: center;
    transform: translateY(30px);
    opacity: 0;
    animation: surfaceRise 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

@keyframes surfaceRise {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(4rem, 12vw, 14rem);
    letter-spacing: -0.03em;
    line-height: 0.9;
    color: #f5f3ff;
    mix-blend-mode: soft-light;
}

.hero-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.05em;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* === Dashboard Section === */
.section-dashboard {
    position: relative;
    min-height: 200vh;
    padding: 10vh 5vw;
    z-index: 2;
}

.dashboard-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3vw;
    max-width: 1400px;
    margin: 0 auto;
    perspective: 1200px;
}

.panel {
    position: sticky;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(40px) saturate(1.2);
    -webkit-backdrop-filter: blur(40px) saturate(1.2);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.panel-1 { top: 10vh; }
.panel-2 { top: 15vh; }
.panel-3 { top: 20vh; }
.panel-4 { top: 25vh; }
.panel-5 { top: 30vh; }
.panel-6 { top: 35vh; }

.panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 25px 60px rgba(196, 181, 253, 0.25);
}

.panel-halo {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(196, 181, 253, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.panel-glyph {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.panel-glyph svg {
    width: 100%;
    height: 100%;
}

.panel-heading {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #f5f3ff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.panel-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    letter-spacing: 0.02em;
    line-height: 1.75;
    color: rgba(245, 243, 255, 0.75);
    position: relative;
    z-index: 1;
}

/* === Trail Section === */
.section-trail {
    position: relative;
    height: 200vh;
    z-index: 2;
}

#trail-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#trail-path {
    stroke-dasharray: var(--path-length, 5000);
    stroke-dashoffset: var(--path-length, 5000);
    transition: none;
}

#trail-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.trail-node {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #6ee7b7 0%, #fde68a 30%, #fecdd3 60%, transparent 70%);
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trail-node.active {
    width: 120px;
    height: 120px;
}

.trail-node-word {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f5f3ff;
    opacity: 0;
    transition: opacity 0.6s ease;
    white-space: nowrap;
}

.trail-node.active .trail-node-word {
    opacity: 0.8;
}

/* === Colophon Section === */
.section-colophon {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #6d28d9 50%, #c4b5fd 75%, #f5f3ff 100%);
    background-size: 400% 400%;
    background-position: 0% 100%;
}

.colophon-content {
    text-align: center;
}

.colophon-title {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #f5f3ff;
    opacity: 0.6;
}

.colophon-line {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    color: #f5f3ff;
    opacity: 0.5;
    margin-top: 1rem;
}

/* === Void End === */
.void-end {
    height: 50vh;
    background: #0f0e17;
}

/* === Responsive === */
@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .panel-1, .panel-2, .panel-3, .panel-4, .panel-5, .panel-6 {
        position: relative;
        top: auto;
    }
}
