/* Shared homepage footer, matching the approved standalone preview. */
.site-footer {
  --footer-surface: var(--polaris-bg-subtle);
  --footer-ink: var(--polaris-text);
  --footer-muted: var(--polaris-text-secondary);
  --footer-line: var(--polaris-border);
  margin-top: 72px;
  padding: 0;
  border-top: 1px solid var(--footer-line);
  background: var(--footer-surface);
  color: var(--footer-ink);
  text-align: left;
}


.footer-inner {
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
  padding: 72px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.15fr 1fr;
  align-items: start;
  gap: 64px;
}

.footer-brand { min-width: 0; }
.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--footer-ink);
  font-family: var(--polaris-font-wordmark);
  font-size: 24px;
  font-style: italic;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.footer-brand-link img { width: 36px; height: 36px; }
.footer-description {
  max-width: 30ch;
  margin: 22px 0;
  color: var(--footer-muted);
  font-size: 15px;
  line-height: 1.8;
  text-wrap: pretty;
}
.footer-email {
  display: inline-block;
  color: var(--footer-ink);
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  text-underline-offset: 4px;
}

.footer-nav h2 {
  margin: 8px 0 22px;
  color: var(--polaris-text-tertiary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 24px;
  text-transform: uppercase;
}
.footer-nav ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-nav li { min-width: 0; }
.footer-nav a,
.footer-nav .analytics-settings-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--footer-muted);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  text-decoration: none;
  text-underline-offset: 4px;
}
.footer-nav a:hover,
.footer-nav .analytics-settings-button:hover { color: var(--footer-ink); text-decoration: underline; }
.site-footer :focus-visible { outline: 2px solid var(--polaris-accent); outline-offset: 5px; }
.site-footer ::selection { background: var(--polaris-accent); color: var(--polaris-accent-foreground); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--footer-line);
  color: var(--footer-muted);
  font-size: 12px;
  line-height: 1.6;
}
.footer-bottom p { margin: 0; }
.footer-heart { display: inline-block; margin: 0 3px; color: #e3414f; fill: currentColor; vertical-align: -2px; }
:root[data-theme="dark"] .footer-heart { color: #f07880; }
.footer-bottom a { color: var(--footer-ink); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 950px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-description { max-width: 46ch; }
}

@media (max-width: 560px) {
  .footer-inner { width: calc(100% - 48px); padding: 40px 0 24px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
  .footer-nav h2 { margin: 0 0 12px; }
  .footer-nav a, .footer-nav .analytics-settings-button { min-height: 44px; }
  .footer-nav ul { gap: 0; }
  .footer-bottom { flex-direction: column; gap: 12px; margin-top: 36px; padding-top: 24px; }
  .footer-description { max-width: 34ch; margin: 16px 0; }
}

/* Language switch lives in the footer's bottom row; its menu opens upward. */
.footer-bottom-start { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.site-footer .language-control { position: relative; }
.site-footer .language-toggle {
  display: inline-flex; align-items: center; gap: 6px; width: auto; height: 32px; min-height: 0; padding: 0 10px 0 9px;
  border: 1px solid var(--footer-line); border-radius: 999px; background: transparent; box-shadow: none;
  color: var(--footer-ink); font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
}
.site-footer .language-toggle:hover,
.site-footer .language-toggle:focus-visible,
.site-footer .language-toggle[aria-expanded="true"] { border-color: var(--polaris-border-strong); background: var(--polaris-bg-muted); color: var(--footer-ink); }
.site-footer .language-toggle-icon { width: 14px; height: 14px; }
.site-footer .language-toggle-chevron { display: block; width: 12px; height: 12px; }
.site-footer [data-language-current] { display: inline; }
.site-footer .language-menu { top: auto; right: auto; bottom: calc(100% + 8px); left: 0; transform: translateY(6px); }
.site-footer .language-menu[data-menu-open="true"] { transform: none; }
.footer-bottom a.footer-icp { color: inherit; }
