/* ============================================
   haru.club — One Spring Day
   Fairycore botanical contemplation
   ============================================ */

:root {
    --hanji-cream: #faf5ef;
    --sky-wash: #e3edf7;
    --apricot-cream: #fff4e6;
    --parchment: #f5f0ea;
    --petal-pink: #e8b4b8;
    --stem-green: #7db88f;
    --pollen-gold: #f0d68a;
    --warm-charcoal: #3d3632;
    --faded-bark: #8a7e74;
    --pale-lavender: #c9b8d9;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif KR', serif;
    font-weight: 200;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--warm-charcoal);
    background: var(--hanji-cream);
    overflow-x: hidden;
}

/* --- Hanji Paper Texture --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* --- Floating Cherry Blossom Petals --- */
#floating-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.fp-1 { width: 40px; position: absolute; top: -50px; left: 15%; animation: petal-drift-1 45s infinite ease-in-out; will-change: transform, opacity; }
.fp-2 { width: 24px; position: absolute; top: -40px; left: 45%; animation: petal-drift-2 52s infinite ease-in-out 5s; will-change: transform, opacity; }
.fp-3 { width: 40px; position: absolute; top: -60px; left: 70%; animation: petal-drift-3 48s infinite ease-in-out 12s; will-change: transform, opacity; }
.fp-4 { width: 24px; position: absolute; top: -30px; left: 85%; animation: petal-drift-4 55s infinite ease-in-out 8s; will-change: transform, opacity; }
.fp-5 { width: 30px; position: absolute; top: -45px; left: 30%; animation: petal-drift-5 60s infinite ease-in-out 20s; will-change: transform, opacity; }

@keyframes petal-drift-1 {
    0%   { transform: translate(0, -50px) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(-120px, 110vh) rotate(340deg); opacity: 0; }
}

@keyframes petal-drift-2 {
    0%   { transform: translate(0, -40px) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(80px, 110vh) rotate(-280deg); opacity: 0; }
}

@keyframes petal-drift-3 {
    0%   { transform: translate(0, -60px) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(-150px, 110vh) rotate(400deg); opacity: 0; }
}

@keyframes petal-drift-4 {
    0%   { transform: translate(0, -30px) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(60px, 110vh) rotate(-320deg); opacity: 0; }
}

@keyframes petal-drift-5 {
    0%   { transform: translate(0, -45px) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(-90px, 110vh) rotate(260deg); opacity: 0; }
}

/* --- Sections --- */
.section {
    position: relative;
}

/* ===========================
   DAWN (0-100vh)
   =========================== */
#dawn {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20vh;
    background: var(--hanji-cream);
}

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.8rem);
    letter-spacing: 0.12em;
    color: var(--warm-charcoal);
    opacity: 0;
    transition: opacity 2s ease;
}

.site-title.visible {
    opacity: 1;
}

/* ===========================
   MORNING (100vh-250vh)
   =========================== */
#morning {
    min-height: 150vh;
    background: var(--hanji-cream);
    transition: background-color 2s ease;
    position: relative;
    overflow: hidden;
}

#morning.sky-transition {
    background: var(--sky-wash);
}

.morning-layout {
    display: flex;
    min-height: 150vh;
    position: relative;
}

.haiku-column {
    width: 40%;
    padding: 15vh 5% 10vh 8%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.haiku-line {
    font-family: 'Noto Serif KR', serif;
    font-weight: 200;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--warm-charcoal);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease, transform 1s ease;
}

.haiku-line[data-delay="1"],
.haiku-line[data-delay="3"],
.haiku-line[data-delay="5"],
.haiku-line[data-delay="7"] {
    font-family: 'Shippori Mincho', serif;
    font-weight: 400;
    font-size: 1.0rem;
    line-height: 1.8;
    color: var(--faded-bark);
}

.haiku-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.wildflower-container {
    width: 60%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 5vh 5% 0;
}

#wildflowers {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.stem {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s ease;
}

.stem.drawn {
    stroke-dashoffset: 0;
}

.flower-group {
    transform: scale(0);
    transform-origin: center bottom;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flower-group.bloomed {
    transform: scale(1);
}

.leaf {
    transform: scale(0);
    transform-origin: right center;
    transition: transform 0.6s ease;
}

.leaf.grown {
    transform: scale(1);
}

/* Dew drops */
.dew {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, transparent 70%);
    box-shadow: 0 0 4px rgba(240,214,138,0.3);
    pointer-events: none;
}

.dew-1 { top: 25%; left: 52%; }
.dew-2 { top: 35%; left: 68%; }
.dew-3 { top: 45%; left: 55%; }
.dew-4 { top: 55%; left: 72%; }
.dew-5 { top: 30%; left: 62%; }

/* Thread lines */
.thread-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ===========================
   MIDDAY (250vh-400vh)
   =========================== */
#midday {
    min-height: 150vh;
    background: var(--sky-wash);
    position: relative;
}

.card-field {
    position: relative;
    width: 100%;
    min-height: 150vh;
    padding: 5vh 3%;
}

.glass-card {
    position: absolute;
    width: clamp(200px, 28vw, 320px);
    padding: 30px 28px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
    opacity: 0;
    transform: translateY(15px);
}

.glass-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.7);
}

.card-label {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--faded-bark);
    display: block;
    margin-bottom: 12px;
}

.card-korean {
    font-family: 'Noto Serif KR', serif;
    font-weight: 200;
    font-size: 2rem;
    color: var(--warm-charcoal);
    margin-bottom: 4px;
}

.card-japanese {
    font-family: 'Shippori Mincho', serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--faded-bark);
    margin-bottom: 14px;
}

.card-gloss {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--warm-charcoal);
    font-style: italic;
}

/* ===========================
   DUSK (400vh-500vh)
   =========================== */
#dusk {
    min-height: 100vh;
    background: var(--apricot-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 10vh 0;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    animation: marquee-scroll 60s linear infinite;
    will-change: transform;
}

.marquee-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2.5vw, 2.4rem);
    letter-spacing: 0.12em;
    color: var(--warm-charcoal);
    padding-right: 8vw;
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Rising petals */
#rising-petals {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

#rising-petals.active {
    opacity: 1;
}

.rpetal {
    position: absolute;
    bottom: -30px;
    will-change: transform, opacity;
}

.rp-1 { width: 24px; left: 12%; animation: rise-1 8s infinite ease-in-out 0s; }
.rp-2 { width: 20px; left: 30%; animation: rise-2 9s infinite ease-in-out 0.5s; }
.rp-3 { width: 16px; left: 50%; animation: rise-3 7s infinite ease-in-out 1s; }
.rp-4 { width: 24px; left: 68%; animation: rise-4 10s infinite ease-in-out 1.5s; }
.rp-5 { width: 20px; left: 82%; animation: rise-5 8.5s infinite ease-in-out 2s; }
.rp-6 { width: 16px; left: 42%; animation: rise-6 9.5s infinite ease-in-out 2.5s; }

@keyframes rise-1 {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.25; }
    100% { transform: translateY(-110vh) rotate(180deg); opacity: 0; }
}
@keyframes rise-2 {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    100% { transform: translateY(-110vh) rotate(-200deg); opacity: 0; }
}
@keyframes rise-3 {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.2; }
    100% { transform: translateY(-110vh) rotate(150deg); opacity: 0; }
}
@keyframes rise-4 {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.2; }
    100% { transform: translateY(-110vh) rotate(-170deg); opacity: 0; }
}
@keyframes rise-5 {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.35; }
    100% { transform: translateY(-110vh) rotate(220deg); opacity: 0; }
}
@keyframes rise-6 {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.25; }
    100% { transform: translateY(-110vh) rotate(-190deg); opacity: 0; }
}

/* ===========================
   NIGHT (500vh-540vh)
   =========================== */
#night {
    height: 80vh;
    background: var(--parchment);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10vh;
}

.night-content {
    text-align: center;
}

.night-text {
    font-size: 1.2rem;
    color: var(--warm-charcoal);
    opacity: 0;
    transition: opacity 1.5s ease;
}

.night-text.visible {
    opacity: 1;
}

.night-kr {
    font-family: 'Noto Serif KR', serif;
    font-weight: 200;
    margin-bottom: 8px;
}

.night-jp {
    font-family: 'Shippori Mincho', serif;
    font-weight: 400;
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
    .fp-1, .fp-2, .fp-3, .fp-4, .fp-5 {
        animation: none;
        display: none;
    }

    .rpetal {
        animation: none;
        display: none;
    }

    .marquee-track {
        animation: none;
    }

    .haiku-line,
    .glass-card,
    .night-text,
    .site-title {
        opacity: 1;
        transform: none;
    }

    .stem {
        stroke-dashoffset: 0;
    }

    .flower-group {
        transform: scale(1);
    }

    .leaf {
        transform: scale(1);
    }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .morning-layout {
        flex-direction: column;
    }

    .haiku-column {
        width: 100%;
        padding: 10vh 8%;
        min-height: 60vh;
    }

    .wildflower-container {
        width: 100%;
        padding: 5vh 10%;
    }

    .glass-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        width: 85%;
        margin: 3vw auto;
    }

    .card-field {
        display: flex;
        flex-direction: column;
        gap: 3vw;
        padding: 10vh 5%;
    }

    .marquee-text {
        font-size: 1.1rem;
    }
}
