:root {
  --green: #00603a;
  --green-dark: #003d25;
  --gold: #c8a44d;
  --gold-light: #e6cf8b;
  --red: #d11f26;
  --cream: #f7f3e8;
  --ink: #1d1b16;
  --muted: #6b6557;
  --card: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

a { color: var(--green); }

/* ---------- HERO ---------- */
.hero {
  background:
    linear-gradient(160deg, rgba(0, 61, 37, 0.92), rgba(0, 96, 58, 0.86)),
    radial-gradient(circle at 80% 20%, rgba(200, 164, 77, 0.35), transparent 55%);
  background-color: var(--green-dark);
  color: #fff;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.hero__inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.hero__kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--gold-light);
  margin: 0 0 0.8rem;
  font-weight: 600;
}
.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 18px rgba(0,0,0,0.3);
}
.hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: rgba(255,255,255,0.92);
  max-width: 620px;
  margin: 0 auto 2rem;
}
.hero__actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero__stat {
  margin-top: 1.6rem;
  font-size: 0.95rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold); color: var(--green-dark); }
.btn--primary:hover { background: var(--gold-light); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); }
.btn--block { width: 100%; margin-top: 0.4rem; }

/* ---------- SECTIONS ---------- */
section { padding: 4.5rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.8rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--green-dark); }
.section-sub { color: var(--muted); font-size: 1.1rem; }

/* ---------- EXPLAINER CARDS ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
  margin-bottom: 3rem;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.card__icon { font-size: 2.2rem; margin-bottom: 0.6rem; }
.card h3 { color: var(--green-dark); font-size: 1.3rem; }
.card p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.card strong { color: var(--ink); }

/* ---------- VS ---------- */
.vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  max-width: 820px;
  margin: 0 auto;
}
.vs__col {
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow);
}
.vs__col h4 { font-size: 1.4rem; margin-bottom: 0.8rem; }
.vs__col ul { margin: 0; padding-left: 1.1rem; }
.vs__col li { margin-bottom: 0.5rem; }
.vs__col--good { background: var(--green); color: #fff; }
.vs__col--good h4 { color: var(--gold-light); }
.vs__col--meh { background: #ece7da; color: var(--ink); }
.vs__col--meh h4 { color: var(--muted); }

/* ---------- MAP ---------- */
.map-section { max-width: 1280px; }
.map-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.city-filter {
  font-family: "Space Grotesk", sans-serif; font-weight: 600; color: var(--green-dark);
  display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.city-filter select {
  font-family: "Inter", sans-serif; font-weight: 600; text-transform: none;
  letter-spacing: 0; padding: 0.6rem 0.9rem; border: 1.5px solid #d8d0bb;
  border-radius: 10px; background: #fff; font-size: 1rem; min-width: 200px; color: var(--ink);
}
.map-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.2rem;
  height: 620px;
}
#leaflet-map {
  height: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1;
}
.sidebar {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar__head {
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid #eee5d0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.sidebar__head h3 { margin: 0; color: var(--green-dark); }
.sidebar__count { color: var(--muted); font-size: 0.9rem; }
.bar-list { list-style: none; margin: 0; padding: 0.5rem; overflow-y: auto; flex: 1; }
.bar-item {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s ease;
  border: 1px solid transparent;
}
.bar-item:hover { background: var(--cream); }
.bar-item.active { background: #eaf3ee; border-color: var(--green); }
.bar-item__name { font-weight: 700; font-family: "Space Grotesk", sans-serif; color: var(--green-dark); }
.bar-item__meta { font-size: 0.85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 0.5rem; }
.bar-item__price { color: var(--red); font-weight: 600; white-space: nowrap; }
.bar-item__rating { color: var(--gold); font-weight: 600; white-space: nowrap; }
.bar-item__badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--green-dark); background: var(--gold-light);
  padding: 0.1rem 0.45rem; border-radius: 999px; margin-left: 0.4rem; vertical-align: middle;
}

/* ---------- BRANDS ---------- */
.brand-legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem;
}
.brand-legend__item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--ink); }
.brand-dot {
  width: 20px; height: 20px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700;
  font-family: "Space Grotesk", sans-serif; flex: none; position: relative; overflow: hidden;
}
.brand-dot--sm {
  width: 16px; height: 16px; font-size: 0.5rem; vertical-align: middle; margin-right: 0.35rem;
}
.brand-dot__logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.beer-pill {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.18rem 0.6rem;
  border-radius: 999px; font-size: 0.82rem; font-weight: 600; font-family: "Space Grotesk", sans-serif;
  white-space: nowrap;
}
.beer-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.4rem; }

/* brand-coloured map marker (teardrop) */
.brand-marker {
  width: 36px; height: 36px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 3px solid;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.brand-marker span {
  transform: rotate(45deg); font-size: 12px; font-weight: 700;
  font-family: "Space Grotesk", sans-serif; line-height: 1;
}
.brand-marker__logo {
  position: absolute; inset: 0; margin: auto; width: 22px; height: 22px;
  transform: rotate(45deg); background: #fff; border-radius: 50%;
  object-fit: contain; padding: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
}

/* beer selection checklists */
.beer-field { border: 1.5px solid #d8d0bb; border-radius: 12px; padding: 0.8rem 1rem 1rem; margin-bottom: 1rem; }
.beer-field legend { font-weight: 600; color: var(--ink); padding: 0 0.4rem; font-size: 0.95rem; }
.beer-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.8rem; margin-bottom: 0.7rem; }
.beer-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; cursor: pointer; margin: 0; font-size: 0.9rem;
  border: 1.5px solid #e7ded0; border-radius: 10px; padding: 0.4rem 0.5rem; transition: border-color 0.12s, background 0.12s; }
.beer-check:hover { border-color: var(--gold); }
.beer-check.on { border-color: var(--green); background: #eef5f0; }
.beer-check input { width: auto; margin: 0; flex: none; }
.beer-logo {
  width: 30px; height: 30px; border-radius: 50%; flex: none; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; font-family: "Space Grotesk", sans-serif;
}
.beer-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.beer-name { font-size: 0.85rem; font-weight: 600; line-height: 1.15; }
.beer-field input[type="text"], #bm-beer-other { width: 100%; padding: 0.6rem 0.7rem; border: 1.5px solid #d8d0bb; border-radius: 10px; font-family: inherit; font-size: 0.95rem; }

/* ---------- STARS ---------- */
.stars { color: var(--gold); letter-spacing: 0.05em; font-size: 1.05rem; }
.stars .empty { color: #d8d0bb; }
.star-input { display: inline-flex; gap: 0.15rem; margin-top: 0.35rem; }
.star-input .star {
  background: none; border: none; cursor: pointer; font-size: 1.9rem; line-height: 1;
  color: #d8d0bb; padding: 0 0.05rem; transition: color 0.1s ease, transform 0.1s ease;
}
.star-input .star:hover { transform: scale(1.15); }
.star-input .star.on { color: var(--gold); }
.form-row { display: flex; gap: 0.8rem; }
.form-row label { flex: 1; }
.form-error { color: var(--red); font-size: 0.88rem; font-weight: 600; margin: 0.2rem 0 0.6rem; }

/* ---------- DETAIL ---------- */
.detail-section { padding-top: 0; }
.detail {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border-left: 6px solid var(--gold);
}
.detail__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.8rem; justify-content: space-between; }
.detail h3 { font-size: 1.9rem; color: var(--green-dark); margin: 0; }
.detail__tag {
  background: var(--green); color: #fff; font-size: 0.78rem;
  padding: 0.25rem 0.7rem; border-radius: 999px; font-weight: 600;
}
.detail__addr { color: var(--muted); margin: 0.3rem 0 1rem; }
.detail__note { font-size: 1.02rem; margin-bottom: 1.4rem; }
.detail__prices {
  background: var(--cream); border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem;
}
.detail__prices h4 { color: var(--green-dark); margin-bottom: 0.6rem; }
.price-summary { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.price-summary__item .big { font-size: 1.8rem; font-family: "Space Grotesk", sans-serif; color: var(--red); font-weight: 700; }
.price-summary__item .lbl { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.price-log { list-style: none; margin: 0; padding: 0; }
.price-log li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 0; border-bottom: 1px dashed #ddd4bd; font-size: 0.95rem;
}
.price-log li:last-child { border-bottom: none; }
.price-log .pl-note { color: var(--muted); font-size: 0.85rem; }
.price-empty { color: var(--muted); font-style: italic; }

/* ---------- MODAL ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.modal__panel {
  position: relative; background: #fff; border-radius: var(--radius);
  padding: 1.5rem 1.75rem 1.75rem; width: 100%; max-width: 420px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); z-index: 1;
}
.modal__panel h3 { color: var(--green-dark); margin-bottom: 0.2rem; padding-right: 1.5rem; }
.modal__bar { color: var(--gold); font-weight: 700; font-family: "Space Grotesk", sans-serif; margin: 0 0 1.2rem; }
.modal__close {
  position: sticky; top: 0; float: right; margin: -0.4rem -0.6rem 0 0;
  border: none; background: none; z-index: 2;
  font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted);
}
.modal form label { display: block; margin-bottom: 1rem; font-weight: 600; color: var(--ink); }
.modal form input, .modal form select {
  width: 100%; margin-top: 0.3rem; padding: 0.7rem 0.8rem; font-size: 1rem;
  border: 1.5px solid #d8d0bb; border-radius: 10px; font-family: inherit; background: #fff;
}
.modal form input:focus, .modal form select:focus { outline: none; border-color: var(--green); }
.modal__hint { font-size: 0.82rem; color: var(--muted); text-align: center; margin: 0.8rem 0 0; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 3rem 1.5rem; color: var(--muted); font-size: 0.9rem; max-width: 760px; margin: 0 auto; }
.footer__credit { font-size: 0.8rem; margin-top: 0.6rem; }

/* ---------- LEAFLET MARKER ---------- */
.tank-marker {
  background: var(--green);
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid var(--gold);
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
}
.tank-marker span { transform: rotate(45deg); font-size: 15px; }
.leaflet-popup-content { font-family: "Inter", sans-serif; }
.popup-name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--green-dark); }
.popup-addr { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 0.5rem; }
.popup-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.2rem; }
.popup-btn {
  display: inline-block; background: var(--gold); color: var(--green-dark);
  padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  font-family: "Space Grotesk", sans-serif; font-size: 0.85rem; cursor: pointer; border: none;
}
.popup-link {
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.85rem;
  color: var(--green); text-decoration: none; white-space: nowrap;
}
.popup-link:hover { text-decoration: underline; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; height: auto; }
  #leaflet-map { height: 60vh; min-height: 360px; }
  .sidebar { height: 320px; }
  .vs { grid-template-columns: 1fr; }
}
