/* CONSCIENTIA - Living Artwork Styles - Modern Version */

/* Navigation — dark overlay for this page */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(22, 22, 29, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 47, 167, 0.15);
    padding: 0.5rem 0;
}

.navigation .logo-link {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ivory);
    text-decoration: none;
}

.navigation .nav-links a {
    color: rgba(244, 241, 236, 0.8);
    font-size: 1rem;
}

.navigation .nav-links a:hover {
    color: var(--ivory);
}

/* Hamburger — hidden on desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ivory);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

.conscientia-container {
    padding-top: 48px; /* height of fixed nav */
    min-height: 100vh;
    background-color: #16161D;
}

/* Dark Navigation for Homepage */
.dark-nav {
    background-color: rgba(22, 22, 29, 0.95);
    border-bottom: 1px solid rgba(0, 47, 167, 0.2);
}

.dark-nav .logo-link,
.dark-nav .nav-links a {
    color: var(--ivory);
}

.dark-nav .nav-links a:hover {
    color: var(--ikb);
}

/* Artwork Stage — shrink-wraps to image aspect ratio */
.artwork-stage {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio (1080/1920) */
    padding-bottom: 0;
    background: #16161D;
    overflow: hidden;
}

/* Crossfade Container */
.crossfade-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.crossfade-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 5s ease-in-out;
    will-change: opacity, transform;
}

.crossfade-layer.crossfade-active {
    opacity: 1;
}

/* Ken Burns motion is applied via JS Web Animations API */

/* Breathing — slow inhale/exhale rhythm, compounds with Ken Burns */
.crossfade-container {
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.003); }
}

/* Vignette overlay for text legibility */
.crossfade-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, transparent 50%, rgba(22, 22, 29, 0.4) 100%),
        linear-gradient(to bottom, rgba(22, 22, 29, 0.15) 0%, transparent 30%, transparent 55%, rgba(22, 22, 29, 0.4) 75%, rgba(22, 22, 29, 0.85) 92%, rgba(22, 22, 29, 1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Date stamp — retro camera style */
.snapshot-date {
    position: absolute;
    bottom: 90px;
    left: 90px;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.snapshot-date.visible {
    opacity: 0.85;
}

.snapshot-date-text {
    font-family: 'VT323', monospace;
    font-size: 2.2rem;
    color: #e8a030;
    letter-spacing: 0.08em;
    text-shadow: 0 0 10px rgba(232, 160, 48, 0.5);
}

/* Mood overlay */
.snapshot-mood {
    position: absolute;
    bottom: 130px;
    left: 90px;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease-in-out 0.3s;
}

.snapshot-mood.visible {
    opacity: 0.6;
}

.snapshot-mood-text {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    color: #e8a030;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(232, 160, 48, 0.4);
}

/* Counter */
.snapshot-counter {
    position: absolute;
    bottom: 64px;
    left: 90px;
    z-index: 10;
    opacity: 0.4;
}

.snapshot-counter-text {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: #e8a030;
    letter-spacing: 0.08em;
    text-shadow: 0 0 4px rgba(232, 160, 48, 0.3);
}

/* Artwork Info Overlay */
.artwork-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    animation: infoFadeIn 2s ease-out 1s forwards;
}

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

.artwork-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 200;
    color: var(--ivory);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-sm);
    text-shadow: 0 0 40px rgba(0, 47, 167, 0.5);
}

.artwork-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    color: rgba(244, 241, 236, 0.7);
    letter-spacing: 0.1em;
    font-style: italic;
}

/* Practice Counter — Flip Clock */
.practice-counter {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.flip-digits {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.flip-digit {
    width: 60px;
    height: 80px;
    background: rgba(244, 241, 236, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 200;
    color: rgba(244, 241, 236, 0.85);
    text-shadow: 0 0 12px rgba(22, 22, 29, 0.8), 0 0 24px rgba(22, 22, 29, 0.5);
    position: relative;
    box-shadow: 0 2px 8px rgba(22, 22, 29, 0.3), 0 0 20px rgba(22, 22, 29, 0.4);
    border: 1px solid rgba(244, 241, 236, 0.06);
}

.flip-digit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(22, 22, 29, 0.25);
}

.practice-label {
    font-size: 0.85rem;
    color: rgba(244, 241, 236, 0.45);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(22, 22, 29, 0.8), 0 0 20px rgba(22, 22, 29, 0.5);
}

/* Evolution Indicator */
.evolution-indicator {
    position: absolute;
    bottom: 100px;
    right: 90px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0.6;
    z-index: 10;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background-color: var(--burgundy);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.evolution-text {
    font-size: 1.2rem;
    color: var(--ivory);
    letter-spacing: 0.15em;
    font-weight: 300;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(22, 22, 29, 0.8), 0 0 20px rgba(22, 22, 29, 0.5);
}

/* ─── Section Variants ─── */

/* Base explanation section */
.work-explanation {
    padding: var(--space-xl) var(--space-md);
    scroll-margin-top: 60px;
    position: relative;
}

/* Dark sections (The Origin, Full Circle) */
.section-dark {
    background-color: var(--charcoal);
}

/* Pull The Origin up into the artwork fade zone */
#the-origin {
    margin-top: -60px;
    padding-top: calc(var(--space-xl) + 60px);
    position: relative;
    z-index: 1;
}

.section-dark .section-title {
    color: var(--ivory);
}

.section-dark .section-subtitle {
    color: rgba(244, 241, 236, 0.5);
}

.section-dark .explanation-text {
    color: rgba(244, 241, 236, 0.85);
}

.section-dark .red-thread-divider {
    opacity: 0.5;
}

/* Light sections (The Translation, The Observer) */
.section-light {
    background-color: var(--ivory);
}

/* Warm section (The Becoming) */
.section-warm {
    background-color: var(--sand);
}

/* ─── Gradient Transitions Between Sections ─── */

.section-transition {
    height: 280px;
    position: relative;
}

/* Dark → Light */
.section-dark + .section-transition {
    background: linear-gradient(to bottom, var(--charcoal), var(--ivory));
}

/* Light → Warm */
.section-light + .section-transition {
    background: linear-gradient(to bottom, var(--ivory), var(--sand));
}

/* Warm → Dark */
.section-warm + .section-transition {
    background: linear-gradient(to bottom, var(--sand), var(--charcoal));
}

/* Dark (Full Circle) → Light (The Observer) — reuse dark→light */

/* Red thread accent line at transition midpoint — disabled */

/* Footer transition (light → dark) */
.footer-transition {
    background: linear-gradient(to bottom, var(--ivory), #16161D);
}

/* ─── Transition from artwork stage to first section ─── */
.artwork-stage + .section-transition {
    height: 0;
}

.explanation-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--ikb);
    font-weight: 300;
    letter-spacing: 0.08em;
    font-style: italic;
    margin-top: var(--space-sm);
}

.explanation-text {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 2;
    color: var(--charcoal);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin: var(--space-lg) 0;
    text-align: left;
}

/* Conceptual Pipeline */
.pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin: var(--space-xl) 0;
    padding: var(--space-md);
}

.pipeline-step {
    font-family: 'VT323', monospace;
    font-size: 1.15rem;
    color: var(--ikb);
    letter-spacing: 0.06em;
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 47, 167, 0.04);
    border: 1px solid rgba(0, 47, 167, 0.12);
    border-radius: 2px;
}

.pipeline-arrow {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--burgundy);
    position: relative;
    margin: 0 4px;
}

.pipeline-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 7px;
    height: 7px;
    border-top: 1px solid var(--burgundy);
    border-right: 1px solid var(--burgundy);
    transform: rotate(45deg);
}

.red-thread-divider {
    width: 100px;
    height: 2px;
    background-color: var(--burgundy);
    margin: var(--space-xl) auto;
    opacity: 0.7;
}

/* Pipeline on dark sections */
.section-dark .pipeline-step {
    color: rgba(244, 241, 236, 0.8);
    background: rgba(244, 241, 236, 0.05);
    border-color: rgba(244, 241, 236, 0.15);
}

.red-thread-divider.small {
    width: 60px;
    margin: var(--space-lg) auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .navigation .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60vw;
        height: 100vh;
        background: rgba(22, 22, 29, 0.97);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-lg);
        transition: right 0.4s ease;
    }

    .navigation .nav-links.nav-open {
        right: 0;
    }

    .navigation .nav-links a {
        font-size: 1.1rem;
        letter-spacing: 0.12em;
    }

    .artwork-stage {
        padding-top: 56.25%;
    }

    .evolution-indicator {
        bottom: 20px;
        right: 20px;
    }

    .snapshot-date {
        bottom: 24px;
        left: 16px;
    }

    .snapshot-date-text {
        font-size: 1.6rem;
    }

    .snapshot-mood {
        bottom: 56px;
        left: 16px;
    }

    .snapshot-mood-text {
        font-size: 1.1rem;
    }

    .snapshot-counter {
        bottom: 6px;
        left: 16px;
    }

    .snapshot-counter-text {
        font-size: 1rem;
    }

    .crossfade-layer {
        transition: opacity 4s ease-in-out;
    }

    .work-explanation {
        padding: var(--space-lg) var(--space-sm);
    }

    .section-transition {
        height: 180px;
    }

    .pipeline {
        flex-direction: column;
        align-items: center;
    }

    .pipeline-arrow {
        width: 1px;
        height: 30px;
        margin: 4px 0;
    }

    .pipeline-arrow::after {
        right: -3px;
        top: auto;
        bottom: 0;
        transform: rotate(135deg);
    }
}

@media (max-width: 480px) {
    .artwork-title {
        font-size: 2rem;
        letter-spacing: 0.12em;
    }

    .artwork-subtitle {
        font-size: 0.85rem;
    }

    .flip-digit {
        width: 40px;
        height: 56px;
        font-size: 2.4rem;
    }

    .practice-label {
        font-size: 0.7rem;
    }

    .artwork-info {
        animation: infoFadeIn 1.5s ease-out 0.5s forwards;
    }

    .snapshot-date {
        bottom: 18px;
        left: 12px;
    }

    .snapshot-date-text {
        font-size: 1.3rem;
    }

    .snapshot-mood {
        bottom: 44px;
        left: 12px;
    }

    .snapshot-mood-text {
        font-size: 0.95rem;
    }

    .snapshot-counter {
        bottom: 4px;
        left: 12px;
    }

    .evolution-indicator {
        bottom: 14px;
        right: 12px;
    }

    .evolution-text {
        font-size: 0.7rem;
    }
}

/* No interactive hint — slideshow is passive */
