/* ═══════════════════════════════════════════════════════════════
   guide.bridge.css — vinesandplates.com
   P6-C follow-up: unify the 36 legacy-template pages with the
   46 Garden-template pages (style.guide.css).

   Strategy (fleet-css-bridge pattern):
   1. Alias every legacy token (--color-*, --space-*, --text-*, --radius-*)
      to the corresponding Garden value so legacy var() references resolve
      to the Garden palette.
   2. Port the structural classes legacy pages use that guide.css lacks:
      hero BEM (hero__overlay/content/region-tag/title/subhead),
      content-section, region-grid/grid-browse, breadcrumb, affiliate-note.
   3. Load AFTER style.guide.css on legacy pages only. The 46 Garden pages
      never load this file — zero regression risk.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Legacy token aliases → Garden values ────────────────────── */
:root {
  /* colors */
  --color-ink: var(--palette-primary);            /* #271513 */
  --color-ink-soft: var(--ink-soft);              /* #4E4640 */
  --color-paper: var(--canvas);                   /* cream page bg */
  --color-paper-dim: var(--line-light);           /* #EAE8E0 */
  --color-rule: var(--line-light);
  --color-accent: var(--palette-action);          /* #BB3F5C */
  --color-accent-ink: var(--on-dark);
  --color-accent-glow: var(--palette-focus);
  --color-focus: var(--palette-focus);
  --color-shadow: var(--shadow);

  /* layout */
  --content-max: 1200px;
  --content-wide: 1200px;
  --content-narrow: 760px;
  --measure: 68ch;

  /* motion */
  --dur-fast: 150ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* fonts */
  --font-wordmark: var(--wordmark);

  /* nav */
  --nav-bg: var(--palette-primary);

  /* radius */
  --radius-full: var(--radius-pill);

  /* rules */
  --rule-thin: 1px;
  --rule-thick: 3px;

  /* spacing (map to Garden ladder) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* text ladder (matches Garden article scale) */
  --text--2: 0.75rem;
  --text--1: 0.85rem;
  --text-0: 1rem;
  --text-1: 1.125rem;
  --text-2: 1.5rem;
  --text-3: 2rem;
  --text-4: 2.75rem;
}

/* ── 2. Structural class ports (Garden-mapped) ─────────────────── */

/* Hero BEM — same visual contract as the Garden article header:
   dark overlay, white Fraunces title, uppercase region tag. */
.hero--full-bleed {
  position: relative; overflow: hidden;
  min-height: clamp(360px, 60vh, 640px);
  display: flex; align-items: center; justify-content: center;
}
.hero--full-bleed .hero-img,
.hero-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero--full-bleed .hero__overlay,
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom,
    rgba(20, 8, 6, 0.45) 0%,
    rgba(20, 8, 6, 0.55) 55%,
    rgba(20, 8, 6, 0.72) 100%);
}
.hero--full-bleed .hero__content,
.hero__content {
  position: relative; z-index: 2;
  max-width: 48rem; width: 100%;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}
.hero__region-tag {
  font-family: var(--wordmark);
  font-size: var(--text--1); font-weight: 600;
  color: var(--gold-200);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--space-sm); display: block;
}
.hero__title {
  font-family: var(--display);
  font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem);
  font-weight: 700; line-height: 1.12; letter-spacing: -0.02em;
  color: var(--on-dark);
  max-width: var(--content-wide); margin: 0 auto;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}
.hero__subhead {
  font-size: var(--text-1);
  color: var(--text-on-dark);
  margin: var(--space-md) auto 0; max-width: 42rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.hero__subhead a { color: var(--gold-200); text-decoration: underline; }

/* Breadcrumb (singular BEM variant used on legacy pages) */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  margin: 0 0 var(--space-md);
  font-size: var(--text--1); color: var(--ink-soft);
}
.breadcrumb__link { color: var(--ink-soft); text-decoration: none; }
.breadcrumb__link:hover { color: var(--palette-action); text-decoration: underline; }
.breadcrumb__sep { color: var(--ink-muted); }

/* Content section — matches Garden article measure + rhythm */
.content-section {
  max-width: var(--measure); margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}
.content-section h2 {
  font-family: var(--display);
  font-size: var(--text-3); font-weight: 600;
  letter-spacing: -0.02em; color: var(--color-ink);
  margin-bottom: var(--space-sm);
}
.content-section h2::after {
  content: ""; display: block;
  width: var(--space-lg); height: var(--rule-thick);
  background: var(--color-accent); margin-top: var(--space-2xs);
}
.content-section h3 {
  font-family: var(--display);
  font-size: var(--text-2); color: var(--color-ink);
  margin: var(--space-lg) 0 var(--space-sm);
}
.content-section p, .content-section li {
  color: var(--ink-soft); line-height: 1.7;
  margin-bottom: var(--space-sm);
}
.content-section a { color: var(--palette-action); text-decoration: underline; }

/* Region grid / browse grid */
.region-grid, .grid-browse {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.region-grid .region-card, .grid-browse .region-card {
  background: var(--palette-primary);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease-out);
}
.region-grid .region-card:hover { transform: translateY(-3px); }
.region-grid .region-card h3 { color: var(--on-dark); font-family: var(--display); }
.region-grid .region-card a { color: var(--gold-200); text-decoration: none; }

/* Affiliate note — regulatory disclosure above cards */
.affiliate-note {
  font-size: var(--text--1);
  color: var(--ink-soft);
  background: var(--line-light);
  border-left: 3px solid var(--palette-action);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-lg) auto;
  max-width: var(--measure);
}

/* Legacy cards keep Garden card anatomy (dark card, white text) —
   ensure the article-card variants match too */
.product-card .tour-card__meta,
.tour-card__meta { color: var(--text-on-dark-soft); }
.tour-card__title { color: var(--on-dark); font-family: var(--display); }

/* ── 3. Inline page-utility components (ported from legacy inline <style>
        blocks, Garden-mapped so pages that previously carried these in
        <style> keep them after the swap) ──────────────────────────── */

/* Hero height + image position tuning */
.hero--full-bleed { min-height: 70vh; }
.hero--full-bleed .hero-img { background-position: center 40%; }

/* Sticky pill nav (editorial/compare pages) */
.nav-pill {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--palette-primary);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-pill);
  margin: 1rem auto; max-width: fit-content;
  position: sticky; top: 1rem; z-index: 50;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}
.nav-pill a { color: var(--text-on-dark); text-decoration: none; padding: 0.25rem 0.6rem; border-radius: var(--radius-pill); }
.nav-pill a:hover { background: var(--palette-primary-mid); color: var(--gold-200); }
.nav-pill a[aria-current="page"] { background: var(--palette-primary-mid); color: var(--gold-200); font-weight: 600; }

/* Browse grid (region cards on editorial pages) */
.region-grid.grid-browse {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin: 2rem 0;
}

/* Row layouts: season / day / format / tour-type */
.season-row, .day-row, .format-row, .tour-type {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 1.25rem; padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-light);
}
.season-row:last-child, .day-row:last-child, .format-row:last-child, .tour-type:last-child { border-bottom: none; }
.season-row .months, .day-row .when, .format-row .label, .tour-type .label {
  font-weight: 600; color: var(--palette-action);
}
.season-row .note, .day-row .what, .format-row .detail, .tour-type .detail {
  font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft);
}

/* Tables */
.quick-table, .distance-table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.95rem;
}
.quick-table th, .quick-table td, .distance-table th, .distance-table td {
  text-align: left; padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line-light); vertical-align: top;
}
.quick-table th, .distance-table th {
  font-weight: 600; background: var(--line-light); color: var(--palette-primary);
}

/* Comparison rows */
.compare-row {
  display: grid; grid-template-columns: 220px 1fr 1fr 1fr;
  gap: 1rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-light);
  align-items: start; font-size: 0.95rem;
}
.compare-row.head {
  font-weight: 600; background: var(--line-light);
  padding: 0.75rem; border-radius: var(--radius-sm); border-bottom: none;
  color: var(--palette-primary);
}
.compare-row .label { font-weight: 600; }
.compare-row .cell { line-height: 1.5; }

/* Cost cards */
.cost-card {
  background: var(--line-light); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem; margin: 1.25rem 0;
  border-left: 3px solid var(--palette-action);
}
.cost-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--palette-primary); font-family: var(--display); }
.cost-card .price-band { font-size: 1.6rem; font-weight: 700; color: var(--palette-action); margin: 0.25rem 0; }

/* Judgment / verdict line */
.judgment { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--ink-soft); line-height: 1.4; }

/* Card image sizing + empty reviews */
.card-img, .tour-card__image { height: 180px; object-fit: cover; }
.tour-card__reviews:empty { display: none; }

/* Mobile sticky bar (mobile-sticky-bar utility) */
@media (max-width: 768px) {
  .mobile-sticky-bar { display: flex !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; }
  .region-grid.grid-browse { grid-template-columns: 1fr; }
  .hero--full-bleed { min-height: 55vh; }
  .season-row, .day-row, .format-row, .tour-type { grid-template-columns: 1fr; gap: 0.35rem; }
  .compare-row { grid-template-columns: 1fr; gap: 0.4rem; padding: 0.75rem 0; }
  .compare-row.head { display: none; }
}
