/* Site footer shared by all pages: app download banner, link columns and a bottom bar.
   Markup: scripts/components/site-footer.js. Self-contained: legal pages and 404 load no page styles. */

/* Zero-specificity reset so the footer does not depend on page styles */
:where(.sf-footer) :where(*) {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:where(.sf-footer) :where(a) {
  color: inherit;
  text-decoration: none;
}
:where(.sf-footer) :where(ul) { list-style: none; }

/* The dark background starts below the banner top, so the banner overlaps the footer edge */
.sf-footer {
  --sf-overlap: 150px;
  margin-top: 72px;
  background: linear-gradient(to bottom, transparent var(--sf-overlap), var(--extra-dark-purple, #2c2c62) var(--sf-overlap));
  color: var(--extra-light-purple, #ebe9fe);
  font-family: "Nunito", sans-serif;
}
.sf-footer-plain {
  margin-top: 56px;
  background: var(--extra-dark-purple, #2c2c62);
}
.sf-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.sf-footer a:focus-visible {
  outline: 2px solid var(--light-purple, #cfd5f6);
  outline-offset: 3px;
  border-radius: 6px;
}

/* App download banner */
.sf-download {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 40px;
  min-height: 300px;
  padding: 48px 56px;
  border-radius: 32px;
  background: radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.2), transparent 55%), var(--purple-accent, #7272ec);
  box-shadow: 0 24px 48px rgba(44, 44, 98, 0.18);
  color: #fff;
}
.sf-eyebrow {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sf-download-title {
  margin-top: 16px;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
}
.sf-download-desc {
  max-width: 560px;
  margin-top: 12px;
  font-family: var(--body-font-family, "Comfortaa", sans-serif);
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}
.sf-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.sf-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 14px;
  background: var(--extra-dark-purple, #2c2c62);
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  transition: opacity var(--duration-ui, 200ms) ease, transform var(--duration-press, 160ms) var(--ease-out, ease);
}
.sf-store:hover { opacity: 0.9; }
.sf-store:active { transform: scale(0.97); }
.sf-store img { display: block; width: 24px; height: 24px; }
.sf-store span { display: flex; flex-direction: column; }
.sf-store small { font-size: 11px; font-weight: 400; opacity: 0.8; }

/* The phone rises above the banner top and is cut at its bottom edge */
.sf-download-media {
  position: relative;
  align-self: stretch;
  margin: -48px 0;
  clip-path: inset(-80px -80px 0 -80px);
}
.sf-download-phone {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 230px;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 36px rgba(44, 44, 98, 0.35));
}

/* Columns */
.sf-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 64px 0 48px;
}
.sf-logo {
  display: inline-grid;
  width: max-content;
  line-height: 1.1;
  font-weight: 700;
  color: var(--light-purple, #cfd5f6);
}
.sf-logo-just { font-size: 13px; }
.sf-logo-do { font-size: 28px; line-height: 1; text-align: center; }
.sf-logo-fit { font-size: 18px; text-align: right; }
.sf-tagline {
  max-width: 340px;
  margin-top: 16px;
  font-family: var(--body-font-family, "Comfortaa", sans-serif);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(235, 233, 254, 0.75);
}
.sf-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.sf-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--extra-light-purple, #ebe9fe);
  transition: background-color var(--duration-ui, 200ms) ease, transform var(--duration-ui, 200ms) ease;
}
.sf-social:hover { background: #fff; transform: translateY(-2px); }
.sf-social img { display: block; width: 18px; height: 18px; }
.sf-col-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light-purple, #cfd5f6);
}
.sf-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
}
.sf-link {
  font-size: 16px;
  line-height: 1.4;
  color: rgba(235, 233, 254, 0.85);
  transition: color var(--duration-ui, 200ms) ease;
}
.sf-link:hover { color: #fff; }
.sf-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sf-contact-label { font-size: 13px; color: rgba(235, 233, 254, 0.6); }
.sf-contact-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  overflow-wrap: anywhere;
  transition: color var(--duration-ui, 200ms) ease;
}
.sf-contact:hover .sf-contact-value { color: var(--light-purple, #cfd5f6); }

/* Bottom bar */
.sf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 32px;
  border-top: 1px solid rgba(235, 233, 254, 0.14);
}
.sf-copyright { font-size: 14px; color: rgba(235, 233, 254, 0.7); }
.sf-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sf-payment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
}
.sf-payment img { display: block; width: auto; height: 18px; }

@media screen and (max-width: 1024px) {
  .sf-download { grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; padding: 40px; }
  .sf-download-media { margin: -40px 0; }
  .sf-download-phone { width: 200px; }
  .sf-download-title { font-size: 30px; }
}
@media screen and (max-width: 960px) {
  .sf-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
}
@media screen and (max-width: 767px) {
  .sf-footer { --sf-overlap: 120px; margin-top: 48px; }
  .sf-footer-plain { margin-top: 40px; }
  .sf-container { padding: 0 16px; }
  .sf-download {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 32px 24px;
    border-radius: 28px;
    text-align: center;
  }
  .sf-download-media { display: none; }
  .sf-download-title { font-size: 26px; }
  .sf-download-desc { margin-left: auto; margin-right: auto; font-size: 16px; }
  .sf-stores { justify-content: center; }
  .sf-columns { padding: 48px 0 40px; }
}
@media screen and (max-width: 610px) {
  .sf-columns {
    grid-template-areas: "brand brand" "product info" "contacts contacts";
    gap: 32px 20px;
  }
  .sf-brand { grid-area: brand; }
  .sf-col-product { grid-area: product; }
  .sf-col-contacts { grid-area: contacts; }
  .sf-col-info { grid-area: info; }
  .sf-store { flex: 1 1 180px; justify-content: center; }
  .sf-bottom { flex-direction: column-reverse; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-store { transition: opacity var(--duration-ui, 200ms) ease; }
  .sf-store:active { transform: none; }
  .sf-social { transition: background-color var(--duration-ui, 200ms) ease; }
  .sf-social:hover { transform: none; }
}
