@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

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

/* ── Variables — French Provence palette ── */
:root {
    --red:        #4E87A8;   /* Provençal blue (shutters / sky) */
    --red-dark:   #376A85;   /* deeper blue (hover) */
    --red-light:  #6FA8C4;   /* lighter blue */
    --gold:       #8C7A52;   /* warm sandstone / Provence stone */
    --gold-light: #B09870;   /* light sandstone */
    --cream:      #F3EFE7;   /* warm linen (plaster walls) */
    --parchment:  #D6E9F4;   /* pale Provence sky */
    --parch-dark: #96BECF;   /* blue-grey */
    --brown:      #1B3A4E;   /* deep Provence navy */
    --brown-mid:  #2C5F78;   /* mid navy */
    --text:       #192D3A;   /* dark text */
    --text-light: #4C7788;   /* muted blue-grey text */
    --border:     #A6C8D6;   /* soft blue border */
    --white:      #F7FAFB;   /* cool white */
}

/* ── Body / Background ── */
body {
    font-family: 'Lato', Georgia, serif;
    background-color: var(--cream);
    background-image:
        repeating-linear-gradient(0deg,   transparent, transparent 28px, rgba(78,135,168,0.05) 28px, rgba(78,135,168,0.05) 29px),
        repeating-linear-gradient(90deg,  transparent, transparent 28px, rgba(78,135,168,0.03) 28px, rgba(78,135,168,0.03) 29px);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

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

/* ── Checkered Ribbon ── */
.checkered {
    height: 12px;
    background: repeating-linear-gradient(
        90deg,
        var(--red)   0px, var(--red)   12px,
        var(--white) 12px, var(--white) 24px
    );
    flex-shrink: 0;
}

/* ── Header ── */
header {
    background: linear-gradient(160deg, #1B3A4E 0%, #0F2535 100%);
    padding: 0;
}

.header-top {
    padding: 2.25rem 0 1.75rem;
    text-align: center;
}

.site-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.2rem;
    color: #D8EFF8;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 1px 2px 8px rgba(0,0,0,0.4);
    text-decoration: none;
    display: block;
    margin-bottom: 0.3rem;
}

.site-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: var(--parchment);
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1.25rem;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 0.15rem;
    flex-wrap: wrap;
}

.header-nav a {
    color: var(--parchment);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    opacity: 0.85;
}

.header-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--gold-light);
    opacity: 1;
}

/* ── Hamburger ── */
.hamburger {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--parchment);
    font-size: 1.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 0.75rem;
    line-height: 1;
}

/* ── Dividers ── */
.ornament {
    text-align: center;
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 0.8rem;
    opacity: 0.5;
    margin: 2rem 0;
}

/* ── Search ── */
.search-wrap {
    max-width: 580px;
    margin: 2.5rem auto 1.5rem;
}

#search-input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    border: 2px solid var(--parch-dark);
    border-radius: 3px;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
}

#search-input::placeholder { color: var(--text-light); opacity: 0.6; }

/* ── Category Filter ── */
.category-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 2.5rem;
    padding: 0 1rem;
}

.cat-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-family: 'Lato', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.18s;
}

.cat-btn:hover, .cat-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: white;
}

/* ── Recipe Grid ── */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.75rem;
    margin-bottom: 4rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state p { font-style: italic; font-size: 1.1rem; }

/* ── Recipe Card ── */
.recipe-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 4px solid var(--red);
    border-radius: 2px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 2px 3px 10px rgba(61,35,8,0.07);
    transition: transform 0.18s, box-shadow 0.18s;
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 3px 6px 18px rgba(61,35,8,0.13);
}

.recipe-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--red-dark);
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0 0.8rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.recipe-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.55;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

/* ── Tags ── */
.tag {
    background: var(--parchment);
    color: var(--brown-mid);
    padding: 0.18rem 0.6rem;
    border-radius: 2px;
    font-size: 0.76rem;
    font-family: 'Lato', sans-serif;
    text-decoration: none;
    letter-spacing: 0.03em;
    border: 1px solid var(--parch-dark);
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.tag:hover {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-light);
    font-family: 'Lato', sans-serif;
    margin: 1.75rem 0 0;
}

.breadcrumb a { color: var(--red); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.5; }

/* ── Recipe Header ── */
.recipe-header {
    text-align: center;
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
}

.recipe-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    color: var(--brown);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.recipe-desc-hero {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 660px;
    margin: 0 auto 1.5rem;
    line-height: 1.65;
}

.recipe-info {
    display: inline-flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--parchment);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.85rem 2rem;
}

.info-item {
    font-size: 0.88rem;
    color: var(--brown-mid);
    font-family: 'Lato', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

/* ── Measurement Toggle ── */
.measurement-toggle {
    text-align: center;
    margin: 2rem 0 1rem;
}

.toggle-btn {
    background: transparent;
    border: 1.5px solid var(--red);
    color: var(--red);
    padding: 0.55rem 1.4rem;
    font-family: 'Lato', sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.18s;
}

.toggle-btn:hover { background: var(--red); color: white; }

/* ── Recipe Content ── */
.recipe-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    margin: 2.5rem 0;
    align-items: start;
}

.ingredients-section, .instructions-section {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 1px 2px 8px rgba(61,35,8,0.05);
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.55rem;
    color: var(--brown);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
}

/* ── Ingredients ── */
.ingredients-list { list-style: none; }

.ingredient-item {
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.93rem;
    line-height: 1.5;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.ingredient-item:last-child { border-bottom: none; }

.ingredient-amount {
    font-weight: 700;
    color: var(--red-dark);
    white-space: nowrap;
    min-width: 4.5rem;
    flex-shrink: 0;
}

/* ── Instructions ── */
.instructions-list {
    counter-reset: step-counter;
    list-style: none;
}

.instruction-step {
    counter-increment: step-counter;
    padding: 1.2rem 0 1.2rem 3.5rem;
    border-bottom: 1px solid var(--parchment);
    position: relative;
    font-size: 0.95rem;
    line-height: 1.75;
}

.instruction-step:last-child { border-bottom: none; }

.instruction-step::before {
    content: counter(step-counter);
    position: absolute;
    left: 0; top: 1.2rem;
    background: var(--red);
    color: white;
    width: 2rem; height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Judy's Notes ── */
.recipe-notes {
    background: #EBF4FA;
    border: 1px solid #A6C8D6;
    border-left: 5px solid var(--red);
    padding: 1.5rem 1.75rem 1.5rem 2rem;
    margin: 2.5rem 0;
    border-radius: 3px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.06);
    position: relative;
}

.recipe-notes::before {
    content: '📌';
    position: absolute;
    top: -10px; left: 1.5rem;
    font-size: 1.2rem;
}

.recipe-notes h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--brown);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.recipe-notes p {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.93rem;
    line-height: 1.65;
}

/* ── Buttons ── */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin: 1.75rem 0;
    flex-wrap: wrap;
}

.btn {
    padding: 0.65rem 1.4rem;
    border-radius: 3px;
    border: 1.5px solid transparent;
    font-family: 'Lato', sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary   { background: var(--red); color: white; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-secondary { background: transparent; color: var(--red); border-color: var(--red); }
.btn-secondary:hover { background: var(--red); color: white; }

/* ── Related Recipes ── */
.related-recipes {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--parchment);
    border: 1px solid var(--border);
    border-radius: 3px;
}

.related-recipes h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--brown);
    font-size: 1.35rem;
    margin-bottom: 1.2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.related-recipe {
    padding: 0.85rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
    transition: border-left-color 0.18s, box-shadow 0.18s;
}

.related-recipe:hover {
    border-left-color: var(--gold);
    box-shadow: 2px 2px 8px rgba(61,35,8,0.1);
}

.related-recipe strong {
    font-family: 'Playfair Display', serif;
    color: var(--brown);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.related-recipe small { color: var(--text-light); font-size: 0.76rem; }

/* ── Tag Page ── */
.tag-page-header {
    padding: 3rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.tag-page-header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--brown);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.tag-page-header p { color: var(--text-light); font-style: italic; }

/* ── 404 ── */
.not-found {
    text-align: center;
    padding: 5rem 2rem;
}

.not-found h1 {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    color: var(--parch-dark);
    margin-bottom: 1rem;
}

.not-found h2 {
    font-family: 'Playfair Display', serif;
    color: var(--brown);
    margin-bottom: 1rem;
}

.not-found p { color: var(--text-light); margin-bottom: 2rem; font-style: italic; }

/* ── Footer ── */
footer {
    background: linear-gradient(160deg, #1B3A4E 0%, #0F2535 100%);
    color: var(--parchment);
    text-align: center;
    padding: 2.5rem 1rem;
    margin-top: 5rem;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    line-height: 2;
}

footer a { color: var(--gold-light); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .footer-divider { opacity: 0.3; margin: 0 0.5rem; }

/* ── Reviews ── */
.reviews-section {
    margin: 2.5rem 0;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: 1px 2px 8px rgba(61,35,8,0.05);
}

.review-item {
    padding: 1.1rem 0;
    border-bottom: 1px dashed var(--border);
}

.review-item:last-child { border-bottom: none; }

.review-stars { color: var(--gold); font-size: 1.05rem; letter-spacing: 0.05em; }
.review-author { font-weight: 700; color: var(--brown); margin-left: 0.5rem; }
.review-date { font-size: 0.78rem; color: var(--text-light); margin-left: 0.5rem; }
.review-comment { margin-top: 0.4rem; font-size: 0.92rem; color: var(--text); line-height: 1.65; font-style: italic; }

.review-form { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1.5px solid var(--border); }
.review-form h3 { font-family: 'Playfair Display', serif; color: var(--brown); font-size: 1.15rem; margin-bottom: 0.9rem; }

.star-picker { font-size: 2rem; cursor: pointer; letter-spacing: 0.1em; user-select: none; }
.star-picker span { color: var(--parch-dark); transition: color 0.1s; display: inline-block; }

.review-input, .review-textarea {
    width: 100%; padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--border); border-radius: 3px;
    font-family: 'Lato', sans-serif; font-size: 0.93rem;
    background: var(--cream); color: var(--text);
}

.review-input:focus, .review-textarea:focus { outline: none; border-color: var(--red); }

.review-textarea { min-height: 90px; resize: vertical; line-height: 1.6; }

/* ── Recipe Author Byline ── */
.recipe-byline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.recipe-byline strong { color: var(--brown-mid); font-style: normal; }

/* ── Homepage Chef Intro ── */
.chef-intro {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 560px;
    margin: 2rem auto 0;
    padding: 1.1rem 1.4rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: 2px;
}

.chef-intro-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    flex-shrink: 0;
}

.chef-intro-text a {
    font-family: 'Playfair Display', serif;
    color: var(--brown);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.chef-intro-text a:hover { color: var(--red); }
.chef-intro-text p { font-size: 0.84rem; color: var(--text-light); font-style: italic; margin-top: 0.15rem; }

/* ── Recipe Photos ── */
.recipe-photo-hero {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    border: 1px solid var(--border);
    margin: 1.5rem 0;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
    margin: 1.5rem 0;
}

.recipe-photo {
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--parchment);
}

.recipe-photo img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.recipe-photo figcaption {
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
}

.step-photo {
    margin-top: 0.9rem;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--border);
    max-width: 380px;
}

.step-photo img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    display: block;
}

.step-photo figcaption {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* ── Print ── */
@media print {
    header, footer, .action-buttons, .measurement-toggle,
    .search-wrap, .category-bar, .related-recipes,
    .reviews-section, .recipe-tags, .breadcrumb, .checkered { display: none !important; }
    body { background: white; font-size: 12pt; }
    .recipe-content { grid-template-columns: 1fr 2fr; display: grid; }
    .recipe-title { font-size: 24pt; }
    .ingredients-section, .instructions-section { border: 1px solid #ccc; box-shadow: none; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .recipe-content { grid-template-columns: 1fr; }
    .related-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .site-title   { font-size: 2.2rem; }
    .recipe-title { font-size: 2rem; }

    .hamburger { display: inline-block; }

    .header-nav {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0.5rem 0 1rem;
    }

    .header-nav.open { display: flex; }

    .header-nav a {
        padding: 0.55rem 1.2rem;
        font-size: 0.88rem;
        width: 100%;
        text-align: center;
    }

    .recipe-info {
        display: flex;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        gap: 1.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .recipe-grid { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
    .category-bar { overflow-x: auto; justify-content: flex-start; flex-wrap: nowrap; padding-bottom: 0.25rem; }
}

@media (max-width: 480px) {
    .site-title   { font-size: 1.75rem; }
    .recipe-title { font-size: 1.65rem; }
    .related-grid { grid-template-columns: 1fr; }
    .recipe-notes { padding: 1.25rem 1.25rem 1.25rem 1.5rem; }
}
