/* v17: compact utility footer. The same 12-column frame as the hero and main
   sections, without another service directory or promotional section. */
footer.footer--compact {
  background: var(--toimi-surface, #f7f8fc);
  padding: 0;
  border-top: 1px solid var(--toimi-divider, #dce4ee);
  color: var(--toimi-ink, #1f1f1f);
}

footer.footer--compact .container-footer {
  display: grid;
  gap: clamp(22px, 2.3vw, 32px);
  width: 100%;
  max-width: var(--toimi-frame, 1470px);
  margin: 0 auto;
  padding: clamp(26px, 3vw, 42px) 0 24px;
  border-radius: 0;
  background: transparent;
}

footer.footer--compact :is(.footer-compact__main, .footer-compact__bottom) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px var(--toimi-column-gap, 20px);
  align-items: start;
}

footer.footer--compact :is(.footer-compact__main, .footer-compact__bottom) > * { min-width: 0; }
footer.footer--compact .footer-compact__direct { grid-column: 1 / 5; }
footer.footer--compact .footer-compact__office { grid-column: 5 / 10; }
footer.footer--compact .footer-compact__social { grid-column: 10 / -1; }

footer.footer--compact p { margin: 0; }
footer.footer--compact .footer-compact__label {
  margin: 0 0 8px;
  color: var(--toimi-muted, #617082);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 550;
}

footer.footer--compact a {
  color: inherit;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
footer.footer--compact a:hover { color: var(--brand-blue-strong, #1e63d6); }
footer.footer--compact a:focus-visible {
  outline: 2px solid var(--brand-blue-strong, #1e63d6);
  outline-offset: 3px;
  border-radius: 4px;
}

footer.footer--compact .footer-compact__direct a {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 4px 0;
  font-weight: 550;
  line-height: 1.4;
  overflow-wrap: anywhere;
  letter-spacing: -.02em;
}
footer.footer--compact .footer-compact__email { font-size: clamp(20px, 1.75vw, 27px); }
footer.footer--compact .footer-compact__phone { font-size: clamp(17px, 1.4vw, 21px); }

footer.footer--compact .footer-compact__office :is(address, p:not(.footer-compact__label)) {
  color: var(--toimi-copy, #4d5968);
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  margin: 0;
}
footer.footer--compact .footer-compact__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-top: 4px;
  color: var(--brand-blue-strong, #1e63d6);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
}
footer.footer--compact .footer-compact__contact-link:hover { text-decoration: underline; text-underline-offset: 3px; }

footer.footer--compact .footer-compact__social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
footer.footer--compact .footer-compact__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--toimi-divider, #dce4ee);
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
footer.footer--compact .footer-compact__social-link svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
footer.footer--compact .footer-compact__social-link svg path { fill: currentColor; }
footer.footer--compact .footer-compact__social-link:hover {
  border-color: #bed7f6;
  background: #eaf3ff;
}

footer.footer--compact .footer-compact__bottom {
  padding-top: 18px;
  border-top: 1px solid var(--toimi-divider, #dce4ee);
  color: var(--toimi-copy, #4d5968);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
}

footer.footer--compact .footer-compact__identity { grid-column: 1 / 8; }
footer.footer--compact .footer-compact__copyright { font-weight: 550; margin-bottom: 3px; }
footer.footer--compact .footer-compact__identity p { overflow-wrap: anywhere; }
footer.footer--compact .footer-compact__legal {
  grid-column: 8 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 16px;
  text-align: right;
}
footer.footer--compact .footer-compact__legal a {
  display: inline-block;
  padding-block: 2px;
  text-decoration: underline;
  text-decoration-color: #adbacb;
  text-underline-offset: 3px;
}
footer.footer--compact .footer-compact__legal a:hover { text-decoration-color: currentColor; }

@media (max-width: 850px) {
  footer.footer--compact .footer-compact__main { row-gap: 24px; }
  footer.footer--compact .footer-compact__direct { grid-column: 1 / 7; }
  footer.footer--compact .footer-compact__office { grid-column: 7 / -1; }
  footer.footer--compact .footer-compact__social { grid-column: 1 / -1; }
  footer.footer--compact .footer-compact__identity,
  footer.footer--compact .footer-compact__legal { grid-column: 1 / -1; }
  footer.footer--compact .footer-compact__legal { justify-content: flex-start; text-align: left; }
}

@media (max-width: 520px) {
  footer.footer--compact .footer-compact__main { row-gap: 20px; }
  footer.footer--compact :is(.footer-compact__direct, .footer-compact__office, .footer-compact__social) { grid-column: 1 / -1; }
  footer.footer--compact .footer-compact__email { font-size: 23px; }
  footer.footer--compact .footer-compact__legal { gap: 8px 14px; }
  footer.footer--compact .footer-compact__legal a { padding-block: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  footer.footer--compact a { transition: none; }
}

/* Original Toimi characters, as a compact editorial row rather than a banner.
   The contact and legal grids below are unchanged. */
footer.footer--compact .footer-epilogue {
  display: grid;
  grid-template-columns: clamp(90px, 9vw, 124px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 1.5vw, 22px);
  min-width: 0;
  margin: 0;
  padding: 0 0 clamp(14px, 1.4vw, 20px);
  border-bottom: 1px solid var(--toimi-divider, #dce4ee);
}

footer.footer--compact .footer-epilogue__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 504 / 396;
  object-fit: contain;
}

footer.footer--compact .footer-epilogue__phrase {
  max-width: 27ch;
  margin: 0;
  font-size: clamp(21px, 1.9vw, 27px);
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: -.028em;
  color: var(--toimi-ink, #1f1f1f);
  text-wrap: balance;
}

footer.footer--compact .footer-epilogue__phrase span {
  color: var(--brand-blue-strong, #1e63d6);
}

@media (max-width: 520px) {
  footer.footer--compact .footer-epilogue {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 16px;
  }
  footer.footer--compact .footer-epilogue__phrase { font-size: 19px; }
}

footer.footer--compact,
.toimi-shell-regions,
.toimi-shell-about-links {
  font-family: "Onest", "Montserrat", system-ui, sans-serif;
}

footer.footer--compact .container-footer,
.toimi-shell-regions,
.toimi-shell-about-links {
  box-sizing: border-box;
  width: min(var(--toimi-frame, 1470px), calc(100% - 32px));
  margin-inline: auto;
}

.toimi-shell-regions,
.toimi-shell-about-links {
  padding-block: 16px 24px;
}

.toimi-shell-about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.toimi-shell-regions summary {
  width: fit-content;
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
}

.toimi-shell-regions ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 10px 20px;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.toimi-shell-regions a,
.toimi-shell-about-links a {
  color: #1e63d6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer.footer--compact :is(.footer-compact__contact-link, .footer-compact__legal a) {
  transition: color .18s ease, text-decoration-color .18s ease;
}

footer.footer--compact .footer-compact__contact-link {
  text-decoration: underline transparent;
  text-underline-offset: 3px;
}

footer.footer--compact .footer-compact__contact-link:hover {
  text-decoration-color: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  footer.footer--compact :is(.footer-compact__contact-link, .footer-compact__legal a) {
    transition: none;
  }
}

@media (max-width: 1024px) {
  footer.footer--compact .container-footer {
    padding-bottom: max(70px, calc(env(safe-area-inset-bottom) + 66px));
  }
}
