/* ══════════════════════════════════════════════════════════════
   GirafPingvin — Bo Bech GIFs  (/bo)
   Prefix: .bo-
   NB: ingen backdrop-filter på kort/gitre (Chrome-flimmer).
   ══════════════════════════════════════════════════════════════ */

.bo-hero,
.bo-gallery {
  position: relative;
  z-index: 1;
}

/* ── Hero ────────────────────────────────────────────────────── */

.bo-hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.bo-hero__kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: .75rem;
}

.bo-hero__title {
  margin: 0 0 1rem;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}

.bo-hero__title-main {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  background: linear-gradient(135deg, #C0392B 0%, #E67E22 60%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bo-hero__title-sub {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.bo-hero__lead {
  max-width: 46rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
}

.bo-hero__lead em { font-style: italic; }

.bo-hero__stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.bo-stat {
  min-width: 7rem;
  padding: .9rem 1.4rem;
  border-radius: var(--radius-card);
  background: var(--color-surface-solid);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.bo-stat__num {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1;
  color: #C0392B;
}

.bo-stat__label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
}

.bo-credit {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-align: left;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-card);
  background: rgba(192, 57, 43, .07);
  border: 1px solid rgba(192, 57, 43, .18);
}

.bo-credit__emoji { font-size: 1.6rem; line-height: 1.2; }
.bo-credit p { margin: 0; font-size: .95rem; line-height: 1.65; }

/* ── Toolbar ─────────────────────────────────────────────────── */

.bo-gallery { padding: 1rem 0 4rem; }

.bo-toolbar {
  position: sticky;
  top: 5.2rem;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  padding: .7rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: var(--color-surface-solid);
  box-shadow: var(--card-shadow);
}

.bo-search {
  position: relative;
  flex: 1 1 16rem;
  display: flex;
  align-items: center;
}

.bo-search__icon {
  position: absolute;
  left: .9rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.bo-search__input {
  width: 100%;
  padding: .6rem 2.4rem .6rem 2.6rem;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: .95rem;
}

.bo-search__input:focus {
  outline: none;
  border-color: rgba(192, 57, 43, .45);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}

.bo-search__input::-webkit-search-cancel-button { display: none; }

.bo-search__clear {
  position: absolute;
  right: .55rem;
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .07);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.bo-filters {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.bo-chip {
  padding: .5rem 1rem;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.bo-chip:hover { border-color: rgba(192, 57, 43, .35); }

.bo-chip.is-active,
.bo-chip[aria-pressed="true"] {
  background: #C0392B;
  border-color: #C0392B;
  color: #fff;
}

.bo-count {
  margin: 0 0 1.25rem;
  font-size: .85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ── Gitter ──────────────────────────────────────────────────── */

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

.bo-card {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-surface-solid);
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.bo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.bo-card[hidden] { display: none; }

.bo-card__media {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: #17110d;
  cursor: zoom-in;
  aspect-ratio: 498 / 280;
  overflow: hidden;
}

.bo-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bo-card__hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.6rem .7rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent);
  opacity: 0;
  transition: opacity .18s ease;
}

.bo-card__media:hover .bo-card__hint,
.bo-card__media:focus-visible .bo-card__hint { opacity: 1; }

.bo-card--playing .bo-card__hint { opacity: 0 !important; }

.bo-card__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .55rem .55rem .8rem;
}

.bo-card__title {
  flex: 1;
  min-width: 0;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bo-card__copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .38rem .7rem;
  border: 1px solid rgba(192, 57, 43, .25);
  border-radius: 999px;
  background: rgba(192, 57, 43, .08);
  color: #C0392B;
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.bo-card__copy:hover { background: #C0392B; color: #fff; }

.bo-card__copy.is-done {
  background: #2E7D32;
  border-color: #2E7D32;
  color: #fff;
}

.bo-empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--color-text-muted);
}

.bo-footnote {
  margin: 2.5rem auto 0;
  max-width: 44rem;
  font-size: .8rem;
  line-height: 1.6;
  text-align: center;
  color: var(--color-text-muted);
}

.bo-footnote em { font-style: italic; }

/* ── Lightbox ────────────────────────────────────────────────── */

.bo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bo-lightbox[hidden] { display: none; }

.bo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 10, 6, .82);
  cursor: zoom-out;
}

.bo-lightbox__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border-radius: 20px;
  background: var(--color-surface-solid);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.bo-lightbox__stage {
  background: #17110d;
  aspect-ratio: 498 / 280;
}

.bo-lightbox__stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bo-lightbox__close {
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.bo-lightbox__nav {
  position: absolute;
  top: calc(28% - 1.4rem);
  z-index: 2;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.bo-lightbox__nav--prev { left: .5rem; }
.bo-lightbox__nav--next { right: .5rem; }
.bo-lightbox__nav:hover { background: #C0392B; }

.bo-lightbox__meta { padding: 1rem 1.1rem 1.2rem; }

.bo-lightbox__title {
  margin: 0 0 .8rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

.bo-urlrow {
  display: flex;
  gap: .5rem;
  margin-bottom: .6rem;
}

.bo-urlrow__input {
  flex: 1;
  min-width: 0;
  padding: .55rem .8rem;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
}

.bo-lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.bo-btn {
  display: inline-flex;
  align-items: center;
  padding: .5rem .9rem;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.bo-btn:hover { background: rgba(192, 57, 43, .1); }

.bo-btn--primary {
  background: #C0392B;
  border-color: #C0392B;
  color: #fff;
}

.bo-btn--primary:hover { background: #A93226; }

/* ── Toast ───────────────────────────────────────────────────── */

.bo-toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  z-index: 2200;
  transform: translate(-50%, 1.5rem);
  padding: .65rem 1.2rem;
  border-radius: 999px;
  background: #2E7D32;
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.bo-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bo-toast--error { background: #C0392B; }

/* ── Dark mode ───────────────────────────────────────────────── */

[data-mode="dark"] .bo-stat,
[data-mode="dark"] .bo-card {
  background: rgba(255, 255, 255, .06);
}

/* Sticky bjælke og lightbox skal være helt uigennemsigtige — ellers
   skinner gitteret igennem. */
[data-mode="dark"] .bo-toolbar,
[data-mode="dark"] .bo-lightbox__panel {
  background: #221A12;
  border: 1px solid rgba(255, 255, 255, .08);
}

[data-mode="dark"] .bo-search__input,
[data-mode="dark"] .bo-chip,
[data-mode="dark"] .bo-btn,
[data-mode="dark"] .bo-urlrow__input {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .12);
  color: var(--color-text);
}

[data-mode="dark"] .bo-chip.is-active,
[data-mode="dark"] .bo-chip[aria-pressed="true"],
[data-mode="dark"] .bo-btn--primary {
  background: #C0392B;
  border-color: #C0392B;
  color: #fff;
}

[data-mode="dark"] .bo-stat__num { color: #FF8A75; }
[data-mode="dark"] .bo-card__copy { color: #FF8A75; }
[data-mode="dark"] .bo-card__copy:hover { color: #fff; }

[data-mode="dark"] .bo-credit {
  background: rgba(192, 57, 43, .14);
  border-color: rgba(255, 138, 117, .25);
}

/* ── Responsivt ──────────────────────────────────────────────── */

@media (max-width: 720px) {
  .bo-toolbar {
    top: 4.2rem;
    padding: .5rem;
    border-radius: 20px;
  }

  .bo-search { flex: 1 1 100%; }

  /* Chips på én linje der kan scrolles vandret — sparer højde på mobil. */
  .bo-filters {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bo-filters::-webkit-scrollbar { display: none; }
  .bo-chip { flex: 0 0 auto; }

  .bo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
  .bo-card__copy-label { display: none; }
  .bo-card__copy { padding: .38rem .5rem; }
  .bo-hero { padding: 2rem 0 1.5rem; }
  .bo-credit { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bo-card,
  .bo-toast { transition: none; }
  .bo-card:hover { transform: none; }
}
