/* HearthRoot Design System
   Where My Heart First Learned to Cook
   ──────────────────────────────────── */

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

:root {
    --coconut-cream: #F3EDE2;
    --valley-earth: #5C4632;
    --ti-leaf: #2F4A3B;
    --burnt-sugar: #A36A3D;
    --sunset-clay: #C07A5A;
    --muted-gold: #C2A24A;
    --cream-dark: #EAE0D0;
    --valley-light: #7A6350;
    --shadow-soft: rgba(92, 70, 50, 0.08);
    --shadow-medium: rgba(92, 70, 50, 0.15);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'EB Garamond', Georgia, serif;
    background-color: var(--coconut-cream);
    color: var(--valley-earth);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ─── Navigation ─── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(243, 237, 226, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(92, 70, 50, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-nav.scrolled {
    background: rgba(243, 237, 226, 0.98);
    box-shadow: 0 2px 20px var(--shadow-soft);
}

.nav-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--valley-earth);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.95rem;
    color: var(--valley-light);
    text-decoration: none;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.25s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--valley-earth);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--burnt-sugar);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--valley-earth) !important;
    color: var(--coconut-cream) !important;
    padding: 10px 24px !important;
    border-radius: 2px;
    letter-spacing: 2px !important;
    font-size: 0.82rem !important;
    transition: background 0.25s ease, transform 0.2s ease !important;
}

.nav-cta:hover {
    background: var(--ti-leaf) !important;
    transform: translateY(-1px);
}

.nav-cta::after {
    display: none !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--valley-earth);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* ─── Common Sections ─── */
.page-body {
    padding-top: 72px; /* Account for fixed nav */
}

.section-label {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--burnt-sugar);
    margin-bottom: 24px;
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 500;
    color: var(--valley-earth);
    line-height: 1.25;
    margin-bottom: 32px;
}

.section-divider {
    background-color: var(--ti-leaf);
    padding: 48px 24px;
    text-align: center;
}

.section-divider p {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--coconut-cream);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
    font-style: italic;
}

/* ─── Page Hero (interior pages) ─── */
.page-hero {
    padding: 100px 24px 80px;
    text-align: center;
    position: relative;
    background: linear-gradient(
        180deg,
        rgba(194, 162, 74, 0.06) 0%,
        var(--coconut-cream) 40%,
        var(--coconut-cream) 60%,
        rgba(47, 74, 59, 0.04) 100%
    );
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--muted-gold) 20%,
        var(--burnt-sugar) 50%,
        var(--muted-gold) 80%,
        transparent 100%
    );
}

.page-hero .ornament {
    font-family: 'Allura', cursive;
    font-size: 28px;
    color: var(--burnt-sugar);
    opacity: 0.7;
    letter-spacing: 4px;
    margin-bottom: 24px;
}

.page-hero h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 500;
    color: var(--valley-earth);
    line-height: 1.2;
    margin-bottom: 20px;
}

.page-hero .subtitle {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--valley-light);
    max-width: 560px;
    margin: 0 auto;
    font-style: italic;
    line-height: 1.7;
}

.page-hero .divider {
    width: 80px;
    height: 1px;
    background: var(--burnt-sugar);
    margin: 32px auto;
    opacity: 0.5;
}

/* ─── Buttons ─── */
.btn-primary {
    display: inline-block;
    background: var(--valley-earth);
    color: var(--coconut-cream);
    padding: 16px 40px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: var(--ti-leaf);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--valley-earth);
    padding: 14px 36px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid var(--valley-earth);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    background: var(--valley-earth);
    color: var(--coconut-cream);
}

.btn-gold {
    display: inline-block;
    background: var(--burnt-sugar);
    color: var(--coconut-cream);
    padding: 18px 48px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 16px rgba(163, 106, 61, 0.25);
}

.btn-gold:hover {
    background: var(--sunset-clay);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(163, 106, 61, 0.35);
}

/* ─── Recipe Cards ─── */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.recipe-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 16px var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--shadow-medium);
}

.recipe-card-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.recipe-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 50%,
        rgba(92, 70, 50, 0.08) 100%
    );
}

.recipe-card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(47, 74, 59, 0.88);
    color: var(--coconut-cream);
    padding: 4px 14px;
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'EB Garamond', Georgia, serif;
    border-radius: 2px;
    z-index: 1;
}

.recipe-card-body {
    padding: 24px;
}

.recipe-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--valley-earth);
    margin-bottom: 10px;
    line-height: 1.3;
}

.recipe-card-desc {
    font-size: 0.95rem;
    color: var(--valley-light);
    line-height: 1.65;
    margin-bottom: 16px;
}

.recipe-card-lock {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(92, 70, 50, 0.08);
    font-size: 0.82rem;
    color: var(--burnt-sugar);
    letter-spacing: 1px;
}

.recipe-card-lock svg {
    width: 14px;
    height: 14px;
    fill: var(--burnt-sugar);
    flex-shrink: 0;
}

/* ─── Category Filter ─── */
.recipe-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 48px;
    padding: 0 24px;
}

.filter-btn {
    padding: 8px 20px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.88rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: transparent;
    color: var(--valley-light);
    border: 1px solid rgba(92, 70, 50, 0.2);
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 2px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--valley-earth);
    color: var(--coconut-cream);
    border-color: var(--valley-earth);
}

/* ─── Content Sections ─── */
.content-section {
    padding: 80px 24px;
    max-width: 760px;
    margin: 0 auto;
}

.content-section p {
    font-size: 1.1rem;
    color: var(--valley-light);
    margin-bottom: 24px;
    line-height: 1.85;
}

.content-section p:first-of-type::first-letter {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 3.5rem;
    float: left;
    line-height: 0.85;
    margin-right: 8px;
    margin-top: 6px;
    color: var(--valley-earth);
    font-weight: 600;
}

/* ─── Pull Quote ─── */
.pull-quote {
    padding: 48px 0;
    margin: 32px 0;
    border-top: 1px solid rgba(47, 74, 59, 0.15);
    border-bottom: 1px solid rgba(47, 74, 59, 0.15);
    text-align: center;
}

.pull-quote p {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem) !important;
    color: var(--ti-leaf) !important;
    font-style: italic;
    max-width: 580px;
    margin: 0 auto !important;
    line-height: 1.5 !important;
}

/* ─── Footer ─── */
.site-footer {
    padding: 48px 24px;
    text-align: center;
    border-top: 1px solid rgba(92, 70, 50, 0.12);
    background: var(--coconut-cream);
}

.site-footer .footer-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--valley-earth);
    margin-bottom: 8px;
}

.site-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.site-footer .footer-links a {
    font-size: 0.85rem;
    color: var(--valley-light);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.25s ease;
}

.site-footer .footer-links a:hover {
    color: var(--valley-earth);
}

.site-footer .footer-copy {
    font-size: 0.82rem;
    color: var(--valley-light);
    opacity: 0.6;
    letter-spacing: 1px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .site-nav {
        padding: 14px 20px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(243, 237, 226, 0.98);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid rgba(92, 70, 50, 0.1);
        box-shadow: 0 8px 24px var(--shadow-soft);
    }

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

    .nav-cta {
        text-align: center;
    }

    .page-hero {
        padding: 80px 20px 60px;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .content-section {
        padding: 60px 20px;
    }

    .site-footer .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    body { font-size: 16px; }

    .page-hero h1 {
        font-size: 2rem;
    }

    .recipe-card-image {
        height: 180px;
    }
}
