.site-footer {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  border-top: 1px solid #926851;
  background: #2a1d17;
  color: #f2eeea;
}

body.app-mode .site-footer { display: none; }

.site-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -175px;
  right: -98px;
  width: clamp(340px, 39vw, 570px);
  aspect-ratio: 1;
  background: currentColor;
  -webkit-mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask-mode: luminance;
  mix-blend-mode: screen;
  opacity: .12;
  pointer-events: none;
}

.site-footer-inner {
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(30px, 6vw, 82px) max(3.6vw, 18px) 16px;
}

.site-footer-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(125px, .75fr) minmax(190px, .85fr);
  gap: clamp(24px, 5.5vw, 72px);
  padding-block-end: clamp(24px, 4vw, 54px);
}

.site-footer-brand {
  display: inline-flex;
  gap: .95rem;
  align-items: center;
  color: #f2eeea;
  text-decoration: none;
  font-size: clamp(3.4rem, 7vw, 5.8rem);
  font-weight: 900;
  line-height: 1.02;
}

.site-footer-brand .brand-mark { transform: scale(1.25); margin-inline: .3rem; }
.site-footer-brand .brand-mark i { background: #c89d84; }
.site-footer-identity p { max-width: 29ch; margin: .85rem 0 0; color: #decfc6; font-size: .95rem; line-height: 1.9; }

.site-footer h2 {
  margin: 0 0 .65rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-block-start: .2rem; }

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 33px;
  color: #decfc6;
  text-decoration: none;
  text-underline-offset: .22em;
  font-size: .9rem;
}

.site-footer li a:hover { color: #fff9f4; text-decoration: underline; }

#footerChat {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  margin-block-start: .6rem;
  padding: .45rem .75rem;
  border: 1px solid #a87960;
  border-radius: 7px;
  color: #2a1d17;
  background: #e5d5cb;
  font: inherit;
  font-weight: 750;
  font-size: .86rem;
}

#footerChat:hover { background: #f2eeea; }

.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  border-top: 1px solid #735a4b;
  padding-block-start: .6rem;
  color: #decfc6;
}

#footerTop {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .2rem .25rem;
  border: 0;
  background: transparent;
  color: #f2eeea;
  font: inherit;
  font-size: .85rem;
}

#footerTop:hover { text-decoration: underline; text-underline-offset: .2em; }

#footerTop span {
  display: grid;
  place-items: center;
  width: 29px;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid #8d6f5c;
}

.site-footer :is(a, button):focus-visible { outline: 2px solid #f2eeea; outline-offset: 4px; }

@media (max-width: 650px) {
  .site-footer::before { top: -141px; right: -103px; }
  .site-footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem .75rem; }
  .site-footer-identity { grid-column: 1 / -1; }
  .site-footer-brand { font-size: 3.55rem; }
  .site-footer li a { min-height: 40px; }
  .site-footer-identity p { margin-block-start: .4rem; }
  #footerChat { font-size: .8rem; padding-inline: .5rem; }
}

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