/* ============================================
   Yaeli's Recipes — Mobile First
   Big fonts, high contrast, kitchen-friendly
   ============================================ */

:root {
    /* Cream background, dark ink */
    --bg: #fdfaf3;
    --bg-card: #ffffff;
    --bg-soft: #f7f1e5;
    --ink: #2c1f17;
    --ink-soft: #5a463a;
    --ink-mute: #8b7b6d;
    --rule: #e8dcc8;
    --accent: #d62828;        /* warm tomato */
    --accent-dark: #a31d1d;
    --accent-soft: #fff4f0;
    --gold: #c5942a;
    --shadow-sm: 0 1px 2px rgba(44, 31, 23, 0.06);
    --shadow-md: 0 4px 12px rgba(44, 31, 23, 0.08);
    --shadow-lg: 0 12px 32px rgba(44, 31, 23, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

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

html {
    font-size: 17px;  /* Slightly larger base for kitchen reading */
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga', 'kern';
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   Header
   ============================================ */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--rule);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-brand-icon {
    font-size: 36px;
    line-height: 1;
}

.site-brand-title {
    font-family: 'Rubik', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.site-brand-subtitle {
    font-size: 13px;
    color: var(--ink-mute);
    margin: 0;
    line-height: 1.2;
}

.site-nav {
    display: flex;
    gap: 18px;
}

.site-nav a {
    color: var(--ink-soft);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.site-nav a:hover {
    background: var(--bg-soft);
    color: var(--accent);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    background: linear-gradient(135deg, #fff4f0 0%, #f7f1e5 100%);
    padding: 50px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--rule);
}

.hero-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin: 0 auto 24px;
    display: block;
}

.hero-title {
    font-family: 'Rubik', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 12px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ============================================
   Section
   ============================================ */
.section {
    padding: 50px 0;
}

.section-title {
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-emoji {
    font-size: 32px;
}

.section-recent {
    background: var(--bg-soft);
}

/* ============================================
   Categories grid
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-card);
    border: 2px solid var(--rule);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: var(--cat-color, var(--accent));
    box-shadow: var(--shadow-md);
}

.category-icon {
    font-size: 48px;
    line-height: 1;
}

.category-name {
    font-family: 'Rubik', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.category-count {
    font-size: 13px;
    color: var(--ink-mute);
}

/* ============================================
   Recipes grid
   ============================================ */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.recipe-card {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.2s;
    display: block;
}

.recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.recipe-card-image {
    aspect-ratio: 4/3;
    background: var(--bg-soft);
    overflow: hidden;
    position: relative;
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recipe-card:hover .recipe-card-image img {
    transform: scale(1.05);
}

.recipe-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: var(--bg-soft);
}

.recipe-card-body {
    padding: 18px 18px 16px;
}

.recipe-card-title {
    font-family: 'Rubik', sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--ink);
    line-height: 1.3;
}

.recipe-card-subtitle {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0 0 10px;
    line-height: 1.4;
}

.recipe-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--rule);
    font-size: 13px;
    color: var(--ink-mute);
}

.recipe-time {
    font-weight: 600;
    color: var(--accent);
}

.recipe-cats {
    display: flex;
    gap: 4px;
}

.recipe-cat {
    background: var(--bg-soft);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--ink-soft);
}

/* ============================================
   Category header
   ============================================ */
.category-header {
    background: var(--bg-soft);
    padding: 40px 0;
    border-bottom: 1px solid var(--rule);
}

.back-link {
    display: inline-block;
    color: var(--ink-soft);
    font-size: 15px;
    margin-bottom: 16px;
    padding: 4px 0;
}

.back-link:hover {
    color: var(--accent);
}

.category-header-title {
    font-family: 'Rubik', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.category-header-icon {
    font-size: 48px;
}

.category-header-subtitle {
    font-size: 16px;
    color: var(--ink-soft);
    margin: 0;
}

/* ============================================
   Recipe page — hero
   ============================================ */
.recipe-page {
    background: var(--bg);
}

.recipe-hero {
    background: linear-gradient(135deg, #fff4f0 0%, #f7f1e5 100%);
    padding: 30px 0 40px;
    border-bottom: 1px solid var(--rule);
}

.recipe-hero-image {
    max-width: 800px;
    margin: 0 auto 30px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16/9;
    background: var(--bg-card);
}

.recipe-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-hero-body {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.recipe-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.recipe-cat-tag {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
}

.recipe-title {
    font-family: 'Rubik', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 8px;
    line-height: 1.2;
}

.recipe-subtitle {
    font-size: 18px;
    color: var(--ink-soft);
    margin: 0 0 24px;
}

.recipe-times {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 24px 0 16px;
}

.recipe-time-block {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

.recipe-time-total {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.recipe-time-total .recipe-time-label,
.recipe-time-total .recipe-time-value {
    color: #fff;
}

.recipe-time-icon {
    font-size: 22px;
}

.recipe-time-label {
    display: block;
    font-size: 12px;
    color: var(--ink-mute);
    margin-bottom: 2px;
}

.recipe-time-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.recipe-servings {
    font-size: 15px;
    color: var(--ink-soft);
    margin: 16px 0 0;
}

/* ============================================
   Recipe grid (2 columns)
   ============================================ */
.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    padding: 40px 0;
}

.recipe-section-title {
    font-family: 'Rubik', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

/* Ingredients */
.recipe-ingredients {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.ingredients-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ingredient-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 16px;
    line-height: 1.5;
}

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

.ingredient-amount {
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    min-width: 80px;
}

.ingredient-name {
    color: var(--ink);
}

/* Steps */
.recipe-steps {
    /* No card on steps — keep clean */
}

.steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
}

.step-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--rule);
}

.step-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    font-family: 'Rubik', sans-serif;
}

.step-text {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    margin: 0;
    padding-top: 6px;
    flex: 1;
}

/* Notes */
.recipe-notes {
    background: #fffbf0;
    border: 1px solid var(--gold);
    border-right: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.recipe-notes-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    white-space: pre-line;
}

/* Source */
.recipe-source {
    text-align: center;
    padding: 20px 0 40px;
}

.source-link {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--accent);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.source-link:hover {
    background: var(--accent);
    color: #fff;
}

/* ============================================
   Empty state
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-soft);
}

.empty-state a {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--ink);
    color: var(--bg);
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
}

.footer-made {
    font-family: 'Rubik', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.footer-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ============================================
   Related section
   ============================================ */
.section-related {
    background: var(--bg-soft);
}

/* ============================================
   Mobile responsive
   ============================================ */
@media (max-width: 900px) {
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .recipe-ingredients {
        position: static;
    }
}

@media (max-width: 600px) {
    html { font-size: 16px; }
    .container { padding: 0 16px; }

    .site-header { padding: 12px 0; }
    .site-brand-title { font-size: 18px; }
    .site-brand-subtitle { font-size: 12px; }
    .site-nav { gap: 8px; }
    .site-nav a { font-size: 14px; padding: 6px 10px; }

    .hero { padding: 36px 0 28px; }
    .hero-title { font-size: 28px; }
    .hero-subtitle { font-size: 16px; }

    .section { padding: 36px 0; }
    .section-title { font-size: 24px; }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card { padding: 18px 10px; }
    .category-icon { font-size: 38px; }
    .category-name { font-size: 16px; }

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

    .category-header-title { font-size: 28px; }
    .category-header-icon { font-size: 38px; }

    .recipe-title { font-size: 28px; }
    .recipe-subtitle { font-size: 16px; }

    .recipe-time-block {
        min-width: 140px;
        padding: 10px 14px;
    }

    .recipe-ingredients { padding: 18px; }
    .ingredient-amount { min-width: 70px; }

    .step-number { width: 36px; height: 36px; font-size: 16px; }
    .step-text { font-size: 16px; }

    .recipe-section-title { font-size: 20px; }
}
