/* iggi.dev - Cottagecore × Dopamine-Neon */

:root {
    --yellow: #ffe566;
    --lavender: #f5eef8;
    --purple-mid: #9b7bb8;
    --chartreuse: #c8ff00;
    --magenta: #ff3cac;
    --deep-night: #1a0e2e;
    --eggplant: #2d1b4e;
    --lilac: #b388ff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--deep-night);
    color: var(--lavender);
    overflow-x: hidden;
}

/* Sidebar Trellis */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--eggplant);
    background-image: 
        linear-gradient(rgba(200, 255, 0, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 255, 0, 0.12) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    border-right: 1px solid rgba(200, 255, 0, 0.2);
}

.sidebar-logo {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--chartreuse);
    margin-bottom: 3rem;
    letter-spacing: -0.015em;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(179, 136, 255, 0.1);
    border: 1px solid rgba(179, 136, 255, 0.3);
    border-radius: 4px;
    color: var(--lavender);
    text-decoration: none;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    font-style: italic;
    transition: all 0.3s ease;
}

.nav-tag:hover,
.nav-tag.active {
    background: rgba(255, 60, 172, 0.15);
    border-color: var(--magenta);
    color: var(--magenta);
    box-shadow: 0 0 12px rgba(255, 60, 172, 0.3);
}

.sidebar-firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--chartreuse);
    border-radius: 50%;
    opacity: 0;
    animation: firefly-pulse 3s ease-in-out infinite;
}

.sidebar-firefly:nth-child(1) { top: 60%; left: 70%; animation-delay: 0s; }
.sidebar-firefly:nth-child(2) { top: 75%; left: 30%; animation-delay: 1s; }
.sidebar-firefly:nth-child(3) { top: 85%; left: 55%; animation-delay: 2s; }

@keyframes firefly-pulse {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-10px); }
}

/* Main Content */
#main-content {
    margin-left: 280px;
}

.act {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 3rem;
    transition: background-color 0.8s ease;
}

.act-inner {
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Act 1: Garden Gate */
#garden-gate {
    background: linear-gradient(135deg, var(--deep-night) 0%, var(--eggplant) 100%);
}

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.015em;
    color: var(--lavender);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.neon-text {
    color: var(--chartreuse);
    text-shadow: 0 0 20px rgba(200, 255, 0, 0.5), 0 0 40px rgba(200, 255, 0, 0.2);
}

.hero-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--purple-mid);
    max-width: 600px;
    line-height: 1.6;
}

.scroll-hint {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--lilac);
    font-size: 0.9rem;
    opacity: 0.7;
}

.scroll-arrow {
    animation: bounce 2s infinite;
    font-size: 1.2rem;
}

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

.duotone-bg {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background: radial-gradient(ellipse at 70% 30%, var(--magenta), transparent 60%),
                radial-gradient(ellipse at 30% 70%, var(--chartreuse), transparent 60%);
    z-index: 1;
}

/* Act 2: Herb Rows */
#herb-rows {
    background: linear-gradient(180deg, var(--eggplant) 0%, var(--deep-night) 100%);
}

.section-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.015em;
    color: var(--yellow);
    margin-bottom: 1rem;
}

.section-intro {
    font-family: 'Lora', serif;
    font-style: italic;
    color: var(--purple-mid);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.flip-card {
    height: 260px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flip-card-front {
    background: linear-gradient(145deg, rgba(45, 27, 78, 0.9), rgba(26, 14, 46, 0.95));
    border: 1px solid rgba(179, 136, 255, 0.2);
}

.flip-card-back {
    background: linear-gradient(145deg, rgba(255, 60, 172, 0.15), rgba(45, 27, 78, 0.95));
    border: 1px solid rgba(255, 60, 172, 0.4);
    transform: rotateY(180deg);
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--lavender);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.flip-card-front h3 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    color: var(--chartreuse);
    font-size: 1.2rem;
}

.card-hint {
    margin-top: 0.8rem;
    font-size: 0.75rem;
    color: var(--purple-mid);
    opacity: 0.7;
    font-style: italic;
}

/* Act 3: Potting Shed */
#potting-shed {
    background: linear-gradient(180deg, var(--deep-night) 0%, #1f0f3a 50%, var(--eggplant) 100%);
}

.shed-shelves {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.shelf {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 2px solid rgba(200, 255, 0, 0.15);
}

.tool-tag {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 229, 102, 0.08);
    border: 1px solid rgba(255, 229, 102, 0.3);
    border-radius: 20px;
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--yellow);
    transition: all 0.3s ease;
}

.tool-tag:hover {
    background: rgba(255, 229, 102, 0.2);
    box-shadow: 0 0 15px rgba(255, 229, 102, 0.2);
    transform: translateY(-2px);
}

.shed-quote {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--lilac);
    border-left: 3px solid var(--magenta);
    padding-left: 1.5rem;
    max-width: 500px;
}

/* Act 4: Evening Garden */
#evening-garden {
    background: linear-gradient(180deg, var(--eggplant) 0%, #0d0618 100%);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(179, 136, 255, 0.08);
    border: 1px solid rgba(179, 136, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    color: var(--lavender);
    font-family: 'Commissioner', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    max-width: 320px;
}

.contact-link:hover {
    border-color: var(--chartreuse);
    box-shadow: 0 0 20px rgba(200, 255, 0, 0.15);
    transform: translateX(8px);
}

.contact-icon {
    font-size: 1.4rem;
    color: var(--magenta);
}

.fireflies-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.firefly-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--chartreuse);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--chartreuse), 0 0 12px rgba(200, 255, 0, 0.3);
    animation: float-firefly 6s ease-in-out infinite;
}

@keyframes float-firefly {
    0%, 100% { opacity: 0; transform: translate(0, 0); }
    25% { opacity: 1; }
    50% { opacity: 0.8; transform: translate(30px, -40px); }
    75% { opacity: 0.4; }
}

/* Responsive */
@media (max-width: 900px) {
    #sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .sidebar-logo {
        margin-bottom: 0;
        font-size: 1.3rem;
    }

    .sidebar-firefly { display: none; }

    #main-content {
        margin-left: 0;
    }

    .act {
        padding: 3rem 1.5rem;
    }
}
