/* Food detail v2: editorial pass.
 * Layered AFTER food-listing.css. */

/* ---------- Reading progress (matches article detail) ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.reading-progress::before {
  content: '';
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--coral, #FF8A73), #f57862);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .reading-progress::before {
    animation: read-progress linear;
    animation-timeline: scroll(root);
  }
}
@keyframes read-progress {
  to { transform: scaleX(1); }
}

/* ---------- Editorial header ---------- */
.article-header {
  text-align: left;
  margin-bottom: 2.5rem;
}

/* Existing .food-badge becomes the eyebrow */
.article-header .food-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  border-radius: 999px !important;
  margin-bottom: 1.25rem !important;
}
.article-header .food-badge.good {
  background: var(--sage, #B4C7A8) !important;
  color: #2c3a26 !important;
  border: 0 !important;
}
.article-header .food-badge.avoid {
  background: rgba(43, 43, 43, 0.08) !important;
  color: #3a3a3a !important;
  border: 0 !important;
}

.article-header h1 {
  font-family: 'Fraunces', serif !important;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem) !important;
  line-height: 1.05 !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  color: var(--charcoal, #2B2B2B);
  margin-bottom: 1.25rem !important;
  font-variation-settings: "opsz" 96;
  max-width: 22ch;
}

.article-header .article-image {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 2rem !important;
  border-radius: 18px !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 24px 60px -28px rgba(43, 43, 43, 0.28) !important;
}

/* Snippet zone: cleaner, no gradient */
.article-header .snippet-zone {
  background: var(--cream, #FFF8F0) !important;
  border: 0 !important;
  border-left: 3px solid var(--sage, #B4C7A8) !important;
  border-radius: 0 14px 14px 0 !important;
  padding: 1.1rem 1.5rem !important;
  margin: 0 0 2rem !important;
  font-size: 1.05rem;
  line-height: 1.65;
}
.article-header .snippet-zone p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
}
.article-header .snippet-zone strong {
  font-weight: 600;
  color: var(--charcoal, #2B2B2B);
}

/* Meta cards: cleaner grid, tighter */
.meta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  margin: 1.75rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(43, 43, 43, 0.08);
  border-bottom: 1px solid rgba(43, 43, 43, 0.08);
  background: transparent !important;
}
.meta-card {
  padding: 0.5rem 0.75rem !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.meta-card-label {
  font-size: 0.7rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #888 !important;
  font-weight: 500 !important;
}
.meta-card-value {
  font-family: 'Fraunces', serif !important;
  font-weight: 500 !important;
  font-size: 1.1rem !important;
  color: var(--charcoal, #2B2B2B) !important;
  letter-spacing: -0.005em;
}
.gi-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
}
.gi-low { background: var(--sage, #B4C7A8); color: #2c3a26; }
.gi-medium { background: var(--cream, #FFF8F0); color: #8a6a3a; border: 1px solid rgba(138, 106, 58, 0.2); }
.gi-high { background: rgba(255, 138, 115, 0.18); color: #b04a35; }

/* Share buttons: ghost, left-aligned */
.article-header .share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-start;
  margin: 1rem 0 0;
}
.article-header .share-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(43, 43, 43, 0.14) !important;
  background: #fff !important;
  color: var(--charcoal, #2B2B2B) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background 0.15s, border-color 0.15s, color 0.15s !important;
  transform: none !important;
}
.article-header .share-btn:hover {
  background: var(--charcoal, #2B2B2B) !important;
  border-color: var(--charcoal, #2B2B2B) !important;
  color: #fff !important;
}
.article-header .share-btn.share-native {
  background: var(--coral, #FF8A73) !important;
  border-color: var(--coral, #FF8A73) !important;
  color: #fff !important;
  display: none;
}
.article-header .share-btn.share-native:hover {
  background: #f57862 !important;
  border-color: #f57862 !important;
}
.article-header .share-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------- Body content (when food has long-form description) ---------- */
.article-content > p:first-of-type::first-letter {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 4.5rem;
  line-height: 0.85;
  float: left;
  margin: 0.45rem 0.7rem -0.05rem 0;
  color: var(--coral, #FF8A73);
}
.article-content h2 {
  font-family: 'Fraunces', serif !important;
  font-weight: 500 !important;
  font-size: clamp(1.6rem, 2.4vw, 2rem) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
  margin: 3rem 0 1.1rem !important;
}
.article-content h3 {
  font-family: 'Fraunces', serif !important;
  font-weight: 500 !important;
  font-size: 1.35rem !important;
  margin: 2.25rem 0 0.75rem !important;
}
.article-content p {
  font-size: 1.075rem;
  line-height: 1.78;
  max-width: 68ch;
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: clamp(1.85rem, 7vw, 2.5rem) !important;
    max-width: none;
  }
  .meta-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress::before {
    animation: none !important;
    transform: scaleX(0);
  }
}
