/* ============================================
   lupin.day — Anti-Design Heist Narrative
   Colors: #c4503d #2b3a67 #f2ede4 #d4b83d #1b1014 #8a7e72 #e8a893 #8e9bbd
   Fonts: Bebas Neue, Caveat, IBM Plex Mono
   ============================================ */

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

html {
    overflow-x: hidden;
}

body {
    background: #f2ede4;
    color: #1b1014;
    font-family: 'IBM Plex Mono', monospace;
    overflow-x: hidden;
    position: relative;
    cursor: crosshair;
}

/* ---- Paper Texture Overlay ---- */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.035;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 126, 114, 0.3) 2px,
            rgba(139, 126, 114, 0.3) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(139, 126, 114, 0.2) 3px,
            rgba(139, 126, 114, 0.2) 4px
        );
}

/* ---- Cursor Trail ---- */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
}

.trail-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
    animation: trail-fade 1.5s ease-out forwards;
}

@keyframes trail-fade {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.2); }
}

/* ---- Ink Splatters ---- */
#ink-splatters {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.ink-splat {
    position: absolute;
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    pointer-events: none;
    animation: ink-spread 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes ink-spread {
    0% { transform: scale(0); opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.06; }
}

/* ---- Typography ---- */
.display-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 0.85;
    text-transform: uppercase;
}

.body-text {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(18px, 2.2vw, 26px);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: #1b1014;
}

.body-text-light {
    color: #f2ede4;
}

.body-text em {
    color: #c4503d;
    font-style: italic;
}

.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7e72;
}

/* ---- Calling Card Motifs ---- */
.calling-card-motif {
    position: fixed;
    width: 60px;
    height: 90px;
    border-radius: 4px;
    background: #f2ede4;
    border: 1px solid rgba(196, 80, 61, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 2px 3px 12px rgba(27, 16, 20, 0.08);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.motif-initials {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    color: #1b1014;
    letter-spacing: 0.05em;
}

.motif-1 {
    top: 15vh;
    right: 8vw;
    transform: rotate(12deg);
    opacity: 0;
    animation: card-appear 0.5s ease-out forwards;
    animation-delay: 3s;
}

.motif-2 {
    top: 55vh;
    left: 4vw;
    transform: rotate(-8deg);
    opacity: 0;
    animation: card-appear 0.5s ease-out forwards;
    animation-delay: 6s;
}

.motif-3 {
    bottom: 20vh;
    right: 15vw;
    transform: rotate(15deg);
    opacity: 0;
    animation: card-appear 0.5s ease-out forwards;
    animation-delay: 9s;
}

@keyframes card-appear {
    0% { opacity: 0; transform: rotate(var(--card-rot, 10deg)) scale(0.5); }
    100% { opacity: 0.7; transform: rotate(var(--card-rot, 10deg)) scale(1); }
}

/* ---- Fixed Wash Blobs ---- */
.wash-blob {
    position: fixed;
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    filter: blur(60px);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

.wash-blob-1 {
    width: 50vw;
    height: 45vw;
    background: radial-gradient(ellipse, #c4503d 0%, transparent 70%);
    top: -15vh;
    right: -10vw;
    opacity: 0.12;
    animation: drift-1 28s infinite alternate ease-in-out;
}

.wash-blob-2 {
    width: 45vw;
    height: 40vw;
    background: radial-gradient(ellipse, #2b3a67 0%, transparent 70%);
    top: 30vh;
    left: -15vw;
    opacity: 0.1;
    animation: drift-2 34s infinite alternate ease-in-out;
}

.wash-blob-3 {
    width: 55vw;
    height: 50vw;
    background: radial-gradient(ellipse, #e8a893 0%, transparent 70%);
    bottom: -20vh;
    right: -5vw;
    opacity: 0.1;
    animation: drift-3 22s infinite alternate ease-in-out;
}

.wash-blob-4 {
    width: 40vw;
    height: 35vw;
    background: radial-gradient(ellipse, #8e9bbd 0%, transparent 70%);
    top: 60vh;
    right: 10vw;
    opacity: 0.08;
    animation: drift-4 30s infinite alternate ease-in-out;
}

.wash-blob-5 {
    width: 48vw;
    height: 42vw;
    background: radial-gradient(ellipse, #d4b83d 0%, transparent 70%);
    bottom: 10vh;
    left: -10vw;
    opacity: 0.06;
    animation: drift-5 38s infinite alternate ease-in-out;
}

.wash-blob-6 {
    width: 42vw;
    height: 38vw;
    background: radial-gradient(ellipse, #c4503d 0%, transparent 70%);
    top: 10vh;
    left: 30vw;
    opacity: 0.07;
    animation: drift-6 26s infinite alternate ease-in-out;
}

@keyframes drift-1 {
    0% { transform: translate(0, 0); border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
    100% { transform: translate(-8vw, 12vh); border-radius: 55% 45% 35% 65% / 60% 30% 70% 40%; }
}
@keyframes drift-2 {
    0% { transform: translate(0, 0); border-radius: 55% 45% 50% 50% / 40% 60% 40% 60%; }
    100% { transform: translate(10vw, -8vh); border-radius: 30% 70% 50% 50% / 55% 45% 55% 45%; }
}
@keyframes drift-3 {
    0% { transform: translate(0, 0); border-radius: 65% 35% 45% 55% / 55% 45% 55% 45%; }
    100% { transform: translate(-12vw, -15vh); border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
}
@keyframes drift-4 {
    0% { transform: translate(0, 0); border-radius: 30% 70% 60% 40% / 50% 50% 50% 50%; }
    100% { transform: translate(6vw, 10vh); border-radius: 50% 50% 40% 60% / 35% 65% 35% 65%; }
}
@keyframes drift-5 {
    0% { transform: translate(0, 0); border-radius: 50% 50% 60% 40% / 35% 65% 35% 65%; }
    100% { transform: translate(14vw, -6vh); border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
}
@keyframes drift-6 {
    0% { transform: translate(0, 0); border-radius: 60% 40% 50% 50% / 45% 55% 45% 55%; }
    100% { transform: translate(-5vw, 8vh); border-radius: 35% 65% 55% 45% / 60% 40% 60% 40%; }
}

/* ---- Section watercolor blobs ---- */
.watercolor-blob {
    position: absolute;
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    filter: blur(40px);
    opacity: 0.25;
    animation: blob-morph 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes blob-morph {
    0% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
    33% { border-radius: 55% 45% 35% 65% / 60% 30% 70% 40%; }
    66% { border-radius: 30% 70% 50% 50% / 40% 60% 40% 60%; }
    100% { border-radius: 50% 50% 60% 40% / 35% 65% 35% 65%; }
}

/* ---- Sections ---- */
.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    padding: 4rem 2rem;
}

/* ============================================
   SECTION 1: THE SCENE
   ============================================ */
.section-scene {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 12vh;
    background: #f2ede4;
}

.scene-title {
    font-size: clamp(120px, 18vw, 320px);
    color: #c4503d;
    transform: rotate(-4deg);
    position: relative;
    z-index: 10;
    margin-left: -0.05em;
    opacity: 0;
    animation: title-reveal 1.2s ease-out 0.3s forwards;
}

@keyframes title-reveal {
    0% { opacity: 0; transform: rotate(-4deg) translateY(40px); }
    100% { opacity: 1; transform: rotate(-4deg) translateY(0); }
}

.scene-message {
    font-family: 'Caveat', cursive;
    font-size: clamp(20px, 2.5vw, 32px);
    font-weight: 400;
    color: #1b1014;
    position: absolute;
    top: 33%;
    right: 8vw;
    max-width: 380px;
    transform: rotate(2deg);
    line-height: 1.5;
    opacity: 0;
    animation: fade-in 1s ease-out 1s forwards;
}

@keyframes fade-in {
    to { opacity: 1; }
}

.scene-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-left: 0.5rem;
    opacity: 0;
    animation: fade-in 1s ease-out 1.5s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 3vh;
    right: 5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fade-in 1s ease-out 2s forwards, float-bob 3s ease-in-out 3s infinite;
}

@keyframes float-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.blob-scene-1 {
    width: 500px;
    height: 400px;
    background: #2b3a67;
    top: 8%;
    right: -5%;
    opacity: 0.15;
}

.blob-scene-2 {
    width: 300px;
    height: 350px;
    background: #e8a893;
    top: 35%;
    left: 17%;
    opacity: 0.12;
    animation-delay: -4s;
}

/* ============================================
   SECTION 2: THE EVIDENCE
   ============================================ */
.section-evidence {
    background: #f2ede4;
    min-height: 150vh;
    padding: 10vh 2rem;
}

/* Environmental typography */
.env-letter {
    position: absolute;
    font-size: 30vw;
    color: #1b1014;
    opacity: 0.06;
    z-index: 1;
    pointer-events: none;
}

.env-d {
    top: 5vh;
    left: 5vw;
    transform: rotate(-3deg);
}

.env-a {
    top: 40vh;
    right: -2vw;
    transform: rotate(5deg);
}

.env-y {
    bottom: 5vh;
    left: 30vw;
    transform: rotate(-7deg);
}

.evidence-block {
    position: relative;
    z-index: 5;
    max-width: 480px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.evidence-block.visible {
    opacity: 1;
}

.evidence-block-1 {
    margin: 5vh 0 0 17%;
    transform: rotate(-2deg) translateX(-20px);
    padding: 2rem;
    background: rgba(242, 237, 228, 0.7);
    border-left: 3px solid #c4503d;
}
.evidence-block-1.visible { transform: rotate(-2deg) translateX(0); }

.evidence-block-2 {
    margin: 8vh 0 0 auto;
    margin-right: 8vw;
    transform: rotate(3deg) translateX(20px);
    padding: 2rem;
    background: rgba(242, 237, 228, 0.7);
    border-left: 3px solid #d4b83d;
}
.evidence-block-2.visible { transform: rotate(3deg) translateX(0); }

.evidence-block-3 {
    margin: 8vh 0 0 33%;
    transform: rotate(-1.5deg) translateX(-20px);
    padding: 2rem;
    background: rgba(242, 237, 228, 0.7);
    border-left: 3px solid #8e9bbd;
}
.evidence-block-3.visible { transform: rotate(-1.5deg) translateX(0); }

.card-label {
    display: block;
    margin-bottom: 0.75rem;
    letter-spacing: 0.12em;
}

.blob-evidence-1 {
    width: 450px;
    height: 350px;
    background: #c4503d;
    top: 15%;
    left: -10%;
    opacity: 0.08;
    animation-delay: -2s;
}

.blob-evidence-2 {
    width: 300px;
    height: 300px;
    background: #d4b83d;
    bottom: 10%;
    right: 5%;
    opacity: 0.1;
    animation-delay: -6s;
}

/* Lupin flower SVGs scattered */
.lupin-flower-scattered {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.flower-pos-1 {
    width: 80px;
    height: 200px;
    bottom: 8%;
    right: 12%;
    transform: rotate(15deg);
    opacity: 0;
    transition: opacity 0.8s ease;
}
.flower-pos-1.visible { opacity: 0.8; }

.flower-pos-2 {
    width: 120px;
    height: 300px;
    top: 15%;
    right: 5%;
    transform: rotate(-12deg);
    opacity: 0;
    transition: opacity 0.8s ease;
}
.flower-pos-2.visible { opacity: 0.8; }

.flower-pos-3 {
    width: 90px;
    height: 220px;
    bottom: 20%;
    left: 8%;
    transform: rotate(20deg);
    opacity: 0;
    transition: opacity 0.8s ease;
}
.flower-pos-3.visible { opacity: 0.7; }

/* ============================================
   SECTION 3: THE GARDEN
   ============================================ */
.section-garden {
    min-height: 150vh;
    padding: 10vh 2rem;
    background: #2b3a67;
    position: relative;
    transition: background-color 0.5s ease;
}

.ink-drip-divider {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 60px;
}

.garden-title {
    font-size: clamp(80px, 14vw, 240px);
    color: #d4b83d;
    position: absolute;
    top: 8vh;
    right: -2vw;
    transform: rotate(5deg);
    z-index: 2;
    opacity: 0.5;
}

.garden-text-block {
    position: relative;
    z-index: 5;
    max-width: 450px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.garden-text-block.visible {
    opacity: 1;
}

.garden-text-1 {
    margin: 30vh 0 0 10vw;
    transform: rotate(-3deg) translateY(20px);
}
.garden-text-1.visible { transform: rotate(-3deg) translateY(0); }

.garden-text-2 {
    margin: 8vh 0 0 auto;
    margin-right: 7vw;
    transform: rotate(2deg) translateY(20px);
}
.garden-text-2.visible { transform: rotate(2deg) translateY(0); }

.blob-garden-1 {
    width: 500px;
    height: 450px;
    background: #c4503d;
    top: 5%;
    left: -8%;
    opacity: 0.12;
    animation-delay: -3s;
}

.blob-garden-2 {
    width: 400px;
    height: 350px;
    background: #8e9bbd;
    top: 30%;
    right: -5%;
    opacity: 0.1;
    animation-delay: -7s;
}

.blob-garden-3 {
    width: 350px;
    height: 300px;
    background: #e8a893;
    bottom: 15%;
    left: 20%;
    opacity: 0.08;
    animation-delay: -11s;
}

.blob-garden-4 {
    width: 250px;
    height: 300px;
    background: #d4b83d;
    top: 50%;
    right: 25%;
    opacity: 0.06;
    animation-delay: -5s;
}

/* ============================================
   SECTION 4: THE DEPARTURE
   ============================================ */
.section-departure {
    min-height: 100vh;
    background: #1b1014;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10vh 2rem;
    gap: 4vh;
}

.departure-card {
    width: 90px;
    height: 130px;
    border-radius: 6px;
    background: rgba(242, 237, 228, 0.05);
    border: 1px solid rgba(212, 184, 61, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slow-rotate 20s linear infinite;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.departure-initials {
    font-size: 28px;
    color: #d4b83d;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.departure-flower {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.departure-flower.visible {
    opacity: 1;
    transform: translateY(0);
}

.flower-svg-final {
    width: 100px;
    height: 150px;
}

.departure-text {
    color: #8a7e72;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.departure-text.visible {
    opacity: 0.6;
}

.final-signature {
    opacity: 0;
    transition: opacity 1s ease 1s;
}

.final-signature.visible {
    opacity: 0.4;
}

.final-signature .mono-text {
    font-size: 9px;
    letter-spacing: 0.2em;
}

.blob-departure-1 {
    width: 400px;
    height: 300px;
    background: #c4503d;
    top: 15%;
    left: -10%;
    opacity: 0.05;
    animation-delay: -2s;
}

.blob-departure-2 {
    width: 300px;
    height: 350px;
    background: #8e9bbd;
    bottom: 10%;
    right: -5%;
    opacity: 0.04;
    animation-delay: -8s;
}

/* ---- Flower stem drawing animation ---- */
.flower-stem,
.flower-leaf,
.flower-petal {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s ease-in-out;
}

.flower-drawn .flower-stem,
.flower-drawn .flower-leaf,
.flower-drawn .flower-petal {
    stroke-dashoffset: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section { padding: 4rem 1.5rem; }

    .scene-message {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 2rem;
        max-width: 100%;
        transform: rotate(1deg);
    }

    .evidence-block {
        max-width: 90%;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }

    .garden-text-block {
        max-width: 90%;
        margin-left: 5vw !important;
        margin-right: 5vw !important;
    }

    .env-letter { font-size: 40vw; }

    .calling-card-motif { display: none; }

    .scene-meta {
        flex-direction: column;
        gap: 0.3rem;
    }
}
