/* Beer Map – mobile first. Base styles target phones; wider screens are layered on with min-width queries. */
:root {
  --amber: #F2A900;
  --amber-soft: #FFE9A8;
  --copper: #C4701A;
  --stout: #2B1A0E;
  --foam: #FFF8E7;
  --wheat: #F6E3B4;
  --hop: #5E7F2E;
  --danger: #A3321B;
  --ink-soft: #7a5a3a;
  --surface: #ffffff;
  --line: #EFE3C6;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(43, 26, 14, .12), 0 8px 24px rgba(43, 26, 14, .12);
  --topbar-h: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--foam); color: var(--stout);
  -webkit-font-smoothing: antialiased; line-height: 1.45;
}
a { color: var(--copper); }
h1, h2 { line-height: 1.2; margin: 0; }
button { font: inherit; color: inherit; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.inline { display: inline; margin: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: relative; z-index: 1300; flex: none; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: 0 max(.75rem, env(safe-area-inset-left)); background: var(--surface);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px rgba(43, 26, 14, .06);
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--stout); font-weight: 800; letter-spacing: -.01em; }
.brand-mug { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--amber); font-size: 1.1rem; }
.brand-name { font-size: 1.1rem; }
.topbar .btn, .navlink { white-space: nowrap; }
.topbar nav { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.who { display: none; color: var(--ink-soft); font-size: .9rem; max-width: 10ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide-xs { display: none; }
.brand-name { display: none; }
.navlink { color: var(--stout); text-decoration: none; font-weight: 600; font-size: .9rem; padding: .35rem .5rem; border-radius: 999px; }
.navlink:hover, .navlink[aria-current] { background: var(--wheat); }
.seg { display: inline-flex; margin: 0; padding: 2px; background: var(--wheat); border-radius: 999px; }
.seg button { border: 0; background: transparent; padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.seg button.active { background: var(--stout); color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: 999px;
  background: var(--amber); color: var(--stout); font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: #ffbc21; }
.btn:active { transform: scale(.98); }
.btn.small { min-height: 36px; padding: 0 .9rem; font-size: .9rem; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--stout); }
.btn.ghost:hover { background: var(--wheat); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.block-btn { width: 100%; }
.link-btn { background: none; border: 0; padding: .25rem 0; cursor: pointer; color: var(--copper); text-decoration: underline; }
.danger-text { color: var(--danger); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--stout); cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.icon-btn.danger { width: 32px; height: 32px; font-size: .9rem; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- Toasts ---------- */
.toasts { list-style: none; margin: 0; padding: 0; }
body > .toasts { position: fixed; z-index: 2000; top: calc(var(--topbar-h) + .5rem); left: 50%; transform: translateX(-50%); width: min(92vw, 420px); }
.toasts li { padding: .7rem 1rem; border-radius: 12px; background: var(--stout); color: var(--foam); box-shadow: var(--shadow); margin-bottom: .4rem; font-size: .95rem; }
.toasts li.success { background: var(--hop); color: #fff; }
.toasts li.error { background: var(--danger); color: #fff; }
.inline-toasts { padding: .75rem 1rem 0; }

/* ---------- Map page ---------- */
.map-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#map { position: absolute; inset: 0; z-index: 0; background: #e8e4d8; }
.leaflet-control-zoom { display: none; }
.leaflet-container { font: inherit; }
.beer-pin { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); transition: transform .15s; transform-origin: 50% 100%; }
.beer-pin.selected { transform: scale(1.35); }
.beer-cluster {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 2px; border-radius: 50%;
  background: var(--amber); color: var(--stout); font-weight: 800; border: 3px solid var(--stout);
  box-shadow: 0 0 0 4px rgba(242, 169, 0, .35), var(--shadow);
}
.beer-cluster.m { width: 48px; height: 48px; margin: -2px; }
.beer-cluster.l { width: 56px; height: 56px; margin: -6px; background: var(--copper); color: #fff; }
.beer-pin.new { animation: bounce .6s infinite alternate; }
@keyframes bounce { to { transform: translateY(-6px); } }

.hint {
  position: absolute; z-index: 1000; top: .75rem; left: 50%; transform: translateX(-50%);
  max-width: 90%; padding: .55rem 1rem; border-radius: 999px; background: var(--stout); color: var(--amber);
  font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); text-align: center;
}
.hint[hidden] { display: none; }

.fabs {
  position: absolute; z-index: 1000; right: max(.75rem, env(safe-area-inset-right));
  bottom: calc(1.6rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: .6rem;
}
.fab {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 52px; min-width: 52px; padding: 0 1.1rem;
  border: 0; border-radius: 999px; background: var(--amber); color: var(--stout); font-weight: 800; box-shadow: var(--shadow); cursor: pointer;
}
.fab.secondary { width: 46px; min-width: 46px; height: 46px; padding: 0; background: var(--surface); }
.fab.active { background: var(--stout); color: var(--amber); }
.fab span { display: none; }
.panel-open .fabs { display: none; }

/* ---------- Panel: bottom sheet on phones ---------- */
.panel {
  position: absolute; z-index: 1100; left: 0; right: 0; bottom: 0; height: 62%;
  display: flex; flex-direction: column; background: var(--surface);
  border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(43, 26, 14, .28);
  transform: translateY(104%); visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), height .28s ease, visibility 0s .28s;
}
.panel.open { transform: none; visibility: visible; transition-delay: 0s; }
.panel.expanded { height: 100%; border-radius: 0; }
.panel-bar { position: relative; flex: none; height: 34px; display: grid; place-items: center; }
.grab { width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.panel-bar .icon-btn { position: absolute; top: 4px; right: 10px; z-index: 5; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
.loading { padding: 2.5rem; text-align: center; font-size: 2rem; animation: bounce .6s infinite alternate; }

/* ---------- Panel content ---------- */
.hero {
  display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 1rem;
  scrollbar-width: none;
}
.hero::-webkit-scrollbar { display: none; }
.hero figure { position: relative; flex: 0 0 82%; margin: 0; scroll-snap-align: center; }
.hero figure:only-child { flex-basis: 100%; }
.hero img { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: 14px; background: var(--wheat); }
.hero figure form { position: absolute; top: 8px; right: 8px; margin: 0; }
.hero.empty { display: grid; place-items: center; height: 120px; margin: 0 1rem; border-radius: 14px; background: linear-gradient(135deg, var(--wheat), var(--amber-soft)); font-size: 3rem; }
.poi-main { padding: 1rem 1rem .5rem; }
.poi-main h1 { font-size: 1.5rem; letter-spacing: -.01em; }
.rating-row { display: flex; align-items: center; gap: .4rem; margin: .35rem 0; }
.mugs span { filter: grayscale(1) opacity(.3); font-size: .95rem; }
.mugs span.on { filter: none; }
.desc { margin: .5rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .85rem; border-radius: 999px; background: var(--wheat); color: var(--stout); text-decoration: none; font-weight: 600; font-size: .9rem; }
.chip:hover { background: var(--amber-soft); }
.block { padding: 1rem; border-top: 1px solid var(--line); }
.block h2 { font-size: 1.05rem; margin-bottom: .6rem; }
.rate-form { display: flex; gap: .25rem; margin: 0 0 .4rem; }
.rate-form .mug { width: 48px; height: 48px; font-size: 1.5rem; border: 0; border-radius: 12px; background: var(--foam); filter: grayscale(1) opacity(.45); cursor: pointer; }
.rate-form .mug.on { background: var(--amber-soft); filter: none; }
.stack { display: flex; flex-direction: column; gap: .7rem; }
.stack .btn { align-self: flex-start; }
.comments { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.comments li { display: flex; gap: .7rem; }
.avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--amber); font-weight: 800; }
.c-body { min-width: 0; overflow-wrap: anywhere; }
.c-meta { font-size: .85rem; color: var(--ink-soft); }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 700; }
.danger-zone[open] summary { margin-bottom: .6rem; }

/* ---------- Forms ---------- */
input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--foam); font: inherit; font-size: 1rem; color: var(--stout);
}
textarea { resize: vertical; }
input[type=file] { width: 100%; font-size: .9rem; }
input:focus, textarea:focus { outline: 2px solid var(--amber); border-color: var(--amber); }
form label { display: block; font-weight: 600; margin-bottom: .25rem; font-size: .9rem; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: .25rem 0; font-size: .9rem; }
.helptext { display: block; color: var(--ink-soft); font-size: .8rem; }
.form-actions { display: flex; gap: .5rem; }
form div:has(> label) { margin-bottom: .2rem; }

/* ---------- Auth pages / About ---------- */
.about h2 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; }
.about ul { padding-left: 1.2rem; margin: 0; }
.about li { margin-bottom: .35rem; }
.about p:last-child { margin-bottom: 0; }
.auth { flex: 1; overflow-y: auto; display: grid; place-items: start center; padding: 1.25rem 1rem 3rem; }
.auth-card { width: 100%; max-width: 420px; padding: 1.5rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 1rem; }
.auth-mug { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: .75rem; border-radius: 50%; background: var(--amber); font-size: 1.8rem; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 480px) {
  .brand-name { display: inline; }
  .who { display: inline; }
  .hide-xs { display: inline-flex; }
}
@media (min-width: 768px) {
  .leaflet-control-zoom { display: block; }
  .fab span { display: inline; }
  .fab { padding: 0 1.3rem; }
  .fab.secondary { padding: 0; }
  .panel-open .fabs { display: flex; }

  /* Side panel, like Google Maps */
  .panel {
    top: 0; right: auto; width: 400px; height: 100%; border-radius: 0;
    transform: translateX(-104%); box-shadow: 6px 0 30px rgba(43, 26, 14, .22);
  }
  .panel.expanded { height: 100%; border-radius: 0; }
  .panel-bar { height: 0; }
  .grab { display: none; }
  .panel-bar .icon-btn { top: 10px; right: 10px; }
  .hero figure { flex-basis: 90%; }
  .hero img { height: 220px; }
  .auth { padding-top: 3rem; }
}

/* ---------- Footer ---------- */
/* Deliberately understated: same colour as the page, tiny and faded; it fully appears on hover/focus. */
.footer {
  flex: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 1rem;
  padding: .3rem 1rem calc(.3rem + env(safe-area-inset-bottom)); background: var(--foam); color: var(--ink-soft);
  font-size: .7rem; line-height: 1.3; opacity: .55; transition: opacity .2s;
  position: relative; z-index: 1300;
}
.footer:hover, .footer:focus-within { opacity: 1; }
.footer nav { display: flex; gap: .75rem; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- Legal placeholder pages ---------- */
.legal { max-width: 640px; }
.legal h2 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; }
.placeholder-note { padding: .6rem .8rem; border-radius: 10px; background: var(--amber-soft); border: 1px dashed var(--copper); font-weight: 600; }

/* ---------- About / marketing page ---------- */
.scroll { flex: 1; min-height: 0; overflow-y: auto; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
.btn.big { min-height: 52px; padding: 0 1.6rem; font-size: 1.05rem; }
.btn.ghost-light { background: transparent; color: var(--foam); border: 2px solid rgba(255, 248, 231, .5); }
.btn.ghost-light:hover { background: rgba(255, 248, 231, .12); }
.btn.dark { background: var(--stout); color: var(--amber); }
.btn.dark:hover { background: #45291a; }

.hero-band {
  position: relative; overflow: hidden; color: var(--foam); padding: 3rem 0 4.5rem;
  background: radial-gradient(circle at 85% 10%, rgba(242, 169, 0, .35), transparent 45%), linear-gradient(160deg, var(--stout), #4a2a12);
}
.eyebrow { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: rgba(242, 169, 0, .18); color: var(--amber); font-weight: 700; font-size: .85rem; }
.hero-band h1 { margin: 1rem 0 .75rem; font-size: clamp(2.2rem, 8vw, 4rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.hero-band h1 em { font-style: normal; color: var(--amber); }
.lead { max-width: 36rem; font-size: 1.1rem; color: var(--wheat); margin: 0 0 1.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.floaties { position: absolute; right: 1rem; bottom: -.5rem; display: none; gap: 1rem; font-size: 4rem; opacity: .9; transform: rotate(-8deg); }

.stats {
  position: relative; z-index: 1; margin-top: -2.2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
  padding: 1rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center;
  width: calc(100% - 2.5rem);
}
.stats strong { display: block; font-size: 1.6rem; color: var(--copper); font-weight: 900; }
.stats span { color: var(--ink-soft); font-size: .85rem; }

.section { padding-top: 3rem; padding-bottom: .5rem; }
.section-title { font-size: clamp(1.5rem, 5vw, 2.2rem); text-align: center; letter-spacing: -.02em; margin-bottom: 1.5rem; }
.features { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.features article { padding: 1.25rem; background: var(--surface); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(43, 26, 14, .1); }
.f-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: .75rem; border-radius: 14px; background: var(--amber-soft); font-size: 1.6rem; }
.features h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.features p { margin: 0; color: var(--ink-soft); }

.testimonials { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.testimonial { margin: 0; padding: 1.25rem; background: var(--surface); border-radius: var(--radius); border-top: 4px solid var(--amber); box-shadow: 0 1px 3px rgba(43, 26, 14, .1); display: flex; flex-direction: column; gap: .75rem; }
.testimonial blockquote { margin: 0; font-size: 1.05rem; font-style: italic; flex: 1; }
.testimonial figcaption { display: flex; align-items: center; gap: .7rem; }

.cta-band { margin-top: 3.5rem; padding: 3rem 0; text-align: center; background: var(--amber); }
.cta-band h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); letter-spacing: -.02em; }
.cta-band p { margin: .5rem 0 1.25rem; }

@media (min-width: 600px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .floaties { display: flex; }
}
@media (min-width: 900px) {
  .hero-band { padding: 5rem 0 6rem; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .testimonials { grid-template-columns: repeat(3, 1fr); }
  .floaties { font-size: 6rem; right: 3rem; bottom: 1rem; }
  .stats { max-width: 700px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
