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

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

:root {
  --cream:    #FFF5F8;
  --tan:      #FBDDE9;
  --brown:    #1B2A4A;
  --mid:      #2D4A7A;
  --terra:    #B5476A;
  --gold:     #C9A96E;
  --green:    #4A6C7C;
  --shadow:   rgba(27,42,74,.12);
  --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'Raleway', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--brown);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
}

/* ── Nav ── */
nav {
  background: var(--brown);
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

nav .brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--tan);
  text-decoration: none;
  flex: 1;
  white-space: nowrap;
}

nav a {
  color: #c8d4e8;
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s;
}
nav a:hover { color: var(--tan); }

/* ── Hero ── */
.hero {
  background: var(--brown);
  color: var(--cream);
  text-align: center;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: .02em;
  position: relative;
}
.hero h1 span { color: var(--tan); font-style: italic; }
.hero p {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: #c8d4e8;
  max-width: 520px;
  margin-inline: auto;
  position: relative;
}
.hero .divider {
  margin: 1.5rem auto;
  width: 80px;
  height: 2px;
  background: var(--gold);
  position: relative;
}

/* ── Grid ── */
.section-label {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--mid);
}
.section-label span {
  display: block;
  font-size: .8rem;
  font-family: var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--terra);
  font-style: normal;
  font-weight: 600;
  margin-bottom: .3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 32px var(--shadow);
}
.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: top;
  display: block;
}
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--tan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card-category {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--terra);
  font-weight: 600;
  margin-bottom: .4rem;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: .6rem;
}
.card-meta {
  font-size: .82rem;
  color: #888;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: .8rem;
}
.card-meta span::before { margin-right: .3rem; }

/* ── Recipe page layout ── */
.recipe-hero {
  background: var(--brown);
  color: var(--cream);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
}
.recipe-hero .crumb {
  font-size: .8rem;
  color: #a0b4cc;
  margin-bottom: 1rem;
}
.recipe-hero .crumb a { color: var(--tan); text-decoration: none; }
.recipe-hero .crumb a:hover { text-decoration: underline; }
.recipe-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
}
.recipe-hero .tagline {
  color: #c8d4e8;
  margin-top: .5rem;
  font-style: italic;
}
.recipe-hero .meta-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: .9rem;
}
.recipe-hero .meta-bar dt { color: var(--tan); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.recipe-hero .meta-bar dd { color: #e0eaf5; font-weight: 600; }

.recipe-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 680px) {
  .recipe-body { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Ingredients ── */
.ingredients-col h2, .directions-col h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brown);
  border-bottom: 2px solid var(--tan);
  padding-bottom: .5rem;
  margin-bottom: 1.2rem;
}
.ingredients-col h3 {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--terra);
  margin: 1.2rem 0 .5rem;
  font-style: italic;
}
.ingredients-col ul {
  list-style: none;
  padding: 0;
}
.ingredients-col ul li {
  padding: .35rem 0 .35rem 1.4rem;
  position: relative;
  font-size: .95rem;
  border-bottom: 1px solid #f0e8d0;
  line-height: 1.5;
}
.ingredients-col ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: .6rem;
  top: .6rem;
}

/* ── Directions ── */
.directions-col ol {
  padding-left: 1.8rem;
  counter-reset: steps;
  list-style: none;
}
.directions-col ol li {
  counter-increment: steps;
  padding: .8rem 0 .8rem 0;
  border-bottom: 1px solid #f0e8d0;
  position: relative;
  padding-left: 2.8rem;
  font-size: .97rem;
}
.directions-col ol li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: .75rem;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--terra);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 600;
}

.tip-box {
  background: var(--tan);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
  font-size: .92rem;
  line-height: 1.6;
}
.tip-box strong { color: var(--mid); }

/* ── Original photo ── */
.original-photo {
  margin-top: 2rem;
}
.original-photo h3 {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--mid);
  margin-bottom: .6rem;
  font-style: italic;
}
.original-photo img {
  width: 100%;
  border-radius: 8px;
  border: 3px solid var(--tan);
  cursor: pointer;
  transition: opacity .2s;
}
.original-photo img:hover { opacity: .9; }
.original-photo figcaption {
  font-size: .78rem;
  color: #999;
  margin-top: .4rem;
  text-align: center;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 6px; }
.lightbox-close {
  position: fixed;
  top: 1rem; right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* ── Recipe nav ── */
.recipe-nav {
  background: var(--tan);
  padding: 2rem;
  text-align: center;
}
.recipe-nav p { color: var(--mid); font-size: .85rem; margin-bottom: 1rem; font-style: italic; }
.recipe-nav .links { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.recipe-nav .links a {
  background: var(--brown);
  color: var(--cream);
  padding: .5rem 1.1rem;
  border-radius: 100px;
  text-decoration: none;
  font-size: .82rem;
  transition: background .2s;
}
.recipe-nav .links a:hover { background: var(--terra); }
.recipe-nav .links a.active { background: var(--terra); }

/* ── Heritage section ── */
.heritage {
  background: var(--tan);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  padding: 3rem 2rem;
  text-align: center;
}
.heritage .label {
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--terra);
  font-weight: 600;
  margin-bottom: .6rem;
}
.heritage h2 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--brown);
  line-height: 1.4;
}
.heritage h2 em { color: var(--terra); font-style: italic; }
.heritage p {
  max-width: 600px;
  margin: 1rem auto 0;
  color: var(--mid);
  font-size: .97rem;
  line-height: 1.75;
}
.heritage .names {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}
.heritage .name-card { text-align: center; }
.heritage .name-card .initials {
  width: 56px;
  height: 56px;
  background: var(--brown);
  color: var(--tan);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .7rem;
}
.heritage .name-card .full-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--brown);
  font-weight: 600;
}
.heritage .name-card .role { font-size: .78rem; color: #888; margin-top: .1rem; }

/* ── Footer ── */
footer {
  background: var(--brown);
  color: #a0b4cc;
  text-align: center;
  padding: 2rem;
  font-size: .82rem;
  line-height: 1.8;
}
footer span { color: var(--tan); }

/* ── Print ── */
@media print {
  nav, .recipe-nav, footer, .original-photo { display: none; }
  .recipe-hero { background: #fff; color: #000; padding: 1rem 0; }
  .recipe-hero h1 { color: #000; }
  .recipe-hero .meta-bar dt, .recipe-hero .meta-bar dd { color: #444; }
  .recipe-body { grid-template-columns: 1fr; }
}
