/* Ressup Open — Community recipe site (extends reciperecorder.org styles) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
    --bg: #faf8f5; --bg-alt: #ffffff; --bg-warm: #f4f0ea;
    --border: #e6e1d8; --text: #1c1917; --text-muted: #6b6459; --text-light: #a89f94;
    --accent: #5a7a3a; --accent-light: #f1f5ec; --accent-hover: #496130;
    --green: #3d7a56; --green-light: #eef6f1;
    --font: 'Lora', Georgia, serif; --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.65; }

h1 { font-family: var(--font); font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 400; }
h2 { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-light); margin-bottom: 2rem; }
h3 { font-family: var(--font); font-size: 1.5rem; font-weight: 400; }
p { color: var(--text-muted); }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }

.container { max-width: 860px; margin: 0 auto; padding: 0 2rem; }

header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250, 248, 245, 0.93); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner { max-width: 860px; margin: 0 auto; padding: 0 2rem; height: 58px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: baseline; }
.logo-name { font-family: var(--font); font-size: 1.05rem; color: var(--text); }
.header-link { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); transition: color 0.2s; }
.header-link:hover { color: var(--text); opacity: 1; }

.hero { padding: 9rem 2rem 8rem; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%); }
.hero-inner { max-width: 860px; margin: 0 auto; }
.hero-eyebrow { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 2rem; }
.hero h1 { margin-bottom: 1.75rem; max-width: 680px; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 580px; }

section { padding: 6rem 2rem; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
.section-inner { max-width: 860px; margin: 0 auto; }
.lead { font-size: 1.05rem; color: var(--text-muted); }
.form-note { margin-top: 0.85rem; font-size: 0.72rem; color: var(--text-light); }
.upload-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.upload-form input[type="file"] { margin-bottom: 1rem; }
.alert { padding: 1rem 1.25rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-success { background: var(--green-light); border: 1px solid rgba(61,122,86,0.2); color: var(--green); }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

/* ── recipe-card, recipe-grid, btn (extend reciperecorder.org) ── */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.recipe-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.recipe-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.recipe-card > a:first-of-type { text-decoration: none; color: inherit; }
.recipe-card__img {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.recipe-card__img--placeholder { background: var(--bg-warm); font-size: 3rem; }
.recipe-card h3 { padding: 1rem 1.25rem 0.25rem; font-size: 1.2rem; }
.recipe-card__by { padding: 0 1.25rem; font-size: 0.8rem; color: var(--text-muted); }
.recipe-card__desc { padding: 1rem 1.25rem; font-size: 0.9rem; flex-grow: 1; }
.recipe-card__meta { padding: 0 1.25rem; font-size: 0.75rem; color: var(--text-light); }
.recipe-card__stats { padding: 1rem 1.25rem; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.recipe-card .btn { margin: 0 1.25rem 1.25rem; text-align: center; }

.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.7rem 1.4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    border: none;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; opacity: 1; }
.btn--small { padding: 0.45rem 0.9rem; font-size: 0.78rem; }
.btn--danger { background: #b91c1c; color: #fff; }
.btn--danger:hover { background: #991b1b; color: #fff; opacity: 1; }

.search-form { display: flex; gap: 0.75rem; margin: 1.5rem 0; flex-wrap: wrap; }
.search-form input[type="search"] { flex: 1; min-width: 200px; padding: 0.7rem 1rem; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; }
.search-form button { padding: 0.7rem 1.25rem; background: var(--accent); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; }

.category-nav ul { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; }
.category-nav a { padding: 0.35em 0.75em; border-radius: 4px; font-size: 0.8rem; }
.category-nav a.active { background: var(--accent-light); color: var(--accent); }

.pagination { display: flex; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a { padding: 0.5em 0.9em; border-radius: 4px; font-size: 0.85rem; }
.pagination a.active { background: var(--accent); color: #fff; }

.manage-list ul { list-style: none; }
.recipe-manage-item { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--border); gap: 1rem; }
.collection-recipe-list { list-style: none; }
.collection-recipe-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--border); gap: 1rem; }

footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 2.5rem 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

@media (max-width: 640px) {
    .hero { padding: 7.5rem 1.5rem 5rem; }
    section { padding: 4.5rem 1.5rem; }
    .recipe-grid { grid-template-columns: 1fr; }
}
