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

:root {
    /* Palette */
    --ivory:      #faf7f0;
    --parchment:  #f0e6d2;
    --parchment-2:#e8d8be;
    --spice:      #9e2d1a;
    --spice-hover:#7d2214;
    --gold:       #b8782a;
    --bark:       #1a0c06;
    --umber:      #52301c;
    --dust:       #8c6650;
    --sage:       #476644;
    --rule:       #d8c8b0;
    --card:       #ffffff;

    /* Typography */
    --display: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif;
    --sans:    'Source Sans 3', 'Helvetica Neue', sans-serif;

    /* Geometry */
    --radius-sm:  3px;
    --radius:     5px;
    --radius-lg:  10px;
    --container:  1100px;

    /* Shadows — warm tinted */
    --shadow-xs:  0 1px 3px rgba(26,12,6,0.07);
    --shadow-sm:  0 2px 10px rgba(26,12,6,0.09);
    --shadow-md:  0 6px 24px rgba(26,12,6,0.13);
    --shadow-lg:  0 12px 48px rgba(26,12,6,0.18);
}

body {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--bark);
    background: var(--ivory);
}

a { color: var(--spice); text-decoration: none; }
a:hover { color: var(--spice-hover); }

img { display: block; max-width: 100%; height: auto; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* === Header === */
.site-header {
    background: var(--bark);
    padding: 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    height: 64px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}
.logo-icon { width: 32px; height: 32px; flex-shrink: 0; opacity: 0.9; }
.logo-name {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ivory);
    letter-spacing: 0.02em;
    line-height: 1;
}
.logo-tagline {
    display: block;
    font-family: var(--sans);
    font-size: 0.62rem;
    color: rgba(250,247,240,0.4);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.main-nav a {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(250,247,240,0.55);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--ivory); }
.main-nav a.active {
    color: var(--ivory);
    border-bottom-color: var(--gold);
}

/* === Hero === */
.site-hero {
    position: relative;
    background: var(--bark);
    padding: clamp(4rem, 10vw, 7rem) 2.5rem clamp(3.5rem, 9vw, 6rem);
    text-align: center;
    overflow: hidden;
}
/* Subtle diamond lattice pattern */
.site-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 2 L38 20 L20 38 L2 20Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 40px 40px;
    pointer-events: none;
}
/* Warm glow from bottom */
.site-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(184,120,42,0.4), transparent);
}
.site-hero .container { position: relative; }
.hero-kicker {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
}
.site-hero h1 {
    font-family: var(--display);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 400;
    color: var(--ivory);
    letter-spacing: 0.03em;
    line-height: 1.05;
    margin-bottom: 1rem;
}
.hero-sub {
    font-family: var(--sans);
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    font-weight: 300;
    color: rgba(250,247,240,0.6);
    letter-spacing: 0.04em;
    max-width: 480px;
    margin: 0 auto;
}

/* === Section header motif === */
.section-label {
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 0.5rem;
}
.section-title {
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 400;
    color: var(--bark);
    letter-spacing: 0.01em;
    line-height: 1.1;
    margin-bottom: 2.25rem;
}
.section-head {
    margin-bottom: 2.5rem;
}

/* === Page Header (inner pages) === */
.page-header {
    background: var(--bark);
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 2 L38 20 L20 38 L2 20Z' fill='none' stroke='rgba(255,255,255,0.035)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 40px 40px;
    pointer-events: none;
}
.page-header .container { position: relative; }
.page-header h1 {
    font-family: var(--display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    color: var(--ivory);
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}
.page-header p {
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(250,247,240,0.5);
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}

/* === Back link === */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(250,247,240,0.45);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 1rem;
    transition: color 0.2s;
}
.back-link:hover { color: rgba(250,247,240,0.85); }

/* === Home Intro === */
.home-intro {
    background: var(--ivory);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--rule);
}
.home-intro p {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--umber);
    max-width: 680px;
}
.home-intro strong {
    font-weight: 600;
    color: var(--spice);
}

/* === Featured Recipes section === */
.featured-recipes {
    padding: 5rem 0;
    background: var(--ivory);
}
.cuisine-browse {
    padding: 5rem 0;
    background: var(--parchment);
}
.recipe-listing,
.cuisine-listing {
    padding: 4rem 0 5rem;
    background: var(--ivory);
}

/* === Recipe Grid === */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.recipe-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, transform 0.3s;
}
.recipe-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: inherit;
}
.card-image {
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--parchment);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.recipe-card:hover .card-image img { transform: scale(1.06); }
.no-image {
    width: 100%;
    height: 100%;
    background: var(--parchment-2);
}
.card-body {
    padding: 1.25rem 1.4rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border-top: 2px solid var(--parchment);
}
.card-body h3 {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bark);
    line-height: 1.2;
    letter-spacing: 0.01em;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.card-time {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--dust);
    letter-spacing: 0.03em;
}

/* === Badge === */
.badge {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25em 0.7em;
    border-radius: 2px;
    background: transparent;
    color: var(--spice);
    border: 1px solid rgba(158,45,26,0.3);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.badge:hover {
    background: var(--spice);
    color: var(--ivory);
    border-color: var(--spice);
}

/* === Empty state === */
.empty {
    font-family: var(--display);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--dust);
    padding: 3rem 0;
}

/* === Cuisine Strip (home) === */
.cuisine-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.cuisine-tile {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.4rem;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 2px;
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 500;
    font-style: italic;
    color: var(--umber);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.cuisine-tile:hover {
    background: var(--spice);
    color: var(--ivory);
    border-color: var(--spice);
}

/* === Cuisine index grid === */
.cuisine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.cuisine-grid .cuisine-tile {
    justify-content: center;
    text-align: center;
    padding: 1.25rem 1rem;
}

/* === Recipe Hero === */
.recipe-hero {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
}
.recipe-hero--no-image {
    background: var(--bark);
    min-height: 240px;
}
.recipe-hero--no-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 2 L38 20 L20 38 L2 20Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 40px 40px;
}
.recipe-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.78) 100%
    );
    display: flex;
    align-items: flex-end;
    width: 100%;
}
.recipe-hero-overlay .container,
.recipe-hero--no-image .container {
    padding-bottom: 3rem;
    padding-top: 3rem;
    position: relative;
}
.recipe-hero h1 {
    font-family: var(--display);
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 16px rgba(0,0,0,0.4);
    max-width: 820px;
}
.recipe-hero--no-image h1 { color: var(--ivory); }

/* === Recipe hero featured image === */
.recipe-hero-image-wrap {
    background: var(--parchment);
    border-bottom: 1px solid var(--rule);
    padding: 2.5rem 0;
    text-align: center;
}
.recipe-image-link { display: inline-block; cursor: zoom-in; }
.recipe-full-image {
    max-height: 520px;
    width: auto;
    max-width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

/* === Recipe Detail === */
.recipe-detail { padding: 3rem 0 6rem; }

.recipe-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5rem 2.5rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
}

/* Meta bar with dividers */
.recipe-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 1.5rem;
    border-right: 1px solid var(--rule);
}
.meta-item:first-child { padding-left: 0; }
.meta-item:last-child { border-right: none; }
.meta-label {
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--dust);
}
.meta-item span:last-child {
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--bark);
    letter-spacing: 0.01em;
}
.meta-source {
    border-right: none;
    flex: 1;
    min-width: 200px;
}
.meta-source span:last-child {
    font-family: var(--display);
    font-size: 0.9rem;
    font-weight: 400;
    font-style: italic;
    color: var(--dust);
}

/* Two-column recipe body on desktop */
.recipe-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3.5rem;
    align-items: start;
}

/* Recipe sections */
.recipe-section { }
.recipe-section h2 {
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bark);
    letter-spacing: 0.01em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.recipe-section h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
    display: none;
}

/* Ingredients */
.ingredients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.ingredients-table tr {
    border-bottom: 1px solid var(--rule);
}
.ingredients-table tr:last-child { border-bottom: none; }
.ingredients-table td {
    padding: 0.6rem 0.5rem;
    vertical-align: top;
    color: var(--umber);
}
.ing-qty {
    white-space: nowrap;
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--spice);
    width: 90px;
    padding-right: 0.75rem;
}
.ing-note {
    color: var(--dust);
    font-size: 0.82rem;
    font-style: italic;
}

/* Steps */
.steps-list {
    list-style: none;
    counter-reset: steps;
    padding: 0;
}
.steps-list li {
    counter-increment: steps;
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: start;
    font-size: 0.98rem;
    line-height: 1.8;
    color: var(--umber);
}
.steps-list li::before {
    content: counter(steps);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--spice);
    color: var(--spice);
    border-radius: 50%;
    font-family: var(--display);
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

/* Notes */
.recipe-notes {
    grid-column: 1 / -1;
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px solid var(--rule);
}
.recipe-notes p {
    font-size: 0.9rem;
    color: var(--dust);
    line-height: 1.75;
    margin-bottom: 0.4rem;
}

/* === Lightbox === */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.94);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
}
#lightbox.active { display: flex; }
.lb-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 80px rgba(0,0,0,0.7);
    border: none;
    margin: 0;
    cursor: default;
}
#lb-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
    font-family: sans-serif;
}
#lb-close:hover { color: #fff; }

/* === Footer === */
.site-footer {
    background: var(--bark);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 2.5rem 0;
    text-align: center;
}
.site-footer p {
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(250,247,240,0.3);
}

/* === Responsive === */
@media (max-width: 1000px) {
    .recipe-grid { grid-template-columns: repeat(2, 1fr); }
    .recipe-body { grid-template-columns: 1fr; gap: 2.5rem; }
    .recipe-notes { grid-column: 1; }
}
@media (max-width: 680px) {
    .main-nav { gap: 1.5rem; }
    .logo-tagline { display: none; }
    .recipe-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .recipe-meta-bar { gap: 0; flex-wrap: wrap; }
    .meta-item { padding: 0.75rem 1rem; border-right: none; border-bottom: 1px solid var(--rule); }
    .meta-item:last-child { border-bottom: none; }
    .container { padding: 0 1.25rem; }
    .recipe-hero { min-height: 300px; }
    .site-hero h1 { letter-spacing: 0; }
}
