/* Shared site footer, used by the home page and case-study pages. */
:root {
  --gradient-brand-soft: linear-gradient(115deg, #FF6A9E 0%, #B472FF 52%, #6C8CFF 100%);
}

.site-footer .container {
  width: min(1320px, calc(100% - 80px));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(215, 35, 99, 0.24));
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(-6deg) scale(1.04);
}

.brand__word {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.brand__word--light {
  color: var(--cream);
}

.site-footer {
  position: relative;
  margin-top: 20px;
  padding: clamp(58px, 7vw, 90px) 0 28px;
  border-radius: 48px 48px 0 0;
  background: #08070D;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.site-footer::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -30%;
  right: -10%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 35, 99, 0.14), rgba(123, 77, 255, 0.07) 45%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  animation: footerGlow 18s ease-in-out infinite alternate;
}

@keyframes footerGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, 4%, 0) scale(1.08); }
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(120px, 0.55fr));
  gap: 40px;
  padding: 58px 0 64px;
}

.footer-brand p {
  max-width: 330px;
  margin-top: 18px;
  color: rgba(246, 242, 235, 0.42);
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-col__title {
  margin-bottom: 20px;
  color: rgba(246, 242, 235, 0.3);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a,
.footer-col button {
  display: inline-block;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: rgba(246, 242, 235, 0.62);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s var(--ease);
}

.footer-col a:hover,
.footer-col button:hover {
  color: var(--cream);
  transform: translateX(3px);
}

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

.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(246, 242, 235, 0.6);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.footer-social a:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 14px;
  height: 14px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(246, 242, 235, 0.34);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-bottom__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: rgba(246, 242, 235, 0.52);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.back-to-top svg {
  width: 12px;
  height: 12px;
  transition: transform 0.35s var(--ease);
}

.back-to-top:hover {
  color: var(--cream);
}

.back-to-top:hover svg {
  transform: translateY(-3px);
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: rgba(246, 242, 235, 0.58);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
}

.motion-toggle:hover {
  color: var(--cream);
}

.motion-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.motion-bars i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: var(--gradient-brand-soft);
  transform-origin: bottom center;
  opacity: 0.45;
}

.motion-toggle.is-on .motion-bars i {
  opacity: 1;
  animation: footerMotionBar 1.1s ease-in-out infinite;
}

.motion-toggle.is-on .motion-bars i:nth-child(1) { height: 5px; animation-delay: -0.2s; }
.motion-toggle.is-on .motion-bars i:nth-child(2) { height: 10px; animation-delay: -0.45s; }
.motion-toggle.is-on .motion-bars i:nth-child(3) { height: 7px; animation-delay: -0.7s; }

.motion-toggle:not(.is-on) .motion-bars i {
  height: 2px;
  background: rgba(246, 242, 235, 0.4);
}

.motion-toggle .motion-label--off { display: none; }
.motion-toggle.is-on .motion-label--on { display: inline; }
.motion-toggle.is-on .motion-label--off { display: none; }
.motion-toggle:not(.is-on) .motion-label--on { display: none; }
.motion-toggle:not(.is-on) .motion-label--off { display: inline; }

.motion-toggle:not(.is-on) .motion-label--off {
  color: rgba(246, 242, 235, 0.4);
}

@keyframes footerMotionBar {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

.motion-toggle--footer {
  color: rgba(246, 242, 235, 0.5);
  font-size: 8px;
}

.motion-toggle--footer:hover {
  color: var(--cream);
}

@media (max-width: 1024px) {
  .site-footer .container {
    width: calc(100% - 48px);
  }

  .footer-main {
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(100px, 0.6fr));
    padding: 48px 0 54px;
  }
}

@media (max-width: 760px) {
  .site-footer {
    border-radius: 32px 32px 0 0;
    margin-top: 10px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
    padding: 40px 0;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-bottom__right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-col:last-child {
    grid-column: auto;
  }

  .footer-social {
    margin-top: 14px;
  }

  .footer-bottom__right {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .motion-toggle,
  .motion-toggle--footer {
    font-size: 7px;
    letter-spacing: 0.1em;
  }
}

/* Match the compact footer treatment used on the home page. */
.footer-main {
  padding-top: 0;
}

.footer-col__list li {
  position: relative;
  padding-left: 14px;
}

.footer-col__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateY(-50%);
  pointer-events: none;
}

.footer-col__list a,
.footer-col__list button {
  padding: 5px 0;
}

.footer-social a {
  width: auto;
  height: auto;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.footer-social a:hover {
  background: transparent;
  border: 0;
  color: var(--cream);
}

/* Shared footer spacing. */
.footer-main {
  padding: 28px 0 14px;
}
