/* Blima Cake site theme: a light, warm recipe-blog look.
   No external fonts or assets (self-hosted only). */

:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --ink: #2c2622;
  --muted: #7a6f66;
  --accent: #a6462f;
  --accent-dark: #7f3422;
  --line: #ece3d6;
  --radius: 10px;
  --wrap: 1080px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-size: 1rem; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-media {
  max-height: 460px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efe7da;
}
.hero-media img { width: 100%; object-fit: cover; max-height: 460px; }
.hero-text { text-align: center; padding: 34px 20px 44px; }
.hero-text h1 { font-size: 3rem; margin: 0 0 6px; }
.hero-tagline { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--accent-dark); margin: 0 0 18px; }
.hero-intro { max-width: 620px; margin: 0 auto 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }

/* Sections */
.section { padding: 40px 20px; }
.section-title { font-size: 1.9rem; margin: 0 0 20px; }

/* Category tiles */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.cat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}
.cat-tile:hover { border-color: var(--accent); text-decoration: none; }
.cat-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.cat-count { color: var(--muted); font-size: 0.95rem; }

/* Recipe cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(44, 38, 34, 0.1); }
.card-media { aspect-ratio: 4 / 3; background: #efe7da; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 3rem; color: #cbb9a3;
}
.card-body { padding: 14px 16px 18px; }
.card-cat { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 4px; }
.card-title { font-size: 1.15rem; margin: 0; }

/* Recipe page */
.recipe { padding: 30px 20px 60px; max-width: 780px; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }
.recipe-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 6px; }
.recipe-cat { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 6px; }
.recipe-head h1 { font-size: 2.4rem; margin: 0 0 12px; }
.recipe-tags { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  background: #f1e7d8;
  color: var(--accent-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.tag:hover { background: var(--accent); color: #fff; text-decoration: none; }
.tag-count { opacity: 0.7; }

.recipe-body { font-size: 1.05rem; }
.recipe-body img { border-radius: var(--radius); margin: 22px 0; }
.recipe-body h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.recipe-body ul, .recipe-body ol { padding-left: 1.3em; }
.recipe-body li { margin: 6px 0; }
.recipe-source { margin-top: 30px; font-size: 0.9rem; }

/* Tags page */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 36px; }
.tag-group { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 26px; scroll-margin-top: 80px; }
.tag-heading { font-size: 1.3rem; margin: 0 0 10px; }
.tag-list { list-style: none; padding: 0; margin: 0; columns: 2; }
.tag-list li { margin: 4px 0; break-inside: avoid; }

/* Search (Pagefind UI theming) */
.pagefind {
  --pagefind-ui-primary: var(--accent);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--surface);
  --pagefind-ui-border: var(--line);
  --pagefind-ui-tag: #f1e7d8;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: var(--radius);
  --pagefind-ui-font: var(--sans);
  max-width: 640px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 28px 0;
  text-align: center;
  font-size: 0.95rem;
}
.site-footer p { margin: 4px 0; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-text h1 { font-size: 2.2rem; }
  .tag-list { columns: 1; }
}
