/* ==========================================================================
   Sanal Fırın — custom styles
   Tailwind (CDN) handles layout utilities; this file holds the design tokens,
   components, animations and the print stylesheet.
   ========================================================================== */

:root {
    --alabaster: #FAF9F6;
    --charcoal: #1A1A1A;
    --terracotta: #C85A32;
    --terracotta-dark: #A84824;
    --terracotta-soft: #F6E6DE;
    --sage: #5F7A61;
    --sage-dark: #4A614C;
    --sage-soft: #E6ECE6;
    --line: #E7E3DB;
    --muted: rgba(26, 26, 26, .58);
    --ease: cubic-bezier(.22, .61, .36, 1);
    --shadow-sm: 0 1px 2px rgba(26, 26, 26, .04), 0 4px 14px rgba(26, 26, 26, .04);
    --shadow-lg: 0 2px 6px rgba(26, 26, 26, .05), 0 22px 48px -12px rgba(26, 26, 26, .18);
}

html { scroll-behavior: smooth; }

body {
    background: var(--alabaster);
    color: var(--charcoal);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, .font-display { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; }

::selection { background: var(--terracotta); color: #fff; }

:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 4px; }

body.is-locked { overflow: hidden; }

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--charcoal); color: #fff; padding: .6rem 1rem; border-radius: .5rem;
    font-size: .875rem; transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(250, 249, 246, .86);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav-link {
    position: relative; color: inherit;
    background: linear-gradient(var(--terracotta), var(--terracotta)) left bottom / 0 1px no-repeat;
    transition: color .25s var(--ease), background-size .35s var(--ease);
    padding-bottom: 2px;
}
.nav-link:hover { color: var(--terracotta); background-size: 100% 1px; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; border-radius: 999px;
    transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: rgba(26, 26, 26, .06); }

/* Slide-out mobile drawer */
.drawer-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(26, 26, 26, .42);
    opacity: 0; transition: opacity .35s var(--ease);
}
.drawer-overlay.is-open { opacity: 1; }

.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
    width: min(22rem, 86vw);
    background: var(--alabaster);
    box-shadow: -24px 0 60px -20px rgba(26, 26, 26, .3);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .45s var(--ease), visibility 0s linear .45s;
    overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); visibility: visible; transition: transform .45s var(--ease), visibility 0s; }

.drawer-link {
    display: block; padding: .85rem 0;
    font-family: 'Playfair Display', Georgia, serif; font-size: 1.35rem;
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateX(18px);
    transition: opacity .4s var(--ease), transform .4s var(--ease), color .2s;
}
.drawer.is-open .drawer-link { opacity: 1; transform: none; }
.drawer.is-open .drawer-link:nth-child(1) { transition-delay: .08s; }
.drawer.is-open .drawer-link:nth-child(2) { transition-delay: .12s; }
.drawer.is-open .drawer-link:nth-child(4) { transition-delay: .16s; }
.drawer.is-open .drawer-link:nth-child(5) { transition-delay: .20s; }
.drawer.is-open .drawer-link:nth-child(6) { transition-delay: .24s; }
.drawer.is-open .drawer-link:nth-child(7) { transition-delay: .28s; }
.drawer.is-open .drawer-link:nth-child(8) { transition-delay: .32s; }
.drawer-link:hover { color: var(--terracotta); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary, .btn-outline, .btn-danger {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .85rem 1.6rem; border-radius: 999px;
    font-size: .875rem; font-weight: 600; letter-spacing: .01em;
    transition: background-color .25s var(--ease), color .25s var(--ease),
                border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: 0 8px 20px -8px rgba(200, 90, 50, .6); }
.btn-primary:hover { background: var(--terracotta-dark); transform: translateY(-2px); }
.btn-primary svg { transition: transform .25s var(--ease); }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-outline { border: 1px solid rgba(26, 26, 26, .2); color: var(--charcoal); background: transparent; }
.btn-outline:hover { border-color: var(--charcoal); background: var(--charcoal); color: #fff; }

.btn-danger { background: #B3261E; color: #fff; }
.btn-danger:hover { background: #8C1D18; }

.btn-ghost {
    display: inline-flex; align-items: center; padding: .45rem .8rem; border-radius: .6rem;
    font-size: .8125rem; font-weight: 600; color: var(--charcoal);
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.btn-ghost:hover { background: rgba(26, 26, 26, .06); }
.btn-ghost.is-danger { color: #B3261E; }
.btn-ghost.is-danger:hover { background: #FBEAE8; }

/* --------------------------------------------------------------------------
   Scroll reveal (only hides content when JavaScript is running)
   -------------------------------------------------------------------------- */
.js .reveal {
    opacity: 0; transform: translateY(26px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { box-shadow: var(--shadow-sm); min-height: 34rem; }
.hero-media { position: relative; overflow: hidden; min-height: 20rem; background: var(--sage-soft); }
.hero-media img { transition: transform 1.4s var(--ease); }
.hero-media:hover img { transform: scale(1.04); }
.hero-badge {
    position: absolute; left: 1.25rem; bottom: 1.25rem;
    background: rgba(250, 249, 246, .94); color: var(--charcoal);
    padding: .45rem .95rem; border-radius: 999px;
    font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}

.stat-label {
    font-size: .6875rem; font-weight: 600; letter-spacing: .18em;
    text-transform: uppercase; color: var(--muted);
}

/* --------------------------------------------------------------------------
   Search + filter pills
   -------------------------------------------------------------------------- */
.search-box {
    display: flex; align-items: center; gap: .75rem;
    width: 100%; max-width: 26rem;
    padding: .8rem 1.2rem; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); color: var(--muted);
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-box:focus-within { border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(200, 90, 50, .12); }
.search-box input {
    flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
    font-size: .9375rem; color: var(--charcoal);
}
.search-box input::placeholder { color: rgba(26, 26, 26, .4); }

.pill {
    padding: .6rem 1.2rem; border-radius: 999px;
    border: 1px solid var(--line); background: #fff;
    font-size: .8125rem; font-weight: 600; color: rgba(26, 26, 26, .72);
    transition: background-color .3s var(--ease), color .3s var(--ease),
                border-color .3s var(--ease), transform .2s var(--ease), box-shadow .3s var(--ease);
}
.pill:hover { border-color: var(--sage); color: var(--sage-dark); transform: translateY(-1px); }
.pill:active { transform: scale(.96); }
.pill.is-active {
    background: var(--sage); border-color: var(--sage); color: #fff;
    box-shadow: 0 8px 18px -8px rgba(95, 122, 97, .7);
}

/* --------------------------------------------------------------------------
   Recipe cards
   -------------------------------------------------------------------------- */
.recipe-card { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.js .recipe-card.reveal.reveal-done { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.js .recipe-card.reveal.is-filtered-out,
.recipe-card.is-filtered-out { opacity: 0; transform: scale(.96) translateY(10px); pointer-events: none; }
.recipe-card[hidden] { display: none; }

.card-media {
    position: relative; overflow: hidden;
    aspect-ratio: 4 / 5; border-radius: 1.4rem;
    background: var(--sage-soft);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .5s var(--ease), transform .5s var(--ease);
}
.card-media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .9s var(--ease);
}
.recipe-card a:hover .card-media,
.recipe-card a:focus-visible .card-media { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.recipe-card a:hover .card-media img,
.recipe-card a:focus-visible .card-media img { transform: scale(1.04); }

.card-badge {
    position: absolute; left: 1rem; top: 1rem;
    background: rgba(250, 249, 246, .94); color: var(--charcoal);
    padding: .4rem .85rem; border-radius: 999px;
    font-size: .625rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.card-title { transition: color .25s var(--ease); }
.recipe-card a:hover .card-title { color: var(--terracotta); }

.difficulty { display: inline-flex; align-items: center; gap: .4rem; }
.difficulty::before { content: ''; width: .45rem; height: .45rem; border-radius: 999px; background: var(--sage); }
.difficulty-orta::before { background: #D9A441; }
.difficulty-zor::before { background: var(--terracotta); }

.empty-state { padding: 5rem 1rem; text-align: center; animation: fade-up .5s var(--ease) both; }
.empty-state[hidden] { display: none; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Recipe page
   -------------------------------------------------------------------------- */
.recipe-hero img {
    width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
    border-radius: 2rem; background: var(--sage-soft);
    box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) { .recipe-hero img { aspect-ratio: 4 / 3; border-radius: 1.4rem; } }

.stats-bar {
    display: grid; grid-template-columns: repeat(2, 1fr);
    margin: -2.5rem auto 0; max-width: 48rem; position: relative;
    background: #fff; border-radius: 1.4rem; box-shadow: var(--shadow-lg);
}
.stats-bar > div { padding: 1.3rem 1rem; text-align: center; border-color: var(--line); }
.stats-bar > div:nth-child(odd) { border-right: 1px solid var(--line); }
.stats-bar > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stats-bar dd { margin-top: .35rem; font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; font-weight: 500; }
@media (min-width: 640px) {
    .stats-bar { grid-template-columns: repeat(4, 1fr); }
    .stats-bar > div { border-bottom: 0 !important; border-right: 1px solid var(--line); padding: 1.6rem 1rem; }
    .stats-bar > div:last-child { border-right: 0; }
}

.recipe-layout { display: grid; gap: 3.5rem; }
@media (min-width: 1024px) {
    .recipe-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 5rem; align-items: start; }
    .recipe-ingredients { position: sticky; top: 6.5rem; }
}

.ingredients-panel {
    background: #fff; border: 1px solid var(--line);
    border-radius: 1.6rem; padding: 2rem;
}

/* Servings scaler */
.scaler {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem;
    padding: .25rem; border-radius: 999px; background: var(--alabaster); border: 1px solid var(--line);
}
.scaler button {
    padding: .55rem 0; border-radius: 999px;
    font-size: .8125rem; font-weight: 700; color: rgba(26, 26, 26, .6);
    transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.scaler button:hover { color: var(--charcoal); }
.scaler button.is-active { background: var(--charcoal); color: #fff; box-shadow: 0 6px 14px -6px rgba(26, 26, 26, .6); }

/* Ingredient checklist */
.ingredient-row { border-bottom: 1px solid var(--line); }
.ingredient-row:last-child { border-bottom: 0; }
.ingredient-row label {
    display: flex; align-items: flex-start; gap: .9rem;
    padding: .85rem 0; cursor: pointer; line-height: 1.5; font-size: .9375rem;
}
.ingredient-check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 1.3rem; height: 1.3rem; margin-top: .1rem;
    border: 1.5px solid rgba(26, 26, 26, .28); border-radius: .4rem; color: #fff;
    transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.check-box svg { transform: scale(0); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.ingredient-row label:hover .check-box { border-color: var(--sage); }
.ingredient-check:focus-visible + .check-box { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.ingredient-check:checked + .check-box { background: var(--sage); border-color: var(--sage); }
.ingredient-check:checked + .check-box svg { transform: scale(1); }

/* Animated strikethrough: a 1.5px line drawn left-to-right through the text */
.ingredient-text { transition: opacity .45s var(--ease); }
.ingredient-ink {
    background: linear-gradient(currentColor, currentColor) left 55% / 0 1.5px no-repeat;
    transition: background-size .45s var(--ease);
    -webkit-box-decoration-break: clone; box-decoration-break: clone;   /* strike every wrapped line */
}
.ingredient-text .qty { font-weight: 700; display: inline-block; transition: color .3s var(--ease), transform .3s var(--ease); }
.ingredient-text .qty.is-changing { color: var(--terracotta); transform: translateY(-2px); }
.ingredient-text .unit { font-weight: 600; }
.ingredient-row.is-checked .ingredient-text { opacity: .42; }
.ingredient-row.is-checked .ingredient-ink { background-size: 100% 1.5px; }

/* Clickable steps */
#step-list > li + li { margin-top: .5rem; }
.step {
    display: flex; gap: 1.25rem; width: 100%; text-align: left;
    padding: 1.25rem; border-radius: 1.2rem; border: 1px solid transparent;
    transition: background-color .3s var(--ease), border-color .3s var(--ease), opacity .4s var(--ease);
}
.step:hover { background: #fff; border-color: var(--line); }
.step-num {
    flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 2.4rem; height: 2.4rem; border-radius: 999px;
    border: 1.5px solid var(--terracotta); color: var(--terracotta);
    font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; font-weight: 600;
    transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.step-num svg { position: absolute; transform: scale(0); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.step-num-text { transition: opacity .2s var(--ease), transform .2s var(--ease); }
.step-body { display: block; padding-top: .1rem; }
.step-label {
    display: block; font-size: .6875rem; font-weight: 700; letter-spacing: .18em;
    text-transform: uppercase; color: var(--muted); margin-bottom: .35rem;
}
.step-text { display: block; font-size: 1.0625rem; line-height: 1.75; transition: color .35s var(--ease); }
.step.is-done .step-num { background: var(--sage); border-color: var(--sage); color: #fff; }
.step.is-done .step-num svg { transform: scale(1); }
.step.is-done .step-num-text { opacity: 0; transform: scale(.5); }
.step.is-done .step-text { color: rgba(26, 26, 26, .4); }

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 1.25rem; box-shadow: var(--shadow-sm); }

.field-label { display: block; margin-bottom: .4rem; font-size: .8125rem; font-weight: 600; }
.field {
    display: block; width: 100%;
    padding: .7rem .9rem; border-radius: .7rem;
    border: 1px solid #D9D4CA; background: #fff;
    font-size: .9375rem; color: var(--charcoal);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field:focus { outline: 0; border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(200, 90, 50, .12); }
textarea.field { resize: vertical; line-height: 1.55; }
.file-field { display: block; width: 100%; font-size: .8125rem; }
.file-field::file-selector-button {
    margin-right: .8rem; padding: .55rem 1rem; border-radius: 999px; border: 1px solid rgba(26, 26, 26, .2);
    background: #fff; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s;
}
.file-field::file-selector-button:hover { background: var(--charcoal); color: #fff; }

.alert { margin-bottom: 1.5rem; padding: .9rem 1.2rem; border-radius: .9rem; font-size: .875rem; animation: fade-up .4s var(--ease) both; }
.alert-success { background: var(--sage-soft); color: #2F4431; border: 1px solid #C9D6CA; }
.alert-error { background: #FBEAE8; color: #8C1D18; border: 1px solid #F1C7C3; }
.alert-warn { background: #FBF3DF; color: #6B4E0B; border: 1px solid #EEDDAE; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 40rem; }
.admin-table th {
    padding: 1rem 1.25rem; text-align: left;
    font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
    border-bottom: 1px solid var(--line);
}
.admin-table th.text-right { text-align: right; }
.admin-table td { padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background-color .2s var(--ease); }
.admin-table tbody tr:hover { background: #FCFBF9; }

.tag { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: var(--sage-soft); color: var(--sage-dark); font-size: .75rem; font-weight: 600; white-space: nowrap; }

.code { padding: .1rem .35rem; border-radius: .35rem; background: #F1EEE8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8em; }
.code-block { margin-top: .6rem; padding: .9rem 1rem; border-radius: .7rem; background: var(--charcoal); color: #F4F1EA; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; white-space: pre-wrap; word-break: break-all; }

/* Dynamic form rows */
.form-row, .form-row-head { display: grid; gap: .6rem; align-items: start; }
.form-row { margin-bottom: .6rem; animation: fade-up .3s var(--ease) both; }
.ingredient-form-row { grid-template-columns: 5.5rem 6rem minmax(0, 1fr) auto; }
.step-form-row { grid-template-columns: 2.2rem minmax(0, 1fr) auto; }
.form-row-head { margin-bottom: .5rem; font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.form-row-head span:last-child { width: 6.4rem; }
.row-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.2rem; height: 2.2rem; margin-top: .25rem; border-radius: 999px;
    background: var(--terracotta-soft); color: var(--terracotta-dark);
    font-family: 'Playfair Display', Georgia, serif; font-weight: 600;
}
.row-actions { display: flex; gap: .25rem; padding-top: .3rem; }
.row-actions button {
    width: 2rem; height: 2rem; border-radius: .5rem; border: 1px solid var(--line);
    font-size: .8125rem; color: rgba(26, 26, 26, .65); background: #fff;
    transition: background-color .2s, color .2s, border-color .2s;
}
.row-actions button:hover { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.row-actions button.is-danger:hover { background: #B3261E; border-color: #B3261E; }
@media (max-width: 640px) {
    .form-row-head { display: none; }
    .ingredient-form-row { grid-template-columns: 1fr 1fr; padding-bottom: .6rem; border-bottom: 1px dashed var(--line); }
    .ingredient-form-row input[name="ing_item[]"] { grid-column: 1 / -1; }
    .ingredient-form-row .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .step-form-row { grid-template-columns: 2.2rem minmax(0, 1fr); }
    .step-form-row .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Image preview */
.image-preview {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3; overflow: hidden; border-radius: 1rem;
    background: var(--alabaster); border: 1px dashed #D9D4CA; color: var(--muted); font-size: .8125rem;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; animation: fade-up .4s var(--ease) both; }
.image-preview img[hidden], .image-preview p[hidden] { display: none; }

/* Toggle switch */
.toggle { display: flex; align-items: flex-start; gap: .9rem; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track {
    flex: none; position: relative; width: 2.75rem; height: 1.6rem; border-radius: 999px;
    background: #D9D4CA; transition: background-color .3s var(--ease);
}
.toggle-thumb {
    position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 999px;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease);
}
.toggle input:checked + .toggle-track { background: var(--terracotta); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(1.15rem); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--terracotta); outline-offset: 3px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(26, 26, 26, .5); opacity: 0; transition: opacity .3s var(--ease); }
.modal-panel {
    position: relative; width: 100%; max-width: 28rem; padding: 2rem;
    background: #fff; border-radius: 1.5rem; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(16px) scale(.97);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-panel { opacity: 1; transform: none; }

/* ==========================================================================
   2026 refresh — animated atmosphere, oven-glow hero, moving nodes
   (later rules in this block intentionally override the base rules above)
   ========================================================================== */
:root { --ember: #E9A23B; --crust: #241812; --cream: #F6EFE6; }

main, footer { position: relative; z-index: 1; }

/* ---- Animated background: drifting warm light + flour dust canvas ---- */
.atmosphere { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; will-change: transform; }
.blob-a { width: max(46vw, 340px); height: max(46vw, 340px); left: -12vw; top: -12vw; background: #F3C98B; animation: drift-a 26s ease-in-out infinite alternate; }
.blob-b { width: max(38vw, 300px); height: max(38vw, 300px); right: -12vw; top: 34vh; background: #EFB7A0; animation: drift-b 32s ease-in-out infinite alternate; }
.blob-c { width: max(34vw, 280px); height: max(34vw, 280px); left: 28vw; bottom: -18vw; background: #C4D3C2; animation: drift-c 38s ease-in-out infinite alternate; }
.is-admin .blob { opacity: .2; }
@keyframes drift-a { to { transform: translate3d(16vw, 12vh, 0) scale(1.18); } }
@keyframes drift-b { to { transform: translate3d(-14vw, -16vh, 0) scale(.86); } }
@keyframes drift-c { to { transform: translate3d(-18vw, -10vh, 0) scale(1.22); } }

.flour-field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.scroll-progress span {
    display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
    background: linear-gradient(90deg, var(--terracotta), var(--ember));
}

/* ---- Floating glass navigation ---- */
.site-header {
    padding: .75rem .75rem 0; background: transparent; border-bottom: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
.nav-shell {
    border-radius: 999px; background: rgba(250, 249, 246, .7);
    -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px);
    border: 1px solid rgba(26, 26, 26, .07);
    transition: box-shadow .35s var(--ease), background-color .35s var(--ease);
}
.site-header.is-scrolled .nav-shell { background: rgba(250, 249, 246, .92); box-shadow: 0 14px 34px -16px rgba(36, 24, 18, .4); }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 2.1rem; height: 2.1rem; border-radius: 999px; background: var(--crust); color: var(--ember);
    transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover .brand-mark { transform: rotate(-16deg) scale(1.1); }

/* ---- Buttons: light sweeps across on hover ---- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
    transform: translateX(-130%); transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(130%); }

/* ---- Hero: a lit oven ---- */
.hero {
    position: relative; isolation: isolate; min-height: 36rem;
    border-radius: 2.2rem; background: var(--crust); color: var(--cream);
    box-shadow: 0 34px 70px -34px rgba(36, 24, 18, .6);
}
.hero-glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; }
.hero-glow::before {
    content: ''; position: absolute; inset: -30%;
    background:
        radial-gradient(38% 38% at 22% 30%, rgba(233, 162, 59, .58), transparent 70%),
        radial-gradient(34% 40% at 58% 86%, rgba(200, 90, 50, .62), transparent 70%),
        radial-gradient(28% 30% at 86% 12%, rgba(95, 122, 97, .45), transparent 70%);
    filter: blur(30px); animation: oven-glow 16s ease-in-out infinite alternate;
}
.hero-glow::after {
    content: ''; position: absolute; inset: 0; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 5px 5px;
}
@keyframes oven-glow {
    from { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1); }
    to   { transform: translate3d(5%, 4%, 0) rotate(14deg) scale(1.14); }
}
.hero-copy { position: relative; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: .6rem; align-self: flex-start;
    padding: .45rem 1rem; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
    font-size: .8125rem; font-weight: 600; color: var(--ember);
}
.pulse-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ember); animation: pulse-ember 2s infinite; }
@keyframes pulse-ember {
    0%   { box-shadow: 0 0 0 0 rgba(233, 162, 59, .7); }
    70%  { box-shadow: 0 0 0 .7rem rgba(233, 162, 59, 0); }
    100% { box-shadow: 0 0 0 0 rgba(233, 162, 59, 0); }
}
.hero-title { line-height: 1.08; text-wrap: balance; }
.hero-title .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .16em; margin-bottom: -.16em; }
.hero-title .word > span {
    display: inline-block; transform: translateY(118%);
    transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms + 120ms);
}
.hero-title.is-in .word > span { transform: none; }

.hero-stats { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-stats > div {
    padding: .7rem 1.05rem; border-radius: 1rem;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
    transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.hero-stats > div:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .13); }
.hero-stats dt { font-size: .75rem; color: rgba(246, 239, 230, .62); }
.hero-stats dd { margin-top: .15rem; font-size: .95rem; font-weight: 600; }
.hero .nav-link, .site-footer .nav-link { background-image: linear-gradient(var(--ember), var(--ember)); }
.hero .nav-link:hover, .site-footer .nav-link:hover { color: var(--ember); }

.hero-media { position: relative; min-height: 21rem; padding: .75rem; background: none; overflow: visible; }
.hero-media-inner { position: relative; display: block; height: 100%; min-height: 19.5rem; overflow: hidden; border-radius: 1.6rem; background: #3A2A21; }
.hero-media-inner img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    animation: breathe 14s ease-in-out infinite alternate;
}
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-badge { left: 1.1rem; top: 1.1rem; bottom: auto; background: rgba(36, 24, 18, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Turning seal on the seam between photo and text */
.hero-seal {
    position: absolute; z-index: 3; left: 1.6rem; bottom: -2.7rem;
    display: grid; place-items: center; width: 6.6rem; height: 6.6rem; border-radius: 50%;
    background: var(--ember); color: var(--crust); box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .55);
}
.hero-seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 24s linear infinite; }
.hero-seal-ring text { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; fill: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1024px) {
    .hero-seal { left: -3.6rem; bottom: 3.2rem; width: 7.2rem; height: 7.2rem; }
}

/* ---- Category ticker ---- */
.marquee {
    position: relative; z-index: 1; margin-top: 2.5rem; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 2rem; padding-right: 2rem; width: max-content; animation: marquee 60s linear infinite; }
.marquee-item { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: clamp(1.5rem, 3vw, 2.4rem); color: rgba(26, 26, 26, .26); white-space: nowrap; }
.marquee-sep { color: var(--terracotta); font-size: .9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- Filter pills: one indicator glides between them ---- */
#filter-pills { position: relative; isolation: isolate; }
.pill { position: relative; z-index: 1; background: rgba(255, 255, 255, .72); }
.js .pill.is-active { background: transparent; border-color: transparent; box-shadow: none; color: #fff; }
.pill-indicator {
    position: absolute; left: 0; top: 0; z-index: 0; width: 0; height: 0; border-radius: 999px; opacity: 0;
    background: var(--sage); box-shadow: 0 10px 22px -10px rgba(95, 122, 97, .95);
}
.pill-indicator.is-ready { opacity: 1; transition: transform .5s var(--ease), width .5s var(--ease), height .5s var(--ease); }
.search-box { background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* ---- Cards: light follows the pointer, the photo tilts toward it ---- */
.card-media {
    border-radius: 1.6rem;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: box-shadow .5s var(--ease), transform .35s var(--ease);
}
.card-media::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
    background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 232, 196, .42), transparent 62%);
}
.recipe-card a:hover .card-media,
.recipe-card a:focus-visible .card-media {
    transform: perspective(900px) translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    box-shadow: 0 32px 54px -24px rgba(36, 24, 18, .5);
}
.recipe-card a:hover .card-media::after { opacity: 1; }
.card-badge { background: rgba(36, 24, 18, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.card-go {
    position: absolute; right: 1rem; bottom: 1rem; z-index: 2;
    display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%;
    background: var(--ember); color: var(--crust);
    transform: scale(0) rotate(-60deg); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.recipe-card a:hover .card-go, .recipe-card a:focus-visible .card-go { transform: none; }

/* ---- Recipe page ---- */
.recipe-hero { position: relative; }
.recipe-hero::before {
    content: ''; position: absolute; inset: 10% 8% -3%; z-index: -1; border-radius: 50%;
    background: linear-gradient(90deg, rgba(233, 162, 59, .6), rgba(200, 90, 50, .5), rgba(95, 122, 97, .45));
    filter: blur(60px); animation: oven-glow 14s ease-in-out infinite alternate;
}
.stats-bar { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.ingredients-panel { background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

.ingredient-progress { display: flex; align-items: center; gap: .9rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.progress-ring { flex: none; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 3; }
.ring-fill {
    fill: none; stroke: var(--sage); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 97.4; stroke-dashoffset: 97.4;
    transition: stroke-dashoffset .6s var(--ease), stroke .3s var(--ease);
}
.ingredient-progress.is-complete .ring-fill { stroke: var(--ember); }

/* Method timeline: nodes joined by a line that fills as steps are completed */
.timeline { position: relative; }
.timeline::before, .timeline::after {
    content: ''; position: absolute; left: calc(1.25rem + 1.2rem - 1px); top: 2.45rem; width: 2px; border-radius: 2px;
}
.timeline::before { bottom: 2.45rem; background: var(--line); }
.timeline::after { height: var(--fill, 0px); background: linear-gradient(var(--sage), var(--ember)); transition: height .7s var(--ease); }
.timeline .step { position: relative; z-index: 1; }
.timeline .step:hover { background: rgba(255, 255, 255, .75); }
.timeline .step-num { background: var(--alabaster); }
.timeline .step.is-done .step-num { background: var(--sage); }
.timeline .step.is-next .step-num { animation: node-pulse 2.2s infinite; }
@keyframes node-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(200, 90, 50, .5); }
    70%  { box-shadow: 0 0 0 .8rem rgba(200, 90, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 90, 50, 0); }
}

/* ---- Footer ---- */
.site-footer {
    overflow: hidden; margin-left: .75rem; margin-right: .75rem;
    border-radius: 2.2rem 2.2rem 0 0; background: var(--crust); color: var(--cream);
}
.footer-glow {
    position: absolute; inset: -40% -10% auto; height: 130%; pointer-events: none;
    background:
        radial-gradient(40% 50% at 14% 62%, rgba(233, 162, 59, .34), transparent 70%),
        radial-gradient(35% 45% at 86% 40%, rgba(200, 90, 50, .4), transparent 70%);
    filter: blur(40px); animation: oven-glow 20s ease-in-out infinite alternate;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
    .js .reveal { opacity: 1; transform: none; }
    /* Looping decoration stops entirely; nothing is hidden, it just holds still. */
    .blob, .hero-glow::before, .footer-glow, .recipe-hero::before, .marquee-track, .hero-seal-ring,
    .hero-media-inner img, .pulse-dot, .timeline .step.is-next .step-num { animation: none !important; }
    .flour-field { display: none; }
    .hero-title .word > span { transform: none; }
    .card-media { transform: none !important; }
}

/* --------------------------------------------------------------------------
   Print — clean, ink-friendly recipe sheet
   -------------------------------------------------------------------------- */
@media print {
    @page { margin: 1.6cm; }

    html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
    .no-print, .site-header, footer, .drawer, .drawer-overlay, .skip-link, .recipe-hero { display: none !important; }
    .atmosphere, .flour-field, .scroll-progress, .marquee { display: none !important; }
    .timeline::before, .timeline::after { display: none !important; }
    .timeline .step-num { animation: none !important; }

    .js .reveal, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    * { box-shadow: none !important; text-shadow: none !important; }

    main, .recipe-page > header, .recipe-layout, .recipe-page > div { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
    .recipe-page > header { padding-top: 0 !important; text-align: left !important; }
    .recipe-page h1 { font-size: 24pt !important; line-height: 1.15 !important; margin-top: 4pt !important; }
    .recipe-page > header p { margin-left: 0 !important; margin-top: 6pt !important; font-size: 10.5pt !important; color: #333 !important; max-width: none !important; }
    .recipe-page > header p:first-of-type { color: #000 !important; }

    .stats-bar {
        grid-template-columns: repeat(4, 1fr) !important; max-width: none; margin: 14pt 0 0;
        border: 1px solid #999; border-radius: 0; background: none;
    }
    .stats-bar > div { padding: 6pt 8pt; border-bottom: 0 !important; border-right: 1px solid #999 !important; }
    .stats-bar > div:last-child { border-right: 0 !important; }
    .stats-bar dd { font-size: 12pt; margin-top: 2pt; }
    .stat-label { color: #444 !important; font-size: 7pt; }

    .recipe-layout {
        display: grid !important; grid-template-columns: 34% 1fr !important;
        gap: 22pt !important; margin-top: 18pt !important; align-items: start;
    }
    .recipe-ingredients { position: static !important; }
    .ingredients-panel { border: 0; padding: 0; background: none; border-radius: 0; }
    .recipe-layout h2 { font-size: 14pt !important; border-bottom: 1.5px solid #000; padding-bottom: 3pt; }

    .ingredient-row { border-bottom: 1px dotted #999; break-inside: avoid; }
    .ingredient-row label { padding: 4pt 0; font-size: 10pt; gap: 7pt; }
    .check-box { width: 9pt; height: 9pt; margin-top: 2pt; border: 1px solid #000 !important; border-radius: 0; background: none !important; }
    .check-box svg { display: none; }
    .ingredient-row.is-checked .ingredient-text, .ingredient-text { opacity: 1 !important; }
    .ingredient-ink { background-size: 0 0 !important; }

    #step-list { margin-top: 8pt !important; }
    #step-list > li { break-inside: avoid; margin-top: 0 !important; }
    .step { padding: 5pt 0; gap: 9pt; border: 0; background: none !important; }
    .step-num { width: 16pt; height: 16pt; font-size: 9pt; border: 1px solid #000 !important; color: #000 !important; background: none !important; }
    .step-num svg { display: none; }
    .step-num-text { opacity: 1 !important; transform: none !important; }
    .step-label { display: none; }
    .step-text, .step.is-done .step-text { font-size: 10.5pt; line-height: 1.5; color: #000 !important; }

    a { color: #000 !important; text-decoration: none !important; }
}
