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

:root {
    --bg-deep: #1c1f26;
    --bg-mid: #252830;
    --bg-surface: #2a2e38;
    --bg-elevated: #3a3f4b;
    --text-primary: #e8eaf0;
    --text-secondary: #c8cdd8;
    --text-muted: #8b919e;
    --accent-pink: #f0abfc;
    --accent-purple: #a78bfa;
    --accent-teal: #5eead4;
    --font-display: 'Share Tech Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
}

/* Gradient Mesh Background */
.gradient-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(240, 171, 252, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 70%, rgba(167, 139, 250, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 100% 100% at 50% 50%, rgba(42, 46, 56, 0.8) 0%, transparent 70%),
        radial-gradient(circle at 30% 80%, rgba(240, 171, 252, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 70% 20%, rgba(167, 139, 250, 0.08) 0%, transparent 45%);
    animation: meshShift 20s ease-in-out infinite alternate;
    /* The ambient gradient mesh breathes slowly behind everything. */
}

@keyframes meshShift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 30% 80%, 70% 20%;
    }
    50% {
        background-position: 10% 5%, 90% 95%, 55% 45%, 35% 75%, 65% 25%;
    }
    100% {
        background-position: 5% 10%, 95% 90%, 45% 55%, 25% 85%, 75% 15%;
    }
}

/* Crystal Container */
.crystal {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

/* Facets */
.facet {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    max-width: 700px;
    opacity: 0;
    transform: rotateY(90deg) scale(0.8);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.facet-active {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
    pointer-events: auto;
}

.facet-exit-left {
    opacity: 0;
    transform: rotateY(-90deg) scale(0.8);
}

.facet-exit-right {
    opacity: 0;
    transform: rotateY(90deg) scale(0.8);
}

/* Typography */
.facet-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-pink) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.facet-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.facet-body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 520px;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 15vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.scroll-hint-text {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.6;
}

.scroll-hint-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-pink), transparent);
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* Navigation Dots */
.facet-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.nav-dot:hover {
    border-color: var(--accent-pink);
    box-shadow: 0 0 8px rgba(240, 171, 252, 0.4);
}

.nav-dot-active {
    background: var(--accent-pink);
    border-color: var(--accent-teal);
    background: var(--accent-teal);
    box-shadow: 0 0 12px rgba(94, 234, 212, 0.6);
}

/* Chrome border effect */
.crystal::before {
    content: '';
    position: absolute;
    inset: 10%;
    border: 1px solid rgba(200, 205, 216, 0.04);
    border-radius: 2px;
    pointer-events: none;
}
