/* =====================================================
   Rate My Crème Brûlée — Recipe Page Stylesheet
   ===================================================== */

.recipe-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    flex: 1;
}

/* -- Hero -- */
.recipe-hero {
    text-align: center;
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.75rem;
}

.recipe-hero h2 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.recipe-subtitle {
    font-family: var(--font-head);
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.recipe-meta-pill {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.35rem 0.9rem;
    font-size: 0.88rem;
    color: var(--text);
    box-shadow: 0 1px 3px var(--shadow);
}

/* -- Progress Bar -- */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 4px var(--shadow);
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 99px;
    transition: width 0.35s ease;
}

.progress-text {
    white-space: nowrap;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.reset-btn {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.2rem 0.75rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.reset-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* -- Two-Column Layout -- */
.recipe-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* -- Ingredients Sidebar -- */
.ingredients-card {
    position: sticky;
    top: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 2px 12px var(--shadow);
}

.ingredients-card h3 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.ingredient-list {
    list-style: none;
}

.ingredient-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.93rem;
    line-height: 1.4;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0.5rem;
    align-items: baseline;
}

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

.qty {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.9rem;
}

.ingredient-note {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
    font-style: italic;
}

/* -- Nutrition -- */
.nutrition-heading {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--accent);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.3rem;
}

.nutrition-subhead {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: lowercase;
}

.nutrition-note {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.nutrition-list {
    list-style: none;
}

.nutrition-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.nutrition-list li:last-child {
    border-bottom: none;
}

.nutr-label {
    color: var(--text-muted);
    text-transform: lowercase;
}

.nutr-value {
    font-weight: 700;
    color: var(--accent);
}

/* -- Steps -- */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem 1.1rem 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
    position: relative;
    box-shadow: 0 1px 4px var(--shadow);
    user-select: none;
}

.step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-hover);
}

.step-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.step-card.done {
    opacity: 0.55;
    filter: grayscale(15%);
}

.step-card.done .step-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.step-card.done .step-number {
    background: #6a9e6a;
}

.step-number {
    flex-shrink: 0;
    width: 2.2rem;
    height: 2.2rem;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.25s ease;
}

.step-body {
    flex: 1;
}

.step-text {
    line-height: 1.65;
    font-size: 0.94rem;
    color: var(--text);
    transition: color 0.25s;
}

.step-check {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.step-card.done .step-check {
    opacity: 1;
}

/* -- Callout Labels -- */
.callout-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
}

/* Warning callout (Step 5) */
.step-card--warning {
    border-color: #e8a94d;
    background: #fffaf0;
}

.step-card--warning .callout-label {
    color: #8a5a00;
    background: #fef2d0;
}

/* Tip callout (Step 11) */
.step-card--tip {
    border-color: #9ec89e;
    background: #f5fbf5;
}

.step-card--tip .callout-label {
    color: #2f6b3b;
    background: #d6f0d6;
}

/* Hero callout (Step 14) */
.step-card--hero {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, #fffaf2, #fff3e0);
}

.step-card--hero .step-number {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
}

.step-card--hero .callout-label {
    color: #7a3e00;
    background: #fde8c0;
}

.game-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.8rem;
    background: var(--accent);
    color: #fff;
    border-radius: 99px;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    transition: background 0.2s;
}

.game-link:hover {
    background: #9e5e1a;
}

/* -- Source Citation -- */
.recipe-source {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.recipe-source a {
    color: var(--accent);
    text-decoration: underline;
}

/* -- Responsive -- */
@media (max-width: 700px) {
    .recipe-layout {
        grid-template-columns: 1fr;
    }

    .ingredients-card {
        position: static;
    }
}

@media (max-width: 480px) {
    .recipe-main {
        padding: 1.5rem 1rem 3rem;
    }

    .recipe-meta {
        gap: 0.4rem;
    }

    .recipe-meta-pill {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem;
    }

    .progress-wrap {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .progress-text {
        order: -1;
        width: 100%;
    }
}
