/*
 * Shared RichFolds footer.
 * Two-card composition inspired by the supplied reference.
 */

.site-footer {
  min-height: 0 !important;
  padding: clamp(70px, 8vw, 112px) 0 !important;
  border: 0 !important;
  background: #fafafa !important;
  color: #191b22 !important;
}

.site-footer::before,
.site-footer::after {
  display: none !important;
}

.rf-footer-shell {
  width: min(1280px, calc(100% - 72px));
  display: grid;
  grid-template-columns: minmax(290px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  margin: 0 auto;
}

.rf-footer-brand-card,
.rf-footer-info-panel {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  border-radius: 25px;
}

.rf-footer-brand-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  background:
    radial-gradient(circle at 78% 72%, rgba(158, 216, 255, 0.48), transparent 42%),
    radial-gradient(circle at 24% 18%, rgba(52, 112, 240, 0.72), transparent 38%),
    linear-gradient(145deg, #071e65, #1254c4 58%, #609ee8);
  color: #fff;
  box-shadow: 0 25px 65px rgba(22, 62, 145, 0.2);
}

.rf-footer-brand-card::before {
  content: "";
  width: 230px;
  height: 230px;
  position: absolute;
  right: -90px;
  bottom: -105px;
  border: 28px solid rgba(255, 255, 255, 0.07);
  transform: rotate(45deg);
}

.rf-footer-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.rf-footer-brand img {
  width: 44px;
  height: 44px;
  filter: brightness(1.28) saturate(0.72);
}

.rf-footer-brand > span > span {
  color: #bfe8ff;
}

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

.rf-footer-brand-bottom > p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-family: "Manrope", sans-serif;
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.rf-footer-socials {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.rf-footer-socials > span {
  color: rgba(255, 255, 255, 0.66);
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
}

.rf-footer-socials > div {
  display: flex;
  gap: 7px;
}

.rf-footer-socials a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(6, 15, 38, 0.8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 9, 38, 0.2);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.rf-footer-socials a:hover {
  background: #7657e8;
  transform: translateY(-3px);
}

.rf-footer-socials svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.rf-footer-info-panel {
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 38px 42px 30px;
  background: #efeff0;
  box-shadow: inset 0 0 0 1px rgba(25, 27, 34, 0.025);
}

.rf-footer-mark {
  width: 122px;
  height: 122px;
  position: absolute;
  top: -37px;
  right: 60px;
  display: grid;
  place-items: center;
  border: 8px solid rgba(255, 255, 255, 0.82);
  border-radius: 27px;
  background: linear-gradient(145deg, #74c6ff, #2376df 55%, #7657e8);
  box-shadow: 0 20px 32px rgba(38, 70, 145, 0.24);
  transform: rotate(-10deg);
  z-index: 3;
}

.rf-footer-mark img {
  width: 74px;
  height: 74px;
  filter: brightness(1.55) saturate(0.45);
}

.rf-footer-navs {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 40px;
  padding-right: 170px;
}

.rf-footer-navs nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.rf-footer-navs h3 {
  margin: 0 0 8px;
  color: #74767e;
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
}

.rf-footer-navs a {
  width: max-content;
  color: #25272e;
  font: 650 12px/1.25 "DM Sans", sans-serif;
  text-decoration: none;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.rf-footer-navs a:hover {
  color: #7657e8;
  transform: translateX(3px);
}

.rf-footer-lower {
  display: grid;
  grid-template-columns: minmax(210px, 0.65fr) minmax(330px, 1fr);
  gap: 40px;
  align-items: end;
  margin-top: auto;
  padding-top: 38px;
}

.rf-footer-legal p,
.rf-footer-legal > span {
  display: block;
  margin: 0;
  color: #85878e;
  font-size: 9px;
  line-height: 1.6;
}

.rf-footer-project > p {
  margin: 0;
  color: #777981;
  font-size: 12px;
}

.rf-footer-project h2 {
  max-width: 440px;
  margin: 4px 0 18px;
  color: #1d1f26 !important;
  font-family: "Manrope", sans-serif;
  font-size: clamp(23px, 2.1vw, 31px) !important;
  font-weight: 650;
  line-height: 1.06 !important;
  letter-spacing: -0.045em !important;
}

.rf-footer-project > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
}

.rf-footer-email,
.rf-footer-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 9px;
  font: 700 10px/1 "DM Sans", sans-serif;
  text-decoration: none;
}

.rf-footer-email {
  border: 1px solid rgba(27, 29, 36, 0.07);
  background: #fff;
  color: #65676f;
}

.rf-footer-button {
  min-width: 158px;
  justify-content: center;
  background: #171921;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  white-space: nowrap;
  opacity: 1;
  box-shadow: 0 10px 22px rgba(23, 25, 33, 0.14);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.site-footer .rf-footer-button:visited,
.site-footer .rf-footer-button:hover,
.site-footer .rf-footer-button:focus-visible {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.site-footer .rf-footer-button::after {
  background-color: #fff !important;
}

.rf-footer-button span {
  margin-left: 8px;
  color: #9ed8ff;
}

.rf-footer-button:hover {
  background: #7657e8;
  transform: translateY(-2px);
}

.rf-back-to-top {
  width: 50px;
  height: 50px;
  position: fixed;
  right: clamp(16px, 2.2vw, 34px);
  bottom: clamp(16px, 2.2vw, 34px);
  z-index: 49000;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, #171921, #33276f);
  box-shadow: 0 14px 32px rgba(25, 25, 45, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.rf-back-to-top.is-visible,
.rf-back-to-top:focus-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.rf-back-to-top:hover {
  background: linear-gradient(145deg, #7657e8, #287ddd);
  transform: translateY(-3px);
}

.rf-back-to-top img {
  width: 19px;
  height: 19px;
  filter: invert(1);
  transform: rotate(-45deg);
}

@media (max-width: 1020px) {
  .rf-footer-shell {
    width: min(900px, calc(100% - 48px));
    grid-template-columns: minmax(250px, 0.42fr) minmax(0, 1fr);
  }

  .rf-footer-info-panel {
    padding: 34px 30px 28px;
  }

  .rf-footer-mark {
    width: 96px;
    height: 96px;
    right: 30px;
  }

  .rf-footer-mark img {
    width: 58px;
    height: 58px;
  }

  .rf-footer-navs {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    padding-right: 110px;
  }

  .rf-footer-navs nav:last-child {
    display: none;
  }

  .rf-footer-lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-footer {
    padding: 54px 0 !important;
  }

  .rf-footer-shell {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
  }

  .rf-footer-brand-card,
  .rf-footer-info-panel {
    min-height: 390px;
    border-radius: 21px;
  }

  .rf-footer-info-panel {
    padding: 34px 24px 26px;
  }

  .rf-footer-mark {
    top: -26px;
    right: 25px;
  }

  .rf-footer-navs {
    padding-right: 105px;
  }
}

@media (max-width: 470px) {
  .rf-footer-navs {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-right: 0;
    padding-top: 74px;
  }

  .rf-footer-project > div {
    grid-template-columns: 1fr;
  }

  .rf-footer-lower {
    gap: 28px;
  }

  .rf-back-to-top {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rf-back-to-top {
    transition-duration: 0.01ms;
  }
}
