/* =================================================================
   CSS CUSTOM PROPERTIES - Design System Variables
   ================================================================= */
:root {
    /* Spacing Scale */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3rem;      /* 48px */
    --space-2xl: 4rem;     /* 64px */
    --space-3xl: 6rem;     /* 96px */
    
    /* Typography Scale */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 2rem;      /* 32px */
    --text-4xl: 3rem;      /* 48px */
    --text-5xl: 4rem;      /* 64px */
    
    /* Colors */
    --color-sky: #b8e8fc;
    --color-sky-dark: #00bdff;
    --color-pink: #ee83c3;
    --color-text: #333;
    --color-white: #ffffff;
    --color-overlay: rgba(255, 255, 255, 0.3);
    
    /* Z-index layers */
    --z-base: 1;
    --z-garden: 5;
    --z-flowers: 4;
    --z-content: 10;
    --z-popup: 100;
    --z-warning: 1000;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Adjust variables for smaller screens */
@media (max-width: 1400px) {
    :root {
        --space-xl: 2.5rem;
        --space-2xl: 3rem;
        --space-3xl: 4rem;
    }
}

@media (max-width: 1024px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2rem;
        --space-2xl: 2.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --space-md: 1rem;
        --space-lg: 1.25rem;
        --space-xl: 1.5rem;
    }
}

/* =================================================================
   BASE STYLES
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-sky);
    font-family: 'CSAleksi', cursive;
    overflow-y: hidden;
    color: var(--color-text);
    font-size: var(--text-base);
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.section {
    flex: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-lg);
    background: #5dd1f9;
    position: relative;
}

/* =================================================================
   TYPOGRAPHY WITH FLUID SIZING
   ================================================================= */

h1 {
    font-family: 'CSAleksi', cursive;
    font-size: clamp(4rem, 8vw, 9rem);  /* 64px - 144px responsive */
    color: var(--color-pink);
    text-align: center;
    z-index: var(--z-content);
    line-height: 1.1;
}

h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(3rem, 6vw, 7rem);  /* 48px - 112px responsive */
    color: rgb(204, 238, 255);
    margin-bottom: 1rem;
    z-index: calc(var(--z-content) + 1);
    line-height: 1.2;
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 3.75rem);  /* 32px - 60px responsive */
    color: rgb(126, 209, 245);
    margin-bottom: 1rem;
    z-index: calc(var(--z-content) + 1);
}

p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.6;
    color: var(--color-sky-dark);
}

/* =================================================================
   GARDEN ELEMENTS - RESPONSIVE SIZING
   ================================================================= */

/* Garden element base styles */
.grass1_1, .grass2_1, .bush1_1, .bush2_1,
.grass1_2, .grass2_2, .bush1_2, .bush2_2,
.grass1_3, .grass2_3, .bush1_3, .bush2_3,
.grass1_4, .grass2_4, .bush1_4, .bush2_4,
.grass1_5, .grass2_5, .bush1_5, .bush2_5 {
    position: absolute;
    bottom: 0;
    height: auto;
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Positioning remains the same */
.grass1_1 { z-index: 5; left: 0; width: 200%; }
.grass2_1 { z-index: 4; left: 0; width: 200%; }
.bush1_1 { z-index: 2; left: 0; width: 200%; }
.bush2_1 { z-index: var(--z-base); left: 0; width: 200%; }

.grass1_2 { z-index: 5; left: 99%; width: 200%; }
.grass2_2 { z-index: 4; left: 99%; width: 200%; }
.bush1_2 { z-index: 2; left: 99%; width: 200%; }
.bush2_2 { z-index: var(--z-base); left: 99%; width: 200%; }

.grass1_3 { z-index: 5; left: 198%; width: 200%; }
.grass2_3 { z-index: 4; left: 198%; width: 200%; }
.bush1_3 { z-index: 2; left: 198%; width: 200%; }
.bush2_3 { z-index: var(--z-base); left: 198%; width: 200%; }

.grass1_4 { z-index: 5; left: 297%; width: 203.4%; }
.grass2_4 { z-index: 4; left: 297%; width: 203.5%; }
.bush1_4 { z-index: 2; left: 297%; width: 203.5%; }
.bush2_4 { z-index: var(--z-base); left: 297%; width: 203.5%; }

/* .grass1_5 { z-index: 5; left: 396%; width: 205%; }
.grass2_5 { z-index: 4; left: 396%; width: 205%; }
.bush1_5 { z-index: 2; left: 396%; width: 205%; }
.bush2_5 { z-index: var(--z-base); left: 396%; width: 205%; } */

/* =================================================================
   FLOWERS - RESPONSIVE SIZING
   ================================================================= */

.flowerTitleSeq,
.flowerGrief,
.flowerFilm,
.flowerGame,
.flowerProduct,
.flowerShowreel {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: var(--z-flowers);
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    transition: clip-path var(--transition-normal);
    will-change: clip-path;
}

.flowerTitleSeq {
    width: clamp(15%, 20%, 30%);  /* Responsive width */
    height: auto;
}

.flowerGrief {
    width: clamp(12%, 30%, 50%);
    height: auto;
}

.flowerFilm {
    width: auto;
    height: clamp(50%, 70%, 80%);
}

.flowerGame {
    width: clamp(15%, 25%, 40%);
    height: auto;
}

.flowerProduct {
    width: clamp(20%, 25%, 25%);
    height: auto;
}

.flowerShowreel {
    width: clamp(10%, 15%, 25%);
    height: auto;
}

/* Small decorative flowers scattered around bush2 */
.small-flower {
    position: absolute;
    pointer-events: none; /* decorative only */
    height: clamp(24px, 5vh, 48px);
    width: auto;
    transform: translateX(-50%);
    /* same stacking context as bush2 (var(--z-base)) so flowers sit within the bush layer */
    z-index: var(--z-base);
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from { transform: translateX(-50%) rotate(0deg); }
    to   { transform: translateX(-50%) rotate(360deg); }
}

.flowerTitleSeq.grown {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Clickable flower states (and hover glow for pointer devices) */
.flowerTitleSeq.clickable,
.flowerWeb.clickable,
.flowerFilm.clickable,
.flowerGame.clickable,
.flowerProduct.clickable,
.flowerGrief.clickable,
.flowerShowreel.clickable {
    cursor: pointer;
    transition: filter var(--transition-fast);
}

/* Always allow hover glow on pointer devices, whether or not element is "clickable" */
.flowerTitleSeq.clickable:hover,
.flowerWeb.clickable:hover,
.flowerFilm.clickable:hover,
.flowerGame.clickable:hover,
.flowerProduct.clickable:hover,
.flowerGrief.clickable:hover,
.flowerShowreel.clickable:hover,
.flowerTitleSeq:hover,
.flowerWeb:hover,
.flowerFilm:hover,
.flowerGame:hover,
.flowerProduct:hover,
.flowerGrief:hover,
.flowerShowreel:hover {
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

/* Persistent glow state for clicked flowers */
.flowerTitleSeq.active-glow,
.flowerWeb.active-glow,
.flowerFilm.active-glow,
.flowerGame.active-glow,
.flowerProduct.active-glow,
.flowerGrief.active-glow,
.flowerShowreel.active-glow {
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

/* =================================================================
   STATIC GARDEN ELEMENTS
   ================================================================= */

.gardenTable {
    position: absolute;
    bottom: -1%;
    left: 100%;
    width: clamp(200px, 30%, 600px);
    height: auto;
    z-index: var(--z-flowers);
}

.aboutMe {
    position: absolute;
    bottom: -1%;
    left: 115%;
    width: clamp(200px, 30%, 600px);
    height: auto;
    z-index: var(--z-flowers);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.aboutMe:hover {
    transform: scale(1.05);
}

/* =================================================================
   FLOWERS SIGNS
   ================================================================= */

.kelperSign{    
    position: absolute;
    bottom: 0%;
    left: 20%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.kelperTagsSign {
    position: absolute;
    bottom: 0%;
    left: 65%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.arcaneTagsSign{    
    position: absolute;
    bottom: 0%;
    left: 65%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.arcaneSign{    
    position: absolute;
    bottom: 0%;
    left: 20%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.gameTagsSign{    
    position: absolute;
    bottom: 0%;
    left: 20%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.gameSign{    
    position: absolute;
    bottom: 0%;
    left: 65%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.griefSign{    
    position: absolute;
    bottom: 0%;
    left: 65%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.griefTagsSign{    
    position: absolute;
    bottom: 0%;
    left: 20%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.filmTagsSign{    
    position: absolute;
    bottom: 0%;
    left: 65%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.filmSign{    
    position: absolute;
    bottom: 0%;
    left: 20%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

.showreelSign{    
    position: absolute;
    bottom: 0%;
    left: 25%;
    width: clamp(150px, 15%, 300px);
    height: auto;
    z-index: 4;
}

/* =================================================================
   POPUP STYLES
   ================================================================= */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    backdrop-filter: blur(5px);
    z-index: var(--z-popup);
    touch-action: none;
}

.speech-bubble {
    position: fixed;
    background: var(--color-white);
    border-radius: 15px;
    padding: clamp(1rem, 2vw, 1.5rem);
    width: clamp(250px, 80vw, 300px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: var(--z-popup);
}

.speech-bubble:after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-right-color: var(--color-white);
    border-left: 0;
    margin-top: -15px;
    margin-left: -15px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    cursor: pointer;
    color: #666;
    transition: color var(--transition-fast);
}

.close-btn:hover {
    color: #333;
}

/* =================================================================
   MOBILE WARNING
   ================================================================= */

.mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: var(--z-warning);
    color: white;
    text-align: center;
    padding: var(--space-lg);
}

.warning-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
}

.warning-content h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.warning-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* =================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================= */

/* Large Desktop (1600px+) - Optimal viewing */
@media screen and (min-width: 1600px) {
    h1 {
        font-size: 9rem;
    }
    
    h2 {
        font-size: 7rem;
    }
}

/* Standard Desktop (1200px - 1599px) - Default styles apply */

/* Small Desktop / Large Tablet (1024px - 1199px) */
@media screen and (max-width: 1199px) {
    .section {
        padding: var(--space-md);
    }
    
    .aboutMe,
    .gardenTable {
        width: clamp(180px, 28%, 500px);
    }
}

/* Tablet Landscape (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .section {
        padding: var(--space-sm);
    }
    
    h1 {
        font-size: clamp(3rem, 8vw, 6rem);
    }
    
    h2 {
        font-size: clamp(2rem, 6vw, 4rem);
    }
    
    /* Show mobile warning */
    .mobile-warning {
        display: block;
    }
    
    .scroll-container {
        display: none;
    }
}

/* Mobile (below 768px) */
@media screen and (max-width: 767px) {
    h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    h2 {
        font-size: clamp(1.5rem, 8vw, 3rem);
    }
    
    .speech-bubble {
        width: 90vw;
        max-width: 350px;
    }
}

/* =================================================================
   TOUCH DEVICE OPTIMIZATION
   ================================================================= */

/* Disable expensive effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .aboutMe:hover {
        transform: none;
    }
    
    .flowerTitleSeq.clickable:hover,
    .flowerWeb.clickable:hover,
    .flowerFilm.clickable:hover,
    .flowerGame.clickable:hover,
    .flowerProduct.clickable:hover {
        filter: none;
    }
    
    /* Larger tap targets for mobile */
    .aboutMe {
        min-width: 44px;
        min-height: 44px;
    }
}

/* =================================================================
   PERFORMANCE OPTIMIZATION
   ================================================================= */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Utility class */
.no-scroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100vh;
    touch-action: none;
}

/* =================================================================
   FONT FACES
   ================================================================= */

@font-face {
    font-family: 'CSAleksi';
    src: url('fonts/CSAleksi-Regular_demo-BF68e78025e1932.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Libre Baskerville';
    src: url('fonts/LibreBaskerville-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
