@font-face {
    font-family: "Inter";
    src: url("inter.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #1a1a1a;
    --muted: #6e6e6e;
    --line: #e8e8e6;
    --tile: #f3f3f1;
    --paper: #fff;
    --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

a:focus-visible, input:focus-visible, button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* Kopfzeile */
.site-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px var(--gutter) 0;
}

.site-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.search { flex: 0 1 260px; min-width: 0; }

.search input {
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1rem;
    appearance: none;
}

.search input::placeholder { color: var(--muted); opacity: 1; }
.search input:focus { outline: none; border-bottom-color: var(--ink); }

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 20px;
    font-size: 0.9375rem;
}

.categories a { color: var(--muted); text-decoration: none; }
.categories a:hover, .categories a[aria-current] { color: var(--ink); }

/* Raster */
main { padding-bottom: 96px; }

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px 24px;
    max-width: 1400px;
    margin: 36px auto 0;
    padding: 0 var(--gutter);
}

@media (min-width: 560px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 28px; }
}

.card { display: block; text-decoration: none; }

.card img, .card__blank {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--tile);
}

.card__title {
    display: block;
    margin-top: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.card:hover .card__title { text-decoration: underline; text-underline-offset: 3px; }

.page-title {
    max-width: 1400px;
    margin: 44px auto 0;
    padding: 0 var(--gutter);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.empty {
    max-width: 1400px;
    margin: 44px auto 0;
    padding: 0 var(--gutter);
    color: var(--muted);
}

.pager {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    max-width: 1400px;
    margin: 64px auto 0;
    padding: 0 var(--gutter);
}

.pager a[rel="next"] { margin-left: auto; }

/* Rezept */
.recipe__cover { max-width: 1400px; margin: 28px auto 0; }

.recipe__cover img {
    width: 100%;
    max-height: 82vh;
    max-height: 82svh;
    object-fit: cover;
    background: var(--tile);
}

@media (min-width: 1400px) {
    .recipe__cover { padding: 0 var(--gutter); }
}

.recipe__text {
    max-width: calc(680px + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.recipe__text h1 {
    margin: 44px 0 0;
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.08;
    overflow-wrap: break-word;
    hyphens: auto;
}

.recipe__draft {
    margin: 32px 0 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.recipe__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.recipe__meta a { text-decoration: none; }
.recipe__meta a:hover { color: var(--ink); }

.ingredients { margin-top: 36px; }
.ingredients h2 { margin: 0 0 10px; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.ingredients ul { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.ingredients li { padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }

.recipe__body { margin-top: 36px; overflow-wrap: break-word; }
.recipe__body h2 { margin: 2em 0 0.5em; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.recipe__body h3 { margin: 1.75em 0 0.4em; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.recipe__body p { margin: 0 0 1em; }
.recipe__body ul, .recipe__body ol { margin: 0 0 1.25em; padding-left: 1.25em; }
.recipe__body li { margin-bottom: 0.3em; padding-left: 0.2em; }
.recipe__body img { width: 100%; margin: 2em 0; background: var(--tile); }
.recipe__body a { text-underline-offset: 3px; }
