/* Garden detail + index page styles */

/* Slideshow dots — chic, rounded, small (desktop + mobile) */
.vignette__dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 999px !important;
}
.vignette__dots { gap: 8px !important; }

/* Slide counter above stage — smaller + subdued */
.vignette__count { font-size: clamp(0.72rem, 0.85vw, 0.85rem) !important; color: var(--ink-faint) !important; }

/* Temporarily hide slide caption/study overlay on all vignettes */
.vignette__overlay { display: none !important; }

/* ---- Hero ---- */
.g-hero {
  position: relative;
  margin-top: 0;
  height: 82vh;
  min-height: 560px;
  max-height: 820px;
  overflow: hidden;
  background: var(--botanical-deep);
  color: #f9faf7;
  display: flex;
  align-items: flex-end;
}
.g-hero__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.g-hero__media img {
  width: 100%; height: 100%; object-fit: cover;
}
/* Darken overlay for text legibility */
.g-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(14,19,16,0.25) 0%,
    rgba(14,19,16,0.45) 55%,
    rgba(14,19,16,0.75) 100%);
  z-index: 1;
  pointer-events: none;
}
.g-hero__body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(3rem, 6vw, 5rem);
  max-width: 960px;
}
.g-hero .eyebrow { color: var(--gold); }
.g-title {
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-style: italic;
  font-weight: 400;
  color: #f9faf7;
  margin: 0.5rem 0 1.5rem;
}
.g-title em {
  color: var(--gold);
  font-style: italic;
  margin-left: 0.25em;
}
.g-hero p.g-lede,
.g-hero .g-lede {
  max-width: 48ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: rgba(249,250,247,0.92);
}
/* No-image fallback (Palisades preview legacy) */
.g-hero--no-image {
  height: auto; min-height: 0; max-height: none;
  background: transparent; color: var(--ink);
  display: block;
}
.g-hero--no-image::after { display: none; }
.g-hero--no-image .g-title { color: var(--ink); }
.g-hero--no-image .g-title em { color: var(--gold-dark); }
.g-hero--no-image .g-lede { color: var(--ink-soft); }
.g-hero--no-image .g-hero__body {
  padding-block: clamp(6rem, 10vw, 10rem) clamp(2rem, 4vw, 4rem);
}

/* ---- Plate grid ---- */
.g-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
.g-row--1 { grid-template-columns: 1fr; }
.g-row--2 { grid-template-columns: 1fr; }
.g-row--3 { grid-template-columns: 1fr; }

@media (min-width: 760px) {
  .g-row { gap: 1.5rem; margin-bottom: 1.5rem; }
  .g-row--2 { grid-template-columns: 1fr 1fr; }
  .g-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}

.g-cell { margin: 0; }
.g-cell .media {
  aspect-ratio: 4/5;
  background: var(--bg-low);
}
.g-cell--full .media  { aspect-ratio: 16/9; }
.g-cell--half .media  { aspect-ratio: 4/5; }
.g-cell--third .media { aspect-ratio: 3/4; }

/* --- Orientation-aware rows (set by site.js) ---
   Rows whose images all share one orientation get a single
   uniform aspect ratio, so side-by-side plates crop to the
   same height and there are no weird gaps. */
.g-row.is-landscape .media,
.g-row.is-landscape .g-cell--full .media,
.g-row.is-landscape .g-cell--half .media,
.g-row.is-landscape .g-cell--third .media { aspect-ratio: 3/2; }

.g-row.is-portrait .media,
.g-row.is-portrait .g-cell--full .media,
.g-row.is-portrait .g-cell--half .media,
.g-row.is-portrait .g-cell--third .media { aspect-ratio: 4/5; }

.g-row.is-square .media { aspect-ratio: 1/1; }

/* Solo landscape plates render at natural aspect — no crop when alone in a row */
.g-row.is-landscape.is-solo .media,
.g-row.is-landscape.is-solo .g-cell--full .media,
.g-row.is-landscape.is-solo .g-cell--half .media,
.g-row.is-landscape.is-solo .g-cell--third .media {
  aspect-ratio: auto;
  height: auto;
}
.g-row.is-landscape.is-solo .media img {
  height: auto;
  object-fit: contain;
}

/* Solo portrait plates: cap to a landscape crop — a full-width portrait
   is too scrolly. Crops to 3/2 with object-position: center. */
.g-row.is-portrait.is-solo .media,
.g-row.is-portrait.is-solo .g-cell--full .media,
.g-row.is-portrait.is-solo .g-cell--half .media,
.g-row.is-portrait.is-solo .g-cell--third .media {
  aspect-ratio: 3/2;
}
.g-row.is-portrait.is-solo .media img {
  object-fit: cover;
  object-position: center;
}

.g-cell .media img { object-fit: cover; }

/* ---- Prev / index / next ---- */
.g-nav {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem clamp(16px, 3vw, 28px);
  border-top: 1px solid var(--rule);
  background: rgba(244, 245, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: var(--max);
  margin: 0 auto 1.75rem;
  padding-inline: var(--gutter);
}
.g-nav__link, .g-nav__index {
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: color .4s var(--ease);
}
.g-nav__link { text-align: left; }
.g-nav__link--next { text-align: right; align-items: flex-end; }
.g-nav__index { text-align: center; align-items: center; }
.g-nav__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  color: var(--ink);
  transition: color .4s var(--ease);
}
.g-nav__link:hover .g-nav__name,
.g-nav__index:hover .g-nav__name { color: var(--gold-dark); }
.g-nav__index .g-nav__name { font-style: normal; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-family: var(--font-body); font-weight: 500; }

/* ---- Gardens INDEX page ---- */
.gindex {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 2rem;
  margin-top: 4rem;
}
@media (min-width: 720px)  { .gindex { grid-template-columns: repeat(2, 1fr); gap: 4rem 2rem; } }
@media (min-width: 1100px) { .gindex { grid-template-columns: repeat(3, 1fr); gap: 5rem 2.5rem; } }

.gindex-card { display: flex; flex-direction: column; gap: 1rem; }
.gindex-card .media { aspect-ratio: 4/5; }
.gindex-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.gindex-card__loc {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.gindex-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  transition: color .4s var(--ease), transform .5s var(--ease);
}
.gindex-card:hover .gindex-card__name { color: var(--gold-dark); }

/* Index map columns — filter */
.gindex-filter {
  display: flex; flex-wrap: wrap; gap: 2rem;
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.gindex-filter button {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-block: 4px;
  border: none;
  border-bottom: 1px solid transparent;
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.gindex-filter button:hover { color: var(--ink); }
.gindex-filter button.is-active {
  color: var(--ink);
  border-bottom-color: var(--gold-dark);
}

/* ============================================================
   Mobile polish — garden / vignette pages
   ============================================================ */
@media (max-width: 859px) {
  .g-hero { height: 62vh; min-height: 420px; }

  .vignette { padding: 0.75rem var(--gutter) 2.5rem !important; }
  .vignette__top { padding-bottom: 0.6rem !important; margin-bottom: 0 !important; }
  .vignette__back { font-size: 0.58rem !important; letter-spacing: 0.22em !important; }
  .vignette__count { font-size: 0.58rem !important; letter-spacing: 0.18em !important; }

  .vignette__overlay { display: none; }

  .vignette__controls {
    margin-top: 0.5rem !important;
    gap: 0.75rem !important;
    justify-content: space-between;
  }
  .vignette__stage { aspect-ratio: 4 / 3 !important; }
  .vignette__dots { gap: 6px !important; flex-wrap: nowrap; }
  .vignette__dot  { width: 4px !important; height: 4px !important; border-radius: 999px !important; }
  .vignette__arrow { width: 28px !important; height: 28px !important; }
  .vignette__arrow svg { width: 12px; height: 12px; }

  .vignette__info { margin-top: 1.5rem !important; gap: 1.5rem !important; }
  .vignette__title { font-size: clamp(1.8rem, 8vw, 2.2rem) !important; margin: 0 0 1rem !important; max-width: none !important; }
  .vignette__rule  { margin: 0 0 1.25rem !important; }
  .vignette__dl    { gap: 0.85rem !important; }
  .vignette__dl dd { font-size: 0.98rem !important; }
  .vignette__info-prose p { font-size: 0.95rem !important; line-height: 1.6 !important; }
  .vignette__info-prose p + p { margin-top: 1rem !important; }

  .g-nav { gap: 0.5rem; padding: 1.1rem 0.9rem; }
  .g-nav__link, .g-nav__index { gap: 0.1rem; }
  .g-nav__name { font-size: 0.85rem; }
  .g-nav__index .g-nav__name { font-size: 0.5rem; letter-spacing: 0.16em; }
  .g-nav .eyebrow { font-size: 0.52rem; letter-spacing: 0.2em; margin-bottom: 0; }

  .g-row { gap: 0.6rem; margin-bottom: 0.6rem; }
}
