/* ========================================
   GLOBAL STYLES & CAFE VIBE PALETTE
   ======================================== */
:root {
    --bg-primary: #FFFDF7; /* A very light, warm cream */
    --bg-secondary: #F0EAD6; /* Kraft paper / Coaster color */
    --text-primary: #4A2C2A; /* Rich Espresso Brown */
    --text-secondary: #856f6f; /* Lighter, muted brown */
    --brand-primary: #4CAF50; /* Vibrant "Money" Green */
    --brand-secondary: #45a049; /* Slightly darker green for hover */
    --highlight-green: #556B2F; /* A warm, olive/moss green for text */
    --border-color: #DED0B6; /* Soft border color */
    --shadow-color: rgba(76, 175, 80, 0.2); /* Soft green shadow */
    --wood-dark: #3a2422;
    --wood-light: #5c4240;
    /* Muted pin colors */
    --pin-red: #c97b63; 
    --pin-blue: #6c91c2;
    --pin-yellow: #d4aa4a;
    --pin-olive: #8A9A5B;
    --pin-mocha: #7b5e57;
    --pin-orange: #d89c64;
    --pin-coral: #e6a57e;
    --pin-sage: #a7c3a5;
    --pin-gray: #b3a999;
}

/* Add a keyframe animation for the floating effect */
@keyframes float {
    0% {
        transform: rotate(-1.5deg) translateY(0px);
    }
    50% {
        transform: rotate(-1.5deg) translateY(-8px);
    }
    100% {
        transform: rotate(-1.5deg) translateY(0px);
    }
}

html {
    scroll-behavior: smooth;
    box-sizing: border-box;
    /* Hide scrollbar for Firefox */
    scrollbar-width: none;
    /* Hide scrollbar for IE and Edge */
    -ms-overflow-style: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar {
    display: none;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    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.05'%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");
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
}

.logo-icon {
    vertical-align: -4px;
    margin-right: 0.5rem;
    transition: color 0.5s cubic-bezier(0.65, 0, 0.35, 1), transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    color: var(--brand-primary);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
#main-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; justify-content: center;
    padding: 0.75rem 0; /* keep constant to avoid CLS */
    pointer-events: none;
}
#main-header > .container {
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0);
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1), box-shadow 0.5s cubic-bezier(0.65, 0, 0.35, 1), border-color 0.5s cubic-bezier(0.65, 0, 0.35, 1), border-radius 0.5s cubic-bezier(0.65, 0, 0.35, 1), background-color 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    position: relative;
    transform: translateZ(0);
    transform-origin: top center; /* smooth scale from top */
}

/* Pseudo-element for the wooden background to fade in */
#main-header > .container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--wood-light);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 40" width="80" height="40"><path fill="none" stroke="%233a2422" stroke-width="1" d="M-10 10 C 30 0, 50 0, 90 10 S 130 20, 170 10" opacity="0.2"></path><path fill="none" stroke="%233a2422" stroke-width="1" d="M-10 30 C 30 20, 50 20, 90 30 S 130 40, 170 30" opacity="0.2"></path></svg>');
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: -1;
    border-radius: 10px; /* Adjusted to fit inside the 2px border */
}

#main-header.header-scrolled > .container {
    transform: scale(0.95);
    border-radius: 12px;
    border: 2px solid var(--wood-dark);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Fade in the wooden background on scroll */
#main-header.header-scrolled > .container::before {
    opacity: 1;
}

#main-header.header-scrolled .logo-text,
#main-header.header-scrolled .nav-link,
#main-header.header-scrolled .scrolled-menu-trigger,
#main-header.header-scrolled .logo-icon {
    color: var(--bg-primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    transition: color 0.5s ease;
}

/* Special override for scrolled logo text shadow */
#main-header.header-scrolled .logo-text {
    text-shadow: 1px 1px 0px rgba(0,0,0,0.4);
}


#main-header.header-scrolled .nav-link:hover {
    color: #fff;
}

.logo-link, .nav-link, .mobile-menu-link { text-decoration: none; }
.logo-text {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    font-weight: 400; /* Fredoka One is a single-weight font */
    letter-spacing: 0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    transition: color 0.5s cubic-bezier(0.65, 0, 0.35, 1), text-shadow 0.5s cubic-bezier(0.65, 0, 0.35, 1), transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    text-shadow: 2px 2px 0 var(--bg-secondary), 3px 3px 0 var(--border-color); /* Layered shadow for pop */
}

.mobile-menu-toggle {
    background-color: transparent; border: none; padding: 0.5rem; margin: -0.5rem;
    cursor: pointer; color: var(--text-secondary); transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-toggle:hover { color: var(--text-primary); }
.mobile-menu-toggle svg { width: 1.5rem; height: 1.5rem; stroke: currentColor; display: block; }
.nav-link { 
    font-family: 'Fredoka One', cursive;
    color: var(--text-secondary); 
    font-weight: 400; 
    transition: color 0.3s ease; 
}
.nav-link:hover { color: var(--brand-primary); }
.desktop-cta-button {
    background-color: var(--brand-primary); color: white; padding: 0.6rem 1.2rem;
    border-radius: 9999px; font-weight: 700; transition: background-color 0.3s ease, transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}
.desktop-cta-button:hover { background-color: var(--brand-secondary); }

#main-header.header-scrolled .desktop-cta-button,
#scrolled-cta-button {
    background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: white;
    border: none;
    border-bottom: 3px solid #388E3C;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: none;
    transition: transform 0.15s ease-out, background 0.15s ease-out, box-shadow 0.15s ease-out;
}

#main-header.header-scrolled .desktop-cta-button:hover,
#scrolled-cta-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #57c85b 0%, #4caf50 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    color: white; /* Ensure text color stays white on hover */
}

#main-header.header-scrolled .desktop-cta-button:active,
#scrolled-cta-button:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border-color); }

/* Reserve space to avoid header shifts when auth UI swaps */
.header-right-group { min-width: 260px; display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }
.desktop-nav-container + .header-right-group { min-width: auto; }

/* Mobile vs Desktop Header Layout */
@media (max-width: 767px) {
    .desktop-nav-container { display: none; }
    .mobile-menu-toggle { display: block; }
    .scrolled-menu-container { display: none; }
    #main-header.header-scrolled .mobile-menu-toggle { display: none; }
    #main-header.header-scrolled .scrolled-menu-container { display: block; }
}
@media (min-width: 768px) {
    .desktop-nav-container { display: flex; align-items: center; gap: 1.5rem; } /* Reduced gap */
    .desktop-nav { display: flex; gap: 1.5rem; } /* Reduced gap */
    .desktop-cta-button, .user-avatar-link { display: block; }
    .mobile-menu-toggle { display: none; }
    .scrolled-menu-container { display: none; }
}

/* Scrolled Mobile Dropdown */
.scrolled-menu-container { position: relative; }
.scrolled-menu-trigger {
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    background-color: transparent; border: 1px solid transparent; border-radius: 50%;
    cursor: pointer; transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.scrolled-menu-trigger:hover, .scrolled-menu-trigger.is-open {
    color: #fff;
    border-color: var(--bg-primary);
    background-color: rgba(0,0,0,0.2);
}
.scrolled-menu-panel {
    position: absolute; top: calc(100% + 10px); right: 0; width: 240px;
    background-color: var(--wood-light);
    backdrop-filter: none;
    border: 1px solid var(--wood-dark);
    border-radius: 0.75rem; padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); opacity: 0;
    transform: translateY(-10px) scale(0.95); transform-origin: top right;
    pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}
.scrolled-menu-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.scrolled-menu-panel a {
    display: block; padding: 0.75rem 1rem; color: var(--bg-primary);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
    text-decoration: none;
    font-weight: 700; border-radius: 0.5rem; transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.scrolled-menu-panel a:hover { 
    background-color: var(--wood-dark);
    color: white; 
}
#scrolled-cta-button { 
    text-align: center; margin-top: 0.5rem; 
}

/* Signed-in row in the scrolled dropdown */
.scrolled-user-info {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.75rem; margin-top: 0.25rem;
    border-top: 1px solid var(--wood-dark);
}
.scrolled-user-info img {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--wood-dark); flex: 0 0 auto;
}
.scrolled-user-info span {
    color: var(--bg-primary); font-weight: 700; font-size: 0.95rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto;
}

/* Make dashboard button look intentional inside the panel */
.scrolled-menu-panel #scrolled-dashboard-link.desktop-cta-button {
    display: block; width: 100%; text-align: center; margin: 0.35rem 0 0.1rem;
    padding: 0.6rem 0.9rem; border-radius: 0.5rem;
}

/* Unscrolled Mobile Menu Panel */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(74, 44, 42, 0.5); /* Semi-transparent brown */
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 99; opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}
.mobile-menu-overlay.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu-panel {
    position: fixed; top: 0; right: 0; width: 75%; max-width: 300px; height: 100%;
    background-color: rgba(255, 253, 247, 0.85);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 100; transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    transform: translateX(100%);
    will-change: transform;
    display: flex; flex-direction: column; padding: 6rem 2rem 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1); border-left: 1px solid var(--border-color);
}
.mobile-menu-panel.is-open { transform: translateX(0); }
.mobile-menu-link {
    font-size: 1.5rem; font-weight: 700; color: var(--text-primary);
    padding: 1rem 0; border-bottom: 1px solid var(--border-color);
    opacity: 0; transform: translateX(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.mobile-menu-panel.is-open .mobile-menu-link { opacity: 1; transform: translateX(0); }
.mobile-menu-panel.is-open .mobile-menu-link:nth-child(2) { transition-delay: 0.05s; }
.mobile-menu-panel.is-open .mobile-menu-link:nth-child(3) { transition-delay: 0.1s; }
.mobile-menu-panel.is-open .mobile-menu-link:nth-child(4) { transition-delay: 0.15s; }
.mobile-menu-button {
    margin-top: 2rem; padding: 1rem; background: var(--brand-primary);
    color: white; font-weight: bold; text-align: center; border-radius: 0.5rem;
    text-decoration: none; opacity: 0; transform: translateX(20px);
    transition: opacity 0.3s ease-out 0.2s, transform 0.3s ease-out 0.2s, background-color 0.3s ease;
}
.mobile-menu-button:hover { background-color: var(--brand-secondary); }
.mobile-menu-panel.is-open .mobile-menu-button { opacity: 1; transform: translateX(0); }

/* ========================================
   HERO SECTION (REVAMPED)
   ======================================== */
.hero-section {
/* Safety: never show mobile menu UI on desktop widths */
@media (min-width: 768px) {
    .mobile-menu-panel { transform: translateX(100%) !important; }
    .mobile-menu-overlay { opacity: 0 !important; pointer-events: none !important; }
    .mobile-menu-panel { display: none !important; }
}
    min-height: 100vh; /* fallback */
    min-height: 100svh; /* stabilize against mobile URL bar */
    display: grid;
    place-items: center;
    padding: 5rem 1.5rem;
    position: relative;
    overflow: hidden;
}

#hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: grab;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.hero-signboard {
    background-color: rgba(255, 253, 247, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 0 10px rgba(255, 253, 247, 0.5);
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    position: relative; /* Needed for the washi tape */
    animation: float 6s ease-in-out infinite; /* Apply the animation */
}

@media (max-width: 480px) {
    .hero-signboard {
        padding: 2rem 1rem;
    /* Reduce heavy effects on low-tier devices */
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background-color: rgba(255, 253, 247, 0.98);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    }
}

/* Washi tape for that scrapbook feel */
.hero-signboard::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-4deg);
    width: 130px;
    height: 35px;
    background: rgba(135, 206, 250, 0.4); /* Light blue, semi-transparent tape */
    border-left: 1px dashed rgba(255,255,255,0.4);
    border-right: 1px dashed rgba(255,255,255,0.4);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.hero-headline {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 400; /* Patrick Hand is not bold */
    letter-spacing: 0;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0;
}

.hero-headline .highlight-text {
    display: inline-block; 
    color: var(--highlight-green);
    text-shadow: none;
    position: relative; 
    white-space: nowrap; 
}

/* Desktop-only micro-adjustment to visually center the second line */
@media (min-width: 1024px) {
    .hero-headline .highlight-text {
        left: -15px; /* subtle nudge to align optical center */
    }
}

.sub-heading {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    font-family: 'Lato', sans-serif;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 1.5rem auto 2.5rem;
    line-height: 1.7;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 2rem;
    font-size: 1.25rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: white;
    text-decoration: none;
    background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 50px;
    border: none;
    border-bottom: 4px solid #388E3C; /* Darker green for a 3D effect */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease-out;
    cursor: pointer;
}
.hero-button:hover {
    transform: translateY(-3px);
    background: linear-gradient(180deg, #57c85b 0%, #4caf50 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 20px var(--shadow-color);
}
.hero-button:active {
    transform: translateY(1px);
    border-bottom-width: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}
.hero-button .leaf-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}
.hero-button:hover .leaf-icon {
    transform: rotate(15deg) scale(1.1);
}

/* ========================================
   SECTION STYLING
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(2.25rem, 5vw, 2.75rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

section {
    padding: 5rem 0;
}

/* ========================================
   WALL OF FAME (RECEIPT STYLE)
   ======================================== */
.wall-of-fame-section { min-height: 360px; }

.wall-of-fame-card {
    background-color: #fdfaf2; /* Off-white paper color */
    font-family: 'Special Elite', monospace;
    max-width: 450px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    border: 2px dashed var(--border-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    min-height: 280px; /* reserve height to reduce CLS */
}

.wall-of-fame-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 15px;
    background-image: linear-gradient(45deg, #fdfaf2 25%, transparent 25%), linear-gradient(-45deg, #fdfaf2 25%, transparent 25%);
    background-position: left bottom;
    background-repeat: repeat-x;
    background-size: 15px 15px;
}


.wall-of-fame-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
    text-transform: uppercase;
}

.wall-of-fame-list {
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
}

.fame-player-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid #f0e9d8;
}

.fame-player-card:last-child {
    border-bottom: none;
}

.fame-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 0.75rem;
    border: 2px solid var(--bg-secondary);
    flex-shrink: 0;
}

.fame-name {
    flex-grow: 1;
    text-align: left;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fame-streak {
    color: var(--highlight-green);
    font-weight: bold;
    flex-shrink: 0;
}

.loading-text {
    color: var(--text-secondary);
}

/* Wall of Fame: Mobile-only load button */
.wof-load-btn-container {
    display: none; /* default hidden; only show on mobile */
}
.wof-load-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 767px) {
    .wof-load-btn-container {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.75rem;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .wall-of-fame-card {
        padding: 1.5rem 1rem;
        max-width: 90%;
    }
    .fame-player-card {
        font-size: 0.9rem;
    }
    .fame-avatar {
        width: 30px;
        height: 30px;
    }
}

/* ========================================
   FEATURES SECTION (3D BUTTON STYLE)
   ======================================== */
.features-section {
    background-color: var(--bg-primary);
    padding-bottom: 7rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem 2rem;
}

.feature-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.15s ease-out, background-color 0.15s ease-out, border-bottom-width 0.15s ease-out;
    position: relative;
    cursor: pointer;
    color: var(--text-primary);
    border: 2px solid var(--wood-dark);
    border-bottom: 7px solid var(--wood-dark);
    box-shadow: inset 0 -2px 1px rgba(0,0,0,0.1);
}

/* Pushpin styles */
.feature-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
    border: 2px solid white;
    z-index: 1;
}

/* Random pin colors */
.feature-card:nth-of-type(8n+1)::before { background-color: var(--pin-red); }
.feature-card:nth-of-type(8n+2)::before { background-color: var(--pin-blue); }
.feature-card:nth-of-type(8n+3)::before { background-color: var(--pin-yellow); }
.feature-card:nth-of-type(8n+4)::before { background-color: var(--pin-olive); }
.feature-card:nth-of-type(8n+5)::before { background-color: var(--pin-mocha); }
.feature-card:nth-of-type(8n+6)::before { background-color: var(--pin-orange); }
.feature-card:nth-of-type(8n+7)::before { background-color: var(--pin-coral); }
.feature-card:nth-of-type(8n+8)::before { background-color: var(--pin-sage); }

/* 3D button press effect */
.feature-card:hover {
    background-color: #f7f2e5;
    transform: translateY(-3px);
    border-bottom-width: 9px;
}

.feature-card:active {
    transform: translateY(2px);
    border-bottom-width: 3px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.2);
    transition-duration: 0.05s;
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--highlight-green);
    border: 1px solid var(--border-color);
}

.feature-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.feature-title {
    font-family: 'Special Elite', monospace;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}


/* ========================================
   HOW IT WORKS SECTION (A-FRAME SIGN)
   ======================================== */

.how-it-works-section .container {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.cafe-sign-board {
    background-color: var(--wood-light);
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 40" width="80" height="40"><path fill="none" stroke="%233a2422" stroke-width="1.5" d="M-10 10 C 30 0, 50 0, 90 10 S 130 20, 170 10" opacity="0.3"></path><path fill="none" stroke="%233a2422" stroke-width="1.5" d="M-10 30 C 30 20, 50 20, 90 30 S 130 40, 170 30" opacity="0.3"></path></svg>'),
        linear-gradient(90deg, var(--wood-light) 0%, var(--wood-dark) 100%);
    background-blend-mode: soft-light;
    border: 10px solid #2c1a18;
    border-radius: 1rem;
    padding: 4rem 2rem 2rem; /* Increased top padding for the new header */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 15px rgba(0,0,0,0.4);
    position: relative;
}

.cafe-sign-board .section-header {
    background-color: var(--bg-secondary);
    padding: 1.25rem 2rem; /* Adjusted padding */
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin: -6rem auto 3rem; /* Pulls the header card up */
    max-width: 75%; /* Made the box narrower */
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Pin for the header card */
.cafe-sign-board .section-header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--pin-blue);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
    border: 2px solid white;
}

.cafe-sign-board .section-title {
    color: var(--text-primary); /* Dark text on the paper */
    text-shadow: none;
    font-family: 'Special Elite', monospace;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 0.5rem;
}

.cafe-sign-board .section-subtitle {
    color: var(--text-secondary); /* Muted text on the paper */
    opacity: 1;
    font-size: 1.1rem;
}

.cafe-sign-board .steps-container {
    margin-top: 2rem;
}

.cafe-sign-board .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}
.cafe-sign-board .step-item:last-child {
    margin-bottom: 0;
}

.cafe-sign-board .step-text-content {
    text-align: center;
    max-width: 450px;
    flex-shrink: 0;
}

.cafe-sign-board .step-number {
    font-family: 'Patrick Hand', cursive;
    font-size: 2.5rem;
    color: var(--bg-primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.cafe-sign-board .step-title {
    font-family: 'Special Elite', monospace;
    color: var(--bg-primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}
.cafe-sign-board .step-description {
    color: var(--bg-secondary);
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.6;
}

.step-visual {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 16 / 9;
    background: #000; /* neutral video placeholder instead of beige */
    border: 2px solid #5c4240;
    border-radius: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0, 0.2);
    cursor: pointer; /* click to play/pause */
}
.step-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* Subtle corner play indicator that doesn’t cover content */
.step-visual::after {
    content: '▶';
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    font-size: 14px;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: none; /* not clickable; video area handles click */
}
.step-visual.is-playing::after {
    opacity: 0; /* hide indicator while playing */
}

/* Video controls placed below the video, not overlaying it */
/* Removed below-video controls; using a small corner glyph instead */

@media (min-width: 768px) {
    .cafe-sign-board .step-item {
        flex-direction: row;
        gap: 5%;
        align-items: center;
    }
    .cafe-sign-board .step-item:nth-child(even) {
        flex-direction: row-reverse;
    }
    .cafe-sign-board .step-text-content {
        text-align: left;
        width: 45%;
    }
    .cafe-sign-board .step-item:nth-child(even) .step-text-content {
        text-align: right;
    }
    .step-visual {
        width: 50%;
        max-width: none;
    }
}

/* Reduce scrolling on desktop: 2-column steps grid and tighter spacing */
@media (min-width: 1024px) {
    .how-it-works-section .container {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    .cafe-sign-board .steps-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 2rem;
    align-items: stretch; /* allow items to stretch to track size */
    grid-auto-rows: 1fr; /* equal-height rows */
    }
    .cafe-sign-board .step-item {
        /* Override 768px row layout for a compact card style */
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 0; /* rely on grid gap */
        gap: 1rem;
        height: 100%; /* fill the grid track height */
    }
    /* Explicitly reset even items that were row-reversed at 768px */
    .cafe-sign-board .step-item:nth-child(even) {
        flex-direction: column;
        align-items: stretch;
    }
    .cafe-sign-board .step-text-content {
        text-align: left;
        width: 100%;
        max-width: none;
        flex: 1 1 auto; /* grow to fill remaining height */
    }
    .cafe-sign-board .step-item:nth-child(even) .step-text-content {
        text-align: left; /* normalize alignment in grid */
    }
    .step-visual {
        width: 100%;
        max-width: 420px;
        align-self: stretch;
        margin-top: auto; /* pin video to bottom for consistent bottoms */
    }
}

/* ========================================
   FAQ SECTION (CORKBOARD STYLE) - OPTIMIZED
   ======================================== */

.faq-section {
    /* Ensure pins aren't clipped by section */
    overflow: visible;
}

.faq-board {
    background-color: #d2b48c; /* Tan / Cork color */
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><g fill-rule="evenodd"><g fill="%23000" fill-opacity=".04"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></g></svg>');
    border: 10px solid var(--wood-dark);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 0 20px rgba(0,0,0,0.4);
    max-width: 850px;
    margin: 0 auto;
    /* Allow overflow for pins */
    overflow: visible;
    /* Add extra padding top for pins */
    padding-top: 2.5rem;
}

.faq-board .section-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
}

.faq-board .section-title {
    color: var(--wood-dark);
    font-family: 'Special Elite', monospace;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.2);
}

.faq-board .section-subtitle {
    color: var(--wood-light);
    font-size: 1.1rem;
    opacity: 0.9;
}

.faq-list {
    display: grid;
    gap: 1.5rem;
    /* Add padding to ensure pins are visible */
    padding-top: 0.75rem;
}

/* Utilize desktop space: widen board and switch FAQ to two columns */
@media (min-width: 1024px) {
    .faq-board {
        max-width: 1100px;
    }
    .faq-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

.faq-item {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    position: relative;
    transition: transform 0.2s ease;
    /* Optimize for mobile */
    will-change: transform;
    /* Remove contain to allow pins to show outside */
    overflow: visible;
}

/* Desktop-only decorative transforms and shadows */
@media (min-width: 768px) {
    .faq-item {
        box-shadow: 3px 3px 8px rgba(0,0,0,0.2);
    }
    .faq-item:nth-child(2n) {
        transform: rotate(1.5deg);
    }
    .faq-item:nth-child(3n) {
        transform: rotate(-1deg);
    }
    .faq-item:nth-child(4n) {
        transform: rotate(1deg);
    }
    .faq-item:hover {
        transform: rotate(0) scale(1.02);
        z-index: 10;
    }
}

/* Simplified mobile styles */
@media (max-width: 767px) {
    .faq-item {
        /* No rotations on mobile */
        transform: none !important;
        /* Lighter shadow for performance */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    /* Avoid hover transforms on touch devices to reduce layout/repaint */
    .feature-card:hover, .feature-card:active { transform: none; border-bottom-width: 7px; }
    .mobile-menu-panel { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
    .faq-item:hover {
        /* No hover effects on mobile */
        transform: none !important;
    }
}

/* Pin styles - simplified for mobile */
.faq-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    /* Optimize pin rendering */
    will-change: auto;
    /* Ensure pin appears above card */
    z-index: 2;
}

/* Desktop pin shadows */
@media (min-width: 768px) {
    .faq-item::before {
        box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
    }
}

/* Random pin colors */
.faq-item:nth-of-type(9n+1)::before { background-color: var(--pin-red); }
.faq-item:nth-of-type(9n+2)::before { background-color: var(--pin-blue); }
.faq-item:nth-of-type(9n+3)::before { background-color: var(--pin-yellow); }
.faq-item:nth-of-type(9n+4)::before { background-color: var(--pin-olive); }
.faq-item:nth-of-type(9n+5)::before { background-color: var(--pin-mocha); }
.faq-item:nth-of-type(9n+6)::before { background-color: var(--pin-orange); }
.faq-item:nth-of-type(9n+7)::before { background-color: var(--pin-coral); }
.faq-item:nth-of-type(9n+8)::before { background-color: var(--pin-sage); }
.faq-item:nth-of-type(9n+9)::before { background-color: var(--pin-gray); }

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    /* Optimize button */
    -webkit-tap-highlight-color: transparent;
}

.faq-question:hover span {
    color: var(--brand-primary);
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    transition: transform 0.3s ease;
}

.faq-item.is-open .faq-icon {
    transform: rotate(180deg);

/* Reduced motion: disable float animation and heavy transitions */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    .hero-signboard { animation: none !important; }
    .hero-button, .desktop-cta-button, .feature-card, .logo-text, .logo-icon {
        transition-duration: 0.01ms !important;
    }
}

/* Backdrop-filter fallback */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .hero-signboard { backdrop-filter: none; -webkit-backdrop-filter: none; background-color: rgba(255, 253, 247, 0.98); }
    .mobile-menu-panel { backdrop-filter: none; -webkit-backdrop-filter: none; background-color: rgba(255, 253, 247, 0.95); }
}
}

/* Optimized animation using transform instead of max-height */
.faq-answer {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.faq-item.is-open .faq-answer {
    height: auto;
    opacity: 1;
    transform: translateY(0);
}

.faq-answer-content {
    font-family: 'Lato', sans-serif;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0 1.5rem 1.25rem;
    margin: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

@media (max-width: 767px) {
    .faq-board {
        padding: 1.5rem 1rem;
        /* Extra padding top for pins on mobile */
        padding-top: 2rem;
        /* Lighter border on mobile */
        border-width: 5px;
    }
    .faq-question {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }
    .faq-answer-content {
        padding: 0 1.25rem 1rem;
        padding-top: 1rem;
    }
}

/* ========================================
   ROADMAP / POLL PAGE STYLES
   ======================================== */
.roadmap-body {
    background-color: var(--wood-light);
}

.roadmap-section {
    padding: 8rem 1rem 5rem 1rem; /* Added horizontal padding */
}

.roadmap-board {
    background-color: #d2b48c; /* Tan / Cork color */
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><g fill-rule="evenodd"><g fill="%23000" fill-opacity=".04"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></g></svg>');
    border: 10px solid var(--wood-dark);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 0 20px rgba(0,0,0,0.4);
    max-width: 1200px; /* Widen the board for 3 columns */
    margin: 0 auto;
}

.roadmap-board .section-header {
    margin-bottom: 2rem;
}

.roadmap-board .section-title {
    color: var(--wood-dark);
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(2.5rem, 5vw, 3rem);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.2);
}

.roadmap-board .section-subtitle {
     color: var(--wood-light);
     font-size: 1.1rem;
     opacity: 0.9;
     max-width: 550px;
     margin: 0.5rem auto 0;
}

.poll-list {
    display: grid;
    gap: 2rem;
}

.poll-item {
    background-color: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.25);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column; /* Ensure content stacks vertically */
    justify-content: space-between; /* Pushes content to top and bottom */
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.poll-item:nth-child(2n) { transform: rotate(1.2deg); }
.poll-item:nth-child(3n) { transform: rotate(-0.8deg); }
.poll-item:nth-child(4n) { transform: rotate(0.5deg); }
.poll-item:hover {
    transform: rotate(0) scale(1.02);
    box-shadow: 5px 5px 25px rgba(0,0,0,0.3);
    z-index: 5;
}

.poll-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
    border: 2px solid white;
    background-color: var(--pin-red);
}

.poll-content {
    flex-grow: 1;
    min-width: 0; /* Fix for flexbox overflow */
    display: flex;
    flex-direction: column;
}

.poll-title {
    font-family: 'Special Elite', monospace;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.poll-description {
    font-family: 'Lato', sans-serif;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem;
    font-size: 1rem;
    flex-grow: 1; /* Allows description to take up space */
}

.poll-progress-bar {
    height: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.poll-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a8e063, #56ab2f);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.poll-vote-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.poll-voters {
    display: flex;
    align-items: center;
    min-height: 32px; /* Reserve space for avatars */
}

.voter-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    margin-left: -10px;
    transition: transform 0.2s ease;
}
.voter-avatar:first-child {
    margin-left: 0;
}
.voter-avatar:hover {
    transform: scale(1.1);
    z-index: 2;
}

.voter-avatar.more-votes {
    background-color: var(--text-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.poll-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poll-vote-button {
    background: var(--brand-primary);
    border: 2px solid var(--wood-dark);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 var(--wood-dark), 0 5px 8px rgba(0,0,0,0.2);
    position: relative; /* For icon positioning */
}

.poll-vote-button svg {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.poll-vote-button .x-icon {
    opacity: 0;
    transform: scale(0.5);
}

.poll-vote-button.voted .checkmark-icon {
    opacity: 0;
    transform: scale(0.5);
}

.poll-vote-button.voted .x-icon {
    opacity: 1;
    transform: scale(1);
}


.poll-vote-button:hover:not(.voted) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--wood-dark), 0 7px 10px rgba(0,0,0,0.2);
    background: var(--brand-secondary);
}

.poll-vote-button:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--wood-dark), 0 3px 5px rgba(0,0,0,0.2);
    transition-duration: 0.05s;
}

.poll-vote-button .checkmark-icon {
    stroke: white;
}
.poll-vote-button .x-icon {
    stroke: white;
}

.poll-vote-button.voted {
    background: var(--pin-red);
    box-shadow: 0 4px 0 #a55d4a, 0 5px 8px rgba(0,0,0,0.2);
    border-color: #a55d4a;
}
.poll-vote-button.voted:hover {
    background: #d17c64;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #a55d4a, 0 7px 10px rgba(0,0,0,0.2);
}

/* --- Suggestion Card Specific Styles --- */
.poll-item-suggestion {
    background: var(--bg-secondary);
    border-style: dashed;
    border-width: 2px;
    border-color: var(--border-color);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.suggestion-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.suggestion-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--highlight-green);
    border: 1px solid var(--border-color);
}
.suggestion-icon svg {
    width: 24px;
    height: 24px;
}
.suggestion-title {
    font-family: 'Special Elite', monospace;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}
.suggestion-text {
    color: var(--text-secondary);
    max-width: 250px;
    margin: 0;
}
.suggestion-button {
    margin-top: 0.5rem;
    background-color: var(--brand-primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
}
.suggestion-button:hover {
    background-color: var(--brand-secondary);
    transform: scale(1.05);
}


/* --- MOBILE FIXES FOR ROADMAP --- */
@media (max-width: 767px) {
    .roadmap-board {
        padding: 1rem;
        border-width: 5px;
    }
    .poll-item,
    .poll-item:nth-child(2n),
    .poll-item:nth-child(3n),
    .poll-item:nth-child(4n) {
        transform: none; /* Straighten out the notes */
        flex-direction: row; /* Keep side-by-side on mobile */
        gap: 1rem;
        padding: 1rem;
    }
    .poll-item:hover {
        transform: scale(1.02); /* Keep a subtle hover effect */
    }
    .poll-title {
        font-size: 1.3rem;
    }
    .poll-description {
        font-size: 0.95rem;
    }
}


/* ========================================
   FOOTER & BACK TO TOP
   ======================================== */
.footer {
    text-align: center; padding: 2.5rem 1.5rem;
    border-top: 1px solid var(--border-color); color: var(--text-secondary);
    background-color: var(--bg-primary);
}
.footer-subtext { font-size: 0.875rem; opacity: 0.7; margin-top: 0.5rem; }

/* Specific override for roadmap page footer */
.roadmap-body .footer {
    background-color: var(--wood-light);
    border-top-color: var(--wood-dark);
    color: var(--bg-secondary);
}

.back-to-top-wrapper {
    position: fixed; bottom: 2rem; right: 2rem; opacity: 0;
    transform: translateY(20px); pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease; z-index: 90;
}
.back-to-top-wrapper.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top-button {
    width: 50px; 
    height: 50px;
    background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 50%; 
    border: none;
    border-bottom: 3px solid #388E3C;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    text-decoration: none; 
    transition: all 0.15s ease-out;
}
.back-to-top-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 0 20px var(--shadow-color);
    background: linear-gradient(180deg, #57c85b 0%, #4caf50 100%);
}
.back-to-top-button:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.back-to-top-button svg {
    stroke: white;
}

/* ========================================
   UTILITIES
   ======================================== */
.fade-in-element {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transform: translateY(20px);
}
.hidden { display: none !important; }

.hero-signboard {
    min-height: 400px;
}

#wall-of-fame-list {
    min-height: 200px;
}

.fade-in-element {
    will-change: opacity, transform;
}