/* =========================================================
   SQUIGS — v2 overrides
   - Magazine masonry gallery (natural aspect ratio, full image visible)
   - Larger captions, all text readable
   - Thumbnail strip + lightbox for the extended family
   - Video grid with natural ratios
   ========================================================= */

/* --- Gallery v2: masonry columns --------------------------- */
.gallery2 {
  columns: 2;
  column-gap: 14px;
  margin: 0 0 36px;
}
@media (min-width: 720px) { .gallery2 { columns: 3; column-gap: 18px; } }
@media (min-width: 1100px) { .gallery2 { columns: 4; } }

.card2 {
  break-inside: avoid;
  margin: 0 0 14px;
  background: var(--paper);
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: block;
  cursor: zoom-in;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
@media (min-width: 720px) { .card2 { margin-bottom: 18px; } }
.card2:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card2.is-hidden { display: none; }

.card2__media {
  display: block;
  background: var(--bg-warm);
  position: relative;
  overflow: hidden;
}
.card2__media img {
  display: block;
  width: 100%;
  height: auto;            /* NATURAL aspect ratio = full image visible */
  transition: transform .35s ease;
}
.card2:hover .card2__media img { transform: scale(1.025); }

.card2 figcaption {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card2 .quote {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 21px;          /* larger and readable */
  line-height: 1.18;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}
.card2 .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.card2 .row b {
  font-weight: 800;
  color: var(--ink);
  font-size: 16px;
}
.card2 .row .tag {
  font-size: 12px;
  color: var(--ink-mute);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* wobble support for v2 cards (matches styles.css behaviour) */
.card2:nth-child(3n+1) { transform: rotate(calc(var(--wobble) * -0.30deg)); }
.card2:nth-child(3n+2) { transform: rotate(calc(var(--wobble) *  0.35deg)); }
.card2:nth-child(3n)   { transform: rotate(calc(var(--wobble) * -0.12deg)); }
.card2:hover           { transform: translateY(-3px) rotate(0deg) !important; }

.card2,
.vcard2 {
  --rwob: calc(var(--wobble) * 0.5px);
  border-radius:
    calc(var(--r-m) + var(--rwob))
    calc(var(--r-m) - var(--rwob) * 0.4)
    calc(var(--r-m) + var(--rwob) * 0.3)
    calc(var(--r-m) - var(--rwob) * 0.6) / var(--r-m);
}

/* --- Thumbs (extended family) ----------------------------- */
.more-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 4px 14px;
  flex-wrap: wrap;
}
.more-head h3 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0;
}
.more-head .hint {
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 700;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 4px;
}
@media (min-width: 540px) { .thumbs { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 720px) { .thumbs { grid-template-columns: repeat(8, 1fr); gap: 10px; } }
@media (min-width: 1100px) { .thumbs { grid-template-columns: repeat(10, 1fr); } }

.thumb {
  border: none;
  padding: 0;
  background: var(--paper);
  border-radius: var(--r-s);
  overflow: hidden;
  aspect-ratio: 1/1;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease;
  position: relative;
}
.thumb:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.thumb.is-hidden { display: none; }
.thumb__vbadge {
  position: absolute;
  inset: auto 4px 4px auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  pointer-events: none;
}
.thumb__vbadge svg { width: 10px; height: 10px; }

/* --- Videos v2: natural aspect ratios ------------------- */
.videos2 {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .videos2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .videos2 { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

.vcard2 {
  background: var(--paper);
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.vcard2:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.vcard2__media {
  background: #1c1820;
  position: relative;
  display: block;
}
.vcard2__media video {
  display: block;
  width: 100%;
  height: auto;            /* natural ratio — show the whole frame */
  background: #1c1820;
}
.vcard2__body {
  padding: 14px 16px 16px;
}
.vcard2__body h3 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.vcard2__body p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.4;
}
.vcard2__play {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
  transition: transform .15s ease;
}
.vcard2__play:hover { transform: scale(1.08); }
.vcard2__play.is-playing svg { display: none; }
.vcard2__play.is-playing::after {
  content: "";
  width: 12px; height: 14px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}
.vcard2__dur {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(20,16,28,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
}
.vcard2__fs {
  position: absolute;
  left: 12px; top: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(20,16,28,.55);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .2s ease;
}
.vcard2:hover .vcard2__fs { opacity: 1; }
.vcard2__fs svg { width: 14px; height: 14px; }

/* wobble alternation for vcards */
.vcard2:nth-child(odd)  { transform: rotate(calc(var(--wobble) * -0.18deg)); }
.vcard2:nth-child(even) { transform: rotate(calc(var(--wobble) *  0.22deg)); }
.vcard2:hover           { transform: translateY(-3px) rotate(0deg); }

/* --- Lightbox -------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,16,28,.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: lbFade .2s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__stage {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--r-m);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  display: block;
  background: #1c1820;
}
.lightbox__caption {
  background: rgba(255,253,243,.96);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 19px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.lightbox__caption b {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  margin-right: 8px;
  letter-spacing: -0.2px;
}
.lightbox__caption .tag {
  margin-left: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: lowercase;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  border: none;
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
  z-index: 2;
  line-height: 1;
}
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__counter {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

body.lb-open { overflow: hidden; }

/* the original styles.css applied border-radius wobble to .card/.vcard.
   override here so they don't double-up on our v2 elements that share
   no class names (only needed because tweaks.js sets --wobble globally).  */

/* --- Section intro polish ---------------------------------- */
.section__sub--wide { max-width: 56ch; }
.gallery2-note {
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--ink-soft);
  margin: 28px 0 8px;
}
