@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Syne:wght@400;500;600;700;800&display=swap');

/* ============================================================
   CRAFTED PLATES — Gallery Exhibition

   Not a food blog. A gallery that happens to contain recipes.
   Every element earns its place. Negative space is the design.
   ============================================================ */

:root {
  --color-primary: #3A3A3A;
  --color-accent: #8B7355;
  --color-accent-light: #A99175;
  --color-bg: #FAFAF6;
  --color-bg-alt: #F2F0EA;
  --color-text: #2D2D2D;
  --color-text-light: #7A7A7A;
  --color-text-muted: #ABABAB;
  --color-sage: #7A8B6E;
  --color-border: #DDDAD2;
  --color-hairline: rgba(45, 45, 45, 0.08);

  --font-display: 'Syne', sans-serif;
  --font-body: 'EB Garamond', Georgia, serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;

  --header-height: 52px;
  --container-max: 1400px;
  --container-narrow: 680px;
  --gallery-gutter: 1.5rem;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-md));
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

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

a {
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.4s ease;
}
a:hover { opacity: 0.6; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

p { margin-bottom: 1.5em; }

::selection {
  background: var(--color-accent);
  color: #fff;
}

/* === Container === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===================================================
   HEADER — Barely there. A thin line of presence.
   =================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--color-bg);
  mix-blend-mode: normal;
}

/* Hairline bottom, appears on scroll via JS or just always present */
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-md);
  right: var(--space-md);
  height: 1px;
  background: var(--color-hairline);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text);
}
.site-logo:hover { opacity: 0.5; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-light);
}
.nav-links a:hover { opacity: 0.4; }

/* Hamburger — three impossibly thin lines */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  left: 2px;
  width: 24px;
  height: 1px;
  background: var(--color-primary);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.nav-toggle::before { top: 8px; }
.nav-toggle span { top: 14px; }
.nav-toggle::after { top: 20px; }

.nav-open .nav-toggle::before { top: 14px; transform: rotate(45deg); }
.nav-open .nav-toggle span { opacity: 0; transform: scaleX(0); }
.nav-open .nav-toggle::after { top: 14px; transform: rotate(-45deg); }

/* ===================================================
   HERO — A single photograph. Nothing else.
   =================================================== */
.hero {
  width: 100%;
  position: relative;
  margin-bottom: var(--space-xl);
}

.hero .container {
  padding: 0;
  max-width: 100%;
}

/* The hero image fills the entire viewport width */
.hero .card-image,
.hero img,
.hero picture {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}

/* Hero tagline appears as a museum caption — small, offset, precise */
.hero-tagline {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-sm) var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
}

/* If there's an h1 in the hero, it's secondary */
.hero h1 {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--color-text-light);
  padding: 0 var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
  display: none; /* Hidden by default — the image IS the hero */
}

/* ===================================================
   BUTTONS — Barely visible. Intentional restraint.
   =================================================== */
.btn,
.view-all {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition: all 0.4s ease;
}

.btn {
  color: var(--color-bg);
  background: var(--color-primary);
  padding: 0.8rem 2rem;
  border: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.7; }

.view-all {
  color: var(--color-text-muted);
  border: none;
  background: none;
  padding: 0;
  position: relative;
}
.view-all::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-text-muted);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.view-all:hover { opacity: 1; }
.view-all:hover::after { transform: scaleX(1); transform-origin: left; }

/* ===================================================
   LATEST RECIPES — Section label, then the gallery
   =================================================== */
.latest-recipes {
  padding: var(--space-lg) 0 var(--space-xl);
}

.latest-recipes h2 {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  padding-left: var(--space-md);
}

/* ===================================================
   RECIPE GRID — Masonry gallery. Staggered. Breathing.
   =================================================== */
.recipe-grid {
  columns: 3;
  column-gap: var(--gallery-gutter);
  padding: 0 var(--space-md);
}

/* ===================================================
   RECIPE CARD — Gallery artwork. Image dominant.
   =================================================== */
.recipe-card {
  break-inside: avoid;
  margin-bottom: var(--gallery-gutter);
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.card-image {
  overflow: hidden;
  line-height: 0;
}

.card-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), filter 0.8s ease;
  filter: grayscale(10%) contrast(1.02);
}

.recipe-card:hover .card-image img {
  transform: scale(1.03);
  filter: grayscale(0%) contrast(1);
}

.card-body {
  padding: var(--space-sm) 0 var(--space-md) 0;
}

.card-body h3 {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.card-body p {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

.card-time {
  display: block;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: 0.35rem;
}

/* ===================================================
   SINGLE RECIPE — Gallery exhibition label style
   =================================================== */
.recipe-single {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.recipe-header {
  margin-bottom: var(--space-lg);
  text-align: left; /* Not centered — gallery labels are left-aligned */
}

.recipe-header h1 {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.recipe-description {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

/* Meta — arranged like artwork details in a gallery */
.recipe-meta {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-hairline);
  margin-top: var(--space-sm);
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-item strong {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text);
}

.meta-item span {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Hero image in single recipe — full width, cinematic */
.recipe-hero-image {
  margin: var(--space-lg) calc(-1 * var(--space-md));
  margin-right: calc(-1 * var(--space-md));
  line-height: 0;
}

.recipe-hero-image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.95);
}

/* ===================================================
   RECIPE BODY — Restrained prose
   =================================================== */
.recipe-body {
  font-size: 1rem;
  line-height: 1.9;
  margin-top: var(--space-lg);
}

.recipe-body h2 {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-hairline);
}

.recipe-body p {
  margin-bottom: 1.5em;
}

/* ===================================================
   INGREDIENTS — Museum inventory list
   =================================================== */
.recipe-ingredients {
  margin: var(--space-lg) 0;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
}

.recipe-ingredients h2,
.recipe-ingredients h3 {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  border: none;
  padding: 0;
}

.recipe-ingredients ul {
  list-style: none;
  padding: 0;
  max-width: 480px;
}

.recipe-ingredients li {
  padding: 0.6em 0 0.6em 1.5em;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* Em-dash bullet */
.recipe-ingredients li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 0.6em;
  color: var(--color-accent);
  font-size: 0.85rem;
}

/* ===================================================
   INSTRUCTIONS — Gallery wall labels
   Oversized numbers left, text right
   =================================================== */
.recipe-instructions {
  margin: var(--space-lg) 0;
  counter-reset: gallery-step;
}

.recipe-instructions h2,
.recipe-instructions h3 {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.recipe-instructions ol {
  list-style: none;
  padding: 0;
}

.recipe-instructions li {
  counter-increment: gallery-step;
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-hairline);
  line-height: 1.85;
  align-items: start;
}

.recipe-instructions li:last-child {
  border-bottom: 1px solid var(--color-hairline);
}

/* Oversized step number — like an artwork label */
.recipe-instructions li::before {
  content: counter(gallery-step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  color: var(--color-border);
  line-height: 1;
  padding-top: 0.15em;
}

/* ===================================================
   NUTRITION — Quiet aside
   =================================================== */
.recipe-nutrition {
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  background: var(--color-bg-alt);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.recipe-nutrition h2,
.recipe-nutrition h3 {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  border: none;
  padding: 0;
}

/* ===================================================
   RECIPE FOOTER — Tags as gallery keywords
   =================================================== */
.recipe-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-hairline);
}

.recipe-categories,
.recipe-tags {
  margin-bottom: var(--space-sm);
}

.recipe-categories h4,
.recipe-tags h4 {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  padding: 0.3rem 0;
  margin-right: 1.2rem;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.tag:hover {
  color: var(--color-primary);
  opacity: 1;
}

/* ===================================================
   LIST PAGE
   =================================================== */
.list-page {
  padding: var(--space-lg) 0 var(--space-xl);
}

.list-page h1 {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: 0;
  margin-bottom: var(--space-xs);
  padding-left: var(--space-md);
}

.list-description {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding-left: var(--space-md);
  margin-bottom: var(--space-lg);
  max-width: 400px;
}

.empty-message {
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ===================================================
   PAGINATION — Minimal number row
   =================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.page-item {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-item:hover,
.page-item.active {
  color: var(--color-primary);
  opacity: 1;
}

.page-item.active {
  border-bottom: 1px solid var(--color-primary);
}

/* ===================================================
   FOOTER — Disappearing act
   =================================================== */
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.site-footer::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--color-accent);
  margin: 0 auto var(--space-md);
}

.site-footer p,
.site-footer a {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.site-footer a:hover { opacity: 0.4; }

/* ===================================================
   RESPONSIVE — 768px
   =================================================== */
@media (max-width: 768px) {
  html { font-size: 17px; }

  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0; bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 999;
  }

  .nav-open .nav-links {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 0.8rem;
    letter-spacing: 0.25em;
  }

  .recipe-grid {
    columns: 2;
  }

  .recipe-instructions li {
    grid-template-columns: 3rem 1fr;
  }

  .recipe-instructions li::before {
    font-size: 1.4rem;
  }
}

/* ===================================================
   RESPONSIVE — 480px
   =================================================== */
@media (max-width: 480px) {
  html { font-size: 16px; }

  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
    --header-height: 46px;
  }

  .recipe-grid {
    columns: 1;
    padding: 0;
  }

  .recipe-card {
    margin-bottom: var(--space-md);
  }

  .hero .card-image,
  .hero img,
  .hero picture {
    aspect-ratio: 4 / 3;
  }

  .recipe-hero-image {
    margin-left: 0;
    margin-right: 0;
  }

  .recipe-instructions li {
    grid-template-columns: 2.5rem 1fr;
    gap: var(--space-xs);
  }

  .recipe-instructions li::before {
    font-size: 1.1rem;
  }

  .recipe-meta {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}

/* === Focus === */
:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 4px;
}

/* === Print === */
@media print {
  .site-header, .site-footer, .nav-toggle, .pagination, .view-all, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .recipe-grid { columns: 2; }
  .recipe-hero-image { margin: 1rem 0; }
  .recipe-hero-image img, .card-image img { filter: none; }
}
