/* ============================================
   lunch.day - Styles
   Skeuomorphic warmth, masonry feast layout
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --linen-cream: #F5EDE0;
    --table-wood: #8B6B4A;
    --olive-oil: #9B8B40;
    --tomato-warm: #C85A4A;
    --herb-green: #5A8B5A;
    --aurora-pink: #D4A0B0;
    --dark-toast: #3A2A1A;
    --cream-white: #FBF6F0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: var(--dark-toast);
    background-color: var(--linen-cream);
    overflow-x: hidden;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--linen-cream);
}

/* Linen texture background with CSS noise */
#hero-bg-texture {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 107, 74, 0.015) 2px,
            rgba(139, 107, 74, 0.015) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(139, 107, 74, 0.015) 2px,
            rgba(139, 107, 74, 0.015) 3px
        );
    pointer-events: none;
    z-index: 0;
}

/* Sun SVG */
#sun-svg {
    position: absolute;
    width: min(80vw, 600px);
    height: min(80vw, 600px);
    z-index: 1;
    opacity: 0;
    animation: fadeInSun 1s 0.3s ease-out forwards;
}

#sun-rays path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawRay 2s 0.5s ease-out forwards;
}

@keyframes drawRay {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInSun {
    to {
        opacity: 1;
    }
}

/* Logotype */
#logotype {
    position: relative;
    z-index: 2;
    font-family: 'Fraunces', serif;
    font-size: clamp(48px, 10vw, 120px);
    line-height: 1;
    opacity: 0;
    animation: fadeInLogo 0.8s 0.8s ease-out forwards;
}

#logo-lunch {
    font-weight: 800;
    font-variation-settings: 'WONK' 1;
    color: var(--dark-toast);
}

#logo-dot {
    color: var(--tomato-warm);
    font-weight: 600;
}

#logo-day {
    font-weight: 300;
    font-variation-settings: 'WONK' 0;
    color: var(--table-wood);
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: translateY(12px);
        font-variation-settings: 'WONK' 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        font-variation-settings: 'WONK' 1;
    }
}

/* Hero tagline */
#hero-tagline {
    position: relative;
    z-index: 2;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(14px, 2vw, 20px);
    color: var(--table-wood);
    margin-top: 16px;
    letter-spacing: 0.04em;
    opacity: 0;
    animation: fadeInTagline 0.8s 1.4s ease-out forwards;
}

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

/* Scroll indicator */
#scroll-indicator {
    position: absolute;
    bottom: 32px;
    z-index: 2;
    opacity: 0;
    animation: fadeInScroll 0.8s 2s ease-out forwards, bounceScroll 2s 3s ease-in-out infinite;
}

@keyframes fadeInScroll {
    to { opacity: 0.6; }
}

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

/* --- Aurora Accent Strip --- */
#aurora-strip {
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, #D4A0B0, #9B8B40, #5A8B5A, #D4A0B0);
    background-size: 300% 100%;
    animation: auroraSlide 10s linear infinite;
    position: relative;
    opacity: 0;
    transform: scaleY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#aurora-strip.visible {
    opacity: 1;
    transform: scaleY(1);
}

@keyframes auroraSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Aurora strip subtle overlay for depth */
#aurora-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(245, 237, 224, 0.15) 0%, transparent 30%, transparent 70%, rgba(245, 237, 224, 0.15) 100%);
    pointer-events: none;
}

/* --- Masonry Section --- */
#masonry-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

#masonry-grid {
    columns: 3;
    column-gap: 20px;
}

/* --- Masonry Block Base --- */
.masonry-block {
    position: relative;
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--cream-white);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.masonry-block.visible {
    opacity: 1;
    transform: scale(1);
}

.masonry-block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.06);
    transform: scale(1.01);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* --- Block Textures --- */
.block-texture {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    border-radius: 12px;
}

/* Wood grain texture */
.block-wood > .block-texture {
    background: repeating-linear-gradient(
        45deg,
        transparent 0%,
        transparent 48%,
        rgba(139, 107, 74, 0.03) 50%,
        transparent 52%
    );
}

/* Ceramic glaze texture */
.block-ceramic > .block-texture {
    background: radial-gradient(
        ellipse at 30% 30%,
        rgba(255, 255, 255, 0.08),
        transparent 60%
    );
}

/* Linen weave texture */
.block-linen > .block-texture {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(139, 107, 74, 0.02) 3px,
            rgba(139, 107, 74, 0.02) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(139, 107, 74, 0.02) 3px,
            rgba(139, 107, 74, 0.02) 4px
        );
}

/* --- Plate-shaped blocks --- */
.block-plate {
    border-radius: 50% / 30%;
    text-align: center;
    padding: 40px 32px;
}

.block-plate > .block-texture {
    border-radius: 50% / 30%;
}

/* --- Block Content Styling --- */
.masonry-block h2 {
    position: relative;
    z-index: 1;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-variation-settings: 'WONK' 1;
    font-size: clamp(18px, 2.5vw, 26px);
    color: var(--dark-toast);
    margin-bottom: 4px;
    line-height: 1.3;
}

.block-category {
    position: relative;
    z-index: 1;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--olive-oil);
    margin-bottom: 12px;
}

.masonry-block p {
    position: relative;
    z-index: 1;
}

/* --- Block Icon (Nature SVGs) --- */
.block-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
}

.block-plate .block-icon {
    margin-left: auto;
    margin-right: auto;
}

.nature-svg {
    width: 100%;
    height: 100%;
}

.draw-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.2s ease-out;
}

.masonry-block.visible .draw-path {
    stroke-dashoffset: 0;
}

/* --- Recipe Details --- */
.recipe-details {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 107, 74, 0.12);
}

.detail-item {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 400;
    color: var(--table-wood);
    background: rgba(139, 107, 74, 0.06);
    padding: 3px 10px;
    border-radius: 4px;
}

/* --- Footer --- */
#site-footer {
    background-color: var(--dark-toast);
    color: var(--linen-cream);
    padding: 60px 24px 40px;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    margin-bottom: 8px;
}

.footer-lunch {
    font-weight: 700;
    font-variation-settings: 'WONK' 1;
    color: var(--cream-white);
}

.footer-dot {
    color: var(--tomato-warm);
}

.footer-day {
    font-weight: 300;
    color: var(--table-wood);
}

.footer-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: rgba(245, 237, 224, 0.7);
    margin-bottom: 24px;
}

.footer-divider {
    width: 60px;
    height: 1px;
    background: rgba(139, 107, 74, 0.4);
    margin: 0 auto 20px;
}

.footer-copy {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: rgba(245, 237, 224, 0.4);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    #masonry-grid {
        columns: 2;
    }
}

@media (max-width: 560px) {
    #masonry-grid {
        columns: 1;
    }

    #masonry-section {
        padding: 40px 16px 60px;
    }

    .masonry-block {
        padding: 24px 20px;
    }

    .block-plate {
        border-radius: 20px;
        padding: 28px 20px;
    }

    .block-plate > .block-texture {
        border-radius: 20px;
    }

    #aurora-strip {
        height: 80px;
    }
}
