/* Social page styles only.
   Global header, marquee, intro, typography, and footer styles come from stylesheet.css. */

.social-page {
  --social-page-pad: 28px;
  --social-gap: 12px;
  --social-line: rgba(0, 0, 0, 0.16);
}

.social-page button {
  color: inherit;
  font: inherit;
}

.social-page.modal-open {
  overflow: hidden;
}

.filter-shell {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 0 var(--social-page-pad);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
}

.filters {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 62px;
  overflow-x: auto;
  border-top: 1px solid var(--social-line);
  border-bottom: 1px solid var(--social-line);
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-button {
  position: relative;
  flex: 0 0 auto;
  padding: 4px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-button::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.filter-button:hover::after,
.filter-button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.gallery-wrap {
  padding: 28px var(--social-page-pad) 100px;
}

.masonry {
  --gallery-columns: 5;
  column-count: var(--gallery-columns);
  column-gap: var(--social-gap);
}

/* Filtered views retain the same card width as the All view. */
.masonry.is-filtered {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), minmax(0, 1fr));
  gap: var(--social-gap);
  columns: initial;
}

.masonry.is-filtered .social-card {
  margin-bottom: 0;
}

.social-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--social-gap);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: #e9e9e9;
  color: var(--white);
  cursor: pointer;
  break-inside: avoid;
  vertical-align: top;
  isolation: isolate;
}

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

.social-card.video-card {
  aspect-ratio: 9 / 16;
  background: #111;
}

.social-card.ratio-4x5 {
  aspect-ratio: 4 / 5;
}

.social-card.ratio-1x1 {
  aspect-ratio: 1 / 1;
}

.preview-shell,
.preview-shell iframe,
.placeholder-art,
.static-shell,
.card-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.preview-shell {
  overflow: hidden;
  background: #111;
}

.preview-shell::before,
.preview-shell::after {
  display: none;
}

.preview-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.preview-shell iframe {
  z-index: 1;
  display: block;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transform: none;
  transition: opacity 180ms ease;
}

.preview-shell.is-preview-ready iframe {
  opacity: 1;
}

.static-shell {
  overflow: hidden;
  background: #fff;
}

.static-shell img,
.placeholder-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.card-overlay {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 18px 18px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.77) 0%,
    rgba(0, 0, 0, 0.34) 48%,
    rgba(0, 0, 0, 0.15) 100%
  );
  opacity: 0;
  transition: opacity 220ms ease;
}

.social-card:hover .card-overlay,
.social-card:focus-visible .card-overlay {
  opacity: 1;
}

.overlay-client,
.overlay-status {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overlay-title {
  margin: 6px 0 18px;
  font-family: "Syne", Arial, sans-serif;
  font-size: clamp(1.05rem, 1.4vw, 1.45rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.placeholder-art {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #161616;
  background:
    linear-gradient(
      135deg,
      transparent 42%,
      rgba(0, 0, 0, 0.07) 42%,
      rgba(0, 0, 0, 0.07) 58%,
      transparent 58%
    ),
    linear-gradient(45deg, #ececec, #d7d7d7);
}

.placeholder-art::before,
.placeholder-art::after {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.17);
  border-radius: 50%;
  content: "";
}

.placeholder-art::after {
  width: 42%;
}

.placeholder-label {
  position: relative;
  z-index: 1;
  padding: 9px 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(250px, 0.42fr);
  gap: 34px;
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: #080808;
  color: var(--white);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.modal-player {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 9 / 16;
  justify-self: center;
  overflow: hidden;
  border-radius: 7px;
  background: #000;
}

.modal-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-player.is-static {
  background: #fff;
}

.modal-player.is-static.ratio-4x5 {
  aspect-ratio: 4 / 5;
}

.modal-player.is-static.ratio-1x1 {
  aspect-ratio: 1 / 1;
}

.modal-player.is-static img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.modal-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 28px;
}

.modal-copy .overlay-title {
  margin-bottom: 26px;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

.modal-copy .overlay-status {
  opacity: 0.72;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.modal-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  transform: translateY(-50%);
}

.modal-prev {
  left: 12px;
}

.modal-next {
  right: 12px;
}

@media (max-width: 1280px) {
  .masonry {
    --gallery-columns: 4;
  }
}

@media (max-width: 980px) {
  .masonry {
    --gallery-columns: 3;
  }
}

@media (max-width: 700px) {
  .social-page {
    --social-page-pad: 16px;
    --social-gap: 8px;
  }

  .filters {
    gap: 22px;
    min-height: 56px;
  }

  .gallery-wrap {
    padding-top: 16px;
  }

  .masonry {
    --gallery-columns: 2;
    column-gap: var(--social-gap);
  }

  .social-card {
    border-radius: 7px;
  }

  .card-overlay {
    display: none;
  }

  .modal {
    align-items: stretch;
    padding: 0;
  }

  .modal-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-height: none;
    min-height: 100svh;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .modal-player {
    width: min(100%, 56.25svh);
    max-width: 100%;
    border-radius: 0;
  }

  .modal-copy {
    width: 100%;
    padding: 24px 22px 38px;
  }

  .modal-copy .overlay-title {
    margin: 6px 0 20px;
    font-size: 1.8rem;
  }

  .modal-close {
    position: fixed;
    top: 14px;
    right: 14px;
  }

  .modal-nav {
    top: 42%;
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-shell iframe,
  .card-overlay,
  .modal {
    transition: none;
  }
}

/* Match the social categories to the small label typography */
.filters .filter-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Inter Tight", Arial, sans-serif;
  font-size: .72rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
