/* Japanese Minimalist Exhibition Website */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
    --white: #FFFFFF;
    --black: #1A1A1A;
    --gray: rgba(255, 255, 255, 0.7);
    --transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Cormorant Garamond', serif;
    color: var(--white);
    overflow-x: hidden;
    background: var(--black);
    height: 100vh;
    width: 100vw;
}

/* Background System */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

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

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Content */
.content {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 4rem;
    padding-bottom: 8rem;
}

.content.centered {
    justify-content: center;
    align-items: center;
}

/* Hero Section */
.hero {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    letter-spacing: 0.05em;
    width: 100%;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero.minimized {
    justify-content: flex-start;
    padding-top: 0;
    margin-bottom: 0;
}

.title-block {
    display: inline-block;
}

.title {
    font-size: clamp(2.4rem, 6.4vw, 4.8rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    text-transform: uppercase;
    line-height: 1.1;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.hero.minimized .title {
    font-size: clamp(1.2rem, 2.4vw, 2rem);
    margin-bottom: 1rem;
    opacity: 0.3;
    cursor: pointer;
}

.hero.minimized .title:hover {
    opacity: 0.6;
}

.subtitle-info {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 1.4vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.85;
    text-align: center;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero.minimized .subtitle-info {
    opacity: 0;
    transform: translateY(-20px);
    height: 0;
    overflow: hidden;
}

/* Story Container */
.story-container {
    flex: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 0 2rem 2rem 2rem;
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-container.active {
    flex: 1;
    height: auto;
    opacity: 1;
    visibility: visible;
}

.artist-name-display {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0;
    transform: translateY(20px);
}

.story-container.active .artist-name-display {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.story-text-container {
    width: 80%;
    max-width: 1200px;
    min-height: 400px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.story-container.active .story-text-container {
    visibility: visible;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

.story-text {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 2.2;
    letter-spacing: 0.03em;
    font-weight: 400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-text.fade-in {
    visibility: visible;
    animation: fadeInText 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.story-text .paragraph-line {
    color: #1F1F1F;
    background-color: #FFFFFF;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    display: inline;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Artists Navigation */
.artists {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem 4rem;
    transition: all 0.5s ease;
}

.artists.reading-mode {
    opacity: 0.6;
}

.artist-name {
    background: none;
    border: none;
    color: var(--gray);
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.artist-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.artist-name:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.artist-name:hover::after {
    width: 100%;
}

.artist-name.active {
    color: var(--white);
    font-weight: 500;
}

.artist-name.active::after {
    width: 100%;
}

.nav-divider {
    width: 1px;
    height: 1em;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    vertical-align: middle;
}

.about-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.35);
}

.about-link:hover {
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .content {
        padding: 1.5rem 1rem;
        padding-bottom: 7rem;
        overflow-x: hidden;
    }

    .title {
        font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
        letter-spacing: 0.05em;
        padding: 0 6%;
        box-sizing: border-box;
        max-width: 100%;
        overflow: hidden;
    }

    .title-block {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .subtitle-info {
        font-size: 0.7rem;
        letter-spacing: 0.08em;
        line-height: 1.6;
        padding: 0 0.5rem;
    }

    .hero.minimized {
        padding-top: 0.5rem;
    }

    .hero.minimized .title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
    }

    /* Scrollable story container */
    .story-container {
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .story-container.active {
        padding-bottom: 8rem;
    }

    .artist-name-display {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        margin-top: 1rem;
        padding: 0 1rem;
    }

    .story-text-container {
        width: 100%;
        min-height: auto;
        padding: 0 1rem;
        max-height: none;
    }

    .story-text {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .story-text .paragraph-line {
        padding: 0.3em 0.5em;
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* Fixed artists navigation */
    .artists {
        gap: 0.8rem;
        padding: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .artist-name {
        font-size: 0.65rem;
        letter-spacing: 0.12em;
        padding: 0.4rem 0;
    }
}

/* Smooth Transitions */
.fade-enter {
    opacity: 0;
    transform: scale(1.05);
}

.fade-exit {
    opacity: 0;
    transform: scale(0.95);
}

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Initial hidden state */
.title,
.subtitle-info,
.artists,
.background-image {
    opacity: 0;
}

/* Apply entrance animations */
.title.animate-in {
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.subtitle-info.animate-in {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

.artists.animate-in {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
}

.background-image.animate-in {
    animation: fadeInScale 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0s forwards;
}
