/* Shared profile and services footer. */
.site-footer .footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.8fr);
  align-items: start;
  gap: clamp(40px, 7vw, 100px);
  padding-block: 60px;
}
.footer-profile {
  max-width: 440px;
  min-width: 0;
}
.site-footer .brand {
  gap: 14px;
}
.site-footer .brand .brand-name {
  font-size: 12px;
}
.site-footer .brand small {
  font-size: 7px;
  letter-spacing: 0.09em;
}
.footer-intro {
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
  max-width: 390px;
}
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
}
.footer-social-link {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.footer-social-link .icon {
  width: 19px;
  height: 19px;
}
.footer-social-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translate(-50%, 3px);
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}
.footer-social-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.footer-services {
  justify-self: end;
  width: 100%;
  max-width: 300px;
  min-width: 0;
}
.footer-services h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.025em;
  margin-bottom: 15px;
}
.footer-service-list {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-service-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding-block: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  transition: color 0.2s ease;
}
.footer-service-list a .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.footer-service-list a:hover,
.footer-service-list a:focus-visible {
  color: var(--accent);
}
.site-footer .footer-bottom {
  align-items: center;
  gap: 28px;
  padding-block: 22px;
  font-size: 10px;
}
.site-footer .footer-credit {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-footer .footer-location {
  display: block;
  font-size: 9px;
}
.site-footer .footer-tools {
  width: auto;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 65%, var(--bg));
  box-shadow: 0 3px 12px color-mix(in srgb, var(--text) 3%, transparent);
  order: 0;
}
.site-footer .footer-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.site-footer .footer-tool .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.site-footer .footer-tools > a {
  gap: 8px;
}
.site-footer .footer-tool:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.site-footer .motion-toggle {
  color: var(--text);
  background: var(--bg);
  border-color: var(--line);
}
.motion-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 16px;
  padding: 3px;
  border-radius: 20px;
  background: var(--accent);
  transition: background-color 160ms ease;
}
.motion-switch-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  transform: translateX(10px);
  transition: transform 160ms ease;
}
.motion-toggle[aria-checked="false"] .motion-switch {
  background: color-mix(in srgb, var(--muted) 55%, var(--surface));
}
.motion-toggle[aria-checked="false"] .motion-switch-thumb {
  transform: translateX(0);
}
.motion-state {
  min-width: 3ch;
  color: var(--accent);
  font: 400 9px var(--font-mono);
  text-transform: uppercase;
}
.motion-toggle[aria-checked="false"] .motion-state {
  color: var(--muted);
}
.site-footer .back-top {
  gap: 9px;
  color: var(--bg);
  background: var(--accent);
}
.site-footer .back-top .icon {
  color: inherit;
  transition: transform 160ms ease;
}
@media (hover: hover) {
  .site-footer .owner-workspace-link:hover,
  .site-footer .motion-toggle:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    background: var(--bg);
  }
  .site-footer .back-top:hover {
    color: var(--bg);
    background: color-mix(in srgb, var(--accent) 85%, var(--text));
  }
  .site-footer .back-top:hover .icon {
    transform: translateY(-2px);
  }
  .footer-social-link:hover {
    transform: translateY(-3px);
    color: var(--bg);
    border-color: var(--accent);
    background: var(--accent);
  }
  .footer-social-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
  .footer-service-list a:hover .icon {
    transform: translate(2px, -2px);
  }
}
@media (max-width: 700px) {
  .site-footer .footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 42px;
  }
  .site-footer .brand .brand-name {
    font-size: 11px;
  }
  .footer-intro {
    font-size: 13px;
    margin-top: 18px;
  }
  .footer-socials {
    margin-top: 20px;
  }
  .footer-services {
    justify-self: start;
    max-width: none;
    border-top: 1px solid var(--line);
    padding-top: 25px;
  }
  .footer-services h2 {
    font-size: 17px;
    margin-bottom: 12px;
  }
  .footer-service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 24px;
  }
  .footer-service-list a {
    min-height: 44px;
    height: 100%;
    font-size: 12px;
    gap: 9px;
  }
  .site-footer .footer-bottom {
    flex-wrap: wrap;
    gap: 14px;
    padding-block: 21px;
  }
  .site-footer .footer-credit,
  .site-footer .footer-tools {
    width: 100%;
  }
  .site-footer .footer-tools {
    justify-content: center;
    gap: 5px;
  }
  .site-footer .footer-tool {
    flex: 1 1 auto;
  }
}
@media (max-width: 460px) {
  .site-footer .footer-tools {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .site-footer .footer-tool {
    padding-inline: 9px;
    gap: 7px;
  }
  .site-footer .back-top {
    grid-column: 1 / -1;
  }
  .site-footer .footer-tools:has(.motion-toggle[hidden]) .back-top {
    grid-column: auto;
  }
}
@media (max-width: 359px) {
  .footer-service-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-service-list a {
    font-size: 13px;
  }
}
:root[data-motion="paused"] .footer-social-link,
:root[data-motion="paused"] .footer-service-list .icon,
:root[data-motion="paused"] .back-top .icon {
  transition: none;
  transform: none;
}
:root[data-motion="paused"] {
  scroll-behavior: auto;
}
:root[data-motion="paused"] .footer-tool,
:root[data-motion="paused"] .motion-switch,
:root[data-motion="paused"] .motion-switch-thumb {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .footer-social-link,
  .footer-service-list .icon,
  .site-footer .footer-tool,
  .site-footer .back-top .icon,
  .motion-switch,
  .motion-switch-thumb {
    transition: none;
  }
  .footer-social-link:hover,
  .footer-service-list a:hover .icon,
  .site-footer .back-top:hover .icon {
    transform: none;
  }
}
