/* ── Self-hosted fonts ───────────────────────────────────── */
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/EBGaramond-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  /* Font license: please see /fonts/Garamond-License.txt */
}

@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/EBGaramond-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  /* Font license: please see /fonts/Garamond-License.txt */
}

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --paper:      #F5F0E8;
  --paper-dark: #EDE7D9;
  --prussian:   #003153;
  --gold:       #C8922A;
  --gold-light: #E8B85A;
  --ink:        #2C2C2C;
  --ink-muted:  #7A6A55;
  --rule:       #D4C9B5;

  --font: 'EB Garamond', Georgia, serif;
  --col:  680px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; }

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────── */
header {
  background: var(--paper);
  text-align: center;
  padding: 1rem 1.5rem 1rem;
}

.site-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
}

.site-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 500;
  font-style: italic;
  color: var(--prussian);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-subtitle {
  margin-top: 0.55rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* ── Prussian Ribbon ─────────────────────────────────────── */
.ribbon {
  background: var(--prussian);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.ribbon nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.ribbon nav a {
  display: block;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.85rem 1.25rem;
  transition: color 0.18s;
}

.ribbon nav a:hover,
.ribbon nav a.active { color: var(--gold-light); }

.ribbon-divider {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.22);
}

/* Gold accent rule below ribbon */
.ribbon-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--prussian), var(--gold) 40%, var(--gold-light) 60%, var(--prussian));
}

/* ── Page layout ─────────────────────────────────────────── */
.page {
  max-width: calc(var(--col) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section label ───────────────────────────────────────── */
.section-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.4rem;
  padding-top: 0.15rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 0.6rem;
  margin-bottom: 2px;
}

/* ── Featured / intro section ────────────────────────────── */
.featured {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Recipe kicker & title ───────────────────────────────── */
.recipe-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.recipe-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.15;
  color: var(--prussian);
  margin-bottom: 0.6rem;
}

/* ── Two-column recipe body ───────────────────────────────── */
.recipe-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem 3rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 580px) {
  .recipe-body { grid-template-columns: 1fr; }
}

.ingredients-col h3,
.method-col h3 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--prussian);
  border-bottom: 1px solid var(--prussian);
  padding-bottom: 0.4rem;
  margin-bottom: 1.1rem;
  font-style: normal;
  font-weight: 500;
}

/* Ingredients */
.ingredients-list {
  list-style: none;
  font-size: 0.96rem;
  line-height: 1.65;
}

.ingredients-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.ingredients-list li:last-child { border-bottom: none; }

.ingredient-qty {
  color: var(--ink-muted);
  white-space: nowrap;
  font-size: 0.88rem;
}

/* ── Recipe meta row ─────────────────────────────────────── */
.recipe-meta {
  font-size: 0.82rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
}

.recipe-meta span::before {
  content: '·';
  margin-right: 1.1rem;
  color: var(--rule);
}

.recipe-meta span:first-child::before { display: none; }

/* ── Recipe intro drop cap ───────────────────────────────── */
.recipe-intro {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 2.2rem;
}

.recipe-intro::first-letter {
  font-size: 3.8em;
  font-weight: 500;
  color: var(--prussian);
  float: left;
  line-height: 0.78;
  margin: 0.06em 0.1em 0 0;
}

/* ── Recipe image placeholder ────────────────────────────── */
.recipe-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--paper-dark);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.4rem;
  position: relative;
  overflow: hidden;
}

.recipe-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 18px,
      rgba(0,49,83,0.03) 18px,
      rgba(0,49,83,0.03) 19px
    );
}

.recipe-image-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

/* ── Notes block ─────────────────────────────────────────── */
.recipe-note {
  background: var(--paper-dark);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.3rem;
  font-size: 0.93rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.recipe-note strong {
  font-style: normal;
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}

/* ── Rendered markdown inside recipe pages ───────────────── */
.recipe-content {
  margin-bottom: 2.5rem;
}

.recipe-content h2 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--prussian);
  border-bottom: 1px solid var(--prussian);
  padding-bottom: 0.4rem;
  margin-top: 2.2rem;
  margin-bottom: 1.1rem;
  font-style: normal;
  font-weight: 500;
}

.recipe-content h2:first-child {
  margin-top: 0;
}

.recipe-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.recipe-content ul {
  list-style: none;
  margin-bottom: 2rem;
}

.recipe-content ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.96rem;
  line-height: 1.65;
}

.recipe-content ul li:last-child {
  border-bottom: none;
}

.recipe-content ol {
  list-style: none;
  counter-reset: step;
  margin-bottom: 2rem;
}

.recipe-content ol li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0 0.8rem;
  margin-bottom: 1.3rem;
  font-size: 1rem;
  line-height: 1.7;
}

.recipe-content ol li::before {
  content: counter(step);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--prussian);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15em;
  flex-shrink: 0;
  letter-spacing: 0;
}

/* ── Recipe listing grid ─────────────────────────────────── */
.more-section {
  padding: 2.5rem 0 3.5rem;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

@media (max-width: 620px) {
  .recipes-grid { grid-template-columns: 1fr; }
}

.recipe-card {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.recipe-card a {
  text-decoration: none;
}

.recipe-card:hover .card-title { color: var(--gold); }

.card-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  color: var(--prussian);
  line-height: 1.25;
  margin-bottom: 0.4rem;
  transition: color 0.16s;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--paper-dark);
  border: 1px solid var(--rule);
  margin-bottom: 0.85rem;
  position: relative;
  overflow: hidden;
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 12px,
    rgba(0,49,83,0.03) 12px,
    rgba(0,49,83,0.03) 13px
  );
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--prussian);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

footer em {
  color: var(--gold-light);
  font-style: italic;
}

/* ── Horizontal rule ─────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* ── Taxonomy listing ────────────────────────────────────── */
.posilek-list {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 1.6rem;
}

.posilek-list li::marker {
  color: var(--prussian);
  font-size: 1.4em;
}

/* ── Utility ─────────────────────────────────────────────── */
.clearfix::after { content: ''; display: table; clear: both; }
