/* The `hidden` attribute must beat a component's own display rule. A class
   selector like `.results { display: block }` has the same specificity as the
   browser's `[hidden] { display: none }`, so the author rule won and the
   results grid stayed on screen in map view. */
[hidden] { display: none !important; }

:root {
  --navy: #0c2233;
  --navy-2: #123449;
  --estuary: #1f6f8b;
  --estuary-deep: #145063;
  --brass: #e9a13b;
  --brass-deep: #c9772a;
  --sand: #f7f4ee;
  --paper: #fffdf9;
  --ink: #16242e;
  --muted: #5f6f78;
  --line: #e6e2d9;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(12,34,51,.05), 0 4px 14px rgba(12,34,51,.06);
  --shadow-md: 0 6px 22px rgba(12,34,51,.10), 0 18px 48px rgba(12,34,51,.10);
  --radius: 18px;
  --radius-lg: 26px;
  --wrap: 1180px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s;
}
/* Scrim behind a transparent header so the logo/nav stay legible over any
   hero image — light or dark. Fades out once the header turns solid on scroll. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,16,26,.5) 0%, rgba(6,16,26,0) 100%);
  opacity: 0; transition: opacity .3s ease;
}
.site-header[data-transparent="true"]:not([data-scrolled="true"])::before { opacity: 1; }
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: .8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-header[data-transparent="true"] { background: transparent; }
.site-header[data-scrolled="true"] {
  background: rgba(255,253,249,.85);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 rgba(12,34,51,.08);
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand__logo { color: var(--navy); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--navy); letter-spacing: -.02em; }
.brand__tag { font-size: .74rem; color: var(--muted); letter-spacing: .01em; }
.site-header[data-transparent="true"]:not([data-scrolled="true"]) .brand__logo {
  color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.55));
}
.site-header[data-transparent="true"]:not([data-scrolled="true"]) .brand__name { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.site-header[data-transparent="true"]:not([data-scrolled="true"]) .brand__tag { color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.5); }

.nav { display: flex; gap: .2rem; align-items: center; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--navy); font-weight: 500; font-size: .92rem;
  padding: .5rem .8rem; border-radius: 10px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(31,111,139,.1); }
.nav__cta { color: var(--estuary-deep) !important; font-weight: 600 !important; }
.site-header[data-transparent="true"]:not([data-scrolled="true"]) .nav a { color: rgba(255,255,255,.95); text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.site-header[data-transparent="true"]:not([data-scrolled="true"]) .nav a:hover { background: rgba(255,255,255,.15); }
.site-header[data-transparent="true"]:not([data-scrolled="true"]) .nav__cta { color: var(--brass) !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative; margin-top: -74px; padding-top: 74px;
  min-height: 92vh; display: flex; flex-direction: column; justify-content: center;
  color: #fff; overflow: hidden;
  /* Fallback first: browsers without image-set() get the JPEG. */
  background:
    linear-gradient(96deg, rgba(6,16,26,.82) 0%, rgba(6,16,26,.5) 42%, rgba(6,16,26,.2) 100%),
    linear-gradient(0deg, rgba(6,16,26,.72) 0%, rgba(6,16,26,0) 38%),
    url('../assets/photos/hero-humber-bridge.jpg') center 45% / cover no-repeat;
  /* Modern browsers take the WebP instead — 1665K JPEG vs 325K WebP. */
  background-image:
    linear-gradient(96deg, rgba(6,16,26,.82) 0%, rgba(6,16,26,.5) 42%, rgba(6,16,26,.2) 100%),
    linear-gradient(0deg, rgba(6,16,26,.72) 0%, rgba(6,16,26,0) 38%),
    image-set(
      url('../assets/photos/hero-humber-bridge.webp') type("image/webp"),
      url('../assets/photos/hero-humber-bridge.jpg') type("image/jpeg")
    );
}
.hero__credit {
  position: absolute; right: .8rem; bottom: .7rem; z-index: 2;
  color: rgba(255,255,255,.72); text-decoration: none; font-size: .68rem;
  background: rgba(6,16,26,.4); padding: .2rem .55rem; border-radius: 6px;
}
.hero__credit:hover { color: #fff; }
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 3rem 1.5rem 5rem;
}
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .74rem; font-weight: 600;
  color: var(--brass); margin: 0 0 1rem;
}
.hero__title {
  margin: 0 0 1.1rem; font-size: clamp(2.4rem, 6.5vw, 4.6rem); line-height: 1.02;
  font-weight: 600; text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero__title em { font-style: italic; font-weight: 500; color: var(--brass); }
.hero__lede { margin: 0 0 2rem; max-width: 46ch; font-size: clamp(1rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.9); }

.searchbar {
  display: flex; align-items: center; gap: .5rem;
  background: #fff; border-radius: 999px; padding: .4rem .4rem .4rem 1.1rem;
  width: 100%; max-width: 620px; box-shadow: var(--shadow-md);
}
.searchbar__icon { color: var(--muted); font-size: 1.3rem; line-height: 1; }
.searchbar input {
  /* min-width:0 is load-bearing. A flex item defaults to min-width:auto, and an
     input's intrinsic minimum is ~20 characters wide — so without this the
     field refuses to shrink on narrow phones and shoves the Search button out
     past the edge of the pill and off the screen. */
  flex: 1; min-width: 0;
  border: 0; outline: 0; font: inherit; font-size: 1rem; color: var(--ink);
  background: transparent; padding: .5rem 0;
}
.searchbar__go {
  border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem;
  color: #fff; background: var(--estuary); padding: .7rem 1.5rem; border-radius: 999px;
  transition: background .15s;
}
.searchbar__go:hover { background: var(--estuary-deep); }

.hero__quick { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1.3rem; font-size: .88rem; }
.hero__quick > span { color: rgba(255,255,255,.7); }
.quicklink {
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff;
  padding: .4rem .85rem; border-radius: 999px; font: inherit; font-size: .85rem; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.quicklink:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.6); }

.hero__scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  color: #fff; text-decoration: none; font-size: 1.4rem; opacity: .8;
  width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%;
  display: grid; place-items: center; animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0);} 50% { transform: translateX(-50%) translateY(6px);} }

/* ---------- Section headings ---------- */
.section-head { margin-bottom: 1.6rem; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--navy); }
.section-head p { margin: .3rem 0 0; color: var(--muted); font-size: 1.02rem; }
.section-head--tight h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.section-head--tight p { margin-top: .1rem; font-size: .92rem; font-weight: 500; }

/* ---------- Category tiles ---------- */
.tiles { max-width: var(--wrap); margin: 0 auto; padding: 4rem 1.5rem 2rem; scroll-margin-top: 80px; }
/* One column per category — 5 since bars & nightlife was added. Below 1100px
   they wrap to 3 rather than leaving a single tile stranded on its own row. */
.tiles__grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(5, 1fr); }
.tile {
  position: relative; border: 0; cursor: pointer; text-align: left;
  border-radius: var(--radius); overflow: hidden; min-height: 210px; color: #fff;
  padding: 1.3rem; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
  font-family: inherit;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tile__motif { position: absolute; top: -6px; right: -6px; width: 120px; height: 120px; opacity: .9; }
.tile__count { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.tile__name { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin-top: .15rem; }
.tile__go { display: block; margin-top: .5rem; font-size: .9rem; font-weight: 600; opacity: .9; }
.tile--photo .tile__count, .tile--photo .tile__name, .tile--photo .tile__go { text-shadow: 0 1px 12px rgba(0,0,0,.55); }
.tile__credit {
  position: absolute; right: .5rem; bottom: .5rem;
  background: rgba(12,34,51,.5); color: rgba(255,255,255,.9);
  font-size: .6rem; padding: .12rem .4rem; border-radius: 5px;
  max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Listing ---------- */
.listing { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem 1.5rem 1rem; }
.listing__bar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem;
  flex-wrap: wrap; margin-bottom: 1.6rem;
}
.listing__tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.chipset { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  padding: .45rem .9rem; border-radius: 999px; font: inherit; font-size: .88rem;
  cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--estuary); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: .5rem 2.1rem .5rem .9rem; border-radius: 999px; font: inherit; font-size: .88rem; cursor: pointer;
}
.select-wrap::after {
  content: "▾"; position: absolute; right: .9rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; font-size: .8rem;
}
.viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.viewtoggle__btn {
  border: 0; background: transparent; color: var(--navy); font: inherit; font-size: .88rem; font-weight: 500;
  padding: .5rem 1rem; cursor: pointer;
}
.viewtoggle__btn.is-active { background: var(--estuary); color: #fff; }

/* ---------- Results grid ---------- */
.results { display: block; }
.cat-section { margin-top: 2.8rem; scroll-margin-top: 80px; }
.cat-section:first-child { margin-top: .5rem; }
.cat-section__head { display: flex; align-items: baseline; gap: .7rem; margin: 0 0 1.1rem; }
.cat-section__head h2 { margin: 0; font-size: 1.5rem; color: var(--navy); }
.cat-section__count { color: var(--muted); font-size: .9rem; font-weight: 500; }

.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* "See all 22 attractions →" under a shortened category on the home page. */
.cat-more {
  display: inline-block; margin-top: 1.1rem;
  padding: .6rem 1.2rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  color: var(--estuary-deep); text-decoration: none;
  font-weight: 600; font-size: .92rem;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.cat-more:hover { border-color: var(--estuary); background: rgba(31,111,139,.06); color: var(--navy); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__coverlink { display: block; text-decoration: none; }

/* Covers (generative art) */
.cover {
  position: relative; height: 168px; overflow: hidden; display: block;
  color: #fff;
}
.cover--tall { height: 300px; }
.cover__grain {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px);
  opacity: .5;
}
.cover__motif { position: absolute; right: -8px; bottom: -12px; width: 128px; height: 128px; }
.cover__cat {
  position: absolute; top: .8rem; left: .8rem;
  background: rgba(12,34,51,.42); backdrop-filter: blur(3px);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .28rem .6rem; border-radius: 7px;
}
.cover__free {
  position: absolute; top: .8rem; right: .8rem;
  background: #2e7d51; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: .28rem .6rem; border-radius: 7px;
}
.cover__title {
  position: absolute; left: 1.1rem; right: 1.1rem; bottom: 1rem; margin: 0;
  font-size: 1.9rem; line-height: 1.05; text-shadow: 0 2px 18px rgba(0,0,0,.4);
}
.cover__credit {
  position: absolute; right: .5rem; bottom: .5rem;
  background: rgba(12,34,51,.5); color: rgba(255,255,255,.9);
  font-size: .62rem; letter-spacing: .01em; padding: .12rem .4rem; border-radius: 5px;
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cover--photo .cover__title { bottom: 1.6rem; }

.card__body { padding: 1.05rem 1.15rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.card__title { margin: 0 0 .25rem; font-size: 1.16rem; }
.card__title-link { color: var(--navy); text-decoration: none; }
.card__title-link:hover { color: var(--estuary-deep); }
.card__area { margin: 0 0 .55rem; font-size: .84rem; color: var(--muted); }
.card__area::before { content: "\1F4CD"; margin-right: .25rem; }
.card__blurb { margin: 0 0 1rem; font-size: .92rem; color: #3a4a53; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.card__detail { text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--estuary-deep); white-space: nowrap; }
.card__detail:hover { color: var(--brass-deep); }

/* Ratings */
.card__rating { font-size: .88rem; min-height: 1.2em; }
.rating-stars { color: var(--brass-deep); letter-spacing: 1px; }
.rating-value { font-weight: 700; margin-left: .3rem; }
.rating-count { color: var(--muted); font-size: .8rem; margin-left: .25rem; }
.rating-src { color: var(--muted); font-size: .72rem; margin-left: .3rem; }
.rating-none { color: var(--muted); font-size: .82rem; font-style: italic; }

.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; font-size: 1.05rem; }

/* ---------- Map ---------- */
.map {
  height: 70vh; min-height: 460px; margin-top: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.hb-pin { display: block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); }
.hb-popup { min-width: 180px; font-family: var(--sans); }
.hb-popup strong { color: var(--navy); font-size: 1rem; font-family: var(--serif); }
.hb-popup__meta { color: var(--muted); font-size: .8rem; margin: .15rem 0 .35rem; }
.hb-popup__rating { margin-bottom: .45rem; font-size: .86rem; }
.hb-popup__link { color: var(--estuary-deep); font-weight: 700; text-decoration: none; font-size: .86rem; }
.hb-popup__link:hover { color: var(--brass-deep); }
.leaflet-container { font-family: var(--sans); }

/* ---------- Events ---------- */
.events { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
.events__loading { color: var(--muted); text-align: center; padding: 2rem 0; }
.events__count { color: var(--muted); font-size: .9rem; font-weight: 600; margin: 0 0 1.4rem; text-align: center; }

/* Poster-forward card grid. flex (not grid) with no grow so a single event
   stays a poster-sized card rather than ballooning to full width. */
.events__grid { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: center; }

.ecard {
  flex: 0 1 300px; max-width: 330px; min-width: 0;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ecard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ecard__coverlink { display: block; text-decoration: none; }

/* Poster-shaped cover. Portrait so real event posters sit comfortably. */
.ecard__cover {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* A poster of unknown shape shows WHOLE (object-fit: contain), letterboxed
   against a blurred, dimmed copy of itself — so nothing is ever cropped. Posters
   are text-heavy; cropping them loses information, which is why we don't. */
.ecard__cover--photo::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--poster); background-size: cover; background-position: center;
  filter: blur(22px) brightness(.62) saturate(1.15); transform: scale(1.25);
}
.ecard__poster {
  position: relative; z-index: 1; width: 100%; height: 100%;
  object-fit: contain; transition: transform .3s ease;
}
.ecard__coverlink:hover .ecard__poster { transform: scale(1.03); }

/* Generative cover for events with no poster — keeps the grid looking designed. */
.ecard__cover--gen { color: #fff; }
.ecard__grain { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 42%); }
.ecard__motif { position: absolute; inset: 0; margin: auto; width: 58%; height: auto; opacity: .85; }

/* Date: a small chip over a poster, or big and central on a gradient cover. */
.ecard__date {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  background: rgba(12,34,51,.82); color: #fff; border-radius: 10px;
  padding: .32rem .55rem; line-height: 1; font-family: var(--sans);
}
.ecard__date b { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.ecard__date--big {
  position: relative; z-index: 1; top: auto; left: auto; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-shadow: 0 2px 14px rgba(0,0,0,.3);
}
.ecard__date--big b { font-size: 3.4rem; line-height: .85; }
.ecard__date--big span { text-transform: uppercase; letter-spacing: .16em; font-size: .95rem; margin-top: .2rem; }

.ecard__credit {
  position: absolute; right: .5rem; bottom: .5rem; z-index: 2;
  background: rgba(12,34,51,.6); color: #fff; font-size: .6rem; letter-spacing: .02em;
  padding: .12rem .4rem; border-radius: 5px; pointer-events: none;
}

.ecard__body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.ecard__title { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.2; color: var(--navy); }
.ecard__where { margin: 0; font-size: .85rem; color: var(--muted); }
/* A soft pill button — reads as tappable, fills on hover, matches the card. */
.ecard__directions {
  display: inline-flex; align-items: center; gap: .35rem;
  align-self: flex-start; padding: .42rem .85rem;
  font-size: .82rem; font-weight: 600; line-height: 1; text-decoration: none;
  color: var(--estuary-deep);
  background: rgba(31,111,139,.09);
  border: 1px solid rgba(31,111,139,.20);
  border-radius: 999px;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.ecard__directions svg { flex-shrink: 0; }
.ecard__directions:hover {
  background: var(--estuary); color: #fff; border-color: var(--estuary);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(31,111,139,.28);
}
.ecard__directions:focus-visible { outline: 2px solid var(--estuary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ecard__directions { transition: none; } }
.ecard__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.ecard__tag {
  font-size: .72rem; font-weight: 600; color: var(--estuary-deep);
  background: rgba(31,111,139,.1); padding: .2rem .55rem; border-radius: 999px; white-space: nowrap;
}
.ecard__tag--when { background: rgba(12,34,51,.08); color: var(--navy); }
.ecard__tag--free { background: rgba(46,125,81,.14); color: #1e5c3a; }
.ecard__desc {
  margin: 0; font-size: .9rem; line-height: 1.5; color: #3a4a53;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ecard__link { margin-top: auto; align-self: flex-start; padding-top: .2rem;
  text-decoration: none; font-weight: 600; font-size: .85rem; color: var(--estuary-deep); }
.ecard__link:hover { color: var(--brass-deep); }

/* On phones let each card fill the column rather than float at 300px. */
@media (max-width: 560px) {
  .ecard { flex: 1 1 100%; max-width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  .ecard, .ecard__poster { transition: none; }
}

/* "Coming up at this venue" on a place detail page. Injected by place-events.js
   only when the business actually has upcoming events, so it never shows empty. */
.place-events {
  margin: 2.5rem 0 0; padding: 1.4rem 1.5rem; background: var(--sand);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.place-events__title { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.35rem; color: var(--navy); }
.pev__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.pev {
  display: flex; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem;
}
.pev__date {
  flex: 0 0 52px; text-align: center; line-height: 1; color: #fff; border-radius: 10px; padding: .45rem .2rem;
  background: linear-gradient(155deg, var(--brass-deep), #b4471f);
}
.pev__date b { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.pev__date span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; margin-top: .15rem; }
.pev__body { flex: 1; min-width: 0; }
.pev__title { display: block; font-weight: 600; color: var(--navy); }
.pev__meta { display: block; font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.pev__link { flex-shrink: 0; text-decoration: none; font-weight: 600; font-size: .84rem; color: var(--estuary-deep); }
.pev__link:hover { color: var(--brass-deep); }
.pev__all { display: inline-block; margin-top: 1rem; font-weight: 600; font-size: .88rem;
  color: var(--estuary-deep); text-decoration: none; }
.pev__all:hover { color: var(--brass-deep); }
@media (max-width: 480px) {
  .pev { flex-wrap: wrap; }
  .pev__link { flex-basis: 100%; }
}

/* Social icon links — shared by place detail pages and event cards. Only the
   platforms a venue actually has are rendered, so this row is never empty. */
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.social-icon:hover { transform: translateY(-2px); }
.social-icon--facebook:hover  { background: #1877f2; border-color: #1877f2; color: #fff; }
.social-icon--instagram:hover { background: #e1306c; border-color: #e1306c; color: #fff; }
.social-icon--x:hover         { background: #000;     border-color: #000;     color: #fff; }
.social-icon:focus-visible { outline: 2px solid var(--estuary); outline-offset: 2px; }

/* Event card footer: the tickets link and any social icons on one row. */
.ecard__foot { margin-top: auto; padding-top: .4rem;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.ecard__foot .ecard__link { margin-top: 0; }
.ecard__foot .socials { margin-top: 0; gap: .4rem; }
.ecard__foot .social-icon { width: 30px; height: 30px; }
.ecard__foot .social-icon svg { width: 15px; height: 15px; }

@media (prefers-reduced-motion: reduce) { .social-icon { transition: none; } }

/* Bottom-of-page call to action, mirroring the homepage owner-cta but in a warm
   tone to sit with the events grid. */
.events-cta { margin: 3rem 0 0; }
.events-cta__inner {
  background: linear-gradient(120deg, rgba(233,161,59,.16), rgba(31,111,139,.10));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.7rem 2rem; display: flex; align-items: center; justify-content: space-between;
  gap: 1.4rem; flex-wrap: wrap;
}
.events-cta__text h2 { margin: 0 0 .25rem; font-family: var(--serif); font-size: 1.4rem; color: var(--navy); }
.events-cta__text p { margin: 0; color: var(--muted); max-width: 48ch; }
.events-cta .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .events-cta__inner { padding: 1.4rem 1.3rem; }
  .events-cta .btn { width: 100%; text-align: center; }
}

.events__empty { text-align: center; padding: 2.5rem 1rem; }
.events__empty h2 { color: var(--navy); margin: 0 0 .5rem; font-size: 1.4rem; }
.events__empty p { color: var(--muted); margin: .4rem auto; max-width: 46ch; }
.events__note { margin-top: 1.6rem; font-size: .88rem; color: var(--muted); }
.events__note a { color: var(--estuary-deep); }

@media (max-width: 480px) {
  .event { gap: .9rem; padding: 1rem; }
  .event__date { flex-basis: 54px; }
  /* Buy back room for the input on small phones so the placeholder is still
     readable once the button stops overflowing. */
  .searchbar { padding-left: .9rem; gap: .35rem; }
  .searchbar__icon { font-size: 1.1rem; }
  .searchbar__go { padding: .7rem 1.1rem; }
}

/* ---------- News ---------- */
.news { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
.news__list { display: flex; flex-direction: column; gap: 1.1rem; }
.news-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.news-card__title { margin: .5rem 0 .3rem; font-size: 1.35rem; }
.news-card__title a { color: var(--navy); text-decoration: none; }
.news-card__title a:hover { color: var(--estuary-deep); }
.news-card__meta { margin: 0 0 .6rem; font-size: .82rem; color: var(--muted); }
.news-card__excerpt { margin: 0 0 .9rem; color: #3a4a53; font-size: .96rem; }
.news-card__more { text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--estuary-deep); }
.news-card__more:hover { color: var(--brass-deep); }

/* Tag shown at the top of a post. "Sponsored" is deliberately the loudest,
   because paid content has to be obviously identifiable. */
.post-tag {
  display: inline-block; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: .25rem .6rem; border-radius: 7px;
  background: rgba(31,111,139,.14); color: var(--estuary-deep);
}
.post-tag--paid { background: var(--brass); color: #4a3208; }
.pagehero .post-tag { background: rgba(255,255,255,.2); color: #fff; }
.pagehero .post-tag--paid { background: var(--brass); color: #4a3208; }

.pagehero--post { text-align: left; }
.pagehero--post .pagehero__inner { max-width: 780px; }

/* ---------- 404 ---------- */
.pagehero--404 { padding-top: 8rem; padding-bottom: 4rem; }
.notfound__compass { width: 118px; height: 118px; display: block; margin: .6rem auto 1.4rem; }
/* The needle drifts rather than points — the site is by Faulty Compass, so the
   joke is the whole brand. Motion is small and slow enough to read as ambient. */
.notfound__needle { transform-origin: 60px 60px; animation: hb-drift 9s ease-in-out infinite; }
@keyframes hb-drift {
  0%, 100% { transform: rotate(-14deg); }
  50%      { transform: rotate(21deg); }
}
@media (prefers-reduced-motion: reduce) {
  .notfound__needle { animation: none; }
}
.notfound { padding: 1rem 1.5rem 4rem; }
.notfound__links {
  display: flex; flex-wrap: wrap; gap: .6rem;
  justify-content: center; max-width: 620px; margin: 1.4rem auto 0;
}
/* .cat-more carries a top margin for its usual home-page position — not wanted
   here, where the flex gap already does the spacing. */
.notfound__links .cat-more { margin-top: 0; }
.notfound__home { margin-top: 2rem; }
.post__byline { margin: .7rem 0 0; color: rgba(255,255,255,.85); font-size: .92rem; }

.post { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
.post__disclosure {
  background: rgba(233,161,59,.13); border: 1px solid rgba(233,161,59,.5);
  border-radius: var(--radius); padding: .9rem 1.1rem; margin: 0 0 1.8rem;
  font-size: .92rem; color: #5c4310;
}
.post__body { font-size: 1.06rem; line-height: 1.75; color: #2b3a43; }
.post__body p { margin: 0 0 1.1rem; }
.post__body h2 { font-size: 1.5rem; color: var(--navy); margin: 2rem 0 .7rem; }
.post__body ul { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.post__body li { margin-bottom: .4rem; }
.post__body a { color: var(--estuary-deep); }
.post__body a:hover { color: var(--brass-deep); }
.post__body strong { color: var(--navy); }

/* Images in a post. max-width:100% + height:auto is what makes them scale to
   any screen; the width/height attributes the renderer writes keep the space
   reserved so text doesn't jump while they load. */
.post__figure { margin: 1.8rem 0; }
.post__figure img {
  display: block; width: 100%; max-width: 100%; height: auto;
  border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--sand);
}
.post__figure figcaption {
  margin-top: .6rem; font-size: .88rem; color: var(--muted); line-height: 1.5;
}
/* On wide screens let images breathe a little past the text column. */
@media (min-width: 900px) {
  .post__figure { margin-left: -40px; margin-right: -40px; }
}
@media (max-width: 560px) {
  .post__figure { margin: 1.3rem 0; }
  .post__figure img { border-radius: 12px; }
}
.post__back { margin-top: 2.5rem; }
.post__back a { color: var(--estuary-deep); text-decoration: none; font-weight: 600; }

/* ---------- Prose / legal pages ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.prose h2 { color: var(--navy); font-size: 1.35rem; margin: 2rem 0 .5rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose p { margin: 0 0 .9rem; color: #33454f; }
.prose a { color: var(--estuary-deep); }
.prose a:hover { color: var(--brass-deep); }
.prose__meta { color: var(--muted); font-size: .85rem; margin-bottom: 1.6rem; }
.prose__note {
  margin-top: 2.5rem; padding: 1.1rem 1.3rem; font-size: .9rem; color: #33454f;
  background: rgba(233,161,59,.10); border: 1px solid rgba(233,161,59,.35);
  border-radius: var(--radius);
}

/* ---------- Ad slots (hidden until AdSense is configured) ---------- */
.ad-slot { display: none; }
.ad-slot.is-live {
  display: block; max-width: var(--wrap); margin: 2.5rem auto 0; padding: 0 1.5rem;
}
.ad-slot.is-live::before {
  content: "Advertisement"; display: block;
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .4rem;
}

/* ---------- Owner CTA (list your business) ---------- */
.owner-cta { max-width: var(--wrap); margin: 2.5rem auto 0; padding: 0 1.5rem; }
.owner-cta__inner {
  background: linear-gradient(120deg, rgba(31,111,139,.09), rgba(233,161,59,.10));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.7rem 2rem; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.owner-cta__text h2 { margin: 0 0 .25rem; font-size: 1.35rem; color: var(--navy); }
.owner-cta__text p { margin: 0; color: var(--muted); }
.owner-cta .btn { white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); margin-top: 4rem; }
.site-footer__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.5rem 1.5rem;
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.site-footer__brand { display: flex; gap: 1rem; align-items: center; }
.site-footer__brand .brand__name { color: #fff; }
.site-footer__brand img { color: #fff; }
.site-footer__brand p { margin: .2rem 0 0; font-size: .9rem; color: rgba(255,255,255,.65); max-width: 34ch; }
.footer-brand { color: var(--brass); font-weight: 600; }
.site-footer__nav { display: flex; flex-direction: column; gap: .5rem; }
.site-footer__nav a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .92rem; }
.site-footer__nav a:hover { color: #fff; }
/* Social links. To add another platform, copy an <a class="social-link"> in the
   footer and swap the href, aria-label and the <svg> path. */
.site-footer__social {
  max-width: var(--wrap); margin: 0 auto;
  padding: .2rem 1.5rem 1.6rem;
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
}
.site-footer__social-label {
  color: rgba(255,255,255,.6); font-size: .85rem; margin-right: .2rem;
}
.social-link {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85); text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.social-link svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.social-link:hover,
.social-link:focus-visible {
  background: var(--brass); border-color: var(--brass);
  color: var(--navy); transform: translateY(-2px);
}

.site-footer__fine {
  max-width: var(--wrap); margin: 0 auto; padding: 1.2rem 1.5rem 2.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.footer-note { font-size: .8rem; color: rgba(255,255,255,.55); margin: .3rem 0 0; }

/* ---------- Compact page hero (non-photo pages) ---------- */
.pagehero {
  margin-top: -74px; padding: 128px 1.5rem 4.5rem;
  color: #fff; text-align: center;
  background:
    radial-gradient(80% 60% at 78% 0%, rgba(233,161,59,.28), transparent 60%),
    linear-gradient(165deg, #0a2030 0%, #123449 55%, #1f6f8b 130%);
}
.pagehero__inner { max-width: 680px; margin: 0 auto; }
.pagehero h1 { margin: .3rem 0 .6rem; font-size: clamp(2rem, 5vw, 3.2rem); }
.pagehero__lede { margin: 0; color: rgba(255,255,255,.9); font-size: 1.05rem; }
.pagehero__lede a { color: var(--brass); text-decoration: none; font-weight: 600; }
.pagehero__lede a:hover { text-decoration: underline; }

/* ---------- List-your-business form ---------- */
.submit-wrap { max-width: 720px; margin: -2.5rem auto 0; padding: 0 1.5rem 4rem; }
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 2rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.field-set { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem .3rem; margin: 0 0 1.1rem; }
.field-set legend { font-weight: 600; color: var(--navy); padding: 0 .4rem; font-size: .95rem; }
.hint-inline { font-weight: 400; color: var(--muted); font-size: .82rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: .35rem; font-size: .92rem; }
.field .req { color: var(--brass-deep); }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.field textarea { min-height: 108px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass);
}
.field .hint { font-size: .8rem; color: var(--muted); margin: .3rem 0 0; }
.field .err-msg { color: #c0392b; font-size: .8rem; margin: .3rem 0 0; display: none; }
.field.error input, .field.error select, .field.error textarea { border-color: #c0392b; }
.field.error .err-msg { display: block; }
.checkbox-row { display: flex; align-items: center; gap: .55rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.checkbox-row input { width: auto; accent-color: var(--estuary); }
.form-divider { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }
/* Anti-spam honeypot: off-screen rather than display:none, because some bots
   deliberately skip fields that are display:none. People never see or tab to it. */
.hp-field {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.form-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.form-note { font-size: .85rem; color: var(--muted); margin: 1rem 0 0; }

.success { text-align: center; padding: 2.5rem 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.success__mark {
  width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 50%;
  background: rgba(46,125,81,.14); color: #2e7d51;
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 700;
}
.success h2 { color: var(--navy); margin: 0 0 .6rem; }
.success p { margin: .4rem auto; max-width: 46ch; color: #33454f; }
.success a { color: var(--estuary-deep); }
.success .btn { margin-top: 1rem; }

@media (max-width: 560px) {
  .field-row, .field-row--3 { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Detail page ---------- */
.detail { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.5rem 2rem; }
.detail--hero { max-width: none; padding: 0; }
.detail-hero {
  position: relative; min-height: 60vh; display: flex; align-items: flex-end; color: #fff;
  padding: 74px 0 0;
}
.detail-hero__cover { position: absolute; inset: 0; z-index: 0; }
.detail-hero__cover .cover { height: 100%; }
.detail-hero__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,26,38,.15), rgba(10,26,38,.75)); }
.detail-hero__inner { position: relative; z-index: 2; max-width: 960px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem 2.4rem; }
.detail-hero__cat {
  display: inline-block; background: rgba(255,255,255,.18); backdrop-filter: blur(4px);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .3rem .7rem; border-radius: 7px; margin-bottom: .8rem;
}
.detail-hero__free { background: #2e7d51; margin-left: .4rem; }
.detail-hero__title { margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.03; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.detail-hero__area { margin: .5rem 0 .7rem; font-size: 1.05rem; color: rgba(255,255,255,.9); }
.detail-hero__area::before { content: "\1F4CD"; margin-right: .3rem; }
.detail-hero__rating { font-size: 1.02rem; }
.detail-hero__rating .rating-none { color: rgba(255,255,255,.8); }

.back-link { display: inline-block; margin: 1.4rem 0 0; color: var(--estuary-deep); text-decoration: none; font-weight: 600; }
.back-link:hover { color: var(--brass-deep); }

.detail__body { display: grid; grid-template-columns: 1.35fr 1fr; gap: 2rem; align-items: start; padding: 2rem 0 0; }
.detail__blurb { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: var(--navy); margin: 0 0 1.4rem; font-weight: 400; }
.detail__facts { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; margin: 0 0 1.4rem; font-size: .95rem; }
.detail__facts dt { font-weight: 700; color: var(--navy); }
.detail__facts dd { margin: 0; color: #33454f; }
.detail__actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .94rem;
  padding: .75rem 1.3rem; border-radius: 999px; border: 1px solid var(--line); color: var(--navy); background: #fff;
  transition: .15s;
}
.btn:hover { border-color: var(--estuary); }
.btn--primary { background: var(--estuary); color: #fff; border-color: var(--estuary); }
.btn--primary:hover { background: var(--estuary-deep); }

.detail__mapwrap { position: sticky; top: 90px; }
.detail__map { height: 320px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.detail__coordnote { font-size: .78rem; color: var(--muted); margin: .5rem 0 0; }
.detail__photocredit { font-size: .78rem; color: var(--muted); margin: 1.4rem 0 0; }
.detail__photocredit a { color: var(--estuary-deep); }

.nearby { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.8rem; }
.nearby h2 { color: var(--navy); font-size: 1.5rem; margin: 0 0 1.1rem; }
.nearby__grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.nearby__card {
  text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; display: block;
}
.nearby__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.nearby__card .cover { height: 110px; }
.nearby__meta { padding: .8rem .9rem; }
.nearby__name { display: block; color: var(--navy); font-weight: 600; font-size: 1rem; font-family: var(--serif); }
.nearby__area { display: block; color: var(--muted); font-size: .82rem; margin-top: .1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tiles__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .tiles__grid { grid-template-columns: repeat(2, 1fr); }
  .detail__body { grid-template-columns: 1fr; }
  .detail__mapwrap { position: static; }
}
@media (max-width: 560px) {
  .hero { min-height: 88vh; }
  .hero__inner { padding: 2rem 1.25rem 4rem; }
  .listing__bar { flex-direction: column; align-items: stretch; }
  .tiles__grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}
