/* =========================================================
   FOOTER — PREMIUM MOTION SYSTEM
   ========================================================= */

.site-footer {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 76px 0 28px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-main, Manrope, Arial, sans-serif);
  isolation: isolate;
}

/* =========================================================
   AMBIENT LIGHT
   ========================================================= */

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(920px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    #7488ff00 12%,
    #8f9dff88 50%,
    #b38aff00 88%,
    transparent 100%
  );
  opacity: 0.85;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: -190px;
  left: 50%;
  width: 620px;
  height: 340px;
  transform: translateX(-50%);
  background:
    radial-gradient(
      ellipse at center,
      #5868ff1c 0%,
      #8b72ff0b 38%,
      transparent 72%
    );
  filter: blur(4px);
  pointer-events: none;
  z-index: -1;
  animation: footerAmbient 9s ease-in-out infinite alternate;
}

@keyframes footerAmbient {
  0% {
    opacity: 0.45;
    transform: translateX(-50%) translateY(0) scale(0.94);
  }

  50% {
    opacity: 0.8;
  }

  100% {
    opacity: 0.5;
    transform: translateX(-50%) translateY(18px) scale(1.06);
  }
}


/* =========================================================
   FOOTER TOP
   ========================================================= */

.footer-top {
  position: relative;
  z-index: 1;

  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;

  display: grid;
  grid-template-columns: 2.1fr repeat(3, 1fr);
  gap: 40px;

  padding-bottom: 44px;
}


/* =========================================================
   FOOTER BRAND
   ========================================================= */

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 0 0 13px;

  color: #f3f5ff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.045em;

  opacity: 0;
  transform: translateY(18px);
  animation: footerReveal 800ms cubic-bezier(.16, 1, .3, 1) 100ms forwards;
}

.footer-brand span {
  display: inline-flex;

  color: #b793ff;

  filter:
    drop-shadow(0 0 6px #b793ff55)
    drop-shadow(0 0 18px #8b79ff22);

  transition:
    transform 500ms cubic-bezier(.16, 1, .3, 1),
    filter 500ms ease;
}

.footer-brand:hover span {
  transform: rotate(-8deg) translateY(-2px);
  filter:
    drop-shadow(0 0 8px #b793ff88)
    drop-shadow(0 0 22px #8b79ff44);
}


/* =========================================================
   FOOTER INTRO
   ========================================================= */

.footer-intro {
  max-width: 300px;

  margin: 0 0 28px;

  color: #848ca2;

  font-size: 12.5px;
  line-height: 1.75;

  opacity: 0;
  transform: translateY(16px);

  animation:
    footerReveal 800ms cubic-bezier(.16, 1, .3, 1) 180ms forwards;
}


/* =========================================================
   TAGLINE
   ========================================================= */

.footer-top > div:first-child::after {
  content: "Make it matter.";

  display: block;
  width: max-content;
  max-width: 100%;

  padding-bottom: 13px;

  border-bottom: 1px solid #ffffff14;

  background: linear-gradient(
    100deg,
    #f4f5ff 8%,
    #9eb5ff 47%,
    #d7a4ff 94%
  );

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.065em;

  filter: drop-shadow(0 4px 16px #7f7dff26);

  opacity: 0;
  transform: translateY(16px) skewY(2deg);
  transform-origin: left bottom;

  animation:
    footerTaglineReveal
    1000ms
    cubic-bezier(.16, 1, .3, 1)
    300ms
    forwards;
}

@keyframes footerTaglineReveal {
  0% {
    opacity: 0;
    transform: translateY(16px) skewY(2deg);
    filter: blur(5px) drop-shadow(0 4px 16px #7f7dff00);
  }

  100% {
    opacity: 1;
    transform: translateY(0) skewY(0);
    filter: blur(0) drop-shadow(0 4px 16px #7f7dff26);
  }
}


/* =========================================================
   FOOTER COLUMNS
   ========================================================= */

.footer-column {
  padding-top: 3px;

  opacity: 0;
  transform: translateY(22px);

  animation:
    footerReveal
    850ms
    cubic-bezier(.16, 1, .3, 1)
    forwards;
}

.footer-column:nth-child(2) {
  animation-delay: 180ms;
}

.footer-column:nth-child(3) {
  animation-delay: 240ms;
}

.footer-column:nth-child(4) {
  animation-delay: 300ms;
}

@keyframes footerReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   COLUMN HEADINGS
   ========================================================= */

.footer-column h3 {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin: 0 0 19px;

  color: #aeb4c9;

  font-family: var(--font-mono, "DM Mono", monospace);
  font-size: 9.5px;
  font-weight: 500;

  letter-spacing: 0.14em;
  text-transform: uppercase;

  transition:
    color 300ms ease,
    transform 300ms cubic-bezier(.16, 1, .3, 1);
}

.footer-column h3::before {
  content: "";

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: #758cff;

  box-shadow:
    0 0 6px #758cffaa,
    0 0 14px #758cff44;

  transition:
    transform 450ms cubic-bezier(.16, 1, .3, 1),
    box-shadow 450ms ease;
}

.footer-column:hover h3 {
  color: #d7dbed;
  transform: translateX(2px);
}

.footer-column:hover h3::before {
  transform: scale(1.45);
  box-shadow:
    0 0 7px #758cffcc,
    0 0 18px #758cff66;
}


/* =========================================================
   FOOTER LINKS
   ========================================================= */

.footer-column a {
  position: relative;

  display: block;
  width: max-content;

  margin: 0 0 11px;

  color: #8a91a6;

  font-size: 13px;
  font-weight: 500;

  text-decoration: none;

  transition:
    color 300ms ease,
    transform 450ms cubic-bezier(.16, 1, .3, 1);
}

.footer-column a::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: -3px;

  width: 100%;
  height: 1px;

  background: linear-gradient(
    90deg,
    #9aa8ff,
    #c49aff,
    transparent
  );

  transform: scaleX(0);
  transform-origin: left;

  transition:
    transform 450ms cubic-bezier(.16, 1, .3, 1);
}

.footer-column a::before {
  content: "";

  position: absolute;
  left: -12px;
  top: 50%;

  width: 5px;
  height: 1px;

  background: #bda2ff;

  opacity: 0;

  transform:
    translateY(-50%)
    translateX(-4px)
    scaleX(0);

  transform-origin: left;

  transition:
    opacity 300ms ease,
    transform 450ms cubic-bezier(.16, 1, .3, 1);
}

.footer-column a:hover {
  color: #edf0ff;

  transform:
    translateX(9px)
    translateY(-1px);
}

.footer-column a:hover::before {
  opacity: 1;

  transform:
    translateY(-50%)
    translateX(0)
    scaleX(1);
}

.footer-column a:hover::after {
  transform: scaleX(1);
}


/* =========================================================
   FOOTER BOTTOM
   ========================================================= */

.footer-bottom {
  position: relative;
  z-index: 1;

  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding-top: 20px;

  border-top: 1px solid var(--line);

  color: #62697e;

  font:
    9.5px
    var(--font-mono, "DM Mono", monospace);

  letter-spacing: 0.05em;

  opacity: 0;
  transform: translateY(12px);

  animation:
    footerReveal
    800ms
    cubic-bezier(.16, 1, .3, 1)
    500ms
    forwards;
}


/* =========================================================
   SOCIAL
   ========================================================= */

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  position: relative;

  display: grid;
  place-items: center;

  width: 30px;
  height: 30px;

  border: 1px solid #ffffff1a;
  border-radius: 8px;

  color: #a9b1cc;

  font:
    10px
    var(--font-mono, "DM Mono", monospace);

  text-decoration: none;

  overflow: hidden;

  transition:
    background 400ms cubic-bezier(.16, 1, .3, 1),
    color 300ms ease,
    border-color 400ms ease,
    box-shadow 500ms cubic-bezier(.16, 1, .3, 1),
    transform 500ms cubic-bezier(.16, 1, .3, 1);
}


/* moving light inside button */

.footer-social a::before {
  content: "";

  position: absolute;

  inset: -50%;

  background:
    linear-gradient(
      115deg,
      transparent 35%,
      #ffffff25 50%,
      transparent 65%
    );

  transform: translateX(-100%) rotate(8deg);

  transition:
    transform 700ms cubic-bezier(.16, 1, .3, 1);
}


/* inner glow */

.footer-social a::after {
  content: "";

  position: absolute;

  inset: 1px;

  border-radius: 7px;

  background:
    radial-gradient(
      circle at 50% 0%,
      #ffffff12,
      transparent 65%
    );

  opacity: 0;

  transition: opacity 350ms ease;
}

.footer-social a:hover {
  border-color: #8d9cff66;

  background:
    linear-gradient(
      135deg,
      #6e91ff,
      #996fdb
    );

  color: #fff;

  box-shadow:
    0 8px 24px #6f7cff30,
    0 0 0 1px #8b8fff18;

  transform:
    translateY(-4px)
    rotate(-2deg)
    scale(1.04);
}

.footer-social a:hover::before {
  transform: translateX(100%) rotate(8deg);
}

.footer-social a:hover::after {
  opacity: 1;
}

.footer-social a:active {
  transform:
    translateY(-1px)
    scale(0.96);
}


/* =========================================================
   SOCIAL STAGGER
   ========================================================= */

.footer-social a:nth-child(1) {
  transition-delay: 0ms;
}

.footer-social a:nth-child(2) {
  transition-delay: 25ms;
}

.footer-social a:nth-child(3) {
  transition-delay: 50ms;
}

.footer-social a:nth-child(4) {
  transition-delay: 75ms;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .footer-top {
    grid-template-columns:
      1.6fr
      repeat(3, 1fr);

    gap: 26px;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .site-footer {
    padding: 52px 0 20px;
  }

  .footer-top,
  .footer-bottom {
    width: calc(100% - 38px);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;

    gap: 32px 24px;

    padding-bottom: 32px;
  }

  .footer-top > div:first-child {
    grid-column: span 2;
  }

  .footer-top > div:first-child::after {
    font-size: 28px;
  }

  .footer-intro {
    max-width: 330px;
  }

  .footer-bottom {
    align-items: flex-start;

    gap: 18px;

    flex-direction: column-reverse;
  }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

  .footer-top {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .footer-top > div:first-child {
    grid-column: auto;
  }

  .footer-column {
    padding-top: 0;
  }

  .footer-bottom {
    gap: 20px;
  }

  .footer-social {
    gap: 7px;
  }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .site-footer::after,
  .footer-brand,
  .footer-intro,
  .footer-top > div:first-child::after,
  .footer-column,
  .footer-bottom {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .footer-column a,
  .footer-social a,
  .footer-brand span,
  .footer-column h3 {
    transition: none;
  }

}