/* ==========================================================================
   guidebook.css — the full guidebook page. Loads on top of rustico.css and
   reuses its tokens (--cream, --terra, --olive, --serif …), so it inherits the
   concept rather than restating it.
   ========================================================================== */

/* --- Masthead ------------------------------------------------------------ */

.gb-top {
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3rem);
  background:
    linear-gradient(rgba(247, 241, 230, 0.9), rgba(247, 241, 230, 0.97)),
    var(--cream-2);
}
.gb-top .dsp { margin-top: 0.15rem; }
.gb-top .lede { margin-top: 1rem; }

.crumbs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.crumbs a { color: var(--terra); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.gb-tally {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
@media (min-width: 640px) { .gb-tally { grid-template-columns: repeat(4, 1fr); } }
.gb-tally li {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--round);
  padding: 1rem 0.9rem;
  text-align: center;
  display: grid;
  gap: 0.15rem;
}
.gb-tally b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.2rem);
  line-height: 1;
  color: var(--terra);
}
.gb-tally span { font-size: 0.74rem; color: var(--ink-3); }

/* --- Map ----------------------------------------------------------------- */

.gb-mapwrap { padding-block: clamp(1.5rem, 4vw, 2.5rem); }

.gb-map {
  height: clamp(20rem, 60vh, 34rem);
  border: 1px solid var(--line);
  border-radius: var(--round);
  overflow: hidden;
  background: var(--cream-2);
  z-index: 0;                 /* keep tiles under the sticky header */
}
.gb-map__fallback { display: grid; place-items: center; height: 100%; padding: 2rem; }
.gb-map__fallback p { max-width: 32rem; text-align: center; color: var(--ink-3); }

.gb-map__note { margin-top: 0.7rem; font-size: 0.82rem; color: var(--ink-3); }

/* Round pins drawn in CSS — no marker sprites to load. */
.gb-pin span {
  display: block;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--pin);
  border: 3px solid var(--ring);
  box-shadow: 0 1px 4px rgba(58, 45, 34, 0.45);
}
.leaflet-container { font: inherit; background: var(--cream-2); }
.leaflet-popup-content { font-size: 0.88rem; line-height: 1.5; }
.leaflet-popup-content b { font-family: var(--serif); font-size: 1.05rem; }
.gb-pop__kind { color: var(--terra); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; }
.leaflet-popup-content a { color: var(--terra); }

/* --- Filter -------------------------------------------------------------- */

.gb-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-block: clamp(1rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--line);
}
.chip {
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.chip:hover { border-color: var(--terra); color: var(--terra); }
.chip.is-on { background: var(--terra); border-color: var(--terra); color: #fff; }
.gb-filter__count { margin-left: auto; font-size: 0.8rem; color: var(--ink-3); }

/* --- Place list ---------------------------------------------------------- */

.gb-zone { padding-block: clamp(2.5rem, 6vw, 4rem); }

.gb-list {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.25rem);
}
@media (min-width: 700px)  { .gb-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1150px) { .gb-list { grid-template-columns: repeat(3, 1fr); } }

.gb-item {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--round);
  padding: 1.3rem 1.35rem 1.1rem;
  display: grid;
  gap: 0.45rem;
  align-content: start;
  scroll-margin-top: 5rem;
}
.sec--tint .gb-item { background: var(--cream); }
.gb-item:target { border-color: var(--terra); box-shadow: 0 0 0 3px rgba(180, 85, 47, 0.16); }

.gb-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}
.gb-item h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.2;
  text-wrap: balance;
}
.gb-kind {
  flex: none;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
/* One colour per kind group, shared with the map pins. Each is checked for
   >=4.5:1 against both cream backgrounds. */
.gb-kind--dining  { background: rgba(168, 72, 42, 0.13);  color: #A8482A; }
.gb-kind--cafe    { background: rgba(122, 82, 48, 0.13);  color: #7A5230; }
.gb-kind--bar     { background: rgba(138, 51, 80, 0.13);  color: #8A3350; }
.gb-kind--winery  { background: rgba(75, 107, 51, 0.14);  color: #4B6B33; }
.gb-kind--shop    { background: rgba(138, 93, 22, 0.13);  color: #8A5D16; }
.gb-kind--culture { background: rgba(47, 98, 116, 0.13);  color: #2F6274; }

/* --- Map legend ---------------------------------------------------------- */

.gb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--ink-2);
}
.gb-legend li { display: flex; align-items: center; gap: 0.4rem; }
.gb-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex: none;
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px rgba(58, 45, 34, 0.22);
}
.gb-dot--dining  { background: #A8482A; }
.gb-dot--cafe    { background: #7A5230; }
.gb-dot--bar     { background: #8A3350; }
.gb-dot--winery  { background: #4B6B33; }
.gb-dot--shop    { background: #8A5D16; }
.gb-dot--culture { background: #2F6274; }
.gb-dot--home    { background: var(--cream); border-color: var(--ink); }

.gb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-3);
}
.gb-tip { font-size: 0.94rem; line-height: 1.6; color: var(--ink-2); }

/* Entries Elena has not written a note for yet: same card, less air. */
.gb-item--brief { padding-bottom: 0.9rem; }
.gb-item--brief h3 { font-size: 1.15rem; }

.gb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.35rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--line);
  font-size: 0.8rem;
}
.gb-links a, .gb-linkish {
  color: var(--terra);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 0;
  font-size: inherit;
}
.gb-links a:hover, .gb-linkish:hover { border-color: currentColor; }

/* --- Closing ------------------------------------------------------------- */

.gb-close__in { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 880px) { .gb-close__in { grid-template-columns: 1fr 0.85fr; } }
.gb-close__in > div { display: grid; gap: 1rem; justify-items: start; }
.gb-close__in p { color: var(--ink-2); max-width: 42rem; }
.gb-close__media {
  display: block;
  border-radius: var(--round);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 10px 30px rgba(58, 45, 34, 0.14);
}

/* --- Teaser on the home page --------------------------------------------- */

.gbt__in { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 900px) { .gbt__in { grid-template-columns: 0.95fr 1fr; } }
.gbt__copy { display: grid; gap: 1rem; justify-items: start; }
.gbt__copy p { color: var(--ink-2); }

.gbt__tally { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gbt__tally li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-2);
}
.sec--tint .gbt__tally li { background: var(--cream-2); }

.gbt__picks { display: grid; gap: 0.6rem; }
.gbt__pick {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 4px solid var(--terra);
  border-radius: var(--round);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.gbt__pick:nth-child(even) { border-left-color: var(--olive); }
.gbt__pick:hover { transform: translateX(3px); }
.gbt__pick b { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.gbt__pick .gb-meta { margin-top: 0.1rem; }
.gbt__pick q { font-size: 0.88rem; color: var(--ink-2); line-height: 1.5; }
