/* Main Page Styles */

/* Loader Styles */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    /* White overlay */
    z-index: var(--z-loader);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#loader.fade-out {
    opacity: 0;
    transform: translateY(-100%);
}

.loader-svg {
    width: 80px;
    /* Small, centered */
    height: auto;
    /* Combine animations: spin (rotate) and pulse (scale) */
    animation: spin 3s linear infinite, pulse 1.5s ease-in-out infinite;
}


/* Hero Section Specifics */
.hero-section {
    background-color: var(--color-teal);
    color: var(--color-white);
    padding-top: var(--space-3xl);
    /* Add default padding for fixed header */
    min-height: 100vh;
    /* Ensure full viewport height */
    display: flex;
    align-items: center;
    position: relative;
    padding-bottom: var(--space-giant);
    z-index: 10;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    margin-top: var(--space-xl);
    /* Push content down slightly more */
}

.hero-title {
    font-size: 40px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.hero-title-brand {
    display: block;
    white-space: nowrap;
    font-size: 40px;
    margin-bottom: var(--space-sm);
}

.hero-title-rest {
    display: block;
    font-size: 28px;
    font-weight: 600;
    opacity: 0.95;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .hero-title-brand {
        white-space: normal;
    }
}

.hero-subtitle {
    font-size: var(--text-body);
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: var(--space-lg);
    max-width: 90%;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-cookie-stack {
    width: 120%;
    /* Large overflow */
    max-width: 600px;
    margin-left: -10%;
    /* Centerish visually */
    margin-top: var(--space-lg);
    transform: translateY(0);
    transition: transform 0.1s ease-out;
    /* For parallax */
}

/* Subtle float animation for cookies */
@keyframes floatCookie {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Mobile: Push cookies up more to be fully visible in viewport */
@media (max-width: 1023px) {
    .hero-cookie-stack {
        margin-top: 0;
        /* No extra space - natural flow */
        width: 100%;
        /* Full width for proper centering */
        margin-left: 0;
        /* Center horizontally */
        margin-right: 0;
        animation: floatCookie 5s ease-in-out infinite;
        /* Add subtle animation on mobile too */
    }

    .hero-visual {
        margin-bottom: -60px;
        /* Pull entire visual up more aggressively */
        margin-top: 0;
        /* No extra spacing */
        display: flex;
        justify-content: center;
        /* Center the cookies */
    }

    .hero-content {
        text-align: center;
        /* Center all text content */
        margin-left: auto;
        margin-right: auto;
    }

    .hero-subtitle {
        max-width: 100%;
        /* Allow full width for centered text */
    }

    .hero-section {
        padding-bottom: 80px;
        /* Reduce bottom padding on mobile to bring cookies up */
    }
}

/* Banner Marquee */
.banner-section {
    background: var(--color-rose);
    color: var(--color-white);
    position: relative;
    overflow: visible;
    padding: 140px 0 60px;
    z-index: 7;
}

/* Menu Page */
.menu-hero {
    background: var(--color-teal);
    color: var(--color-white);
    padding: 180px 0 140px;
    position: relative;
    overflow: hidden;
}

.menu-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.menu-hero-image {
    width: min(520px, 90vw);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
}

.menu-list {
    background: var(--color-pink);
    padding-top: 120px;
    padding-bottom: 140px;
    position: relative;
}

.menu-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-black);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    border: 2px solid transparent;
    transition: var(--transition-fast);
}

.filter-chip.active,
.filter-chip:hover {
    border-color: var(--color-teal);
    color: var(--color-teal);
}

.menu-grid {
    margin-top: var(--space-lg);
}

.menu-card {
    background: rgba(255,255,255,0.95);
}

.menu-empty {
    text-align: center;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

@media (min-width: 1024px) {
    .menu-hero-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile hero spacing moved to end for correct override */

/* 404 Page */
.error-hero {
    background: var(--color-teal);
    color: var(--color-white);
    padding: 160px 0 140px;
    position: relative;
    overflow: hidden;
}

.error-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.error-code {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: var(--space-sm);
}

.error-hero-image {
    width: min(460px, 90vw);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: var(--space-lg);
}

@media (min-width: 1024px) {
    .error-hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.banner-wave {
    position: absolute;
    left: 0;
    width: 100%;
    height: 80px;
    color: var(--color-rose);
    pointer-events: none;
    z-index: 3;
}

.banner-wave svg {
    width: 100%;
    height: 80px;
    display: block;
}

.banner-wave-top {
    top: 0;
    transform: translateY(-99%);
}

.banner-wave-bottom {
    bottom: 0;
    transform: translateY(99%);
    color: var(--color-rose);
}

.banner-marquee {
    position: relative;
    z-index: 2;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: marquee 40s linear infinite;
    will-change: transform;
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-right: 28px;
    flex-shrink: 0;
}

.marquee-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: clamp(18px, 2.4vw, 26px);
}

.marquee-icon {
    width: 38px;
    height: 38px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
    opacity: 1;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
}

/* Decorative Elements */
.decorative {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.hero-wing {
    top: 10%;
    right: 5%;
    width: 80px;
    animation: float 6s ease-in-out infinite;
}

.hero-nugget-1 {
    bottom: 20%;
    left: 5%;
    width: 30px;
    animation: float 8s ease-in-out infinite reverse;
}

/* Menu Section */
.menu-section {
    background-color: var(--color-pink);
    padding-top: var(--space-xl);
    /* Space for incoming cookie stack */
    z-index: 5;
    overflow-x: hidden;
    position: relative;
    /* Prevent horizontal scroll from drip */
}

/* Mobile: Add more top padding to prevent blue wave covering title */
@media (max-width: 1023px) {
    .menu-section {
        padding-top: 100px;
        /* Extra space to clear the drip wave */
    }
}

/* Global Zig-Zag Logic */
.row-even {
    flex-direction: row-reverse;
}

.row-cookie-image:hover {
    transform: scale(1.1) rotate(5deg) !important;
}

/* Mobile Vertical Stack with Bleed */
@media (max-width: 1023px) {
    .cookie-rows {
        display: flex;
        flex-direction: column;
        gap: var(--space-xl);
        padding-bottom: var(--space-xl);
    }

    .cookie-row {
        display: flex;
        align-items: center;
        /* flex-direction is handled by .row-even global rule */
        padding: 0;
        padding: 0;
        overflow: visible;
        gap: 0;
        /* Let margins handle overlapping/bleeding logic specifically for mobile */
    }

    .cookie-row-visual {
        flex: 0 0 50%;
        /* Image takes half width */
        position: relative;
    }

    .cookie-row-content {
        flex: 1;
        padding: 0 var(--space-md);
        z-index: 2;
    }

    /* Bleeding Images Logic */
    .row-cookie-image {
        width: 180% !important;
        /* increased from 160% */
        max-width: none;
    }

    /* Snowy Kisses Specific Boost (Mobile) */
    .row-cookie-image.cookie-snowy-kisses {
        width: 250% !important;
        /* Huge boost for the smaller image on mobile */
    }

    /* Odd Rows (Img Left) - Bleed Left */
    .row-odd .row-cookie-image {
        margin-left: -45%;
        /* increased bleed */
    }

    /* Even Rows (Img Right) - Bleed Right */
    .row-even .row-cookie-image {
        margin-right: -45%;
        /* increased bleed */
    }

    .cookie-row-title {
        font-size: 28px !important;
        margin-bottom: var(--space-sm);
    }

    .cookie-row-desc {
        font-size: 15px !important;
    }

    .giant-number {
        display: none;
    }
}

.section-title {
    text-align: center;
    font-size: var(--text-h2-mobile);
    margin-bottom: var(--space-xs);
}

.dream-title {
    text-transform: uppercase;
    font-size: clamp(26px, 4.5vw, 56px);
    letter-spacing: 1.5px;
}

.section-subtitle {
    text-align: center;
    font-family: var(--font-primary);
    font-style: italic;
    margin-bottom: var(--space-xl);
    opacity: 0.7;
}

/* Story Section */
.story-section {
    background-color: var(--color-yellow);
    z-index: 4;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.story-image img {
    border-radius: 50% 50% 0 50%;
    /* Organic shape */
    border: 4px solid var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.story-quote {
    font-size: var(--text-h3-mobile);
    font-family: serif;
    /* Differentiate quote */
    font-style: italic;
    color: var(--color-teal);
    margin-bottom: var(--space-md);
}

/* Footer Section */
.footer-section {
    font-family: var(--font-primary);
    background-color: var(--color-teal);
    color: var(--color-white);
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-lg);
    z-index: 3;
    position: relative;
}

/* Extend teal beyond footer content for extra scroll */
.footer-section::after {
    content: "";
    display: block;
    height: 100vh;
    background: var(--color-teal);
}

@media (max-width: 1023px) {
    .footer-section::after {
        height: 0;
    }
}

@media (min-width: 1024px) {
    .footer-section::after {
        height: calc(100vh - 110px);
    }
}

.footer-sticky {
    position: static;
}

@media (min-width: 1024px) {
    .footer-sticky {
        position: sticky;
        top: 110px;
    }
}


.footer-brand img {
    height: 80px;
    margin-bottom: var(--space-md);
}

.footer-logo {
    filter: brightness(0) invert(1);
}

.footer-section .icon-list {
    color: var(--color-white);
}

.footer-column h4 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-style: italic;
    font-size: 18px;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-section a {
    color: var(--color-white);
}

.footer-section a:hover {
    opacity: 0.85;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    text-align: center;
    font-size: var(--text-sm);
    opacity: 0.6;
}

/* Desktop Overrides */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 68px;
    }
    
    .hero-title-brand {
        font-size: 68px;
    }
    
    .hero-title-rest {
        font-size: 48px;
    }

    .hero-section {
        padding-bottom: 15vh;
        padding-top: calc(var(--space-3xl) + 60px);
        /* Push content down more from header */
    }

    .hero-content {
        margin-top: calc(var(--space-xl) + 40px);
        /* Additional push down for text content */
        padding-right: 40px;
        /* Add gap between text and image */
    }

    .hero-visual {
        position: absolute;
        top: 80px;
        /* Push down from top - creates balanced spacing */
        bottom: 0;
        right: -6vw;
        width: 32vw;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        z-index: 0;
    }

    .hero-cookie-stack {
        position: relative;
        width: 100%;
        max-width: none;
        height: auto;
        animation: floatCookie 6s ease-in-out infinite;
        /* Subtle floating animation */
    }

    .menu-section {
        padding-top: 150px;
        /* Accounts for overlap */
    }

    .story-grid {
        grid-template-columns: 1fr 1fr;
    }

    .story-content {
        order: 1;
    }

    .story-image {
        order: 0;
    }

    /* Desktop Cookie Row Styles */
    .cookie-row {
        display: flex;
        /* Restored from inline */
        align-items: center;
        min-height: 80vh;
        /* Restore 1 cookie per screen feeling */
        overflow: hidden;
        position: relative;
        gap: 10vw;
        /* consistently large gap for all rows */
    }

    .row-cookie-image {
        width: 90% !important;
        /* Larger on desktop (was 75%) */
    }

    .row-cookie-image.cookie-snowy-kisses {
        transform: scale(1.3) !important;
        /* Mega boost for the smaller PNG image */
    }

    .row-cookie-image.cookie-snowy-kisses:hover {
        transform: scale(1.43) rotate(5deg) !important;
        /* 1.3 * 1.1 hover scale = 1.43 */
    }
}

/* Product Hover Effect - Floating Nugget */
.cookie-card {
    position: relative;
    /* Ensure positioning context */
}

.cookie-card::after {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-image: url('../svg/Solo nugget 4-05.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transform: translateY(20px) rotate(0deg);
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 10;
}

.cookie-card:hover::after {
    opacity: 1;
    transform: translateY(-40px) rotate(15deg);
}

/* Crumb Trail Animation */
@keyframes crumbDisappear {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(30px) rotate(180deg);
    }
}

.crumb {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 12px;
    /* Small nugget size */
    height: 12px;
    background-image: url('../svg/Solo nugget 1-05.svg');
    background-size: contain;
    background-repeat: no-repeat;
    animation: crumbDisappear 1.5s forwards;
}

/* ------------------------------
   About Page
--------------------------------*/
.about-hero {
    background-color: var(--color-teal);
    color: var(--color-white);
    padding-top: 180px;
    padding-bottom: 150px;
    overflow: hidden;
}

.about-hero-grid {
    gap: var(--space-xl);
}

.about-hero-cookie {
    width: 110%;
    transform: rotate(-12deg);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

.about-hero .deco-star {
    top: 15%;
    left: 6%;
    width: 60px;
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

.about-hero .deco-wing {
    bottom: 26%;
    right: 8%;
    width: 110px;
    opacity: 0.35;
    animation: float 8s ease-in-out infinite reverse;
}

.about-hero .deco-crumb {
    bottom: -10px;
    left: -20px;
    width: 70px;
    animation: float 4s ease-in-out infinite;
}

.decorative-line {
    width: 110px;
    height: 4px;
    background: var(--color-yellow);
    border-radius: 2px;
}

.polaroid-wrapper {
    background: white;
    padding: 22px;
    padding-bottom: 70px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    transform: rotate(-3deg);
    position: relative;
    border-radius: 8px;
}

.polaroid-wrapper img {
    width: 100%;
    border-radius: 6px;
}

.handwritten-note {
    position: absolute;
    bottom: 22px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-heading);
    color: var(--color-gray);
    font-size: 1.2rem;
}

.timeline-section {
    background: #fff;
    padding-top: 120px;
    padding-bottom: 80px;
}

.timeline-grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.timeline-item {
    background: var(--color-white);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.timeline-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

.timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.values-section {
    background-color: var(--color-pink);
    padding-top: 120px;
    padding-bottom: 140px;
}

.value-card {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    padding: var(--space-lg);
}

.value-card .icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.value-cta {
    background: var(--color-teal);
    color: var(--color-white);
}

/* ------------------------------
   Contact Page
--------------------------------*/
.contact-hero {
    background-color: var(--color-teal);
    color: var(--color-white);
    padding-top: 170px;
    padding-bottom: 130px;
    overflow: hidden;
}

.contact-hero .deco-nugget {
    top: 18%;
    left: 9%;
    width: 42px;
    opacity: 0.6;
    animation: float 5s ease-in-out infinite;
}

.contact-hero .deco-wing {
    bottom: 26%;
    right: 12%;
    width: 100px;
    opacity: 0.4;
    animation: float 7s ease-in-out infinite reverse;
}

.contact-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.contact-hero-visual {
    display: flex;
    justify-content: center;
}

.hero-cookie-bubble {
    border-radius: 30px;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-hero-cookie {
    width: min(420px, 90vw);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

.contact-band {
    background: var(--color-pink);
    padding-top: 110px;
    padding-bottom: 130px;
    position: relative;
}

.contact-grid {
    gap: var(--space-xl);
}

.contact-info-card {
    padding: var(--space-lg);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
}

.info-row {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: var(--space-md);
    align-items: start;
    margin-bottom: var(--space-md);
}

.info-icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.subtext {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.6);
    margin-top: 6px;
}

.contact-form-card {
    border-radius: 20px;
    border: 1px solid #eee;
    padding: var(--space-lg);
}

.form-status {
    margin-top: var(--space-sm);
    font-weight: 700;
}

.faq-section {
    background: #fff;
    padding-top: 110px;
    padding-bottom: 140px;
}

@media (min-width: 1024px) {
    .contact-hero-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-hero {
        padding-top: 190px;
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding-top: 24vw;
        padding-bottom: 90px;
    }

    .contact-hero {
        padding-top: 24vw;
        padding-bottom: 90px;
    }

    .menu-hero {
        padding-top: 24vw;
        padding-bottom: 110px;
    }

    .error-hero {
        padding-top: 24vw;
        padding-bottom: 100px;
    }
}
