/* mysterious.boo - Futuristic Editorial Seance */
/* Color Palette: #d4a017, #2d1b4e, #6b5b7b, #0d2b45, #e8d5f5, #9b1b30, #8b7a9e, #c4b5d4, #c27bff, #1a0a2e, #0a4d3a */

@property --syne-weight {
    syntax: '<number>';
    inherits: false;
    initial-value: 400;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: #0a0612;
    color: #e8d5f5;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Constellation Canvas */
#constellation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========== OPENING GATE ========== */
.gate {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0a0612 0%, #1a0a2e 50%, #0d2b45 100%);
    z-index: 1;
    overflow: hidden;
}

.gate-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.case-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: #d4a017;
    text-transform: uppercase;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.kinetic-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 5vw, 80px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #e8d5f5;
    margin-bottom: 24px;
    display: inline-block;
}

.kinetic-title .letter {
    display: inline-block;
    opacity: 0;
    transform: rotateX(-90deg);
    transform-origin: center bottom;
    animation: letterFlip 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.kinetic-title .letter.dot {
    color: #d4a017;
}

.kinetic-title .letter:hover {
    color: #c27bff;
    text-shadow: 0 0 30px rgba(194, 123, 255, 0.5);
}

@keyframes letterFlip {
    0% {
        opacity: 0;
        transform: rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: rotateX(0deg);
    }
}

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(16px, 2vw, 24px);
    font-style: italic;
    font-weight: 400;
    color: #8b7a9e;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeInUp 1s ease 2s forwards;
}

/* EMF Meter */
.emf-meter {
    width: 300px;
    margin: 0 auto 40px;
    opacity: 0;
    animation: fadeInUp 1s ease 2.5s forwards;
}

.emf-bar {
    height: 3px;
    background: #2d1b4e;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.emf-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0a4d3a, #d4a017, #9b1b30);
    border-radius: 2px;
    animation: emfPulse 3s ease-in-out infinite;
}

.small-meter .emf-bar::after {
    animation: none;
    width: 72%;
    background: linear-gradient(90deg, #0a4d3a, #d4a017);
}

@keyframes emfPulse {
    0%, 100% { width: 15%; }
    25% { width: 65%; }
    50% { width: 30%; }
    75% { width: 85%; }
}

.emf-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #6b5b7b;
    display: block;
    margin-top: 8px;
}

#emf-value {
    color: #d4a017;
}

/* Scroll Indicator */
.scroll-indicator {
    opacity: 0;
    animation: fadeInUp 1s ease 3s forwards;
}

.scroll-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    color: #6b5b7b;
    display: block;
    margin-bottom: 12px;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, #c27bff, transparent);
    margin: 0 auto;
    animation: scrollPulse 2s ease-in-out infinite;
}

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

/* Scanline Effect */
.gate-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(194, 123, 255, 0.015) 2px,
        rgba(194, 123, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 3;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== INVESTIGATION BOARD ========== */
.board {
    position: relative;
    z-index: 1;
    padding: 120px 5vw;
    background: #0a0612;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.classification {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: #9b1b30;
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 4vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #e8d5f5;
    margin-bottom: 24px;
}

.divider-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c27bff, transparent);
    margin: 0 auto;
}

/* Masonry Grid */
.masonry-grid {
    columns: 3;
    column-gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .masonry-grid { columns: 2; }
}

@media (max-width: 600px) {
    .masonry-grid { columns: 1; }
}

/* Evidence Cards */
.evidence-card {
    break-inside: avoid;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.4), rgba(10, 6, 18, 0.8));
    border: 1px solid #2d1b4e;
    box-shadow: 0 0 20px rgba(194, 123, 255, 0.08);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.evidence-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.evidence-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 40px rgba(194, 123, 255, 0.15), 0 0 80px rgba(194, 123, 255, 0.05);
    border-color: rgba(194, 123, 255, 0.3);
}

.card-inner {
    padding: 0;
}

.card-front {
    padding: 24px;
}

.evidence-stamp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: #d4a017;
    border: 1px solid #d4a017;
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.evidence-image {
    margin: 0 -24px 20px;
    border-top: 1px solid #2d1b4e;
    border-bottom: 1px solid #2d1b4e;
    mix-blend-mode: luminosity;
}

.evidence-image svg {
    display: block;
    width: 100%;
    height: auto;
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #e8d5f5;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-excerpt {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    color: #c4b5d4;
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(45, 27, 78, 0.6);
}

.meta-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #6b5b7b;
    letter-spacing: 0.05em;
}

.meta-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    padding: 3px 10px;
    border-radius: 2px;
}

.status-open {
    color: #d4a017;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
}

.status-active {
    color: #0a4d3a;
    background: rgba(10, 77, 58, 0.15);
    border: 1px solid rgba(10, 77, 58, 0.4);
}

.status-classified {
    color: #9b1b30;
    background: rgba(155, 27, 48, 0.1);
    border: 1px solid rgba(155, 27, 48, 0.3);
}

/* Void Cells */
.void-cell {
    break-inside: avoid;
    margin-bottom: 24px;
    height: 180px;
    background: #0a0612;
    border: 1px solid rgba(45, 27, 78, 0.15);
    position: relative;
}

.void-cell::after {
    content: 'REDACTED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.4em;
    color: rgba(107, 91, 123, 0.15);
}

.void-small {
    height: 100px;
}

/* Redacted Text */
.redacted {
    background: #9b1b30;
    color: #9b1b30;
    padding: 0 4px;
    border-radius: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.redacted:hover {
    color: #e8d5f5;
    background: rgba(155, 27, 48, 0.3);
}

/* ========== DOSSIER SECTION ========== */
.dossier {
    position: relative;
    z-index: 1;
    padding: 120px 5vw;
    background: linear-gradient(180deg, #0a0612, #1a0a2e);
}

.dossier-content {
    max-width: 800px;
    margin: 0 auto;
}

.dossier-entry {
    display: flex;
    gap: 32px;
    margin-bottom: 64px;
    opacity: 0;
    transform: translateY(30px);
}

.dossier-entry.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.entry-marker {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #2d1b4e;
    line-height: 1;
    min-width: 60px;
    text-align: right;
}

.entry-body {
    flex: 1;
    padding-top: 8px;
}

.entry-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #e8d5f5;
    margin-bottom: 16px;
}

.entry-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    line-height: 1.7;
    color: #c4b5d4;
    margin-bottom: 24px;
}

.small-meter {
    width: 200px;
}

.small-meter .emf-label {
    font-size: 9px;
}

/* Status Tags */
.status-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 2px;
    display: inline-block;
    vertical-align: middle;
}

.tag-open {
    color: #d4a017;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
}

.tag-active {
    color: #0a4d3a;
    background: rgba(10, 77, 58, 0.15);
    border: 1px solid rgba(10, 77, 58, 0.4);
}

.tag-classified {
    color: #9b1b30;
    background: rgba(155, 27, 48, 0.1);
    border: 1px solid rgba(155, 27, 48, 0.3);
}

.highlight-text {
    color: #d4a017;
    font-weight: 600;
}

/* ========== FOOTER GATE ========== */
.footer-gate {
    position: relative;
    z-index: 1;
    padding: 80px 5vw;
    background: #0a0612;
    border-top: 1px solid rgba(45, 27, 78, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    text-align: center;
    margin-bottom: 60px;
}

.footer-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #e8d5f5;
    display: block;
    margin-bottom: 8px;
}

.footer-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    font-style: italic;
    color: #6b5b7b;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: #d4a017;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #8b7a9e;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    color: #8b7a9e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #c27bff;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot-open { background: #d4a017; }
.dot-active { background: #0a4d3a; }
.dot-classified { background: #9b1b30; }

.footer-freq {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #c27bff;
    line-height: 1;
    margin-bottom: 8px;
}

.footer-note {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #6b5b7b;
    letter-spacing: 0.05em;
}

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid rgba(45, 27, 78, 0.3);
}

.footer-copy {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #6b5b7b;
    letter-spacing: 0.05em;
}

.footer-classification {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: #9b1b30;
}

/* ========== ANIMATIONS ========== */

/* Font weight morph for Syne variable */
@keyframes weightMorph {
    0% { --syne-weight: 400; }
    50% { --syne-weight: 800; }
    100% { --syne-weight: 400; }
}

/* Subtle glow pulse for interactive elements */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(194, 123, 255, 0.08); }
    50% { box-shadow: 0 0 30px rgba(194, 123, 255, 0.15); }
}

.evidence-card:hover {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Global selection color */
::selection {
    background: rgba(194, 123, 255, 0.3);
    color: #e8d5f5;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0612;
}

::-webkit-scrollbar-thumb {
    background: #2d1b4e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b5b7b;
}
