/* ============================================
   concurrent.day — Styles
   Cyberpunk-sepia horizontal filmstrip
   ============================================ */

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

html {
    overflow: hidden;
    height: 100vh;
}

body {
    background: #1A1408;
    color: #D4C4A0;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.85;
    letter-spacing: 0.02em;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* --- Noise Overlay --- */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    mix-blend-mode: overlay;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-color: rgba(61, 49, 34, 0.3);
    transition: opacity 0.6s ease;
}

#noise-overlay.visible {
    opacity: 0.03;
}

/* --- Vignette Overlay --- */
#vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
    background: radial-gradient(ellipse at center, transparent 40%, #1A1408 100%);
}

/* --- Scroll Progress Bar --- */
#scroll-progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 200;
    background: rgba(26, 20, 8, 0.8);
    opacity: 0;
    transition: opacity 0.4s ease, height 0.2s ease;
}

#scroll-progress-container.visible {
    opacity: 1;
}

#scroll-progress-container:hover {
    height: 6px;
}

#scroll-progress-container:hover #scroll-ticks {
    opacity: 1;
}

#scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #C4A265, #5EECD3);
    transition: width 0.1s linear;
}

#scroll-ticks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.scroll-tick {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(212, 196, 160, 0.4);
}

/* --- Scroll Track (Horizontal) --- */
#scroll-track {
    display: flex;
    flex-direction: row;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#scroll-track::-webkit-scrollbar {
    display: none;
}

/* --- Panel Base --- */
.panel {
    flex-shrink: 0;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.panel-arrival { min-width: 100vw; background: #1A1408; scroll-snap-align: start; }
.panel-manifesto { min-width: 150vw; background: #2C2316; scroll-snap-align: start; }
.panel-corridor { min-width: 200vw; background: #1A1408; scroll-snap-align: start; }
.panel-archive { min-width: 100vw; background: #2C2316; scroll-snap-align: start; }
.panel-terminus { min-width: 100vw; background: #1A1408; scroll-snap-align: start; }

/* --- Panel Vignette --- */
.panel-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, #1A1408 100%);
    z-index: 2;
}

/* --- Fog Dividers --- */
.fog-divider {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100vh;
    background: radial-gradient(ellipse at center, transparent 40%, #1A1408 100%);
    z-index: 3;
    pointer-events: none;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 5vw, 5.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #E8D9B8;
    margin-bottom: 2rem;
}

.brand-name {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 5vw, 5.5rem);
    letter-spacing: 0.15em;
    text-transform: none;
    color: #E8D9B8;
    margin-top: 2rem;
    opacity: 0;
}

.brand-name .char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.15s ease, text-shadow 0.1s ease;
}

.brand-name .char.revealed {
    opacity: 1;
    text-shadow: 0 0 12px rgba(196, 162, 101, 0.6);
}

.brand-name .char.glow-fade {
    text-shadow: 0 0 0px rgba(196, 162, 101, 0);
}

/* --- Scroll Hint --- */
.scroll-hint {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.08em;
    color: #5EECD3;
    opacity: 0;
    margin-top: 2rem;
    transition: opacity 0.4s ease;
}

.scroll-hint.visible {
    opacity: 0.7;
}

.scroll-hint.faded {
    opacity: 0.3;
}

/* --- Timestamps / Data Fragments --- */
.timestamp, .data-fragment {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.08em;
    color: #5EECD3;
    opacity: 0.7;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;
    cursor: default;
}

.data-fragment:hover {
    opacity: 1;
    text-shadow: 0 0 8px rgba(94, 236, 211, 0.4), 0 0 24px rgba(94, 236, 211, 0.15);
}

/* ============================================
   PANEL 1: THE ARRIVAL
   ============================================ */
.arrival-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 5;
}

/* Crystalline Glyph */
.crystalline-glyph {
    filter: url(#neon-glow-teal);
    cursor: pointer;
}

.glyph-group {
    transform-origin: 100px 100px;
    animation: glyph-rotate 30s linear infinite;
    animation-play-state: paused;
}

.glyph-group.spinning {
    animation-play-state: running;
}

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

.glyph-outer, .glyph-inner, .glyph-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.glyph-outer.drawn, .glyph-inner.drawn, .glyph-line.drawn {
    stroke-dashoffset: 0;
}

.crystalline-glyph:hover .glyph-outer,
.crystalline-glyph:hover .glyph-inner,
.crystalline-glyph:hover .glyph-line {
    opacity: 0.5;
}

.glyph-pulse {
    opacity: 0.3;
    fill: #D4727A;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Glyph click acceleration */
.glyph-group.accelerated {
    animation-duration: 3s;
}

/* ============================================
   PANEL 2: THE MANIFESTO
   ============================================ */
.manifesto-content {
    display: flex;
    flex-direction: row;
    height: 100%;
    position: relative;
    z-index: 5;
}

.manifesto-left {
    width: 40%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.crystal-lattice {
    width: 100%;
    height: 80%;
    filter: url(#neon-glow-teal);
}

.lattice-hex {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 2s ease, opacity 0.2s ease;
}

.lattice-hex.drawn {
    stroke-dashoffset: 0;
}

.lattice-branch {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.5s ease;
}

.lattice-branch.drawn {
    stroke-dashoffset: 0;
}

.crystal-lattice:hover .lattice-hex,
.crystal-lattice:hover .lattice-branch {
    opacity: 0.5;
}

.manifesto-right {
    width: 60%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 6rem 4rem 4rem;
}

.manifesto-heading {
    margin-bottom: 3rem;
}

.manifesto-text {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.manifesto-line {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    line-height: 1.8;
    color: #D4C4A0;
    padding-left: var(--offset, 0rem);
    position: relative;
}

.manifesto-bold {
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    color: #E8D9B8;
}

/* Text hover underline */
.manifesto-line::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: var(--offset, 0rem);
    width: 0;
    height: 1px;
    background: #C4A265;
    transition: width 0.3s ease;
}

.manifesto-line:hover::after {
    width: calc(100% - var(--offset, 0rem));
}

/* ============================================
   PANEL 3: THE CORRIDOR
   ============================================ */
.corridor-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 5;
}

.corridor-row {
    overflow: hidden;
}

.corridor-top {
    height: 30vh;
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 0 4rem;
    white-space: nowrap;
}

.corridor-middle {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8rem;
}

.corridor-narrative {
    max-width: 900px;
}

.corridor-narrative p {
    margin-top: 1.5rem;
    color: #D4C4A0;
}

.corridor-bottom {
    height: 30vh;
    display: flex;
    align-items: flex-end;
}

.crystal-landscape {
    width: 100%;
    height: 100%;
    filter: url(#neon-glow-teal);
}

/* ============================================
   PANEL 4: THE ARCHIVE
   ============================================ */
.archive-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem 6rem;
    position: relative;
    z-index: 5;
}

.archive-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin-top: 1rem;
}

.archive-card {
    background: #3D3122;
    border: 1px solid rgba(94, 236, 211, 0.1);
    padding: 1.8rem 2rem;
    position: relative;
}

.card-rotate-pos {
    transform: rotate(1deg);
}

.card-rotate-neg {
    transform: rotate(-1deg);
}

.archive-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #5EECD3, transparent);
    opacity: 0.3;
}

.card-timestamp {
    display: block;
    margin-bottom: 0.8rem;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
}

.card-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    color: #D4C4A0;
}

/* ============================================
   PANEL 5: THE TERMINUS
   ============================================ */
.terminus-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 5;
}

.terminus-glyph .shard {
    opacity: 0.3;
    transition: transform 8s ease-out;
}

.terminus-glyph.drifting .shard-1 { transform: translate(-5px, -12px); }
.terminus-glyph.drifting .shard-2 { transform: translate(10px, -8px); }
.terminus-glyph.drifting .shard-3 { transform: translate(14px, 3px); }
.terminus-glyph.drifting .shard-4 { transform: translate(2px, 12px); }
.terminus-glyph.drifting .shard-5 { transform: translate(-14px, 3px); }
.terminus-glyph.drifting .shard-6 { transform: translate(-10px, -8px); }
.terminus-glyph.drifting .shard-7 { transform: translate(0px, 15px); }
.terminus-glyph.drifting .shard-8 { transform: translate(12px, 10px); }
.terminus-glyph.drifting .shard-9 { transform: translate(-12px, 10px); }
.terminus-glyph.drifting .shard-10 { transform: translate(8px, -4px); }
.terminus-glyph.drifting .shard-11 { transform: translate(-8px, -4px); }
.terminus-glyph.drifting .shard-12 { transform: translate(0px, 18px); }
.terminus-glyph.drifting .shard-13 { transform: translate(-8px, -6px); }
.terminus-glyph.drifting .shard-14 { transform: translate(8px, -6px); }
.terminus-glyph.drifting .shard-15 { transform: translate(12px, 0px); }
.terminus-glyph.drifting .shard-16 { transform: translate(-12px, 0px); }

.terminus-pulse {
    animation: pulse-glow-fade 4s ease-in-out infinite;
}

@keyframes pulse-glow-fade {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.6; }
}

.terminus-heading {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.terminus-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: #D4C4A0;
    opacity: 0.7;
    margin-bottom: 2rem;
}

.brand-name-terminus {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    letter-spacing: 0.15em;
    color: #E8D9B8;
    opacity: 0;
    transition: opacity 2s ease;
}

.brand-name-terminus.fading .char-terminus {
    display: inline-block;
    transition: opacity 0.3s ease;
}

/* ============================================
   ANIMATIONS: Entry effects
   ============================================ */
.animate-on-enter {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.animate-on-enter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Neon glow CSS classes */
.neon-teal-glow {
    box-shadow: 0 0 8px rgba(94, 236, 211, 0.4),
                0 0 24px rgba(94, 236, 211, 0.15),
                0 0 48px rgba(94, 236, 211, 0.05);
}

.neon-rose-glow {
    box-shadow: 0 0 8px rgba(212, 114, 122, 0.4),
                0 0 24px rgba(212, 114, 122, 0.15),
                0 0 48px rgba(212, 114, 122, 0.05);
}

/* ============================================
   MOBILE ADAPTATION
   ============================================ */
@media (max-width: 768px) {
    html {
        overflow: auto;
        height: auto;
    }

    body {
        overflow: auto;
        height: auto;
    }

    #scroll-track {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y mandatory;
        height: auto;
    }

    .panel {
        min-width: 100vw !important;
        width: 100vw;
        min-height: 100vh;
        scroll-snap-align: start;
    }

    .panel-manifesto {
        min-height: 100vh;
    }

    .panel-corridor {
        min-height: 120vh;
    }

    .manifesto-content {
        flex-direction: column;
    }

    .manifesto-left {
        width: 100%;
        height: 30vh;
    }

    .manifesto-right {
        width: 100%;
        padding: 2rem;
    }

    .corridor-top {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem 2rem;
        white-space: normal;
    }

    .corridor-middle {
        padding: 2rem;
    }

    .archive-content {
        padding: 2rem;
    }

    .fog-divider {
        width: 100%;
        height: 40px;
        top: auto;
        bottom: 0;
        right: 0;
        background: radial-gradient(ellipse at center, transparent 40%, #1A1408 100%);
    }
}
