/* ─── Footer layout ───────────────────────────────────────────────────────
   Same elements as before, new arrangement (Figma "Footer"): the logo mark
   grows into a big backdrop, cut off by the top edge, with the CTA centered
   inside the C, the theme switcher bottom-left and the © under the hook.

   Linked after each page's inline <style>, so it overrides the old layout.
   The composition scales with the footer width (cqw), measured from the
   1846px-wide Figma frame. The theme switcher stays on the page grid.
   ──────────────────────────────────────────────────────────────────────── */
footer {
  container-type: inline-size;
  position: relative;
  padding-top: 0;
}

/* Absolute children (CTA, ©, logo) position against the footer itself */
.footer-container { position: static; }

/* Stage: gives the footer its height (649 / 1846) plus room for the bottom
   row under the logo, so the © and live time never run into the hook */
.footer-inner {
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: calc(35.16cqw + 48px);
  min-height: 300px;
  padding: 0;
  gap: 0;
}

/* CTA: centered, inside the C */
.footer-cta {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 13.79cqw;
  transform: translateX(-50%);
  align-items: center;
  text-align: center;
  white-space: nowrap;
}
.footer-cta-buttons { justify-content: center; }

/* Bottom row, on the page grid: switcher left, © + live time right */
.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.footer-copy { position: static; text-align: right; white-space: nowrap; }
/* Live Costa Rica time (js/site.js) on its own line */
.footer-time:not([hidden]) { display: block; }

/* Logo mark: same SVG, drawn past its viewBox so the whole C shows.
   Its (0,0) sits at (60.71cqw, -1.49cqw); 102 viewBox units = 39.44cqw. */
.footer-logo-mark {
  display: block;
  position: absolute;
  right: auto;
  bottom: auto;
  left: 60.71cqw;
  top: -1.49cqw;
  width: 39.44cqw;
  height: auto;
  overflow: visible;
}

@media (max-width: 600px) {
  /* Small screens (Figma mobile footer, 390px frame): CTA on top, a big
     crop of the hook + end square, then switcher and © centered below.
     1 viewBox unit = 1.077cqw; mark clipped at its top (viewBox y = 0). */
  .footer-inner { height: calc(192.6cqw + 18px); min-height: 0; padding-top: 0; }
  .footer-cta { top: 26.4cqw; }
  .footer-cta-buttons { flex-wrap: nowrap; }
  .footer-logo-mark {
    left: -17.7cqw;
    top: 51.8cqw;
    width: 109.8cqw;
    clip-path: inset(0 -200% -200% -200%);
  }
  .footer-bottom { flex-direction: column; align-items: center; gap: 50px; }
  .footer-copy { position: static; text-align: center; }
}
