.site-footer {
  display: block !important;
  background: #242723 !important;
  color: #f6f3ec !important;
  padding: 56px clamp(24px, 4vw, 72px) 24px !important;
  border-top: 3px solid #ac8e58;
  position: relative;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 32px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  color: #fff !important;
}
.footer-brand > span {
  font:
    44px/1 Georgia,
    serif;
  letter-spacing: 4px;
}
.footer-brand small {
  display: block;
  font:
    10px/1.4 Arial,
    sans-serif;
  letter-spacing: 6px;
  margin: 10px 0 0;
  text-align: center;
}
.site-footer .footer-crest {
  width: 84px;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) invert(1) brightness(1.7);
  mix-blend-mode: screen;
  background: transparent !important;
}
.site-footer .footer-academy {
  font:
    21px/1.4 Georgia,
    serif;
  color: #fff;
  margin-top: 20px;
}
.site-footer .footer-affiliation {
  font-size: 12px;
  color: #c8c8bd;
  margin-top: 9px;
}
.site-footer .footer-motto {
  color: #c9ad79;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-size: 10px;
  line-height: 1.9;
  margin-top: 26px;
}
.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.site-footer .footer-column h2 {
  font:
    19px/1.4 Georgia,
    serif;
  letter-spacing: 0;
  color: #e0c798;
  margin: 10px 0 16px;
}
.site-footer .footer-column a {
  font:
    14px/1.5 Arial,
    sans-serif;
  color: #ecece3;
  padding: 8px 0;
  min-height: 38px;
}
.site-footer a:hover {
  color: #efd7a7;
  text-decoration: none;
}
.site-footer .footer-contacts p {
  font:
    14px/1.8 Arial,
    sans-serif;
  color: #c8c8bd;
  margin-bottom: 12px;
}
.footer-baseline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid #ffffff25;
  font:
    12px/1.6 Arial,
    sans-serif;
  color: #c8c8bd;
}
.footer-baseline nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}
.footer-baseline a {
  padding: 6px 0;
}
.license-section {
  margin-bottom: 44px;
}
.license-section h2 {
  font:
    36px/1.2 Georgia,
    serif;
  margin: 12px 0 20px;
}
.license-note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 850px;
  margin-bottom: 28px;
}
.license-note a {
  text-decoration: underline;
  color: var(--copper);
}
.license-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.license-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--contact-surface, #fff);
}
.license-preview {
  display: flex;
  justify-content: center;
  padding: 24px;
  background: rgba(150, 140, 110, 0.07);
}
.license-preview img {
  width: auto;
  max-width: 100%;
  height: 245px;
  object-fit: contain;
  box-shadow: 0 5px 18px #0002;
}
.license-copy {
  padding: 24px;
}
.license-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--copper);
}
.license-copy h3 {
  font:
    24px/1.3 Georgia,
    serif;
  margin: 14px 0;
}
.license-copy p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.license-meta {
  margin: 18px 0;
}
.license-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.license-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 5px;
  color: var(--copper);
}
[data-reading="on"] .footer-main,
[data-reading="on"] .license-grid {
  grid-template-columns: 1fr;
}
[data-reading="on"] .site-footer :is(a, p),
[data-reading="on"] .license-copy :is(a, p) {
  font-size: var(--reading-font);
}
@media (max-width: 1150px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .site-footer {
    padding-top: 36px !important;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 24px 18px;
  }
  .footer-identity,
  .footer-contacts {
    grid-column: 1/-1;
  }
  .footer-brand > span {
    font-size: 38px;
  }
  .site-footer .footer-column a {
    min-height: 44px;
  }
  .footer-baseline {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-baseline nav {
    flex-direction: column;
    gap: 4px;
  }
  .license-grid {
    grid-template-columns: 1fr;
  }
  .license-section h2 {
    font-size: 29px;
  }
}

.jump-footer {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #c7ae7e;
  border-radius: 3px;
  background: #faf7ef;
  color: #8d542f;
  box-shadow: 0 4px 16px #0002;
  cursor: pointer;
  transition:
    background 0.18s,
    transform 0.18s;
}
.jump-footer:hover {
  background: #eee3cf;
  transform: translateY(2px);
}
.jump-footer:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 4px;
}
body:has(.cookie-note) .jump-footer {
  bottom: 240px;
}
[data-theme="dark"] .jump-footer {
  background: #30342d;
  color: #e2c488;
  border-color: #8b794f;
}
@media (max-width: 650px) {
  .jump-footer {
    right: 16px;
    bottom: 16px;
  }
  body:has(.cookie-note) .jump-footer {
    bottom: 270px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .jump-footer {
    transition: none;
  }
}
.site-footer .footer-baseline {
  padding-right: 64px;
}

.jump-footer.points-up svg {
  transform: rotate(180deg);
}

/* Bare directional control; retain a generous invisible hit area. */
.jump-footer,
.jump-footer:hover,
[data-theme="dark"] .jump-footer {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: #99532e;
}
.jump-footer svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 2px #fff9);
}
.jump-footer.points-up,
[data-theme="dark"] .jump-footer {
  color: #e2c488;
}
.jump-footer.points-up svg,
[data-theme="dark"] .jump-footer svg {
  filter: drop-shadow(0 1px 2px #0006);
}
.jump-footer:focus:not(:focus-visible) {
  outline: none;
}
.jump-footer:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0;
}

.jump-footer {
  --arrow-direction: 1;
}
.jump-footer.points-up {
  --arrow-direction: -1;
}
@keyframes arrow-directional-nudge {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 calc(5px * var(--arrow-direction));
  }
}
html[data-motion="on"] .jump-footer svg {
  animation: arrow-directional-nudge 1.6s ease-in-out 3;
}
@media (hover: hover) {
  html[data-motion="on"] .jump-footer:hover svg {
    animation: arrow-directional-nudge 0.8s ease-in-out infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-motion="on"] .jump-footer svg {
    animation: none !important;
  }
}

.site-footer .footer-developer {
  color: #e0c798;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  text-wrap: pretty;
}
.site-footer .footer-developer:hover {
  color: #fff0d2;
}
@media (max-width: 600px) {
  .footer-developer {
    flex-basis: 100%;
  }
}
