/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #fdfaf1;
    --warm-yellow: #ffcc00;
    --dark-brown: #4a2c2a;
    --solana-green: #9945ff;
    --solana-purple: #14f195;
    --grass-green: #d6f5d6;
    --sky-blue: #e0f2fe;
}

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--cream);
    color: var(--dark-brown);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Initial page loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--cream);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeOut 0.5s ease-out 1.5s forwards;
    pointer-events: none;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.paw-loader {
    width: 60px;
    height: 60px;
    position: relative;
    animation: pawBounce 0.8s ease-in-out infinite;
}

@keyframes pawBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.paw-loader img {
    width: 100%;
    opacity: 0.8;
    filter: sepia(1) saturate(1.5) hue-rotate(30deg);
}

/* Grain Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXVpaWl9fX1ZWVkICAgJCQkKCgpFRUUWHh4zMzMoKCgmJiY9PT04ODgrKysgICApKSkgICAhISEjIyMoKCgAAABaWVpAAAB6SURBVEjHY2AYBaNgFIyCUTAKRsEoQO4/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j/qP+o/6j8QAAB1BwB4kRE+AAAAAElFTkSuQmCC');
    opacity: 0.05;
    pointer-events: none;
    z-index: 100;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: visible; /* IMPORTANT: Allows mascot to overlap sections */
}

/* Page Load Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Bottom layer */
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards;
}

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

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 2; /* Top layer (above mascot) */
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.parker-sprite {
    /*
    MANUAL CONTROLS FOR PARKER
    Adjust these values to change the mascot's size and position.
    The text will NOT move.
    */
    --parker-size: clamp(300px, 60vw, 700px);
    --parker-vertical-position: -5.8vw; /* Pushes mascot down. Use negative values for more overlap. */

    position: absolute;
    z-index: 1; /* Middle layer (below text, above background) */
    width: var(--parker-size);
    bottom: var(--parker-vertical-position);
    left: 50%;
    transform: translateX(-50%);
}

.parker-hero {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    opacity: 0;
    animation: slideInFromBottom 1s ease-out 0.3s forwards;
}

@keyframes wag {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-2deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

.hero-title {
    /*
    MANUAL CONTROLS FOR TITLE POSITION
    Adjust these values to position the title independently
    */
    --title-position-top: -10rem;
    --title-position-left: 0rem;
    
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    position: relative;
    top: var(--title-position-top);
    left: var(--title-position-left);
    color: #F4E3C4;
    text-shadow:
        -2px -2px 0 #000,
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.hero-subtitle {
    /*
    MANUAL CONTROLS FOR SUBTITLE POSITION
    Adjust these values to position the subtitle independently
    */
    --subtitle-position-top: 25rem;
    --subtitle-position-left: 0rem;
    
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: var(--dark-brown);
    margin-bottom: 2.5rem;
    background: rgba(253, 250, 241, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    position: relative;
    top: var(--subtitle-position-top);
    left: var(--subtitle-position-left);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.bone-button {
    /*
    MANUAL CONTROLS FOR BUTTON POSITION
    Adjust these values to position the button independently
    */
    --button-position-top: 20rem;
    --button-position-left: 0rem;
    
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    top: var(--button-position-top);
    left: var(--button-position-left);
    opacity: 0;
    animation: scaleIn 0.6s ease-out 1s forwards;
}

.bone-button:hover {
    transform: scale(1.1) rotate(-5deg);
}

.bone-button img {
    width: 220px;
    height: auto;
    transition: filter 0.3s ease;
}

.bone-button:hover img {
    filter: brightness(1.1) drop-shadow(0 8px 16px rgba(0,0,0,0.3));
}

/* Comic Strip Section */
.comic-section {
    padding: 5rem 2rem;
    background-color: var(--sky-blue);
    border-top: 5px solid var(--dark-brown);
    border-bottom: 5px solid var(--dark-brown);
    position: relative;
    z-index: 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 4rem;
    color: var(--dark-brown);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 3px 3px 0 rgba(255,255,255,0.5);
}

.comic-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.comic-panel {
    background: #fff;
    border: 4px solid var(--dark-brown);
    padding: 1rem 1rem 3rem 1rem; /* Extra padding at bottom for caption */
    position: relative;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    transform: rotate(-2deg);
}

.comic-panel:nth-child(even) {
    transform: rotate(2deg);
}

.comic-panel:hover {
    transform: translateY(-10px) rotate(0deg);
    box-shadow: 15px 15px 5px rgba(0,0,0,0.2);
}

.comic-panel img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border: 2px solid #eee;
    border-radius: 4px;
}

.comic-caption {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: #555;
}

/* Fetchonomics Section */
.fetchonomics-section {
    padding: 5rem 2rem;
    background-color: var(--grass-green);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    border-bottom: 5px solid var(--dark-brown);
}

.fetchonomics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.fetch-item {
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fetch-item:hover {
    transform: scale(1.1);
}

.fetch-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
    transition: filter 0.3s ease;
}

.fetch-item:hover .fetch-icon {
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

.fetch-label {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark-brown);
    background: rgba(255,255,255,0.6);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

.fetch-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-brown);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 1rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.fetch-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* Interactive Map Section */
.map-section {
    padding: 5rem 2rem;
    background-color: #fffbe9; /* Lighter cream */
    position: relative;
    z-index: 0;
    border-bottom: 5px solid var(--dark-brown);
}

.map-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.park-map {
    width: 100%;
    height: auto;
    border: 8px solid var(--dark-brown);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    transform: rotate(-1.5deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.park-map:hover {
    transform: rotate(0deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.map-hotspot {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hotspot hover effects - requires JS or different HTML structure */
/* As a fallback, we can add some animated pointers */
.map-indicator {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--warm-yellow);
    border: 3px solid var(--dark-brown);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse-indicator 2s infinite;
}

.map-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--dark-brown);
    border-radius: 50%;
}

.map-indicator:hover {
    transform: scale(1.2);
    background: var(--solana-purple);
}

.map-indicator {
    /*
    MANUAL CONTROLS FOR MAP INDICATORS
    Adjust these values to position each indicator
    */
    --sandbox-top: 75%;
    --sandbox-left: 21%;
    --squirrel-top: 50%;
    --squirrel-left: 45%;
}

.map-indicator.sandbox { 
    top: var(--sandbox-top); 
    left: var(--sandbox-left); 
}

.map-indicator.squirrel { 
    top: var(--squirrel-top); 
    left: var(--squirrel-left); 
}

@keyframes pulse-indicator {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7); }
    50% { box-shadow: 0 0 0 20px rgba(255, 204, 0, 0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}


.map-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--cream);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 2000;
    max-width: 500px;
    max-height: 400px;
    overflow: hidden;
    border: 5px solid var(--dark-brown);
    transition: opacity 0.3s ease;
}

.hidden {
    display: none;
}

.fading {
    opacity: 0;
    pointer-events: none;
}

.overlay-content h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--dark-brown);
}

.overlay-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}


.sandbox-joke {
    max-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
}

/* Footer - The Paw Print Exit */
.footer-section {
    padding: 3rem 2rem 1.5rem;
    background: linear-gradient(to bottom, 
        rgba(214, 245, 214, 0.2) 0%,
        rgba(184, 225, 184, 0.4) 50%,
        rgba(154, 205, 154, 0.6) 100%);
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--dark-brown);
}

/* Subtle grass/park background */
.footer-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q 5 0 10 20 Q 15 5 20 20 Q 25 2 30 20 Q 35 8 40 20 Q 45 3 50 20 Q 55 10 60 20 Q 65 1 70 20 Q 75 7 80 20 Q 85 4 90 20 Q 95 0 100 20' fill='none' stroke='%2387a068' stroke-width='2' opacity='0.5'/%3E%3C/svg%3E") repeat-x;
    opacity: 0.6;
}

/* Comic-style quote with terminal cursor */
.footer-text {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 0 rgba(255,204,0,0.3);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.terminal-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--dark-brown);
    vertical-align: text-bottom;
    animation: blink-cursor 1s infinite;
    margin-left: 2px;
}

@keyframes blink-cursor {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}



.footer-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.wallet-connect {
    display: inline-block;
    margin-bottom: 1rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wallet-button {
    width: 160px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

.wallet-connect:hover {
    transform: scale(1.1) rotate(-3deg);
}

.footer-disclaimer {
    margin-top: 0;
    font-size: 0.8rem;
    color: rgba(74, 44, 42, 0.5);
    position: relative;
    z-index: 3;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        justify-content: flex-start;
        padding-top: 8rem;
    }
    
    .comic-strip {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .fetchonomics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .fetch-item::before {
        display: none; /* Tooltips can be tricky on mobile */
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .fetchonomics-grid {
        grid-template-columns: 1fr;
    }
    
    .parker-hero {
        width: 200px;
    }

    .footer-mascot {
        width: 180px;
    }
}
