/* =====================================================================
   BEACH INDEX  (/beaches/)
   Filterable card grid. Everything here is prefixed b* so it cannot
   collide with anything else that lands in this shared file.
   ===================================================================== */

/* ------------------------------------------------------- the picker panel
   Heading, the link to the six-question finder and the three filter rows,
   all in one block, so the beaches start high up the page. */
.bpanel {
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* Tinted off the themed surface, not off two fixed light values, so the
     panel and its text stay legible in dark mode. */
  background: var(--bg-alt);
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--shallow) 16%, var(--bg-alt)),
    color-mix(in srgb, var(--sandy) 32%, var(--bg-alt)));
  box-shadow: var(--shadow);
}
.bpanel-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  margin: 0 0 18px;
}
.bpanel-hd .eyebrow { margin: 0 0 4px; }
.bpanel-hd h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  letter-spacing: -.02em;
  margin: 0;
}
.bpanel-hd .btn-solid { flex: none; padding: 12px 22px; }

/* -------------------------------------------------------------- filters */
.bfilters { display: grid; gap: 12px; }
.bfrow { display: grid; grid-template-columns: 130px 1fr; gap: 6px 16px; align-items: start; }
.bflab {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.bfset { display: flex; flex-wrap: wrap; gap: 8px; }
.bfilters .chip { font-family: var(--font-sans); }
.bfilters .chip:focus-visible { outline: 2px solid var(--shallow); outline-offset: 2px; }

.bempty {
  margin: 0;
  padding: 28px 0 8px;
  color: var(--text-soft);
  font-size: .95rem;
}
.bempty .chip { margin-left: 8px; }

/* ----------------------------------------------------------------- grid */
.bgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.bcard {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .28s var(--ease, cubic-bezier(.16,.84,.34,1)), box-shadow .28s;
}
.bcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.bcard[hidden] { display: none; }

.bcard-ph { display: block; overflow: hidden; background: var(--bg-sunk); }
.bcard-ph img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  transition: transform .6s var(--ease, cubic-bezier(.16,.84,.34,1));
}
.bcard:hover .bcard-ph img { transform: scale(1.05); }

/* No honest photograph exists for this beach, so it gets a typographic
   plate rather than a picture of somewhere else. */
.bcard-plate {
  position: relative;
  height: 168px;
  display: flex;
  align-items: flex-end;
  padding: 16px 18px;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(111,197,192,.30), transparent 62%),
    linear-gradient(160deg, var(--bg-sunk), var(--bg-alt));
  border-bottom: 1px solid var(--line);
}
.bcard-big {
  position: absolute;
  left: 18px; top: 44px;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--aegean);
  font-feature-settings: "tnum" 1;
}
.bcard-lab {
  position: absolute;
  left: 19px; top: 92px;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.bcard-sub {
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: .85;
}
.bcard-mark {
  position: absolute;
  left: 18px; top: 20px;
  width: 62px; height: 14px;
  background:
    linear-gradient(var(--shallow), var(--shallow)) 0 0 / 62px 2px no-repeat,
    linear-gradient(var(--shallow), var(--shallow)) 0 6px / 40px 2px no-repeat,
    linear-gradient(var(--shallow), var(--shallow)) 0 12px / 52px 2px no-repeat;
  opacity: .8;
}

.bcard-bd { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.bcard-bd h3 {
  margin: 0 0 8px;
  font-size: 1.14rem;
  font-weight: 500;
  letter-spacing: -.02em;
}
.bcard-bd h3 a { color: var(--text); text-decoration: none; }
.bcard-bd h3 a:hover { color: var(--aegean); }
.bcard-bd h3 a::after { content: ""; position: absolute; inset: 0; }
.bcard { position: relative; }
.bcard-bd > p {
  margin: 0 0 14px;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.bcard-facts { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.bcard-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.bcard-facts span {
  flex: none;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.bcard-facts b {
  font-size: .76rem;
  font-weight: 500;
  text-align: right;
  color: var(--text);
  font-feature-settings: "tnum" 1;
}

.bcard-tags { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.btag {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .04em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-sunk);
  color: var(--text-soft);
  border: 1px solid var(--line);
}
.btag--warn { color: var(--bougie); border-color: var(--bougie); background: transparent; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btag--warn { color: color-mix(in srgb, var(--bougie) 62%, var(--wash)); border-color: color-mix(in srgb, var(--bougie) 62%, var(--wash)); }
}
:root[data-theme="dark"] .btag--warn { color: color-mix(in srgb, var(--bougie) 62%, var(--wash)); border-color: color-mix(in srgb, var(--bougie) 62%, var(--wash)); }

/* ---------------------------------------------------------- three notes */
.bnotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.bnote {
  padding: 22px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bnote h3 { margin: 0 0 10px; font-size: 1.02rem; font-weight: 500; letter-spacing: -.015em; }
.bnote p { margin: 0 0 10px; font-size: .92rem; line-height: 1.5; color: var(--text-soft); }
.bnote p.mono {
  margin: 0;
  color: var(--pine);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bnote p.mono { color: var(--shallow); }
}
:root[data-theme="dark"] .bnote p.mono { color: var(--shallow); }
.bmore { margin: 22px 0 0; font-size: .92rem; color: var(--text-soft); }

/* ------------------------------------------------------------- narrow */
@media (max-width: 620px) {
  .bfrow { grid-template-columns: 1fr; }
  .bflab { margin: 0; }
  .bfilters { gap: 14px; }
  .bpanel { padding: 18px; }
  .bpanel-hd .btn-solid { width: 100%; justify-content: center; }
  .bgrid { grid-template-columns: 1fr; }
  .bcard-ph img, .bcard-plate { height: 150px; }
  .bcard-facts li { flex-direction: column; gap: 2px; }
  .bcard-facts b { text-align: left; }
}

/* ------------------------------------------------- page rhythm and hero
   The two top sections read as one block, so the beaches start high up
   the page rather than after two full section gaps. */
#all { padding: 30px 0 88px; }
#all .resultcount { margin: 16px 0 14px; }
