/* ============================================================
   SPIDER — hero overrides (Figma 433:95915)
   Dark page (reuses project.css). Hero = sticky behaviour with
   tag chips (bottom-left) + white "See the work" CTA (bottom-right),
   same pattern as Jan / Ranketta / Gems / VUT. Mower image carries a
   baked bottom fade into black. Self-contained (.spider-hero).
   ============================================================ */

.spider-hero { background: #000000; }

.spider-hero__tags {
  position: absolute;
  bottom: 54px;
  left: var(--page-padding);
  display: flex;
  gap: 9px;
  z-index: 3;
  pointer-events: none;
}
.spider-hero__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: var(--text-caption);
  font-weight: 500;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: auto;
}

.spider-hero .proj-hero__cta {
  top: auto;
  bottom: 54px;
  left: auto;
  right: var(--page-padding);
  background-color: #ffffff;
  color: #1d1d1f;
}
.spider-hero .proj-hero__cta:hover {
  background-color: #ffffff;
  color: #1d1d1f;
  transform: translateY(-2px);
}

@media (max-width: 1023px) {
  .spider-hero__tags { position: static; margin: 16px 0 0; flex-wrap: wrap; }
  .spider-hero .proj-hero__cta { position: static; margin-top: 16px; }
}

/* ============================================================
   SPIDER — Projects masonry gallery (Figma 433:95950 "All")
   4-col grid, span modifiers + per-card aspect ratios, label
   under each card. Cards are SOLID WHITE PLACEHOLDERS for now
   (real images/reels swapped in later). Mirrors rank-gallery.
   ============================================================ */
.spider-gallery {
  background-color: var(--color-fg);   /* #1d1d1f */
  color: #ffffff;
  position: relative;
  z-index: 2;
}
.spider-gallery__inner {
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding: 125px var(--page-padding) 125px;
}

.spider-gallery__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.spider-gallery__heading {
  font-size: clamp(36px, 3.57vw, 54px);
  font-weight: 500;
  letter-spacing: -2.16px;
  line-height: var(--leading-tight);
  margin: 0;
  flex-shrink: 0;
}
.spider-gallery__subline {
  font-size: var(--text-body-l);
  font-weight: 400;
  letter-spacing: var(--tracking-body-l);
  line-height: var(--leading-normal);
  color: #ffffff;
  max-width: 436px;
  margin: 5px 0 0 0;
}
.spider-gallery__divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: calc(100% - 436px - var(--page-padding) - var(--page-padding));
  margin-top: 20px;
}

.spider-gallery__tabs { display: flex; gap: 0; margin-top: 54px; margin-bottom: 46px; }
.spider-gallery__tab {
  display: flex; align-items: baseline; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 0;
  margin-right: 50px; color: #86868c; font-family: var(--font-display);
  transition: color var(--duration-fast) var(--ease-out);
}
.spider-gallery__tab.is-active { color: #ffffff; }
.spider-gallery__tab:hover { color: rgba(255, 255, 255, 0.8); }
.spider-gallery__tab-name { font-size: clamp(24px, 2.38vw, 36px); font-weight: 500; letter-spacing: -0.72px; line-height: 1; }
.spider-gallery__tab-count { font-size: var(--text-body); font-weight: 400; letter-spacing: -0.32px; line-height: 1; opacity: 0.7; }

.spider-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 22px;
  row-gap: 44px;
  align-items: start;
}
.spider-gallery__item { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.spider-gallery__card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0a0a;            /* dark placeholder — no white bleed před loadem */
}

.spider-gallery__label-title {
  display: block; font-family: var(--font-display); font-size: var(--text-h3);
  font-weight: 500; letter-spacing: var(--tracking-h3); line-height: 1.2; color: #ffffff;
}
.spider-gallery__label-sub {
  display: block; margin-top: 6px; font-size: var(--text-body); font-weight: 400;
  letter-spacing: var(--tracking-body-l); line-height: var(--leading-normal); color: #86868c; max-width: 460px;
}

/* spans + aspect ratios (match Figma card sizes) */
.spider-gallery__item--span2 { grid-column: span 2; }
.spider-gallery__item--span4 { grid-column: 1 / -1; }

.spider-gallery__card--social    { aspect-ratio: 703 / 468; }
.spider-gallery__card--reel      { aspect-ratio: 341 / 605; }
.spider-gallery__card--card425   { aspect-ratio: 341 / 425; }
.spider-gallery__card--wide425   { aspect-ratio: 704 / 425; }
.spider-gallery__card--billboard { aspect-ratio: 1428 / 714; }

@media (max-width: 1023px) {
  .spider-gallery__inner { padding: var(--space-20) var(--page-padding); }
  .spider-gallery__grid { grid-template-columns: repeat(2, 1fr); column-gap: 16px; row-gap: 32px; }
  .spider-gallery__item--span2, .spider-gallery__item--span4 { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .spider-gallery__grid { grid-template-columns: 1fr; row-gap: 28px; }
  .spider-gallery__item, .spider-gallery__item--span2, .spider-gallery__item--span4 { grid-column: 1 / -1; }
  .spider-gallery__header { flex-direction: column; gap: 16px; }
  .spider-gallery__divider { margin-left: 0; }
}

/* ---------- real media inside cards (img + video) ---------- */
.spider-gallery__card img,
.spider-gallery__card video {
  display: block; width: 100%; height: 100%; object-fit: cover;
  background: #000;
  transition: transform 600ms var(--ease-out);
}
.spider-gallery__item:hover .spider-gallery__card img,
.spider-gallery__item:hover .spider-gallery__card video { transform: scale(1.03); }

/* video cards are buttons → open lightbox (with sound) */
button.spider-gallery__card {
  padding: 0; border: none; font: inherit; width: 100%;
  cursor: pointer; position: relative; display: block;
}
.spider-gallery__sound {
  position: absolute; right: 12px; bottom: 12px;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5); border-radius: 50%;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; z-index: 2; pointer-events: none; transition: background 0.2s var(--ease-out);
}
button.spider-gallery__card:hover .spider-gallery__sound { background: rgba(0,0,0,0.78); }

/* ---------- LIGHTBOX (click reel → enlarged + sound + scrub) ---------- */
.spider-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 5vh 5vw;
  background: rgba(0,0,0,0.92);
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease-out);
}
.spider-lightbox.is-open { opacity: 1; visibility: visible; }
.spider-lightbox__video {
  max-width: 100%; max-height: 90vh;
  border-radius: 12px; background: #000;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.spider-lightbox__close {
  position: absolute; top: 24px; right: 28px;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
  transition: background 0.2s var(--ease-out);
}
.spider-lightbox__close:hover { background: rgba(255,255,255,0.25); }