.foot {
  position: relative; z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--ink);
}
.foot__inner { position: relative; padding-block: 72px 36px; }

.foot__grid {
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: space-between;
  gap: 48px 32px;
}
.foot__col { display: grid; align-content: start; gap: 44px; }

.foot__h {
  margin: 0 0 18px;
  font: 500 15.5px/1.3 var(--font-ui); letter-spacing: -.01em;
  color: var(--ink-nav);
}
.foot__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.foot__link {
  display: inline-flex; align-items: center; gap: 8px;
  font: 400 15px/1.4 var(--font-ui); letter-spacing: -.006em;
  color: var(--ink-faint);
  transition: color .15s ease;
}
.foot__link:hover { color: var(--ink); }
.foot__tag {
  font: 500 9.5px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}

.foot__legal { position: relative; }
.foot__legal > summary { list-style: none; cursor: pointer; gap: 5px; }
.foot__legal > summary::-webkit-details-marker { display: none; }
.foot__legal > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.foot__legal[open] > summary { color: var(--ink); }
.foot__chev {
  width: 12px; height: 12px;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .15s ease;
}
.foot__legal[open] .foot__chev { transform: rotate(180deg); }
.foot__menu {
  position: absolute; z-index: 5; top: calc(100% + 8px); left: -12px;
  min-width: 184px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.foot__legal[open] .foot__menu { animation: foot-menu .14s ease-out; }
@keyframes foot-menu { from { opacity: 0; transform: translateY(-4px); } }
.foot__menu a {
  display: block; padding: 8px 10px; border-radius: 7px;
  font: 400 14.5px/1.3 var(--font-ui); letter-spacing: -.006em; white-space: nowrap;
  color: var(--ink-nav);
}
.foot__menu a:hover,
.foot__menu a:focus-visible { background: #f5f5f7; color: var(--ink); outline: none; }
@media (prefers-reduced-motion: reduce) {
  .foot__legal[open] .foot__menu { animation: none; }
}

.foot__base {
  margin-top: 88px;
  display: grid; grid-template-columns: 1fr auto; align-items: end;
  gap: 22px 48px;
}
.foot__copy {
  margin: 0;
  font: 400 14.5px/1.4 var(--font-ui);
  color: var(--ink-faint);
}
.foot__social {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 22px;
}
.foot__social a { display: inline-flex; color: var(--ink-nav); transition: color .15s ease; }
.foot__social a:hover { color: var(--brand); }
.foot__social svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.foot__social li:first-child svg { height: 20px; width: auto; }

.foot__ask {
  grid-column: 2; grid-row: 1 / span 2;
  display: flex; align-items: center; gap: 16px;
}
.foot__ask-h {
  margin: 0;
  font: 400 14.5px/1.4 var(--font-ui);
  color: var(--ink-faint);
}
.foot__ask-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.foot__ask-btn {
  position: relative;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid #e8e8ec; background: var(--surface);
  color: var(--ink-nav);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.foot__ask-btn svg { width: 18px; height: 18px; fill: currentColor; }
.foot__ask-btn:hover { background: #f5f5f7; border-color: #dedee4; color: var(--c, var(--ink)); }
.foot__ask-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.foot__ask-btn::after {
  content: attr(data-name);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 5px 8px; border-radius: 6px;
  background: var(--ink-nav); color: #fff;
  font: 500 12px/1 var(--font-ui); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
}
.foot__ask-btn:hover::after,
.foot__ask-btn:focus-visible::after { opacity: 1; }

@media (max-width: 1000px) {
  .foot__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: normal; }
}
@media (max-width: 760px) {
  .foot__inner { padding-block: 56px 28px; }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  .foot__base { margin-top: 64px; grid-template-columns: 1fr; }
  .foot__ask { grid-column: auto; grid-row: auto; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 10px; }
}

/* The language menu (src/components/LangSwitch.astro): beside the copyright,
   on the Legal menu's look, opening upward in two columns. */
.foot__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.foot__lang > summary { gap: 6px; font-size: 14.5px; }
.foot__globe {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round;
}
.foot__lang .foot__menu { top: auto; bottom: calc(100% + 8px); columns: 2; column-gap: 4px; min-width: 0; width: max-content; }
.foot__lang .foot__menu li { break-inside: avoid; }
.foot__lang .foot__menu a[aria-current] { color: var(--ink); font-weight: 500; }
.foot__lang[open] .foot__chev { transform: rotate(0deg); }
.foot__lang .foot__chev { transform: rotate(180deg); }
@media (max-width: 760px) {
  .foot__lang .foot__menu { left: 0; }
}
