/* ---- Sticky-reveal footer -----------------------------------------------
   z-index: 5  →  sits behind the contact section (z-index 30).
   position: sticky; bottom: 0  →  footer sticks to the BOTTOM of the
   viewport, so content appears at the bottom with empty space above.

   margin-top and pin-wrap height are set dynamically by js/footer.js
   based on the actual rendered footer height (fh) and viewport height (vh):
     margin-top    = -fh   (shifts footer up so sticking starts when contact de-pins)
     pin-wrap.h    = fh + vh  (keeps footer pinned while contact slides 100vh off)

   CSS fallbacks (overridden by JS on load):
     margin-top: -300vh / pin-wrap: 400vh
   ------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 5;
  margin-top: -300vh;
  font-family: 'Archivo', sans-serif;
  color: #fff;
}

.site-footer__pin-wrap {
  height: 400vh;
}

.site-footer__sticky {
  position: sticky;
  top: 0; /* JS overrides this to (vh - fh) so footer sticks at viewport bottom */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Red gradient backdrop — mirrors the blue of the contact section */
.site-footer__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 25%, rgba(0,0,0,0.22) 72%, rgba(0,0,0,0.45) 100%),
    linear-gradient(270deg, rgba(28,6,6,0) 28%, rgba(28,6,6,0.14) 48%, rgba(28,6,6,0.6) 73%, rgba(28,6,6,0.92) 100%),
    radial-gradient(ellipse 55% 70% at 87% 52%, rgba(120,18,18,0.35) 0%, rgba(80,10,10,0.18) 38%, transparent 72%),
    radial-gradient(ellipse 75% 70% at 96% 112%, rgba(160,22,22,0.78) 0%, rgba(110,14,14,0.58) 28%, rgba(70,8,8,0.3) 55%, transparent 82%),
    #1c0808;
}

/* ---- Inner flex layout ---- */
.site-footer__inner {
  position: relative; /* above .site-footer__bg */
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 4vh 5.5% 2.5vh;
  box-sizing: border-box;
}

/* ---- Top row: logo | nav | contact ---- */
.site-footer__top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.4fr;
  gap: 2rem 3rem;
  align-items: start;
  flex: 0 0 auto;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Logo */
.site-footer__logo-wrap {
  display: block;
  text-decoration: none;
}

.site-footer__logo {
  height: 2.8rem;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* Brand block (logo + people) */
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.site-footer__people {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.site-footer__person {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  margin: 0;
}

.site-footer__person-role {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  font-weight: 700;
}

.site-footer__person-name {
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Clickable contact links */
.site-footer__contact-link {
  display: block;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__contact-link:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* Column label */
.site-footer__col-title {
  font-size: 0.78rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 0.9rem;
  font-weight: 700;
}

/* Nav */
.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}

.site-footer__nav-link {
  font-size: clamp(1.07rem, 1.14vw, 1.24rem);
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
  width: fit-content;
}

.site-footer__nav-link:hover {
  color: #fff;
}

/* Contact info */
.site-footer__contact-item {
  font-size: clamp(1.04rem, 1.1vw, 1.17rem);
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.38rem;
  line-height: 1.5;
}

/* ---- Big GABING title ---- */
.site-footer__title {
  flex: 0 0 auto;
  margin-top: 12px;
  margin-bottom: 12px;
  /* bleed to page edges */
  margin-left: -5.5%;
  margin-right: -5.5%;
  padding-left: 5.5%;
  overflow: hidden;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 14.7vw, 16.8rem);
  line-height: 0.84;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

/* ---- Bottom bar ---- */
.site-footer__bottom {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-footer__copy {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}

.site-footer__made-by {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__made-by:hover {
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__made-by-logo {
  height: 1.14rem;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.4;
  display: block;
  transition: opacity 0.2s;
}

.site-footer__made-by:hover .site-footer__made-by-logo {
  opacity: 0.7;
}

/* ---- Tablet ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-footer__top {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__logo-wrap {
    grid-column: 1 / -1;
  }
  .site-footer__title {
    font-size: clamp(2.8rem, 12.6vw, 9.8rem);
  }
}

/* ---- Mobile: disable sticky reveal ---- */
@media (max-width: 767px) {
  .site-footer {
    margin-top: 0;
    z-index: 1;
  }
  .site-footer__pin-wrap {
    height: auto;
  }
  .site-footer__sticky {
    position: relative;
    height: auto;
    overflow: visible;
  }
  .site-footer__inner {
    padding: 6vh 6% 5vh;
  }
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 4vh;
    flex: none;
  }
  .site-footer__title {
    font-size: clamp(3.5rem, 20vw, 7rem);
    margin-top: 3vh;
    margin-left: -6%;
    margin-right: -6%;
    padding-left: 6%;
  }
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}
