/* miris.works - Pastoral Pop-Art Dreamscape */
/* Fonts: Bebas Neue, Cormorant Garamond, Space Grotesk */

:root {
    --rose-quartz: #f7d6e0;
    --seafoam: #b8e0d2;
    --dusty-violet: #5c4b8a;
    --muted-rose: #c47a8a;
    --twilight-gray: #4a4458;
    --lilac-mist: #d4c5e2;
    --pale-mint: #e8f5f0;
    --peach-glow: #f5e0d0;
    --cool-slate: #8a9ba8;
    --bg-warmth: 0;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--twilight-gray);
    background: var(--rose-quartz);
}

body {
    filter: hue-rotate(calc(var(--bg-warmth) * 15deg));
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #f7d6e0, #c47a8a, #5c4b8a, #b8e0d2);
    z-index: 1000;
    transition: width 0.1s linear;
}

/* Bubble Container */
#bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

/* Scroll Wrapper */
#scroll-wrapper {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#horizontal-canvas {
    display: flex;
    flex-direction: row;
    width: 500vw;
    height: 100vh;
}

/* Panel Base */
.panel {
    width: 100vw;
    height: 100vh;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

/* Halftone Overlay */
.halftone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(92, 75, 138, 0.06) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    z-index: 2;
}

/* ===== PANEL 1: Hero ===== */
.panel-hero {
    background: linear-gradient(135deg, #f7d6e0 0%, #d4c5e2 50%, #b8e0d2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-hero .panel-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.hero-title {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: clamp(12rem, 25vw, 20rem);
    color: var(--dusty-violet);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 0.85;
    text-shadow: 2px 2px 0 rgba(184, 224, 210, 0.6), -1px -1px 0 rgba(247, 214, 224, 0.4);
    opacity: 0;
    transform: scale(1.3);
    filter: blur(12px);
    animation: heroReveal 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.2s forwards;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.hero-subtitle {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cool-slate);
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

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

/* Hero Bubbles */
.hero-bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(247, 214, 224, 0.6), rgba(184, 224, 210, 0.4), rgba(212, 197, 226, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: float linear infinite;
}

.bubble::before {
    content: "";
    position: absolute;
    top: 25%;
    left: 25%;
    width: 35%;
    height: 20%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    filter: blur(3px);
}

@keyframes float {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translateY(50vh) translateX(15px); }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) translateX(-5px); opacity: 0; }
}

.bubble-1 { width: 60px; height: 60px; left: 15%; animation-duration: 12s; animation-delay: 1s; }
.bubble-2 { width: 90px; height: 90px; left: 35%; animation-duration: 16s; animation-delay: 0.5s; }
.bubble-3 { width: 40px; height: 40px; left: 55%; animation-duration: 10s; animation-delay: 2s; }
.bubble-4 { width: 120px; height: 120px; left: 70%; animation-duration: 18s; animation-delay: 0s; }
.bubble-5 { width: 50px; height: 50px; left: 85%; animation-duration: 14s; animation-delay: 3s; }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.prism-icon {
    width: 30px;
    height: 30px;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    background: linear-gradient(135deg, rgba(212, 197, 226, 0.6), rgba(184, 224, 210, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* ===== PANEL 2: Philosophy ===== */
.panel-philosophy {
    background: linear-gradient(135deg, #d4c5e2 0%, #e8f5f0 100%);
    display: flex;
    align-items: center;
}

.panel-split {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    padding: 0 6vw;
}

.philosophy-text {
    flex: 0 0 65%;
    padding-right: 4vw;
    z-index: 10;
}

.panel-title {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: clamp(2.8rem, 6vw, 5rem);
    color: var(--dusty-violet);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: 2px 2px 0 rgba(184, 224, 210, 0.6), -1px -1px 0 rgba(247, 214, 224, 0.4);
    margin-bottom: 2rem;
}

.philosophy-body {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    line-height: 1.9;
    color: var(--twilight-gray);
    max-width: 50ch;
}

/* Crystal Field */
.crystal-field {
    flex: 0 0 35%;
    position: relative;
    height: 80%;
}

.crystal {
    position: absolute;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    backdrop-filter: blur(4px);
    background: linear-gradient(135deg, rgba(212, 197, 226, 0.3), rgba(184, 224, 210, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
    transform: scale(0.2) rotate(-30deg);
    transition: opacity 0.8s, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.crystal.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.crystal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.05), transparent, rgba(255,255,255,0.05), transparent);
}

.crystal-1 { width: 80px; height: 80px; top: 10%; left: 20%; animation: crystalSpin 20s linear infinite; transition-delay: 0ms; }
.crystal-2 { width: 120px; height: 120px; top: 30%; left: 50%; animation: crystalSpin 25s linear infinite reverse; transition-delay: 120ms; }
.crystal-3 { width: 60px; height: 60px; top: 55%; left: 10%; animation: crystalSpin 18s linear infinite; transition-delay: 240ms; }
.crystal-4 { width: 100px; height: 100px; top: 65%; left: 60%; animation: crystalSpin 22s linear infinite reverse; transition-delay: 360ms; }
.crystal-5 { width: 50px; height: 50px; top: 20%; left: 75%; animation: crystalSpin 15s linear infinite; transition-delay: 480ms; }
.crystal-6 { width: 90px; height: 90px; top: 80%; left: 35%; animation: crystalSpin 28s linear infinite reverse; transition-delay: 600ms; }
.crystal-7 { width: 70px; height: 70px; top: 45%; left: 85%; animation: crystalSpin 19s linear infinite; transition-delay: 720ms; }

@keyframes crystalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.crystal.visible {
    animation-name: crystalSpinVisible;
}

@keyframes crystalSpinVisible {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1) rotate(360deg); }
}

/* ===== PANEL 3: Works ===== */
.panel-works {
    background: linear-gradient(135deg, #f7d6e0 0%, #d4c5e2 50%, #e8f5f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-works .panel-content {
    z-index: 10;
    position: relative;
    width: 80%;
}

.panel-works .panel-title {
    text-align: center;
    margin-bottom: 3rem;
}

.works-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.work-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.work-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.work-card-1 { margin-left: 0; transition-delay: 0ms; }
.work-card-2 { margin-left: 8vw; transition-delay: 100ms; }
.work-card-3 { margin-left: 16vw; transition-delay: 200ms; }

.card-crystal {
    flex-shrink: 0;
}

.crystal-icon {
    width: 40px;
    height: 40px;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    background: linear-gradient(135deg, var(--dusty-violet), var(--muted-rose));
}

.crystal-icon-adventure {
    background: linear-gradient(135deg, #b8e0d2, #5c4b8a);
}
.crystal-icon-puzzle {
    background: linear-gradient(135deg, #f7d6e0, #c47a8a);
}
.crystal-icon-narrative {
    background: linear-gradient(135deg, #d4c5e2, #5c4b8a);
}

.card-title {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--dusty-violet);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card-desc {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    line-height: 1.85;
    color: var(--twilight-gray);
    letter-spacing: 0.01em;
}

/* ===== PANEL 4: Garden ===== */
.panel-garden {
    background: linear-gradient(180deg, #f5e0d0 0%, #d4c5e2 50%, #b8e0d2 100%);
    position: relative;
}

.garden-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.garden-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.grass-field {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    pointer-events: none;
}

.grass-blade {
    position: absolute;
    bottom: 0;
    left: var(--left, 50%);
    width: 2px;
    height: var(--h, 60px);
    background: linear-gradient(to top, #b8e0d2, transparent);
    transform-origin: bottom center;
    transform: rotate(var(--rot, 0deg));
    animation: sway ease-in-out infinite alternate;
    animation-duration: calc(4s + var(--delay, 0s) * 2);
    animation-delay: var(--delay, 0s);
}

@keyframes sway {
    0% { transform: rotate(calc(var(--rot, 0deg) - 4deg)); }
    100% { transform: rotate(calc(var(--rot, 0deg) + 4deg)); }
}

#wave-canvas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 33%;
    pointer-events: none;
}

/* ===== PANEL 5: Contact ===== */
.panel-contact {
    background: var(--pale-mint);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-content {
    text-align: center;
    z-index: 10;
}

.contact-bubble {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(247, 214, 224, 0.6), rgba(184, 224, 210, 0.4), rgba(212, 197, 226, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
    animation: float 12s ease-in-out infinite;
}

.contact-bubble::before {
    content: "";
    position: absolute;
    top: 20%;
    left: 20%;
    width: 35%;
    height: 20%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    filter: blur(3px);
}

.monogram {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 2.5rem;
    color: var(--dusty-violet);
    position: relative;
    z-index: 1;
}

.contact-email {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--dusty-violet);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.contact-email:hover {
    color: var(--muted-rose);
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cool-slate);
    text-decoration: none;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--muted-rose);
}

.social-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--cool-slate);
    opacity: 0.5;
}

/* Dynamic Bubbles */
.dynamic-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(247, 214, 224, 0.6), rgba(184, 224, 210, 0.4), rgba(212, 197, 226, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.5);
    pointer-events: none;
    animation: floatUp ease-in-out infinite;
}

.dynamic-bubble::before {
    content: "";
    position: absolute;
    top: 25%;
    left: 25%;
    width: 35%;
    height: 20%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    filter: blur(3px);
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    50% { transform: translateY(-50vh) translateX(15px); }
    90% { opacity: 0.8; }
    100% { transform: translateY(-110vh) translateX(-5px); opacity: 0; }
}

/* Garden bubbles */
.garden-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(247, 214, 224, 0.5), rgba(184, 224, 210, 0.3), rgba(212, 197, 226, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: floatUp ease-in-out infinite;
}

.garden-bubble::before {
    content: "";
    position: absolute;
    top: 25%;
    left: 25%;
    width: 35%;
    height: 20%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    filter: blur(2px);
}

/* Mobile: vertical stack fallback */
@media (max-width: 768px) {
    #horizontal-canvas {
        flex-direction: column;
        width: 100vw;
        height: auto;
    }
    .panel {
        width: 100vw;
        min-height: 100vh;
        height: auto;
    }
    #scroll-wrapper {
        overflow-y: auto;
        overflow-x: hidden;
    }
    .panel-split {
        flex-direction: column;
        padding: 4rem 2rem;
    }
    .philosophy-text {
        flex: none;
        padding-right: 0;
        margin-bottom: 2rem;
    }
    .crystal-field {
        flex: none;
        height: 300px;
        width: 100%;
    }
    .work-card-1, .work-card-2, .work-card-3 {
        margin-left: 0;
    }
    .hero-title {
        font-size: clamp(5rem, 20vw, 12rem);
    }
    #progress-bar {
        display: none;
    }
}