/* --- Global Variables --- */
:root {
    --bg-oat: #FDFBF7;
    --text-peppercorn: #222222;
    --text-muted: #666666;
    --accent-spice: #D37651; /* Terracotta/saffron */
    --border-light: #EAE6DF;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-oat);
    color: var(--text-peppercorn);
    font-family: var(--font-sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    
    /* NEW: This pushes the entire website down so the header doesn't cut anything off! */
    padding-top: 110px; 
}

/* --- Global Animations & Utilities --- */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 4px; background: var(--accent-spice);
    width: 0%; z-index: 9999; transition: width 0.1s ease;
}

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   1. LANDING PAGE (index.php)
========================================= */
.home-landing { padding-bottom: 100px; }

.landing-hero {
    position: relative; 
    height: 85vh; /* Slightly shorter so it frames perfectly on the screen */
    display: flex; 
    align-items: center; 
    justify-content: center;
    
    /* Changed the top margin to 0 so it sits nicely below the new body padding */
    margin: 0 20px 100px; 
    border-radius: 20px; 
    overflow: hidden;
}

.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }

.hero-center-box {
    position: relative; z-index: 2; text-align: center; color: #fff; max-width: 800px;
}
.eyebrow-text { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 3px; font-weight: 600; margin-bottom: 20px; display: block; color: var(--accent-spice); }
.hero-center-box h1 { font-family: var(--font-serif); font-size: 5rem; line-height: 1; margin-bottom: 40px; }

.btn-solid {
    background: var(--bg-oat); color: var(--text-peppercorn); padding: 15px 40px; border-radius: 50px;
    text-decoration: none; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem;
    transition: transform 0.3s, box-shadow 0.3s; display: inline-block;
}
.btn-solid:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

/* Philosophy Block */
.philosophy-block { max-width: 800px; margin: 0 auto 120px; padding: 0 5%; }
.drop-cap { float: left; font-family: var(--font-serif); font-size: 6rem; line-height: 0.8; padding-top: 10px; padding-right: 15px; color: var(--accent-spice); }
.lead-text { font-size: 1.5rem; line-height: 1.8; color: var(--text-peppercorn); font-weight: 400; }

/* Mood Teaser Grid */
.collections-teaser { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.teaser-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; }
.teaser-header h2 { font-family: var(--font-serif); font-size: 2.5rem; font-style: italic; }
.text-link { color: var(--text-peppercorn); text-decoration: none; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; border-bottom: 1px solid var(--text-peppercorn); padding-bottom: 3px; }

.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.mood-card { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/5; text-decoration: none; display: block; }
.mood-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; filter: brightness(0.8); }
.mood-card:hover img { transform: scale(1.05); filter: brightness(0.6); }
.mood-card h3 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-family: var(--font-serif); font-size: 2rem; width: 100%; text-align: center; z-index: 2; }


/* =========================================
   2. RECIPE INDEX PAGE (recipes.php)
========================================= */
.recipe-index { max-width: 1400px; margin: 0 auto; padding: 120px 5% 150px; } /* Added top padding to account for fixed header */

.index-header { text-align: center; max-width: 800px; margin: 0 auto 80px; }
.index-header h1 { font-family: var(--font-serif); font-size: 4rem; margin-bottom: 20px; }
.index-header p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; }

.filter-bar { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.filter-btn { background: transparent; border: 1px solid var(--border-light); padding: 10px 25px; border-radius: 30px; font-family: var(--font-sans); font-size: 0.9rem; color: var(--text-peppercorn); cursor: pointer; transition: all 0.3s; }
.filter-btn:hover, .filter-btn.active { background: var(--text-peppercorn); color: var(--bg-oat); border-color: var(--text-peppercorn); }

.master-recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 50px 40px; }

.index-card { text-decoration: none; color: var(--text-peppercorn); display: block; }
.card-img-wrap { border-radius: 12px; overflow: hidden; aspect-ratio: 4/5; margin-bottom: 20px; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.index-card:hover .card-img-wrap img { transform: scale(1.03); }

.card-tag { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-spice); font-weight: 600; display: block; margin-bottom: 10px; }
.card-info h2 { font-family: var(--font-serif); font-size: 1.8rem; line-height: 1.2; }


/* =========================================
   3. INDIVIDUAL RECIPE LAYOUT
========================================= */
.recipe-container { max-width: 1200px; margin: 0 auto; padding: 120px 5% 0; } /* Added top padding for header */

.recipe-hero { margin-bottom: 80px; }
.hero-image-wrap { width: 100%; aspect-ratio: 21/9; border-radius: 12px; overflow: hidden; margin-bottom: 40px; }
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

.recipe-header-text { text-align: center; max-width: 800px; margin: 0 auto; }
.recipe-header-text h1 { font-family: var(--font-serif); font-size: 4rem; line-height: 1.1; margin-bottom: 20px; color: var(--text-peppercorn); }
.recipe-desc { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; }

.recipe-meta {
    display: flex; justify-content: center; gap: 60px;
    border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
    padding: 20px 0;
}
.meta-item { display: flex; flex-direction: column; }
.meta-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 5px; }
.meta-value { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; }

.recipe-body { display: flex; gap: 80px; align-items: flex-start; margin-bottom: 100px; }
.recipe-body h2 { font-family: var(--font-serif); font-size: 2.5rem; font-style: italic; margin-bottom: 30px; padding-bottom: 10px; border-bottom: 2px solid var(--border-light); }

/* Left Column: Sticky Ingredients */
.ingredients-panel { width: 35%; }
.sticky-wrapper {
    position: sticky; top: 100px; /* Accounts for the new dynamic header */
    background: #fff; padding: 40px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}

.ingredient-subhead { font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; margin: 25px 0 15px; color: var(--text-peppercorn); }
.ingredient-list { list-style: none; }
.ingredient-list li { margin-bottom: 12px; font-size: 1rem; color: var(--text-muted); }

/* Custom Checkboxes */
.checkbox-container { display: block; position: relative; padding-left: 30px; cursor: pointer; user-select: none; }
.checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { position: absolute; top: 4px; left: 0; height: 18px; width: 18px; border: 1px solid #ccc; border-radius: 4px; transition: all 0.2s; }
.checkbox-container:hover input ~ .checkmark { border-color: var(--text-peppercorn); }
.checkbox-container input:checked ~ .checkmark { background-color: var(--accent-spice); border-color: var(--accent-spice); }
.checkmark:after { content: ""; position: absolute; display: none; left: 5px; top: 2px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox-container input:checked ~ .checkmark:after { display: block; }
.checkbox-container input:checked { text-decoration: line-through; opacity: 0.5; }

/* Right Column: Instructions */
.instructions-panel { width: 65%; }
.step-list { display: flex; flex-direction: column; gap: 50px; }
.step-item { display: flex; gap: 30px; }
.step-number { font-family: var(--font-serif); font-size: 3rem; color: var(--accent-spice); line-height: 1; min-width: 50px; font-weight: 600; }
.step-text p { font-size: 1.15rem; line-height: 1.8; color: var(--text-peppercorn); }


/* =========================================
   4. MOBILE RESPONSIVENESS
========================================= */
@media (max-width: 900px) {
    /* Landing Page */
    .hero-center-box h1 { font-size: 3rem; }
    .mood-grid { grid-template-columns: 1fr; }
    
    /* Recipe Index */
    .master-recipe-grid { grid-template-columns: 1fr; }
    .filter-bar { gap: 10px; }
    .filter-btn { padding: 8px 15px; font-size: 0.8rem; }
    
    /* Individual Recipe */
    .recipe-header-text h1 { font-size: 3rem; }
    .recipe-meta { flex-direction: column; gap: 20px; text-align: center; }
    .recipe-body { flex-direction: column; gap: 60px; }
    .ingredients-panel, .instructions-panel { width: 100%; }
    .sticky-wrapper { position: relative; top: 0; padding: 30px 20px; }
}

/* =========================================
   5. ABOUT PAGE (about.php)
========================================= */
.about-page { padding: 150px 5% 100px; max-width: 1200px; margin: 0 auto; }
.about-container { display: flex; gap: 80px; align-items: center; }
.about-image { flex: 1; border-radius: 12px; overflow: hidden; aspect-ratio: 4/5; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-text { flex: 1; }
.about-text h1 { font-family: var(--font-serif); font-size: 4rem; margin-bottom: 30px; line-height: 1; color: var(--text-peppercorn); }
.about-text p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 25px; line-height: 1.8; }
.about-text .lead-text { font-size: 1.5rem; color: var(--text-peppercorn); font-family: var(--font-serif); font-style: italic; }
.about-signature { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border-light); }
.about-signature p { font-size: 1rem; color: var(--text-peppercorn); }

/* =========================================
   6. CONTACT PAGE (contact.php)
========================================= */
.contact-page { padding: 150px 5% 100px; max-width: 1000px; margin: 0 auto; }
.contact-header { text-align: center; margin-bottom: 80px; }
.contact-header h1 { font-family: var(--font-serif); font-size: 4rem; margin-bottom: 15px; }
.contact-header p { font-size: 1.2rem; color: var(--text-muted); }

.contact-container { display: flex; gap: 80px; }
.minimal-form { flex: 2; display: flex; flex-direction: column; gap: 25px; }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--text-peppercorn); }
.input-group input, .input-group select, .input-group textarea {
    width: 100%; padding: 15px; border: 1px solid var(--border-light); border-radius: 6px;
    background: transparent; font-family: var(--font-sans); font-size: 1rem; color: var(--text-peppercorn); outline: none; transition: border-color 0.3s;
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { border-color: var(--accent-spice); }
.minimal-form .btn-solid { border: none; cursor: pointer; align-self: flex-start; margin-top: 10px; }

.direct-contact { flex: 1; padding-top: 20px; }
.direct-contact h3 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 15px; font-style: italic; }
.direct-contact a { color: var(--text-muted); text-decoration: none; font-size: 1.1rem; transition: color 0.3s; border-bottom: 1px solid transparent; }
.direct-contact a:hover { color: var(--text-peppercorn); border-color: var(--text-peppercorn); }

/* Mobile Fixes for New Pages */
@media (max-width: 900px) {
    .about-container, .contact-container { flex-direction: column; gap: 50px; }
    .about-image { order: -1; width: 100%; }
    .about-text h1, .contact-header h1 { font-size: 3rem; }
    .minimal-form .btn-solid { align-self: stretch; text-align: center; }
}