/* ============================================
   haru.club — Frutiger Aero Spring Greenhouse
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: hidden;
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    color: #4A3350;
    background: #1A0E20;
    cursor: default;
    -webkit-font-smoothing: antialiased;
}

/* --- Color Variables --- */
:root {
    --deep-bg: #1A0E20;
    --panel-frost: #FFF5FA;
    --primary-accent: #E8A0BF;
    --secondary-accent: #7ECBC4;
    --warm-highlight: #F5D2A8;
    --text-primary: #2D1B33;
    --text-secondary: #8B6A8A;
    --glass-edge: rgba(255, 255, 255, 0.6);
    --bubble-glow: #C4E8FF;
    --gradient-start: #FFE4F0;
    --gradient-end: #E0F0FF;
}

/* --- Greenhouse Container --- */
.greenhouse {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* --- Deep Background Layer --- */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFE4F0 0%, #E0F0FF 40%, #FFE4F0 70%, #E0F0FF 100%);
    z-index: 0;
}

/* --- Parallax Mid-Ground Layer --- */
.parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 500vw;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
}

.botanical {
    position: absolute;
    pointer-events: none;
}

.cherry-branch {
    width: 400px;
    height: 500px;
    top: 5%;
    left: 8%;
}

.fern-frond {
    width: 300px;
    height: 600px;
    top: 30%;
    left: 25%;
}

.ginkgo-leaves {
    width: 350px;
    height: 500px;
    top: 10%;
    left: 55%;
}

.branch-scatter {
    width: 200px;
    height: 400px;
    top: 40%;
    left: 75%;
}

.fern-scatter {
    width: 250px;
    height: 500px;
    top: 15%;
    left: 90%;
}

/* --- Scroll Content Container --- */
.scroll-content {
    display: flex;
    width: fit-content;
    height: 100vh;
    position: relative;
    z-index: 2;
    will-change: transform;
}

/* --- Chambers --- */
.chamber {
    position: relative;
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

/* --- Acrylic Panel (Frosted Glass) --- */
.acrylic-panel {
    background: rgba(255, 245, 250, 0.55);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(219, 112, 147, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    padding: 48px;
    position: relative;
    overflow: hidden;
    transition: backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease, filter 0.6s ease, opacity 0.6s ease;
}

.acrylic-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 24px 24px 0 0;
    pointer-events: none;
}

.acrylic-panel:hover {
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
}

/* --- Panel blur-focus (scroll driven) --- */
.acrylic-panel.blur-distant {
    filter: blur(4px);
    opacity: 0.7;
}

.acrylic-panel.blur-near {
    filter: blur(2px);
    opacity: 0.85;
}

.acrylic-panel.blur-focus {
    filter: blur(0px);
    opacity: 1;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: #2D1B33;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(150, 80, 120, 0.12);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    margin-bottom: 20px;
}

h3 {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 700;
    margin-bottom: 8px;
}

p {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    color: #4A3350;
}

.label-text {
    font-family: 'Zen Maru Gothic', sans-serif;
    color: #8B6A8A;
    font-size: 2.4rem;
    display: block;
    margin-bottom: 8px;
}

.note-text {
    font-family: 'Zen Maru Gothic', sans-serif;
    color: #8B6A8A;
    font-size: 0.95rem;
}

/* --- Hero Panel --- */
.hero-panel {
    text-align: center;
    max-width: 600px;
    padding: 64px 80px;
}

.hero-title {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 16px;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    animation: char-emerge 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(0.4s + var(--i) * 0.05s);
}

@keyframes char-emerge {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #8B6A8A;
    opacity: 0;
    animation: fade-in 0.8s ease 1s forwards;
}

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

/* --- Skeleton Loader --- */
.skeleton-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 5;
    animation: skeleton-hide 0.3s ease 0.4s forwards;
}

.skeleton-rect {
    width: 320px;
    height: 32px;
    border-radius: 16px;
    background: rgba(255, 245, 250, 0.4);
    position: relative;
    overflow: hidden;
}

.skeleton-rect.short {
    width: 240px;
}

.skeleton-rect.shorter {
    width: 180px;
}

.skeleton-rect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    to { left: 100%; }
}

@keyframes skeleton-hide {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* --- Chamber-specific layouts --- */
.chamber-1 {
    justify-content: center;
    align-items: center;
}

.chamber-2 {
    gap: 40px;
    flex-direction: row;
    padding: 80px 100px;
}

.about-panel {
    max-width: 480px;
    flex-shrink: 0;
}

.about-panel p {
    margin-bottom: 12px;
}

.side-note-panel {
    max-width: 220px;
    text-align: center;
    padding: 32px;
    align-self: flex-start;
    margin-top: 60px;
}

.chamber-3 {
    justify-content: center;
    padding: 60px 80px;
}

.specimens-panel {
    max-width: 720px;
}

.specimen-grid {
    display: flex;
    gap: 24px;
    margin-top: 24px;
}

.specimen-card {
    flex: 1;
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 245, 250, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.specimen-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(219, 112, 147, 0.18);
}

.specimen-bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.8),
        rgba(196, 232, 255, 0.3) 50%,
        rgba(232, 160, 191, 0.1) 100%);
    box-shadow:
        inset 0 -4px 8px rgba(0, 0, 0, 0.05),
        0 4px 16px rgba(196, 232, 255, 0.3);
    position: relative;
}

.specimen-bubble::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 12px;
    width: 12px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
}

.specimen-card h3 {
    color: #2D1B33;
}

.specimen-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #8B6A8A;
}

.chamber-4 {
    gap: 40px;
    padding: 80px 100px;
}

.atmosphere-panel {
    max-width: 420px;
    flex-shrink: 0;
}

.atmosphere-panel p {
    margin-bottom: 20px;
}

.atmosphere-stats {
    display: flex;
    gap: 20px;
    margin-top: 24px;
}

.stat-bubble {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.7),
        rgba(196, 232, 255, 0.25) 50%,
        rgba(232, 160, 191, 0.08) 100%);
    box-shadow:
        inset 0 -4px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(196, 232, 255, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.stat-value {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #2D1B33;
}

.stat-label {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 0.7rem;
    color: #8B6A8A;
    margin-top: 2px;
}

.dark-panel {
    max-width: 420px;
    background: rgba(26, 14, 32, 0.75);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(139, 106, 138, 0.3);
    box-shadow: 0 8px 32px rgba(26, 14, 32, 0.3);
    flex-shrink: 0;
}

.dark-panel::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
}

.dark-panel h2 {
    color: #FFF5FA;
}

.dark-panel p {
    color: #E8A0BF;
}

.chamber-5 {
    justify-content: center;
}

.closing-panel {
    max-width: 520px;
    text-align: center;
    padding: 64px 72px;
}

.closing-panel p {
    margin-bottom: 16px;
}

.closing-kanji {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 32px 0 12px;
}

.closing-kanji span {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 3rem;
    color: #E8A0BF;
    text-shadow: 0 2px 8px rgba(232, 160, 191, 0.3);
}

.closing-translation {
    font-family: 'Zen Maru Gothic', sans-serif;
    color: #8B6A8A;
    font-size: 0.9rem;
    font-style: italic;
}

/* --- Decorative Bubbles --- */
.deco-bubble {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--x);
    top: var(--y);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.8),
        rgba(196, 232, 255, 0.3) 50%,
        rgba(232, 160, 191, 0.1) 100%);
    box-shadow:
        inset 0 -4px 12px rgba(0, 0, 0, 0.04),
        0 4px 20px rgba(196, 232, 255, 0.2);
    pointer-events: none;
    animation: bob 3s ease-in-out infinite;
    animation-delay: var(--delay);
    z-index: 3;
}

.deco-bubble::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 22%;
    width: 25%;
    height: 18%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
}

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

/* --- Dew Drops --- */
.dew-drop {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(196, 232, 255, 0.4));
    box-shadow: 0 0 6px rgba(196, 232, 255, 0.4);
    pointer-events: none;
    z-index: 4;
}

/* --- Bubble Navigation --- */
.bubble-nav {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    gap: 12px;
    z-index: 100;
    opacity: 0;
    animation: nav-assemble 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards;
}

@keyframes nav-assemble {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-bubble {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.75),
        rgba(196, 232, 255, 0.3) 50%,
        rgba(232, 160, 191, 0.15) 100%);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    box-shadow:
        inset 0 -3px 6px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(196, 232, 255, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: bob 3s ease-in-out infinite;
    animation-delay: var(--bob-delay);
    position: relative;
}

.nav-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 50% 50% 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-bubble:hover {
    transform: scale(1.08);
    box-shadow:
        inset 0 -3px 6px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(196, 232, 255, 0.25),
        0 0 20px rgba(196, 232, 255, 0.35);
}

.nav-bubble:hover::before {
    opacity: 1;
}

.nav-bubble.active {
    box-shadow:
        inset 0 -3px 6px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(232, 160, 191, 0.35),
        0 0 24px rgba(232, 160, 191, 0.25);
    border-color: rgba(232, 160, 191, 0.5);
}

.nav-label {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 1.1rem;
    color: #2D1B33;
    pointer-events: none;
    user-select: none;
}

/* --- Petal Particles --- */
#petal-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 8px solid var(--petal-color);
    border-radius: 0 0 50% 50%;
    will-change: transform;
    pointer-events: none;
    opacity: var(--petal-opacity);
}

/* --- Glossy Button Highlights (for interactive elements) --- */
.glossy-btn {
    position: relative;
    display: inline-block;
    padding: 12px 28px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(232, 160, 191, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #2D1B33;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.glossy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 50%);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.glossy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 160, 191, 0.25);
}

.glossy-btn:hover::before {
    transform: translateY(2px);
    opacity: 0.8;
}

/* --- Bubble Link Underlines --- */
a {
    color: #E8A0BF;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a:hover {
    color: #2D1B33;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: radial-gradient(circle, #E8A0BF 1.5px, transparent 1.5px);
    background-size: 8px 4px;
    background-repeat: repeat-x;
    opacity: 0;
    transition: opacity 0.3s ease;
}

a:hover::after {
    opacity: 1;
}

/* --- Panel entrance animation --- */
.acrylic-panel {
    opacity: 0;
    filter: blur(8px);
    animation: panel-emerge 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.4s;
}

@keyframes panel-emerge {
    to {
        opacity: 1;
        filter: blur(0px);
    }
}

/* Stagger panel animations per chamber */
.chamber-2 .side-note-panel {
    animation-delay: 0.7s;
}

.chamber-3 .specimens-panel {
    animation-delay: 0.5s;
}

.chamber-4 .dark-panel {
    animation-delay: 0.8s;
}

/* --- Scroll indicator (subtle) --- */
.chamber-1::after {
    content: '';
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(139, 106, 138, 0.3);
    border-bottom: 2px solid rgba(139, 106, 138, 0.3);
    transform: translateY(-50%) rotate(-45deg);
    animation: scroll-hint 2s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes scroll-hint {
    0%, 100% { transform: translateY(-50%) rotate(-45deg) translate(0, 0); opacity: 0.5; }
    50% { transform: translateY(-50%) rotate(-45deg) translate(4px, 4px); opacity: 0.3; }
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .chamber {
        padding: 32px;
        flex-direction: column;
    }

    .chamber-2, .chamber-4 {
        padding: 40px 32px;
        gap: 24px;
    }

    .acrylic-panel {
        padding: 32px;
    }

    .hero-panel {
        padding: 40px;
    }

    .specimen-grid {
        flex-direction: column;
    }

    .bubble-nav {
        bottom: 16px;
        right: 16px;
        gap: 8px;
    }

    .nav-bubble {
        width: 42px;
        height: 42px;
    }

    .nav-label {
        font-size: 0.9rem;
    }

    .about-panel,
    .atmosphere-panel,
    .dark-panel,
    .closing-panel {
        max-width: 100%;
    }

    .side-note-panel {
        max-width: 100%;
        align-self: center;
        margin-top: 0;
    }
}
