/* Import refined Google Fonts - Fredoka (playful) & Poppins (clean/professional) */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@700&family=Poppins:wght@400;500;600;700&display=swap');

/* --- Advanced momentum & Spring curves --- */
:root {
    --spring-transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                          box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                          background-color 0.2s ease, 
                          color 0.2s ease;
    --smooth-transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- High-Quality Keyframe Animations --- */

/* Buttery-smooth, liquid-style floating motion */
@keyframes soft-float {
    0%, 100% { transform: translateY(0) rotate(-0.5deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

/* Page load transition */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stamp badge slow pulse */
@keyframes stamp-pulse {
    0%, 100% { transform: rotate(-4deg) scale(1); }
    50% { transform: rotate(-5deg) scale(1.05); }
}

/* Hot dog trampoline hop and landing squish */
@keyframes hop-and-squish {
    0%, 100% { transform: translateY(0) scale(1.3, 1.3); }
    30% { transform: translateY(-12px) scale(1.1, 1.5); } 
    50% { transform: translateY(-14px) rotate(15deg) scale(1.2, 1.2); } 
    70% { transform: translateY(0) scale(1.5, 0.85); } 
    85% { transform: translateY(0) scale(1.2, 1.3); } 
}

/* Jello wobble for buttons */
@keyframes button-wobble {
    0% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.15, 0.85) rotate(-3deg); }
    50% { transform: scale(0.85, 1.15) rotate(3deg); }
    75% { transform: scale(1.05, 0.95) rotate(-1deg); }
    100% { transform: scale(1) rotate(0); }
}

/* 404 falling numbers animation */
@keyframes numbers-fall {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(14deg) translateY(8px); }
}


/* --- Global Settings --- */
html {
    scroll-behavior: smooth; 
}

body {
    font-family: 'Poppins', sans-serif; /* Clean, modern body font */
    background-color: #faf5ee; 
    background-image: radial-gradient(#cca01a 2px, transparent 2px); 
    background-size: 35px 35px; 
    color: #2c3e50; 
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden; 
}

/* Custom Highlight Style */
::selection {
    background-color: #b33925;
    color: #fff;
}

/* Theme-aligned Keyboard Focus */
a:focus-visible, button:focus-visible {
    outline: 3px dashed #cca01a;
    outline-offset: 4px;
}


/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 14px;
}
::-webkit-scrollbar-track {
    background: #faf5ee;
    border-left: 3px solid #2c3e50;
}
::-webkit-scrollbar-thumb {
    background-color: #cca01a;
    border-radius: 10px;
    border: 3px solid #faf5ee;
    transition: var(--smooth-transition);
}
::-webkit-scrollbar-thumb:hover {
    background-color: #b33925;
}


/* --- Header & Design Additions --- */
header {
    background-color: #b33925; 
    color: #ffffff;
    padding: 50px 20px 40px 20px;
    text-align: center;
    border-bottom: 8px solid #2c3e50; 
    box-shadow: 0px 10px 0px #cca01a; 
    position: relative;
}

/* Checkerboard diner decoration strip */
header::after, footer::before {
    content: "";
    display: block;
    height: 16px;
    width: 100%;
    background: repeating-conic-gradient(#2c3e50 0% 25%, #faf5ee 0% 50%) 0/16px 16px;
    border-top: 3px solid #2c3e50;
    border-bottom: 3px solid #2c3e50;
    position: absolute;
    left: 0;
    z-index: 2;
}

header::after {
    bottom: -24px;
}

header h1 {
    font-family: 'Fredoka', sans-serif; /* Playful logo style */
    font-size: 3.5em;
    margin: 0;
    text-shadow: 4px 4px 0px #2c3e50; 
    letter-spacing: 2px;
    display: inline-block;
    animation: soft-float 6s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite; 
}

.tagline {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.15em;
    margin: 15px 0 25px 0;
    color: #faf5ee;
    background-color: #2c3e50;
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    transform: rotate(-1.5deg); 
    border: 2px solid #cca01a;
    transition: var(--smooth-transition);
}

.tagline:hover {
    transform: rotate(1deg) scale(1.03);
}


/* --- Blob-Shaped Buttons --- */
nav {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

nav a {
    background-color: #ffffff;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Poppins', sans-serif; /* Cleaner typography for links */
    padding: 12px 24px;
    border-radius: 24px 12px 28px 14px / 14px 28px 12px 24px; 
    border: 4px solid #2c3e50;
    box-shadow: 4px 4px 0px #2c3e50; 
    transition: var(--spring-transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95em;
}

nav a:hover {
    background-color: #cca01a; 
    color: #ffffff;
    animation: button-wobble 0.6s ease-in-out;
    box-shadow: 6px 6px 0px #b33925; 
}

nav a:active {
    transform: translate(4px, 4px) scale(0.95);
    box-shadow: 0px 0px 0px #2c3e50;
}


/* --- Main Card Layout --- */
main {
    max-width: 750px;
    margin: 65px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; 
    border: 5px solid #2c3e50; 
    box-shadow: 12px 12px 0px #cca01a, 12px 12px 0px 5px #2c3e50; 
    position: relative;
    animation: fade-in-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.7em;
    color: #2c3e50;
    background-color: #cca01a;
    display: inline-block;
    padding: 6px 18px;
    border-radius: 12px;
    border: 3px solid #2c3e50;
    transform: rotate(1deg);
    margin-top: 0;
    box-shadow: 3px 3px 0px #b33925;
    transition: var(--spring-transition);
}

h2:hover {
    transform: rotate(-1deg) scale(1.02);
    box-shadow: 5px 5px 0px #b33925;
}

h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #b33925;
}


/* --- Trampoline Hot Dog Bullets --- */
ul {
    list-style-type: none;
    padding-left: 0;
}

li {
    margin-bottom: 18px;
    padding-left: 42px;
    position: relative;
    font-size: 1.05em;
    font-weight: 500;
    transition: var(--smooth-transition);
}

li::before {
    content: "🌭";
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 1.25em;
    transform: scale(1.3);
}

li:hover {
    transform: translateX(4px);
    color: #b33925;
}

li:hover::before {
    animation: hop-and-squish 0.6s ease-in-out forwards;
    transform-origin: bottom center; 
}


/* --- Custom Design Additions --- */

/* 1. Sticker Style for Images */
.sticker-img {
    border: 6px solid #ffffff; 
    outline: 4px solid #2c3e50; 
    border-radius: 16px;
    box-shadow: 6px 6px 0px #2c3e50;
    transform: rotate(-1.5deg);
    transition: var(--spring-transition);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
}

.sticker-img:hover {
    transform: scale(1.03) rotate(2deg) translateY(-4px);
    box-shadow: 10px 10px 0px #2c3e50;
}

/* 2. Stamp Callout Badge */
.stamp-badge {
    background-color: #cca01a;
    color: #2c3e50;
    font-family: 'Fredoka', sans-serif; /* Kept fun for stamps */
    font-weight: 700;
    padding: 6px 14px;
    border: 3px dashed #2c3e50;
    border-radius: 6px;
    display: inline-block;
    transform: rotate(-4deg);
    box-shadow: 4px 4px 0px #2c3e50;
    text-transform: uppercase;
    font-size: 0.9em;
    margin: 10px 0;
    animation: stamp-pulse 3s ease-in-out infinite;
    transform-origin: center center;
}

/* 3. Reusable Checker Divider */
.checker-divider {
    height: 16px;
    background: repeating-conic-gradient(#2c3e50 0% 25%, #faf5ee 0% 50%) 0/16px 16px;
    border-top: 3px solid #2c3e50;
    border-bottom: 3px solid #2c3e50;
    margin: 35px 0;
    width: 100%;
}


/* --- Silly & "Broken" 404 Error Page --- */
.error-page {
    background-color: #ebdcd0; 
}

.error-page header h1 {
    animation: drift 1s ease-in-out infinite alternate; 
}

.error-page .road-sign {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 15px 30px;
    display: inline-block;
    border-radius: 15px;
    border: 5px dashed #b33925; 
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    transform: rotate(-8deg); 
    box-shadow: 8px -4px 0px #cca01a; 
    margin-bottom: 30px;
}

.error-page .error-code {
    font-size: 6.5rem;
    color: #b33925;
    font-weight: bold;
    display: inline-block;
    margin: 10px 0;
    animation: numbers-fall 1.5s ease-in-out infinite alternate; 
    transform-origin: bottom left;
}

.error-page nav a {
    transform: rotate(3deg);
    background-color: #faf5ee;
}

.error-page nav a:nth-child(even) {
    transform: rotate(-4deg);
}

.error-page nav a:hover {
    background-color: #b33925;
    color: #ffffff;
    transform: scale(1.1) rotate(0deg);
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 55px 20px;
    background-color: #2c3e50;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05em;
    border-top: 8px solid #cca01a;
    margin-top: 80px;
    position: relative;
}

footer::before {
    top: -24px;
}


/* --- MOBILE / TABLET RESPONSIVE STYLES --- */
@media (max-width: 600px) {
    header {
        padding: 30px 15px 25px 15px;
    }

    header h1 {
        font-size: 2em;
    }

    .tagline {
        font-size: 0.95em;
        margin-bottom: 10px;
    }

    nav {
        display: flex;
        flex-direction: column; 
        width: 100%;
        max-width: 300px;
        margin: 15px auto 0 auto;
        gap: 12px;
    }

    nav a {
        text-align: center;
        padding: 12px;
    }

    main {
        margin: 35px 15px;
        padding: 25px 20px;
        box-shadow: 8px 8px 0px #cca01a, 8px 8px 0px 4px #2c3e50; 
        animation: fade-in-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
    }

    h2 {
        font-size: 1.4em;
    }
}