:root {
    --text-color: #2a2a2a;
    --bg-color: #f9f9f9;
    --accent-color: #e08fac;
    /* Softer, more refined Sakura pink */
    --font-serif: 'Zen Old Mincho', serif;
    --font-script: 'Mrs Saint Delafield', cursive;
}

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

body {
    font-family: var(--font-serif);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    /* Prevent scroll for the "app" feel */
    width: 100vw;
    height: 100vh;
    font-feature-settings: "palt";
}

/* Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 50;
    opacity: 0.6;
}

.container {
    display: grid;
    grid-template-columns: 38% 62%;
    /* Adjusted ratio */
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
    /* Initial state for fade-in */
    animation: containerFadeIn 1.5s ease-out forwards;
}

/* Left Content */
.content-left {
    padding: 5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #f2f2f2;
    position: relative;
    z-index: 10;
}

.poetry {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.35rem;
    line-height: 2.8;
    font-size: 0.95rem;
    height: auto;
    max-height: 60%;
    font-weight: 500;
}

.poetry p {
    opacity: 0;
    animation: fadeUpText 1.5s ease-out forwards;
    /* Slower duration */
}

/* Stagger animations for poetry lines - slower rhythm */
.poetry p:nth-child(1) {
    animation-delay: 1.0s;
}

.poetry p:nth-child(2) {
    animation-delay: 1.6s;
}

.poetry p:nth-child(3) {
    animation-delay: 2.2s;
}

.poetry p:nth-child(4) {
    animation-delay: 2.8s;
}

.poetry p:nth-child(5) {
    animation-delay: 3.4s;
}

.info {
    font-size: 0.75rem;
    letter-spacing: 0.15rem;
    margin-top: auto;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUpText 1.5s ease-out forwards 4.0s;
    /* Delayed */
}

.info .location,
.info .role {
    margin-bottom: 0.6rem;
}

.characters {
    margin-top: 2rem;
}

.characters .sub {
    font-size: 0.55rem;
    opacity: 0.6;
    margin-bottom: 0.8rem;
    font-family: sans-serif;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.credits {
    font-size: 0.5rem;
    opacity: 0.5;
    line-height: 1.5;
    animation: fadeUpText 1.5s ease-out forwards 4.3s;
    /* Delayed */
    opacity: 0;
    /* Ensure start opacity is 0 before animation */
}

.call-of-cthulhu {
    font-family: serif;
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    letter-spacing: 0.2rem;
}

/* Right Content */
.content-right {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.1);
    /* Start slightly zoomed in */
    animation: imageReveal 3s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.3s;
    /* Slower zoom */
    filter: brightness(1.05) contrast(0.95);
}

/* Title Overlay */
.title-overlay {
    position: absolute;
    bottom: 6%;
    right: 6%;
    text-align: right;
    width: auto;
    pointer-events: none;
    color: #2a2a2a;
    z-index: 20;
}

.tagline {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.25rem;
    opacity: 0;
    animation: slideInRight 1.5s ease-out forwards 4.5s;
    /* Delayed */
}

.sub-tagline {
    font-size: 0.75rem;
    line-height: 2;
    margin-bottom: 2.5rem;
    opacity: 0;
    font-weight: 500;
    animation: slideInRight 1.5s ease-out forwards 4.8s;
    /* Delayed */
}

h1 {
    font-size: 4.5rem;
    font-weight: 500;
    letter-spacing: 0.05rem;
    line-height: 1;
    margin-bottom: 0px;
    opacity: 0;
    animation: titleReveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards 5.2s;
    /* Delayed */
    position: relative;
}

h1 span {
    font-weight: 400;
    color: var(--accent-color);
}

.english-title {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--accent-color);
    margin-top: 0.5rem;
    /* Changed from negative to positive */
    margin-right: 0;
    opacity: 0;
    transform: translateY(20px) rotate(-5deg);
    animation: scriptReveal 1.8s ease-out forwards 5.8s;
    /* Delayed */
}

/* Sakura Petals */
.sakura-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -10%;
    /* Start off-screen */
    background-color: #ffc0cb;
    border-radius: 150% 0 150% 0;
    animation: animate-petal 10s linear infinite;
    opacity: 0;
    /* Hidden by default until animation makes them visible if needed, or controlled by keyframes */
}

/* Keyframes handle opacity: 1 at 0% */

.petal::after {
    content: "";
    position: absolute;
    top: -5%;
    left: -10%;
    width: 100%;
    height: 100%;
    border-radius: 150% 0 150% 0;
    background-color: #ffc0cb;
}


/* Animations */
@keyframes containerFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeUpText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes imageReveal {
    to {
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 0.8;
        transform: translateX(0);
    }
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes scriptReveal {
    to {
        opacity: 0.9;
        transform: translateY(0) rotate(-5deg);
    }
}

@keyframes animate-petal {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        top: 110%;
        transform: translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        /* Allow scroll on mobile */
        height: auto;
    }

    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .content-left {
        height: auto;
        min-height: 60vh;
        padding: 3rem 2rem;
        order: 2;
    }

    .poetry {
        height: 300px;
        margin-bottom: 3rem;
        font-size: 1rem;
    }

    .content-right {
        order: 1;
        height: 60vh;
    }

    .title-overlay {
        bottom: 55%;
        /* Adjust to overlap image/text boundary on mobile */
        right: 1rem;
        text-align: right;
        mix-blend-mode: normal;
        /* For mobile, we might need a background or shadow if it overlaps image */
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }

    body::after {
        /* Add a gradient fade on mobile to make text readable over image bottom */
        content: "";
        position: fixed;
        bottom: 0;
        width: 100%;
        height: 20%;
        background: linear-gradient(to top, rgba(255, 255, 255, 1), transparent);
        pointer-events: none;
        z-index: 15;
        display: none;
        /* Decided against it for now */
    }

    h1 {
        font-size: 3rem;
    }

    .english-title {
        font-size: 2rem;
    }
}