/* ═══════════════════════════════════════════════════════════
   COMPONENTS.CSS — NeuralNerdworks v2
   TOC:
     1. Project Items (mirror/quill)
     2. Carousel Cards
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. PROJECT ITEMS ─── */
.project-item {
    position: relative;
    width: clamp(140px, 21vw, 266px);
    cursor: pointer;
    display: block;
    background: transparent;
}
.project-item--right { transition-delay: 0.2s; }

/* The actual media (img or video) */
.project-media {
    width: 100%;
    height: auto;
    display: block;
    background: transparent;
    transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-out), opacity 0.5s ease;
}

.project-video {
    background: transparent !important;
    outline: none;
    border: none;
}

/* Enlarge on hover — both items */
.project-item:hover .project-media {
    transform: scale(1.08);
}

/* Mirror: blue eerie glow on hover */
.project-item--left:hover .project-media {
    filter: drop-shadow(0 0 20px rgba(70, 140, 220, 0.4))
            drop-shadow(0 0 50px rgba(70, 140, 220, 0.2))
            drop-shadow(0 0 80px rgba(70, 140, 220, 0.1));
}

/* Quill: warm subtle glow on hover */
.project-item--right:hover .project-media {
    filter: drop-shadow(0 0 15px rgba(212, 165, 116, 0.2));
}

/* Overlay text on hover */
.project-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}
.project-item:hover .project-item-overlay { opacity: 1; }

/* Quill: dim + enlarge + warm glow on hover */
.project-item--right:hover .project-media {
    opacity: 0.5;
    transform: scale(1.08);
    filter: drop-shadow(0 0 15px rgba(212, 165, 116, 0.25));
}

.project-item-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 230, 225, 0.5);
}
.project-item-name {
    font-family: var(--font-industrial);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-item--left .project-item-name  { color: var(--col-b); }
.project-item--right .project-item-name { color: var(--col-a); }

/* TCQ overlay — splash screen style */
.project-item-overlay--tcq {
    gap: 0.3rem;
}
.tcq-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    color: var(--col-a);
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-align: center;
}
.tcq-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.6rem, 1.2vw, 0.8rem);
    color: rgba(212, 165, 116, 0.6);
    letter-spacing: 0.06em;
}

@media (max-width: 700px) {
    .project-item {
        width: 50vw;
        max-width: 224px;
    }
}

/* ─── 2. TIMELINE & PIECES ─── */

.timeline-year {
    padding: 4rem 0 6rem;
    background: #000;
    position: relative;
}

.year-marker {
    text-align: center;
    padding: 3rem 0 4rem;
    position: relative;
}

.year-title {
    font-family: var(--font-industrial);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.06);
    transition: opacity 0.8s ease;
    display: inline-block;
}

/* Pieces */
.piece {
    max-width: 900px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.piece.visible {
    opacity: 1;
    transform: translateY(0);
}

.piece-media {
    margin-bottom: 1.5rem;
}

.piece-video {
    width: 100%;
    border-radius: 4px;
    background: #0a0a0a;
    display: block;
}

.piece-info {
    max-width: 640px;
}

.piece-type {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--col-a);
    display: block;
    margin-bottom: 0.4rem;
}

.piece-title {
    font-family: var(--font-industrial);
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 2rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.8rem;
}

.piece-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.7;
    max-width: 520px;
}

.piece--placeholder .piece-info {
    text-align: center;
    margin: 0 auto;
}
.piece--placeholder .piece-title {
    color: rgba(255, 255, 255, 0.15);
    font-size: 1.2rem;
}
.piece--placeholder .piece-desc {
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.1);
}

/* ─── 3. AUDIO PLAYER ─── */

.audio-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    max-width: 500px;
}

.audio-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease;
    padding: 0;
}
.audio-btn:hover {
    border-color: var(--col-a);
    color: var(--col-a);
}
.audio-btn svg {
    width: 14px;
    height: 14px;
}
.audio-icon-play { margin-left: 2px; }

.audio-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress {
    height: 100%;
    width: 0%;
    background: var(--col-a);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.audio-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    min-width: 3rem;
    text-align: right;
    flex-shrink: 0;
}

/* ─── 4. STICKY MENU ─── */

.sticky-menu {
    position: fixed;
    top: 1.8rem;
    right: 1.8rem;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}
.sticky-menu.visible {
    opacity: 1;
    pointer-events: all;
}

.hamburger {
    width: 32px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}
.hamburger:hover { transform: scaleX(1.3); }

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 1px;
    transition: background 0.3s ease;
}
.hamburger:hover span { background: rgba(255, 255, 255, 0.8); }

.sticky-nav {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.4s ease;
    white-space: nowrap;
}
.sticky-nav.open {
    max-width: 500px;
    opacity: 1;
}

.sticky-nav span {
    font-family: var(--font-industrial);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0.4rem 1rem;
    transition: color 0.3s ease;
    display: inline-block;
}
.sticky-nav span:hover { color: rgba(255, 255, 255, 0.8); }

/* ─── 5. QUILL CINEMATIC TRANSITION ─── */

/* Both items need transition for the animation */
.project-item--left,
.project-item--right {
    transition: transform 2.5s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 2s ease;
}

/* State: quill focused — mirror exits left, quill centers */
.project-item--left.exit-left {
    transform: translateX(-150vw);
    opacity: 0;
    transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 2.5s ease;
}

/* State: mirror focused — quill exits right, mirror centers */
.project-item--right.exit-right {
    transform: translateX(150vw);
    opacity: 0;
    transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 2.5s ease;
}

.project-item--right.focused {
    z-index: 50;
    cursor: pointer;
}

.project-item--left.focused {
    z-index: 50;
    cursor: pointer;
}

/* Show TCQ overlay permanently when quill focused */
.project-item--right.focused .project-item-overlay { opacity: 1; }
.project-item--right.focused .project-media { opacity: 0.5; }

/* Mirror: no hover overlay, no hover dim */
.project-item--left .project-item-overlay { display: none; }

/* Mirror: blue glow on hover (keep) but no dim */
.project-item--left:hover .project-media {
    transform: scale(1.08);
    filter: drop-shadow(0 0 20px rgba(70, 140, 220, 0.5))
            drop-shadow(0 0 50px rgba(70, 140, 220, 0.25))
            drop-shadow(0 0 80px rgba(70, 140, 220, 0.12));
}

/* Mirror focused text — hidden until focused state */
.mirror-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 1.5s ease 0.8s;
    pointer-events: none;
}

.mirror-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: rgba(200, 205, 215, 0.7);
    letter-spacing: 0.08em;
    text-shadow: 0 0 30px rgba(150, 170, 200, 0.3);
}

/* Show mirror text when focused */
.project-item--left.focused .mirror-text { opacity: 1; }
.project-item--left.focused .project-media { opacity: 0.6; }

/* Full-screen fade overlay */
.scene-fade {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 2.5s ease;
}
.scene-fade.active {
    opacity: 1;
    pointer-events: all;
}
