/* Crunchdom kitchen guides — one system for the index and every article.
   The hero card matches the storefront hero (wine surface, cream words, gold
   kicker); the contents rail, article column and related-guide cards all share
   one paper surface, one border, one radius and one spacing rhythm. */

.gi,
.gd {
  --guide-line: #e4d7c3;
  --guide-paper: #fffdf8;
  --guide-wine: #173a2b;
  --guide-gold: #e8b75b;
  --guide-red: #2f6b4f;
}

/* ── Crumb ─────────────────────────────────────────────────────── */
.gd-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: 22px 0 26px;
  font-size: 14px;
  line-height: 1.4;
  color: #6a5c4e;
}

.gd-crumb a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.gd-crumb a:hover {
  color: var(--guide-red);
  border-bottom-color: currentColor;
}

.gd-crumb span {
  color: #b6a48c;
}

/* ── Hero card (index + article heads) ─────────────────────────── */
.gd-head,
.gi-head {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(18px, 2.2vw, 30px);
  align-items: center;
  margin: 0 0 clamp(24px, 2.6vw, 36px);
  padding: clamp(18px, 2.2vw, 30px);
  background: var(--guide-wine);
  color: #faf6ee;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  /* these heads are <header> elements: keep them in the page flow, not pinned
     like the site's sticky navigation */
  position: static;
  top: auto;
  z-index: auto;
}

.gd-head h1,
.gi-head h1 {
  margin: 0 0 10px;
  font: 720 clamp(27px, 3.2vw, 42px) / 1.06 var(--display, Fraunces, Georgia, serif);
  letter-spacing: -0.038em;
  color: inherit;
}

.gd-head .gd-kicker,
.gi-head .gd-kicker {
  margin: 0 0 9px;
  color: var(--guide-gold);
}

.gd-head .gd-lead,
.gi-head .gd-lead {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(15.5px, 1.15vw, 17px);
  line-height: 1.55;
  color: #e6efe8;
}

/* one photo shape everywhere in the guides */
.gd-photo,
.gi-photo {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #173a2b;
}

.gd-photo img,
.gi-photo img {
  display: block;
  width: 100%;
  /* a wide editorial band keeps the card short while the photo still fills
     the whole right panel, cropped rather than stretched */
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: 50% 55%;
}

.gd-photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(40, 30, 24, 0.84);
  color: #fdf3e2;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ── Article: contents rail + notes ────────────────────────────── */
.gd-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
  padding: 0 0 clamp(24px, 3vw, 40px);
}

.gd-toc {
  position: sticky;
  top: calc(var(--header-h, 72px) + 16px);
  padding: 18px;
  background: var(--guide-paper);
  border: 1px solid var(--guide-line);
  border-radius: 12px;
}

.gd-toc b {
  display: block;
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #8a7a68;
}

.gd-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.gd-toc li {
  counter-increment: toc;
  border-top: 1px solid #efe4d3;
}

.gd-toc li:first-child {
  border-top: 0;
}

.gd-toc a {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.35;
  color: #3c3129;
  text-decoration: none;
}

.gd-toc a::before {
  content: counter(toc, decimal-leading-zero);
  padding-top: 1px;
  font-family: var(--display, Fraunces, Georgia, serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--guide-red);
}

.gd-toc a:hover {
  color: var(--guide-red);
}

.gd-article {
  max-width: 68ch;
}

.gd-article section {
  margin: 0 0 clamp(22px, 2.6vw, 30px);
  padding: 0 0 clamp(22px, 2.6vw, 30px);
  border-bottom: 1px solid var(--guide-line);
}

.gd-article section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.gd-step {
  display: block;
  margin-bottom: 8px;
  font-family: var(--display, Fraunces, Georgia, serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: var(--guide-red);
}

.gd-article h2 {
  margin: 0 0 10px;
  font: 700 clamp(24px, 2.3vw, 32px) / 1.16 var(--display, Fraunces, Georgia, serif);
  letter-spacing: -0.028em;
}

.gd-article p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: #43382f;
}

.gd-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--btn-h, 48px);
  margin-top: clamp(24px, 2.6vw, 32px);
  padding: 0 24px;
  border-radius: var(--r-btn, 8px);
  background: var(--guide-wine);
  color: #fff6e6;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}

.gd-cta::after {
  content: "→";
  transition: transform 0.18s;
}

.gd-cta:hover {
  background: #1e4634;
}

.gd-cta:hover::after {
  transform: translateX(4px);
}

/* ── Related guides ────────────────────────────────────────────── */
.gd-more {
  margin: clamp(32px, 4vw, 56px) 0 clamp(40px, 4.4vw, 64px);
  padding: clamp(22px, 2.6vw, 34px);
  background: var(--guide-paper);
  border: 1px solid var(--guide-line);
  border-radius: 12px;
}

.gd-more h2 {
  margin: 0 0 clamp(16px, 2vw, 24px);
  font: 700 clamp(22px, 2.2vw, 30px) / 1.15 var(--display, Fraunces, Georgia, serif);
  letter-spacing: -0.03em;
}

.gd-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.gd-more-card {
  display: flex;
  gap: 12px;
  align-items: center;
  height: 100%;
  padding: 10px;
  background: #fffdf8;
  border: 1px solid #efe3d2;
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.gd-more-card img {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 55%;
}

.gd-more-card span {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #3c3129;
}

.gd-more-card:hover {
  border-color: #d8c2a4;
  box-shadow: 0 12px 24px -20px rgba(40, 30, 24, 0.6);
  transform: translateY(-1px);
}

.gd-more-card:hover span {
  color: var(--guide-red);
}

/* ── Guides index ──────────────────────────────────────────────── */
.gi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
  padding: 0 0 clamp(40px, 4.4vw, 64px);
}

.gi-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--guide-paper);
  border: 1px solid var(--guide-line);
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.gi-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 55%;
}

.gi-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
}

.gi-card-body .gd-kicker {
  margin: 0;
  font-size: 11.5px;
}

.gi-card h2 {
  margin: 0;
  font: 700 clamp(21px, 1.9vw, 27px) / 1.15 var(--display, Fraunces, Georgia, serif);
  letter-spacing: -0.03em;
  color: #2c231d;
}

.gi-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: #5c5046;
}

.gi-card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 750;
  color: var(--guide-red);
}

.gi-card-more::after {
  content: "→";
  transition: transform 0.2s;
}

.gi-card:hover {
  transform: translateY(-3px);
  border-color: #dcc9ad;
  box-shadow: 0 26px 46px -34px rgba(40, 30, 24, 0.65);
}

.gi-card:hover .gi-card-more::after {
  transform: translateX(4px);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .gd-head,
  .gi-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .gd-photo,
  .gi-photo {
    order: -1;
  }

  .gd-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .gd-toc {
    position: static;
  }

  .gd-more-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .gd-head,
  .gi-head {
    padding: 16px;
    gap: 16px;
  }

  .gi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gd-article p {
    font-size: 16.5px;
  }

  .gd-more-card img {
    width: 48px;
    height: 48px;
  }
}
