/* Wolverhampton Whisky & Rum Club */

:root {
  --bg: #14100d;
  --bg-raised: #1d1712;
  --bg-card: #221a14;
  --line: #35291f;
  --ink: #efe6d8;
  --ink-dim: #b3a48f;
  --ink-faint: #7d6f5c;
  --whisky: #e8a33d;
  --whisky-deep: #c07f1e;
  --rum: #e05c50;
  --rum-deep: #b03d33;
  --gold-grad: linear-gradient(120deg, #e8a33d, #f5d58a 45%, #e8a33d);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(232, 163, 61, .35); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(20, 16, 13, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .02em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
}
.brand .amp { color: var(--whisky); font-style: italic; }
nav.main { margin-left: auto; display: flex; gap: 4px; }
nav.main a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
nav.main a:hover { color: var(--ink); background: rgba(255,255,255,.05); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 64px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(ellipse 55% 60% at 30% 20%, rgba(232,163,61,.14), transparent 60%),
    radial-gradient(ellipse 50% 55% at 72% 15%, rgba(224,92,80,.12), transparent 60%);
  pointer-events: none;
}
.hero .kicker {
  font-size: .78rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--whisky);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.01em;
}
.hero h1 em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--ink-dim);
  font-size: 1.05rem;
}

/* stats row */
.stats {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 6vw, 72px);
  margin-top: 52px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
}
.stat span {
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.stat.whisky b { color: var(--whisky); }
.stat.rum b { color: var(--rum); }

/* ---------- Section scaffolding ---------- */
section { padding: 72px 0; }
.sec-head { margin-bottom: 32px; }
.sec-head .kicker {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--whisky);
}
.sec-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin-top: 6px;
}
.sec-head p { color: var(--ink-dim); max-width: 620px; margin-top: 8px; }

/* ---------- Map ---------- */
#map-section { padding-top: 24px; }
.map-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
#map { height: 620px; background: #0e1b24; }

.map-controls {
  position: absolute;
  z-index: 1000;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  flex-wrap: wrap;
}
.map-controls > div { display: flex; gap: 8px; pointer-events: auto; flex-wrap: wrap; }

.chip {
  border: 1px solid var(--line);
  background: rgba(20, 16, 13, .92);
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.chip.on-all.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on-whisky.active { background: var(--whisky); color: #1c1207; border-color: var(--whisky); }
.chip.on-rum.active { background: var(--rum); color: #fff; border-color: var(--rum); }
.chip.view { font-size: .76rem; }

.map-legend {
  position: absolute;
  z-index: 1000;
  bottom: 14px;
  left: 14px;
  background: rgba(20, 16, 13, .92);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .78rem;
  color: var(--ink-dim);
  display: flex;
  gap: 16px;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.w { background: var(--whisky); box-shadow: 0 0 8px rgba(232,163,61,.8); }
.dot.r { background: var(--rum); box-shadow: 0 0 8px rgba(224,92,80,.8); }

/* leaflet marker + popup theming */
.pin {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.75);
  box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 0 12px 2px rgba(0,0,0,.4);
  transition: transform .15s;
}
.pin.w { background: var(--whisky); box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 0 14px 3px rgba(232,163,61,.55); }
.pin.r { background: var(--rum); box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 0 14px 3px rgba(224,92,80,.5); }
.leaflet-marker-icon:hover .pin { transform: scale(1.45); }

.leaflet-popup-content-wrapper {
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px -12px rgba(0,0,0,.9);
}
.leaflet-popup-tip { background: var(--bg-raised); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 14px 18px; font-family: var(--font-body); }
.pop h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.pop .where { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; margin: 2px 0 10px; }
.pop.w .where { color: var(--whisky); }
.pop.r .where { color: var(--rum); }
.pop ul { list-style: none; }
.pop li { padding: 3px 0; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--ink-dim); }
.pop li:first-child { border-top: 0; }
.pop a.more { display: inline-block; margin-top: 10px; font-size: .8rem; color: var(--whisky); text-decoration: none; }
.pop a.more:hover { text-decoration: underline; }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-faint); }

/* ---------- Catalogue ---------- */
.cat-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
}
.cat-tools input[type="search"] {
  flex: 1 1 240px;
  max-width: 340px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .92rem;
  padding: 11px 16px;
  border-radius: 999px;
  outline: none;
  transition: border-color .2s;
}
.cat-tools input[type="search"]:focus { border-color: var(--whisky-deep); }
.cat-tools input::placeholder { color: var(--ink-faint); }

.group-block { margin-bottom: 40px; }
.group-block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.group-block h3 .count { font-family: var(--font-body); font-size: .75rem; color: var(--ink-faint); letter-spacing: .1em; }
.group-block h3 .tag {
  font-family: var(--font-body);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: auto;
}
.tag.w { color: var(--whisky); border: 1px solid rgba(232,163,61,.4); }
.tag.r { color: var(--rum); border: 1px solid rgba(224,92,80,.4); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); border-color: #4a3a2a; }
.card .b-name { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; line-height: 1.3; }
.card .b-brand { font-size: .8rem; color: var(--ink-dim); }
.card .b-where { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.card .b-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card .buy { font-size: .76rem; color: var(--whisky); text-decoration: none; white-space: nowrap; }
.card .buy:hover { text-decoration: underline; }

/* ---------- Meetings ---------- */
.meeting {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 18px;
}
.meeting.next-meeting { border-color: var(--whisky-deep); box-shadow: 0 14px 50px -20px rgba(232,163,61,.4); }
.meeting.past { opacity: .92; }
.m-head {
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  position: relative;
  padding-right: 38px; /* keeps the × clear of the date/badges however they wrap */
}
.m-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; }
.m-badge {
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--whisky);
  color: #1c1207;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.m-badge.dim { background: transparent; color: var(--ink-faint); border: 1px solid var(--line); }
.m-kind {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 11px;
  border-radius: 999px;
  font-weight: 600;
}
.m-kind.w { color: var(--whisky); border: 1px solid rgba(232,163,61,.45); }
.m-kind.r { color: var(--rum); border: 1px solid rgba(224,92,80,.45); }
.m-kind.s { color: var(--ink); border: 1px solid var(--ink-faint); background: rgba(255,255,255,.05); }
.m-theme { color: var(--ink-dim); font-style: italic; font-size: .95rem; }
.log-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.m-bottle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}
.mb-info b { font-weight: 600; font-size: .96rem; }
.mb-info span { display: block; font-size: .8rem; color: var(--ink-dim); }

/* forms */
form.add-bottle, #plan-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
#plan-form { border-top: 0; padding: 18px 4px; }
#plan-form label { color: var(--ink-faint); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
form.add-bottle input, form.add-bottle select, #plan-form input, #plan-form select {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .88rem;
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s;
  flex: 1 1 150px;
  min-width: 0;
  color-scheme: dark;
}
form.add-bottle select { flex: 0 1 110px; }
#plan-form input[type="date"] { flex: 0 1 170px; }
form.add-bottle input:focus, #plan-form input:focus { border-color: var(--whisky-deep); }
form input::placeholder { color: var(--ink-faint); }

.btn {
  background: var(--whisky);
  color: #1c1207;
  border: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .03em;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s, background .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: #f2b455; }
.btn.ghost { background: transparent; color: var(--whisky); border: 1px solid var(--whisky-deep); }
.btn.ghost:hover { background: rgba(232,163,61,.1); }

.hidden-note {
  color: var(--ink-dim);
  font-size: .86rem;
  padding: 12px 0 2px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}

/* add-bottle form: a shelf search, or a clearly-separate "new to us" block */
form.add-bottle { display: block; }
.fld { display: flex; flex-direction: column; gap: 5px; flex: 0 1 auto; min-width: 0; }
/* the generic form rule sets flex-basis 150px, which becomes the HEIGHT once the field
   is a column — needs to outrank `form.add-bottle input` on specificity */
form.add-bottle .fld input,
form.add-bottle .fld select { flex: 0 0 auto; width: 100%; }
.fld.grow { flex: 1 1 220px; }
.fld-label {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.fld-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.search-fld { margin-bottom: 14px; }
.search-fld input { width: 100%; }

.identity-fields, .spec-fields {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin-top: 4px;
}
form.add-bottle.matched .identity-fields { display: none; }
.spec-head { font-size: .8rem; color: var(--ink-dim); margin-bottom: 12px; }

/* inline spec editor on a shelf card */
.detail-btn {
  margin-top: 10px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-size: .74rem;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.detail-btn:hover { color: var(--whisky); border-color: var(--whisky-deep); }
.spec-edit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spec-edit input, .spec-edit select {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .85rem;
  padding: 8px 12px;
  border-radius: 9px;
  outline: none;
  width: 100%;
  color-scheme: dark;
}
.spec-edit input:focus, .spec-edit select:focus { border-color: var(--whisky-deep); }
.spec-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn.small { padding: 7px 16px; font-size: .78rem; }
.spec-hint { font-size: .72rem; color: var(--ink-faint); }
.new-head {
  font-size: .8rem;
  color: var(--ink-dim);
  margin-bottom: 12px;
}
.opt { text-transform: none; letter-spacing: 0; font-size: .68rem; opacity: .7; }
.specs {
  display: block;
  font-size: .76rem;
  color: var(--whisky);
  letter-spacing: .02em;
  margin: 1px 0 2px;
}
.card .specs { margin: 2px 0 0; }
.preview .specs { display: inline; }

.preview { font-size: .84rem; color: var(--ink-dim); margin-bottom: 4px; }
.preview b { color: var(--ink); font-weight: 600; }
.preview .ok { color: var(--whisky); }
.preview .warn { color: var(--ink-faint); }

.pin.added { border-style: dashed; }

.add-toggle { margin-top: 14px; }
.add-toggle summary {
  cursor: pointer;
  color: var(--ink-faint);
  font-size: .8rem;
  letter-spacing: .04em;
  list-style: none;
  padding: 6px 0;
  width: fit-content;
}
.add-toggle summary::-webkit-details-marker { display: none; }
.add-toggle summary::before { content: "+ "; color: var(--whisky); }
.add-toggle summary:hover { color: var(--ink); }

/* on the next meeting it's the main thing you came to do, so make it a real button */
#next-add { margin-top: 18px; }
#next-add > summary {
  background: var(--whisky);
  color: #1c1207;
  font-weight: 600;
  font-size: .85rem;
  padding: 11px 22px;
  border-radius: 999px;
  transition: transform .15s, background .2s;
}
#next-add > summary::before { content: none; }
#next-add > summary:hover { color: #1c1207; background: #f2b455; transform: translateY(-1px); }
#next-add[open] > summary { background: transparent; color: var(--ink-faint); border: 1px solid var(--line); }
#next-add[open] > summary:hover { background: transparent; color: var(--ink); }
.add-toggle form.add-bottle { margin-top: 0; }

/* remove buttons */
button.x {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: color .2s, border-color .2s, background .2s;
}
button.x:hover { color: var(--rum); border-color: var(--rum); background: rgba(224,92,80,.1); }
button.x.head { position: absolute; top: -2px; right: 0; margin-left: 0; }

/* rating cell (stars + club average) */
.rate-cell { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.m-bottle .rate-cell { align-items: flex-end; }
.agg { font-size: .72rem; color: var(--whisky); letter-spacing: .04em; }
.agg.dim { color: var(--ink-faint); }

/* stars */
.stars { display: inline-flex; gap: 1px; cursor: pointer; }
.stars svg { width: 17px; height: 17px; fill: #453623; transition: fill .12s, transform .12s; }
.stars svg.lit { fill: var(--whisky); }
.stars svg:hover { transform: scale(1.2); }

.empty-note { color: var(--ink-faint); font-style: italic; padding: 30px 0; }

/* ---------- Passport ---------- */
.passport-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.flag-chip {
  border: 1px solid var(--line);
  background: var(--bg-raised);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .84rem;
  color: var(--ink-dim);
}
.flag-chip b { color: var(--ink); font-weight: 600; }
.next-up { margin-top: 26px; color: var(--ink-dim); font-size: .95rem; }
.next-up em { color: var(--whisky); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  color: var(--ink-faint);
  font-size: .84rem;
  text-align: center;
}
footer .drink-aware { margin-top: 8px; font-size: .76rem; }
footer a { color: var(--ink-dim); }

/* touch devices: stars need to be thumb-sized */
@media (pointer: coarse) {
  .stars { gap: 4px; }
  .stars svg { width: 24px; height: 24px; }
  button.x { width: 32px; height: 32px; }
}

/* Dropping "Wolverhampton" buys enough room to keep brand and nav on one row. */
@media (max-width: 700px) {
  .brand-place { display: none; }
  header.site .wrap { gap: 12px; }
  nav.main a { padding: 8px 8px; font-size: .78rem; }
}

/* Below this even the short name and three links won't share a row. */
@media (max-width: 460px) {
  header.site .wrap {
    flex-wrap: wrap;
    height: auto;
    gap: 0;
    padding-top: 12px;
  }
  .brand { font-size: .95rem; flex: 1 1 100%; }
  nav.main {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding: 2px 0 8px;
  }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { padding: 6px 16px 6px 0; font-size: .74rem; white-space: nowrap; }
}

@media (max-width: 640px) {
  #map { height: 440px; }
  .map-legend { display: none; }

  section { padding: 52px 0; }
  .hero { padding: 56px 0 44px; }
  .stats { margin-top: 40px; gap: 22px 34px; }

  /* map controls: smaller chips, less map buried under them */
  .chip { padding: 7px 12px; font-size: .74rem; }
  .chip.view { font-size: .7rem; }

  /* 16px stops iOS zooming the page when an input is focused */
  .cat-tools input[type="search"],
  form.add-bottle input, form.add-bottle select, #plan-form input, #plan-form select {
    font-size: 16px;
  }

  .meeting { padding: 18px 16px; }
  .m-bottle .rate-cell { align-items: flex-start; }
}
