/* ============================================================
   The footer: "Night ride" (2026-10-17). The hero's sky after
   dark, with the seeds turned to stars (js/footer.js). Picked
   from three mockups; shares the hero's faces and store buttons
   (hero.css is always loaded alongside).

   The page is sections, and the footer is the last one: white
   ends and night begins, full width, on purpose. A fade from
   white into navy always went muddy in the middle (tried a
   gradient, a page-long sky and an inset card, 2026-10-17).
   ============================================================ */

.footer {
  --night: #141d40;
  --night-deep: #0e1630;
  --on-night: #ffffff;
  --on-night-soft: rgba(255, 255, 255, 0.78);
  --on-night-faint: rgba(255, 255, 255, 0.55);
  --footer-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --footer-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  position: relative;
  isolation: isolate;
  overflow-x: clip;        /* the hump is wider than the screen; let it rise above */
  background: linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  color: var(--on-night);
  font-family: var(--footer-body);
}
.footer__stars { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; }
/* The same soft hump as under the hero (sections.css .how2::before): the
   night rises into the white page above in one half-ellipse wider than
   the screen, low at the edges. */
.footer::before {
  content: "";
  position: absolute;
  left: -20%; right: -20%;
  top: calc(-1 * var(--hero-tail));
  height: calc(var(--hero-tail) + 1px);
  background: var(--night);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.footer__wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  padding-block: 80px 56px;
}
.footer__headline {
  margin: 0;
  font-family: var(--footer-display);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  /* tokens.css pins opsz for Inter; Bricolage has its own axis. */
  font-optical-sizing: auto;
  font-variation-settings: normal;
}
.footer__lede { margin: 16px 0 26px; max-width: 40ch; color: var(--on-night-soft); font-size: 18px; line-height: 1.55; }
.footer__stores { display: flex; flex-wrap: wrap; gap: 12px; }
/* Light buttons on the night sky; the hero's dark ones would vanish. */
.footer .footer__store { background: var(--on-night); color: #111a2e; }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, auto);   /* Support and Legal */
  justify-content: end;
  gap: 20px 56px;
}
.footer__col { display: grid; gap: 8px; align-content: start; font-size: 15px; }
.footer__col h3 {
  margin: 0 0 4px;
  font-family: var(--footer-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-night-faint);
}
.footer__col a { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
.footer__col a:hover { color: var(--on-night); text-decoration: underline; text-underline-offset: 3px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px max(32px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  color: var(--on-night-faint);
}

.footer__bottom { align-items: center; }
.footer__lang { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--on-night-faint); }
.footer__lang:hover { color: var(--on-night); }
.footer__lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.footer__lang select {
  appearance: none; -webkit-appearance: none;
  width: auto; field-sizing: content; min-width: 0;
  padding: 4px 18px 4px 0; border: 0; background: transparent;
  color: inherit; font: inherit; font-size: 13px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 6px center, right 2px center;
  background-size: 4px 4px; background-repeat: no-repeat;
}
.footer__lang select option { color: #16203a; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .footer__top { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 56px 40px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: start; }
  /* stacked on a phone, everything on the middle line */
  .footer__top, .footer__col { text-align: center; }
  .footer__lede { margin-inline: auto; }
  .footer__stores { justify-content: center; }
  .footer__col { justify-items: center; }
  .footer__bottom { flex-direction: column; justify-content: center; }
}
