/* Briloner Bierbande — Galerie. Same monochrome language as the
   landing page. Photos render as CSS backgrounds (no <img>), with a
   repeating diagonal watermark tile layered over every cell and the
   lightbox — friction against casual saving, not real protection. */

:root {
  --ink: #000;
  --paper: #fff;
  /* diagonal "BRILONER BIERBANDE" tile, ~8% white */
  --wm: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='260'%20height='170'%3E%3Ctext%20x='130'%20y='90'%20fill='%23fff'%20fill-opacity='.08'%20font-family='Arial,sans-serif'%20font-size='13'%20letter-spacing='2'%20text-anchor='middle'%20transform='rotate(-24%20130%2085)'%3EBRILONER%20BIERBANDE%3C/text%3E%3C/svg%3E");
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  /* anti-download friction: no text/image selection, no iOS
     long-press callout anywhere on the gallery */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

h1, .g-back, .empty {
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', 'Franklin Gothic Bold', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.g-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
}

.g-head h1 { font-size: clamp(1.5rem, 6vw, 2.2rem); }

.g-back {
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--paper);
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ---- grid: fixed 3:4 cells (phone photos are portrait; landscape
   shots crop via cover). 2 columns on phones, 3 from 700px up. ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
}

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin: 0 auto; }
}

.cell {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  background-color: #111;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
}

.cell::after {
  /* watermark tile over every photo */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--wm);
}

.cell.loading { animation: pulse 1.2s ease-in-out infinite alternate; }

@keyframes pulse {
  from { background-color: #111; }
  to { background-color: #1e1e1e; }
}

.empty {
  text-align: center;
  padding: 4rem 1.5rem;
  font-size: 1.1rem;
  opacity: 0.85;
}

.g-foot {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ---- lightbox ---- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.96);
}

.lb-img {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.lb-wm {
  /* denser watermark in the detail view: the tile twice, offset */
  position: absolute;
  inset: 0;
  background: var(--wm), var(--wm);
  background-position: 0 0, 130px 85px;
  pointer-events: none;
}

.lb-mark {
  position: absolute;
  left: 0.9rem;
  bottom: 0.7rem;
  font-size: 0.75rem;
  opacity: 0.65;
  pointer-events: none;
}

.lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.45);
  color: var(--paper);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lb-close { top: 0.75rem; right: 0.75rem; }
.lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }

.lb-count {
  position: absolute;
  right: 0.9rem;
  bottom: 0.7rem;
  font-size: 0.85rem;
  opacity: 0.75;
  pointer-events: none;
}
