/* ============================================================
   TRNDIE — City page v2.1  (city-v2.njk)
   Loaded on top of style.css. Inherits all :root tokens.
   ============================================================ */

/* ── Per-city palette ────────────────────────────────────────
   To assign a palette to a new v2.1 city, add a block:

     .cityv2[data-city="<slug>"] {
       --city-accent: #..;  primary accent: pills, hearts, active states
       --city-tint:   #..;  soft wash behind accented surfaces
       --city-ink:    #..;  dark ground for typography covers
     }

   Keep it a temperature nudge — subtle, not a costume.
   Melbourne reads warm amber. Future cities shift accordingly.
   ──────────────────────────────────────────────────────────── */

.cityv2 {
  --city-accent: #E8490F;
  --city-tint:   #FFF1EC;
  --city-ink:    #1C1C1C;
}

.cityv2[data-city="melbourne"] {
  --city-accent: #C0712B;
  --city-tint:   #F7EEDF;
  --city-ink:    #2A1D0E;
}

body.page-city-v2,
body.page-venues-all {
  background: var(--cream);
}

/* Safely hide elements that carry the `hidden` attribute,
   even when CSS gives them an explicit display value. */
.cityv2 [hidden],
.all-venues [hidden] { display: none !important; }

/* ── Header ─────────────────────────────────────────────── */

.cityv2-head {
  background: var(--dark);
  color: var(--cream);
  padding: 26px 20px 24px;
}

.cityv2-head-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.cityv2-back {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 22px;
  transition: color 0.15s;
}
.cityv2-back:hover { color: var(--cream); }

.cityv2-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -1.8px;
  line-height: 1;
}

.cityv2-tagline {
  font-size: 0.92rem;
  color: var(--text-3);
  margin-top: 10px;
  max-width: 480px;
}

.cityv2-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.cityv2-stamp {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

.cityv2-tier {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--city-accent);
  border: 1px solid var(--city-accent);
  border-radius: 100px;
  padding: 3px 10px;
}

/* ── Vibe filter strip ───────────────────────────────────────
   Mobile  : fixed to viewport bottom — always in reach.
   Desktop : sticky under the header as you scroll.
   ──────────────────────────────────────────────────────────── */

.vibe-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(245, 242, 236, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.vibe-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.vibe-strip-inner::-webkit-scrollbar { display: none; }

/* ── Pills (strip + in-card) ─────────────────────────────── */

.vibe-pill,
.vcard-vibe {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 13px;
  border: 1px solid var(--border-2);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  line-height: 1;
}

.vibe-pill { flex-shrink: 0; }

.vibe-pill:hover,
.vcard-vibe:hover {
  border-color: var(--city-accent);
  color: var(--city-accent);
}

.vibe-pill.is-active,
.vcard-vibe.is-active {
  background: var(--city-accent);
  border-color: var(--city-accent);
  color: #fff;
}

.vibe-clear {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.vibe-clear:hover { color: var(--text); }

/* ── Main content ────────────────────────────────────────── */

.cityv2-main {
  /* Bottom padding clears the fixed strip on mobile */
  padding: 26px 20px calc(76px + env(safe-area-inset-bottom, 0px));
}

.cityv2-main-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.cityv2-empty {
  padding: 60px 20px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-2);
}

/* ── Venue grid ──────────────────────────────────────────── */

.venue-grid-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* ── Card shell ──────────────────────────────────────────── */

.vcard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.vcard:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

/* ── Cover zone ──────────────────────────────────────────── */

.vcard-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--city-ink);
}

/* Real photo — swaps in cleanly once cover_photo_url is populated */
.vcard-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Typography fallback cover — designed, not a placeholder */
.vcard-typo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  overflow: hidden;
  color: var(--cream);
  /* Warm dark ground with a faint top-right glow using the city accent */
  background:
    radial-gradient(ellipse 80% 60% at 110% -10%, color-mix(in srgb, var(--city-accent) 18%, transparent), transparent 60%),
    var(--city-ink);
}

/* Venue name on typography cover */
.vcard-typo-name {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.06;
}
/* Accent bar above the name */
.vcard-typo-name::before {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  background: var(--city-accent);
  border-radius: 2px;
  margin-bottom: 10px;
}

.vcard-typo-vibes {
  position: relative;
  margin-top: 9px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.55);
}

/* Heart / save button — top-right corner */
.vcard-save {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.50);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.12s;
}
.vcard-save:hover { transform: scale(1.09); }
.vcard-save:active { transform: scale(0.94); }

.vcard-save svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
.vcard-save.is-saved             { background: var(--city-accent); }
.vcard-save.is-saved svg         { fill: #fff; stroke: #fff; }

/* ── Card body ───────────────────────────────────────────── */

.vcard-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 11px;
  padding: 16px 16px 18px;
}

.vcard-headrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.vcard-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--text);
}

.vcard-suburb {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.vcard-copy {
  font-size: 0.875rem;
  line-height: 1.63;
  color: var(--text-2);
}

.vcard-musttry {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-2);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.vcard-musttry-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--city-accent);
  margin-right: 4px;
}

/* Push vibes to bottom so card bottoms align in multi-col grid */
.vcard-vibes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
}

.vcard-sources {
  font-size: 0.71rem;
  color: var(--text-3);
}
.vcard-sources-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.63rem;
  font-weight: 700;
  margin-right: 3px;
}
.vcard-sources a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--text-3);
  transition: color 0.13s;
}
.vcard-sources a:hover { color: var(--text); }

/* ── Footer ──────────────────────────────────────────────── */

.cityv2-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--dark);
  font-size: 0.78rem;
  color: var(--text-3);
}
.cityv2-foot-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cream);
  font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablet : 2-column grid ─────────────────────────────── */

@media (min-width: 600px) {
  .venue-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Desktop : strip moves to sticky top, 3-column grid ─── */

@media (min-width: 720px) {
  .vibe-strip {
    position: sticky;
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid var(--border);
  }
  .vibe-strip-inner {
    flex-wrap: wrap;
    overflow: visible;
    padding: 13px 24px;
  }
  .cityv2-head     { padding: 42px 24px 36px; }
  .cityv2-main     { padding: 36px 24px 72px; }
  .cityv2-foot     { padding: 22px 24px; }
}

@media (min-width: 960px) {
  .venue-grid-v2 {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ============================================================
   ALL VENUES PAGE  — every cafe across every city
   ============================================================ */

.all-venues {
  --city-accent: var(--accent);
  --city-tint:   var(--accent-bg);
  --city-ink:    #1C1C1C;
}

.all-venues-head {
  background: var(--dark);
  color: var(--cream);
  padding: 26px 20px 24px;
}

.all-venues-head-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.all-venues-back {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 22px;
  transition: color 0.15s;
}
.all-venues-back:hover { color: var(--cream); }

.all-venues-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -1.4px;
  line-height: 1.02;
}

.all-venues-tagline {
  font-size: 0.95rem;
  color: var(--text-3);
  margin-top: 10px;
  max-width: 560px;
  line-height: 1.55;
}

.all-venues-meta {
  margin-top: 18px;
}

.all-venues-stamp {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ── Filters ─────────────────────────────────────────────── */

.all-venues-filters {
  background: rgba(245, 242, 236, 0.97);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.all-venues-filters-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.filter-row-label {
  flex-shrink: 0;
  align-self: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  min-width: 38px;
}

.filter-row-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* City chips reuse the pill geometry from .vibe-pill but with a
   neutral resting state — clearly a different filter axis from vibes. */
.city-chip {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 13px;
  border: 1px solid var(--border-2);
  border-radius: 100px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  line-height: 1;
}
.city-chip:hover {
  border-color: var(--text);
  color: var(--text);
}
.city-chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--cream);
}

.filter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 16px;
}

.filter-active {
  font-size: 0.72rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.filter-clear {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.filter-clear:hover { color: var(--text); }

/* ── Main grid area ─────────────────────────────────────── */

.all-venues-main {
  padding: 26px 20px 60px;
}

.all-venues-main-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.all-venues-empty {
  padding: 60px 20px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-2);
}

/* ── Per-card city line (only shown on All Venues page) ─── */

.vcard-city-line {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: -4px;
}
.vcard-city-line a { color: inherit; }
.vcard-city-line a:hover { text-decoration: underline; text-underline-offset: 3px; }

.vcard-name-link { color: inherit; }
.vcard-name-link:hover { color: var(--accent); }

@media (min-width: 720px) {
  .all-venues-head     { padding: 42px 24px 36px; }
  .all-venues-filters-inner { padding: 16px 24px; }
  .all-venues-main     { padding: 36px 24px 72px; }
}

