/* ===========================================================
   100 Wrap Recepten — stylesheet
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --cream: #fdf7ef;
  --cream-dim: #f6ede0;
  --paper: #fffdf9;
  --ink: #2c2118;
  --ink-soft: #6b5d4f;
  --terracotta: #c2542f;
  --terracotta-dark: #a3421f;
  --avocado: #5c7a4e;
  --avocado-dark: #43592f;
  --line: #e9ddc9;
  --shadow: 0 12px 30px -14px rgba(60, 40, 20, 0.28);

  --cat-kip: #d98a1f;
  --cat-vlees: #c2452f;
  --cat-vis: #2f7d94;
  --cat-vegetarisch: #5c7a4e;
  --cat-warm: #b5502f;

  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 118px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(253, 247, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-size: 1.28rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--terracotta-dark);
}
.logo .num { color: var(--avocado-dark); }
.logo .sub {
  font-family: 'Work Sans', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.search-box {
  flex: 1;
  position: relative;
  max-width: 480px;
  margin-left: auto;
}
.search-box input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 84, 47, 0.14);
}
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-soft);
  pointer-events: none;
}
.search-count {
  display: none;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: var(--ink-soft);
  background: var(--cream-dim);
  padding: 3px 8px;
  border-radius: 999px;
}

.toc-nav {
  border-top: 1px solid var(--line);
}
.toc-nav .wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 24px;
  scrollbar-width: none;
}
.toc-nav .wrap::-webkit-scrollbar { display: none; }
.toc-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
  background: var(--paper);
  transition: background .15s, color .15s, border-color .15s;
}
.toc-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--dot);
}
.toc-pill:hover { border-color: var(--dot); color: var(--ink); }
.toc-pill.all { color: var(--terracotta-dark); border-color: var(--terracotta); }

/* ---------- hero ---------- */

.hero {
  padding: 56px 0 36px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--avocado-dark);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
}
.hero p.lede {
  max-width: 560px;
  margin: 14px auto 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.7rem;
  color: var(--terracotta-dark);
}
.hero-stats .stat span {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- sections & grid ---------- */

.category-section { padding: 40px 0 8px; scroll-margin-top: 120px; }

.category-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
}
.category-heading h2 { font-size: 1.7rem; }
.category-heading .cat-tag {
  color: var(--paper);
  background: var(--dot);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.category-heading .count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  padding-bottom: 12px;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line);
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-dim);
  position: relative;
}
.card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .thumb img { transform: scale(1.06); }
.card .num-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(44, 33, 24, 0.72);
  color: #fff;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(3px);
}
.card .body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}
.card .meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.card .meta svg { width: 13px; height: 13px; }

.empty-state {
  display: none;
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-soft);
}
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }

/* ---------- recipe detail page ---------- */

.recipe-hero {
  position: relative;
  max-width: var(--maxw);
  margin: 26px auto 0;
  padding: 0 24px;
}
.recipe-hero .photo {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16/8;
  box-shadow: var(--shadow);
}
.recipe-hero .photo img { width: 100%; height: 100%; object-fit: cover; }

.recipe-crumb {
  max-width: var(--maxw);
  margin: 18px auto 0;
  padding: 0 24px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.recipe-crumb a { color: var(--terracotta-dark); font-weight: 600; }
.recipe-crumb a:hover { text-decoration: underline; }

.recipe-title-block {
  max-width: var(--maxw);
  margin: 14px auto 0;
  padding: 0 24px;
}
.recipe-title-block .cat-tag {
  display: inline-block;
  color: var(--paper);
  background: var(--dot);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.recipe-title-block h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 760px; }
.recipe-title-block .servings {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.recipe-title-block .servings svg { width: 16px; height: 16px; }

.recipe-body {
  max-width: var(--maxw);
  margin: 30px auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) {
  .recipe-body { grid-template-columns: 1fr; }
}

.ingredients-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
  position: sticky;
  top: 130px;
}
.ingredients-box h2 { font-size: 1.2rem; margin-bottom: 16px; }
.ingr-group + .ingr-group { margin-top: 18px; }
.ingr-group h4 {
  font-family: 'Work Sans', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--terracotta-dark);
  margin-bottom: 8px;
}
.ingr-group ul { list-style: none; margin: 0; padding: 0; }
.ingr-group li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.94rem;
  display: flex;
  gap: 10px;
}
.ingr-group li:last-child { border-bottom: none; }
.ingr-group li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--avocado);
}

.steps-box h2 { font-size: 1.2rem; margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  padding: 0 0 22px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: #fff;
  background: var(--terracotta);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex: none;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.steps li p { margin: 4px 0 0; }

.tip-box {
  margin-top: 26px;
  background: #f4f1e2;
  border: 1px solid #e3dcc0;
  border-left: 4px solid var(--avocado);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.94rem;
}
.tip-box b { color: var(--avocado-dark); }

.recipe-nav {
  max-width: var(--maxw);
  margin: 0 auto 70px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.recipe-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--terracotta-dark);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 0.9rem;
}
.recipe-nav a:hover { border-color: var(--terracotta); }
.recipe-nav a svg { width: 15px; height: 15px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 24px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.site-footer a { color: var(--terracotta-dark); font-weight: 600; }

/* category color scoping */
.cat-kip { --dot: var(--cat-kip); }
.cat-vlees { --dot: var(--cat-vlees); }
.cat-vis { --dot: var(--cat-vis); }
.cat-vegetarisch { --dot: var(--cat-vegetarisch); }
.cat-warm { --dot: var(--cat-warm); }

@media (max-width: 640px) {
  .header-row { flex-wrap: wrap; }
  .search-box { order: 3; max-width: none; flex-basis: 100%; }
  .hero { padding: 40px 0 26px; }
  .hero-stats { gap: 22px; }
}
