/* === Black Pie Day === */

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

:root {
    --cream: #FFF8F0;
    --warm-white: #FFFAF5;
    --rust: #A0522D;
    --deep-rust: #7B3F1E;
    --gold: #D4A035;
    --dark-brown: #3B2314;
    --warm-black: #2A1A0E;
    --burnt-orange: #CC6B2C;
    --soft-gold: #E8C876;
    --parchment: #F5E6D0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: var(--dark-brown);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--warm-black);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/hero-bg.jpg') center center / cover no-repeat;
    filter: sepia(0.8) brightness(0.35) contrast(1.1) saturate(0.7);
    opacity: 0.5;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, var(--warm-black) 100%);
}

.hero-overlay {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
}

.wordmark {
    font-family: Georgia, serif;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: bold;
    line-height: 1.05;
    color: var(--cream);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--soft-gold);
    line-height: 1.6;
    font-style: italic;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    font-size: 1.5rem;
    color: var(--gold);
    opacity: 0.5;
    animation: bob 2s ease-in-out infinite;
}

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

/* --- Manifesto --- */
.manifesto {
    padding: 6rem 1.5rem;
    background: var(--cream);
    text-align: center;
}

.manifesto h2 {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rust);
    margin-bottom: 2.5rem;
}

.manifesto p {
    font-size: 1.2rem;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    color: var(--dark-brown);
}

.manifesto .big-text {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: bold;
    color: var(--warm-black);
    line-height: 1.3;
    margin: 2rem auto;
}

/* --- Steps --- */
.steps {
    padding: 6rem 1.5rem;
    background: var(--warm-black);
    color: var(--cream);
    position: relative;
    overflow: hidden;
}

.steps::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/steps-bg.jpg') center center / cover no-repeat;
    filter: sepia(0.8) brightness(0.25) contrast(1.1) saturate(0.6);
    opacity: 0.45;
}

.steps > .container {
    position: relative;
    z-index: 1;
}

.steps h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
    color: var(--cream);
}

.steps-intro {
    text-align: center;
    font-style: italic;
    color: var(--soft-gold);
    font-size: 1.15rem;
    margin-bottom: 3.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
    padding: 1.5rem 1rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--gold);
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.step h3 {
    font-size: 1.3rem;
    color: var(--soft-gold);
    margin-bottom: 0.75rem;
}

.step p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--parchment);
}

.strikethrough {
    text-decoration: line-through;
    opacity: 0.6;
}

/* --- Recipes Section --- */
.recipes-section {
    padding: 6rem 1.5rem;
    background: var(--parchment);
    text-align: center;
}

.recipes-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--warm-black);
    margin-bottom: 0.5rem;
}

.recipes-intro {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--rust);
    max-width: 580px;
    margin: 0 auto 3rem;
}

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

.recipe-card {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 200px;
    padding: 1.25rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--cream);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.recipe-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42, 26, 14, 0.85) 0%, rgba(42, 26, 14, 0.2) 60%, transparent 100%);
    transition: background 0.2s;
}

.recipe-card:hover,
.recipe-card:focus-visible {
    box-shadow: 0 6px 24px rgba(160, 82, 45, 0.25);
    transform: translateY(-3px);
}

.recipe-card:hover::before {
    background: linear-gradient(to top, rgba(42, 26, 14, 0.9) 0%, rgba(42, 26, 14, 0.3) 60%, rgba(42, 26, 14, 0.1) 100%);
}

.recipe-name {
    position: relative;
    z-index: 1;
    font-weight: bold;
    font-size: 1.05rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* --- Footer --- */
.footer {
    padding: 3rem 1.5rem;
    background: var(--warm-black);
    text-align: center;
    color: var(--soft-gold);
    font-size: 0.95rem;
}

.footer-home {
    display: inline-block;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.footer-home:hover {
    text-decoration: underline;
}

/* ===========================================
   404 PAGE
   =========================================== */

.error-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--warm-black);
    color: var(--cream);
    padding: 2rem;
}

.error-page h1 {
    font-size: clamp(5rem, 15vw, 10rem);
    color: var(--gold);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.3rem;
    color: var(--parchment);
    margin-bottom: 0.5rem;
}

.error-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    color: var(--gold);
    border: 2px solid var(--gold);
    border-radius: 4px;
    text-decoration: none;
    font-family: Georgia, serif;
    transition: background 0.2s, color 0.2s;
}

.error-link:hover {
    background: var(--gold);
    color: var(--warm-black);
}

/* ===========================================
   RECIPE PAGES
   =========================================== */

.recipe-page {
    background: var(--cream);
}

.recipe-header {
    padding: 1.25rem 2rem;
    background: var(--warm-black);
}

.back-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.back-link:hover {
    text-decoration: underline;
}

.recipe-hero {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    filter: sepia(0.3) saturate(0.9);
}

.recipe {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.recipe h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--warm-black);
    margin-bottom: 1rem;
    line-height: 1.15;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--rust);
    font-style: italic;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--parchment);
}

.recipe-section {
    margin-bottom: 2.5rem;
}

.recipe-section h2 {
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rust);
    margin-bottom: 1rem;
}

.recipe-section ul {
    list-style: none;
    padding: 0;
}

.recipe-section ul li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: 1.05rem;
}

.recipe-section ul li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
}

.recipe-section ol {
    padding-left: 1.5rem;
}

.recipe-section ol li {
    padding: 0.4rem 0;
    font-size: 1.05rem;
}

.recipe-section ol li::marker {
    color: var(--rust);
    font-weight: bold;
}

.recipe-note {
    margin-top: 1rem;
    color: var(--rust);
    font-size: 1.05rem;
}

.print-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: var(--warm-black);
    color: var(--gold);
    border: 2px solid var(--gold);
    border-radius: 4px;
    font-family: Georgia, serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.print-btn:hover {
    background: var(--gold);
    color: var(--warm-black);
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
    /* Hide non-recipe elements */
    .hero, .manifesto, .steps, .recipes-section, .footer,
    .recipe-header, .recipe-hero, .print-btn, .hero-scroll-hint {
        display: none !important;
    }

    /* Reset page for clean printing */
    body, .recipe-page {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.5;
    }

    .recipe {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .recipe h1 {
        font-size: 22pt;
        color: black;
        margin-bottom: 0.5rem;
        border-bottom: 2px solid #333;
        padding-bottom: 0.5rem;
    }

    .recipe-meta {
        border-bottom: none;
        padding-bottom: 0.5rem;
        margin-bottom: 1.5rem;
        color: #555;
        font-size: 10pt;
    }

    .recipe-section h2 {
        font-size: 12pt;
        color: #333;
        margin-bottom: 0.5rem;
        margin-top: 1rem;
    }

    .recipe-section ul li::before {
        color: #333;
    }

    .recipe-section ol li::marker {
        color: #333;
    }

    .recipe-section ul li,
    .recipe-section ol li {
        font-size: 11pt;
        padding: 0.2rem 0;
    }

    .recipe-note {
        color: #555;
    }

    /* Page setup */
    @page {
        margin: 1in;
    }
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 600px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .manifesto {
        padding: 4rem 1.5rem;
    }

    .steps {
        padding: 4rem 1.5rem;
    }

    .recipes-section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 400px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }
}
