.gallery-section {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: 104px;
}

.gallery-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 54px -10vw -52px;
  background:
    radial-gradient(circle at 70% 48%, rgba(180, 73, 19, .16), transparent 34%),
    linear-gradient(180deg, transparent, rgba(244, 196, 48, .035) 52%, transparent);
  pointer-events: none;
}

.gallery-section .section-heading {
  position: absolute;
  z-index: 5;
  top: 148px;
  left: clamp(28px, 5vw, 70px);
  margin: 0;
  pointer-events: none;
}

.gallery-section .section-heading::after {
  content: "";
  display: block;
  width: clamp(105px, 18vw, 240px);
  height: 1px;
  margin-top: 22px;
  background: linear-gradient(90deg, transparent, #f4c430 20%, #ffdf75 55%, transparent);
  box-shadow: 0 0 13px rgba(244, 196, 48, .7);
}

.gallery-section .section-heading .eyebrow {
  color: #ffd34f;
  font-size: clamp(10px, 1.2vw, 15px);
  letter-spacing: .3em;
  text-shadow: 0 2px 15px #000;
}

.gallery-section .section-heading h2 {
  color: #fffaf0;
  font-size: clamp(64px, 9vw, 116px);
  text-shadow: 0 6px 34px #000, 0 1px 1px rgba(255,255,255,.18);
}

.gallery-grid {
  position: relative;
  display: grid;
  grid-template-columns: 31% 42% 31%;
  gap: 0;
  height: clamp(410px, 42vw, 590px);
  overflow: hidden;
  border: 1px solid rgba(244, 196, 48, .27);
  border-radius: 34px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), transparent 28%, transparent 72%, rgba(0,0,0,.25)),
    url("assets/images/gallery-crab.jpg") center 44% / cover no-repeat,
    #050403;
  box-shadow: 0 28px 80px rgba(0,0,0,.62), inset 0 0 70px rgba(0,0,0,.55);
}

.gallery-grid::before,
.gallery-grid::after {
  content: "";
  position: absolute;
  z-index: 4;
  pointer-events: none;
  inset: 0;
}

.gallery-grid::before {
  background:
    linear-gradient(90deg, rgba(0,0,0,.9) 0, rgba(0,0,0,.5) 18%, transparent 43%, transparent 76%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(0,0,0,.26), transparent 34%, rgba(0,0,0,.78));
}

.gallery-grid::after {
  inset: auto 5% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f4c430, transparent);
  box-shadow: 0 -2px 18px rgba(244,196,48,.7);
}

.gallery-grid figure {
  position: relative;
  margin: 0 -7%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.gallery-grid figure:first-child { z-index: 1; }
.gallery-grid figure:nth-child(2) { z-index: 2; }
.gallery-grid figure:last-child { z-index: 1; }

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.08) brightness(.82) sepia(.06);
  transform: scale(1.04);
  transition: transform .7s ease, filter .7s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}

.gallery-grid figure:first-child img { object-position: 54% center; }
.gallery-grid figure:nth-child(2) img { object-position: center 42%; filter: saturate(1.18) contrast(1.1) brightness(.9) sepia(.08); }
.gallery-grid figure:last-child img { object-position: 52% center; }
.gallery-grid:hover img { transform: scale(1.075); }

.social-row {
  position: relative;
  z-index: 8;
  width: min(850px, calc(100% - 60px));
  min-height: 104px;
  margin: -54px auto 0;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(255, 211, 79, .62);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20,17,11,.97), rgba(4,4,3,.98));
  box-shadow: 0 20px 52px rgba(0,0,0,.72), 0 0 22px rgba(244,196,48,.16), inset 0 1px rgba(255,255,255,.07);
  backdrop-filter: blur(18px);
}

.social-row a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: auto;
  min-width: 0;
  min-height: 78px;
  padding: 6px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}

.social-row a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: linear-gradient(transparent, rgba(244,196,48,.55), transparent);
}

.social-row a:hover,
.social-row a:focus-visible {
  background: radial-gradient(circle, rgba(244,196,48,.1), transparent 68%);
  transform: translateY(-2px);
  outline: none;
}

.social-row a:active { transform: scale(.98); }
.social-row .social-icon { flex: 0 0 62px; width: 62px; height: 62px; border-radius: 50%; box-shadow: 0 0 18px rgba(244,196,48,.3); }
.social-row .social-icon svg { width: 32px; height: 32px; }
.social-copy { min-width: 0; display: grid; gap: 3px; }
.social-copy strong { font-size: 15px; line-height: 1; text-transform: uppercase; }
.social-copy small { color: #f4c430; font-size: 11px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }

@media (max-width: 600px) {
  .gallery-section { width: 100%; padding-top: 76px; }
  .gallery-section .section-heading { top: 96px; left: 20px; }
  .gallery-section .section-heading h2 { font-size: clamp(46px, 14vw, 62px); }
  .gallery-section .section-heading .eyebrow { max-width: 250px; font-size: 9px; }
  .gallery-grid {
    display: block;
    width: 100%;
    height: clamp(190px, 53vw, 228px);
    border: 0;
    border-radius: 0;
    background: #080604;
    box-shadow: 0 18px 44px rgba(0,0,0,.55);
  }
  .gallery-grid figure {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .gallery-grid figure:first-child { left: 0; width: 40%; z-index: 1; }
  .gallery-grid figure:nth-child(2) { left: 27%; width: 46%; z-index: 2; }
  .gallery-grid figure:last-child { left: 63%; width: 37%; z-index: 3; }
  .gallery-grid::before {
    z-index: 5;
    background:
      linear-gradient(90deg, rgba(0,0,0,.42), transparent 29%, transparent 76%, rgba(0,0,0,.2)),
      linear-gradient(180deg, rgba(0,0,0,.34), transparent 48%, rgba(0,0,0,.28));
  }
  .gallery-grid::after { display: none; }
  .gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
    border: 0;
    border-radius: 0;
  }
  .gallery-grid figure:first-child img {
    object-position: 54% center;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 68%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 68%, transparent 100%);
  }
  .gallery-grid figure:nth-child(2) img {
    object-position: center 42%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20%, #000 80%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 20%, #000 80%, transparent 100%);
  }
  .gallery-grid figure:last-child img {
    object-position: 52% center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 100%);
  }
  .gallery-grid:hover img { transform: none; }
  .social-row { width: calc(100% - 14px); min-height: 86px; margin-top: 10px; padding: 9px 6px; border-radius: 26px; }
  .social-row a { gap: 6px; min-height: 66px; padding: 4px 5px; }
  .social-row .social-icon { flex-basis: 48px; width: 48px; height: 48px; }
  .social-row .social-icon svg { width: 25px; height: 25px; }
  .social-copy strong { font-size: 9px; }
  .social-copy small { font-size: 7px; letter-spacing: .06em; }
}

@media (max-width: 390px) {
  .gallery-section .section-heading { left: 20px; }
  .gallery-grid { height: 198px; }
  .social-row { width: calc(100% - 8px); padding-inline: 3px; }
  .social-row a { gap: 4px; padding-inline: 3px; }
  .social-row .social-icon { flex-basis: 45px; width: 45px; height: 45px; }
  .social-copy strong { font-size: 8px; }
  .social-copy small { font-size: 6.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-grid img { transition: none; }
}
