/* ==========================================================================
   La Cuisine d'Olga Franko — Main Stylesheet
   ==========================================================================
   Structure:
   1. CSS Custom Properties
   2. Reset
   3. @font-face declarations
   4. Base typography
   5. Layout
   6. Components
   7. Page-specific
   8. Responsive (breakpoint 768px)
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
  /* Colors — accessibility-compliant contrasts */
  --color-bg: #FDFBF7;
  --color-bg-alt: #EDE7DC; /* Fond alterné entre sections — plus contrasté */
  --color-text: #2D2A26;
  --color-heading: #1A1714;
  --color-accent: #6B4C3B;
  --color-link: #4A6741;
  --color-link-hover: #3A5331;
  --color-border: #E8E0D6;
  --color-surface: #F7F2EB;
  --color-muted: #6B6560;
  --color-focus: #2B5EA7;
  --color-error: #9B2C2C;
  --color-white: #FFFFFF;

  /* Fonts */
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 90rem;
  --content-width: 64rem;
  --sidebar-width: 20rem;

  /* Borders */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --border-width: 1px;
}

/* ==========================================================================
   2. Reset
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

ul,
ol {
  list-style: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

/* ==========================================================================
   3. @font-face declarations
   ========================================================================== */

/* Cormorant Garamond — Regular (body text) */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'),
       url('/assets/fonts/cormorant-garamond-latin-400-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Cormorant Garamond — Regular Italic (provenance, emphasis) */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2'),
       url('/assets/fonts/cormorant-garamond-latin-400-italic.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Cormorant Garamond — SemiBold (headings) */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'),
       url('/assets/fonts/cormorant-garamond-latin-600-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — Regular (UI text, nav, footer) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-400-normal.ttf') format('truetype');
}

/* Inter — Medium (buttons, labels) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-500-normal.ttf') format('truetype');
}

/* ==========================================================================
   4. Base typography
   ========================================================================== */

body {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-heading);
  line-height: 1.3;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
}

a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* ==========================================================================
   5. Layout
   ========================================================================== */

.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
}

.site-header {
  border-bottom: var(--border-width) solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  width: 2.5rem;
  height: 2.5rem;
}

.site-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-heading);
}

/* Main navigation */
.main-nav {
  background-color: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-border);
  padding: var(--space-sm) var(--space-lg);
}

.main-nav__list {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.main-nav__link {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav__link:hover {
  background-color: var(--color-border);
  color: var(--color-heading);
}

.main-nav__link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.main-nav__link[aria-current="page"] {
  background-color: var(--color-border);
  color: var(--color-heading);
  font-weight: 500;
}

/* Main content area */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Site footer */
.site-footer {
  border-top: var(--border-width) solid var(--color-border);
  padding: var(--space-2xl) var(--space-lg);
  background-color: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer-col--identity {}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-sm);
}

.footer-description {
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  transition: color 0.2s ease;
}

.footer-social-link:hover {
  color: var(--color-text);
}

.footer-social-link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer-social-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer-heritage {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-muted);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-2xl);
  }
}

/* ==========================================================================
   6. Components
   ========================================================================== */

/* --- Section background utilities --- */
.section-bg {
  background-color: var(--color-bg);
  padding: var(--space-2xl) var(--space-lg);
  border: none;
  box-shadow: none;
  background-image: none;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-bg--alt {
  background-color: var(--color-bg-alt);
  padding: var(--space-2xl) var(--space-lg);
  border: none;
  box-shadow: none;
  background-image: none;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- Olha Franko section --- */
.olha-franko {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.olha-franko__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: var(--space-xl);
  align-items: center;
}

.olha-franko__text {
  /* Colonne texte : biographie, closing, signature */
}

.olha-franko__portrait {
  display: flex;
  align-items: center;
  justify-content: center;
}

.olha-franko__photo {
  max-width: 14rem;
  height: auto;
  border-radius: var(--radius-md);
}

.olha-franko__bio {
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.olha-franko__closing {
  font-style: italic;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.olha-franko__signature {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--color-accent);
  text-align: right;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-focus);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-md);
  outline: 3px solid var(--color-heading);
  outline-offset: 2px;
}

/* --- Recipe card --- */
.recipe-card {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-white);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  box-shadow: 0 6px 20px rgba(45, 42, 38, 0.12);
  transform: translateY(-2px);
}

.recipe-card__image-wrap {
  overflow: hidden;
}

.recipe-card__image-wrap .card-image {
  transition: transform 0.3s ease;
}

.recipe-card:hover .card-image {
  transform: scale(1.04);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-heading);
  padding: var(--space-md) var(--space-md) var(--space-xs);
}

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

.card-title a:hover {
  text-decoration: underline;
}

.card-title a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.card-provenance {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  font-style: italic;
  padding: 0 var(--space-md);
  margin-bottom: var(--space-xs);
}

.card-excerpt {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.5;
  padding: 0 var(--space-md) var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-card__meta {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: var(--space-sm);
}

/* --- Recipe grid --- */
.recipe-grid {
  columns: 1;
  column-gap: var(--space-xl);
}

.recipe-grid .recipe-card {
  break-inside: avoid;
  margin-bottom: var(--space-xl);
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* --- Recipes layout (main + sidebar) --- */
.recipes-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.recipes-layout__sidebar {
  order: 2;
}

/* --- Sidebar about --- */
.sidebar-about {
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.sidebar-about__title {
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-md);
  color: var(--color-heading);
}

.sidebar-about__photo {
  display: block;
  width: 8rem;
  height: auto;
  margin: 0 auto var(--space-md);
  border-radius: 50%;
}

.sidebar-about__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.sidebar-about__closing {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.sidebar-about__signature {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--color-accent);
  text-align: right;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pagination__link:hover {
  background-color: var(--color-surface);
  border-color: var(--color-accent);
}

.pagination__link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.pagination__current {
  font-weight: 500;
  color: var(--color-text);
}

/* --- Language switch --- */
.lang-switch {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
}

.lang-switch__link {
  color: var(--color-muted);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-switch__link:hover {
  background-color: var(--color-surface);
  color: var(--color-text);
}

.lang-switch__link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.lang-switch__link[aria-current="true"] {
  background-color: var(--color-border);
  color: var(--color-heading);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) 0;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.breadcrumbs__item::after {
  content: '›';
  color: var(--color-border);
  margin-left: var(--space-xs);
}

.breadcrumbs__item:last-child::after {
  content: '';
}

.breadcrumbs__link {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.breadcrumbs__link:hover {
  color: var(--color-link-hover);
}

.breadcrumbs__link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.breadcrumbs__current {
  color: var(--color-text);
}

/* ==========================================================================
   7. Page-specific
   ========================================================================== */

/* --- Hero (homepage) --- */
.hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  border-bottom: var(--border-width) solid var(--color-border);
  margin-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/images/manuscrit.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-2xl);
  background-color: #6B2D3B;
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(107, 45, 59, 0.25);
}

.hero-cta:hover {
  background-color: #522230;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(107, 45, 59, 0.35);
}

.hero-cta:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.hero-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(107, 45, 59, 0.2);
}

.hero-cta__arrow {
  display: inline-block;
  margin-left: var(--space-sm);
  font-size: 1.3em;
  transition: transform 0.2s ease;
}

.hero-cta:hover .hero-cta__arrow {
  transform: translateX(4px);
}

/* --- Hero diptyque (with dish photo) --- */
.hero--with-image {
  display: flex;
  text-align: left;
  padding: 0;
  height: 380px;
}

.hero--with-image .hero__content {
  flex: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg) 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

.hero--with-image .hero__content h1 {
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
}

.hero--with-image .hero-subtitle {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 0;
}

.hero--with-image .hero-cta {
  align-self: flex-start;
  max-width: 280px;
  width: auto;
}

.hero--with-image::before {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__photo-wrapper {
  flex: 2;
  overflow: hidden;
  min-height: 0;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* --- Category grid --- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.categories {
  border-top: var(--border-width) solid var(--color-border);
}

.recent-news {
  border-top: var(--border-width) solid var(--color-border);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--color-white);
  text-decoration: none;
  color: var(--color-text);
  height: 100%;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:not(.category-card--with-image) {
  padding: var(--space-xl) var(--space-lg);
}

.category-card:hover {
  box-shadow: 0 2px 8px rgba(45, 42, 38, 0.06);
  border-color: var(--color-accent);
}

.category-card:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.category-card__image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.category-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.category-card a {
  color: var(--color-heading);
  text-decoration: none;
}

.category-card a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.category-card__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-heading);
  text-align: center;
}

.category-card__count {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: var(--space-xs);
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}

/* --- Section headings --- */
.section-heading {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: var(--border-width) solid var(--color-border);
}

/* --- Article content (detail page) --- */
.recipe-detail {
  overflow: hidden;
}

.recipe-detail__image {
  width: 100%;
  max-width: 20rem;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: cover;
  float: left;
  margin-right: var(--space-lg);
  margin-bottom: var(--space-md);
}

.recipe-detail__intro h1 {
  margin-bottom: var(--space-sm);
}

.recipe-date {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-muted);
  display: block;
  margin-bottom: var(--space-sm);
}

.provenance {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.recipe-content hr:first-child {
  margin-top: var(--space-sm);
}

.recipe-categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.recipe-categories li a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.recipe-categories li a:hover {
  background-color: var(--color-border);
}

.recipe-content {
  max-width: var(--content-width);
}

/* Images within recipe content — base styling */
.recipe-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  object-fit: cover;
}

.recipe-content figure {
  margin: var(--space-md) auto;
  text-align: center;
}

.recipe-content figure img {
  width: auto;
  max-width: 100%;
  height: auto;
}

/* Override for gallery figures (nested figure > figure) — no max-width constraint */
.recipe-content figure:has(> figure) {
  max-width: none;
}

.recipe-content figcaption {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-style: italic;
  margin-top: var(--space-sm);
  text-align: center;
}

/* Gallery container for consecutive images */
/* The API wraps grouped images as: <figure> <figure><img></figure> ... </figure> */
.recipe-content figure:has(> figure) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.recipe-content figure > figure {
  flex: 1 1 calc(25% - var(--space-md) * 3 / 4);
  max-width: calc(25% - var(--space-md) * 3 / 4);
  margin: 0;
}

.recipe-content figure > figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  object-fit: cover;
}

@media (max-width: 768px) {
  .recipe-content figure > figure {
    flex: 1 1 calc(50% - var(--space-md) / 2);
    max-width: calc(50% - var(--space-md) / 2);
  }
}

@media (max-width: 480px) {
  .recipe-content figure > figure {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* --- Recipe sections (Ingredients + Preparation side by side) --- */
.recipe-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.recipe-section--ingredients {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.recipe-section--preparation {
  padding: var(--space-lg) 0;
}

.recipe-section--preparation img {
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.recipe-section--preparation figcaption {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-style: italic;
  margin-top: var(--space-sm);
  text-align: center;
}

.recipe-section h2 {
  margin-top: 0;
}

.article-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.article-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.article-content p {
  margin-bottom: var(--space-md);
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: var(--space-xs);
}

.article-content a {
  color: var(--color-link);
  text-decoration: underline;
}

.article-content img {
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.article-content figure {
  margin: var(--space-lg) 0;
}

.article-content figcaption {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
}

.article-content hr {
  border: none;
  border-top: var(--border-width) solid var(--color-border);
  margin: var(--space-2xl) 0;
}

.recipe-content hr {
  border: none;
  border-top: var(--border-width) solid var(--color-muted);
  margin: var(--space-md) 0 var(--space-2xl);
}

/* --- About Olha Franko --- */
.about-olha-page {
  max-width: var(--content-width);
}

.about-olha__photo {
  float: right;
  width: 16rem;
  height: auto;
  margin: 0 0 var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
}

.about-olha__subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}

/* --- About us / Portraits --- */
.about-us-page {
  max-width: var(--content-width);
}

.about-us-intro {
  color: var(--color-muted);
  margin-bottom: var(--space-2xl);
}

.portrait {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: var(--border-width) solid var(--color-border);
}

.portrait:last-child {
  border-bottom: none;
}

.portrait__img {
  width: 100%;
  max-width: 14rem;
  height: auto;
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.portrait__text h2 {
  margin-bottom: var(--space-sm);
}

.portrait__text p {
  color: var(--color-text);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .portrait {
    grid-template-columns: 14rem 1fr;
    align-items: start;
  }

  .portrait--right {
    grid-template-columns: 1fr 14rem;
  }

  .portrait--right .portrait__photo {
    order: 2;
  }

  .portrait--right .portrait__text {
    order: 1;
  }
}

/* --- Contact form --- */
.contact-page {
  max-width: 40rem;
}

.contact-intro {
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  padding: var(--space-sm) var(--space-md);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: 1rem;
  background-color: var(--color-white);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(107, 76, 59, 0.1);
}

.contact-submit {
  padding: var(--space-sm) var(--space-xl);
  background-color: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.form-submit {
  display: flex;
  justify-content: flex-end;
}

.contact-submit:hover {
  background-color: var(--color-link-hover);
}

.contact-submit:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.contact-success {
  background-color: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: #2e7d32;
  margin-bottom: var(--space-lg);
}

.contact-errors {
  background-color: #fbe9e7;
  border: 1px solid #ef9a9a;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--color-error);
  margin-bottom: var(--space-lg);
}

.contact-errors ul {
  list-style: disc;
  padding-left: var(--space-lg);
}

/* --- Error pages (404, 503) --- */
.error-page {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.error-page__code {
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 500;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.error-page__title {
  font-size: 1.75rem;
  color: var(--color-heading);
  margin-bottom: var(--space-md);
}

.error-page__message {
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.error-page__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.error-page__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  border: var(--border-width) solid var(--color-accent);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.error-page__link:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.error-page__link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* --- Featured image (article detail) --- */
.featured-image {
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: auto;
}

/* --- Article header --- */
.article-header {
  margin-bottom: var(--space-xl);
}

.article-header__date {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.article-header__categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.article-header__category {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
}

.article-header__category:hover {
  background-color: var(--color-border);
}

.article-header__category:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* --- History block (homepage) --- */
.history-block {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-2xl) 0;
}

.history-block__title {
  font-size: 1.375rem;
  margin-bottom: var(--space-md);
}

.history-block__text {
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.7;
}

/* --- Heritage aside (recipe detail) --- */
.heritage-aside {
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-2xl) 0;
  max-width: var(--content-width);
}

.heritage-aside__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.heritage-aside p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.heritage-aside p:last-child {
  margin-bottom: 0;
}

.heritage-aside__closing {
  color: var(--color-accent);
  font-weight: 500;
}

/* ==========================================================================
   8. Responsive (mobile-first, breakpoint 768px)
   ========================================================================== */

@media (min-width: 768px) {
  /* Typography */
  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Hero */
  .hero {
    padding: var(--space-3xl) var(--space-xl);
  }

  .hero--with-image {
    padding: 0;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  /* Recipe grid: 2 columns on tablet, 3 on larger */
  .recipe-grid {
    columns: 2;
  }

  /* Category grid: 2 columns */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Header layout */
  .site-header__inner {
    flex-wrap: nowrap;
  }
}

@media (min-width: 1024px) {
  /* Recipe grid: 3 columns on desktop */
  .recipe-grid {
    columns: 3;
  }

  /* Category grid: 3 columns on desktop */
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Recipes layout: main + sidebar */
  .recipes-layout {
    grid-template-columns: 1fr 18rem;
  }

  .recipes-layout__sidebar {
    order: 0;
  }

  /* Recipe sections: side by side on desktop */
  .recipe-sections {
    grid-template-columns: 1fr 2fr;
  }
}

/* --- Section "more" link --- */
.section-more {
  text-align: center;
  margin-top: var(--space-xl);
}

.section-more__link {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  padding: var(--space-sm) var(--space-lg);
  border: var(--border-width) solid var(--color-accent);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.section-more__link:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.section-more__link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* --- Burger menu --- */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}

.burger__line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-heading);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.is-active .burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-active .burger__line:nth-child(2) {
  opacity: 0;
}

.burger.is-active .burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.burger:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (max-width: 767px) {
  .burger {
    display: flex;
  }

  .main-nav {
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .about-olha__photo {
    float: none;
    width: 100%;
    max-width: 14rem;
    display: block;
    margin: 0 auto var(--space-lg);
  }

  .main-nav__list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-md) 0;
  }

  .main-nav__link {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
  }

  /* Hero diptyque — stack on mobile, photo on top */
  .hero--with-image {
    flex-direction: column;
    height: auto;
  }

  .hero--with-image .hero__content {
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    order: 2;
  }

  .hero--with-image .hero__content h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero--with-image .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero--with-image .hero-cta {
    align-self: center;
    max-width: 100%;
    width: auto;
  }

  .hero__photo-wrapper {
    order: 1;
    height: 280px;
    flex: none;
  }

  .hero__photo {
    height: 280px;
    object-position: center center;
  }

  /* Olha Franko section — stack vertically on mobile */
  .olha-franko__inner {
    grid-template-columns: 1fr;
  }

  .olha-franko__portrait {
    order: -1;
  }

  .olha-franko__photo {
    margin: 0 auto;
  }
}

/* --- Legal page --- */
.legal-page {
  max-width: var(--content-width);
}

.legal-page h2 {
  margin-top: var(--space-xl);
}

