/* Footer (2026-11-16; made dark in Jeet's round 4; simplified 2026-11-19 from Jeet's Pinterest picks, memory/references/
   footer-pinterest-2026-11-19/: MBDS, Rejouice, Cilo, Mitra). The close's light page colour falls through dusk into
   dark wine; a calm band of links at the top; then the sky wordmark across the full width, so large that the page
   ends partway down its letters: its lower part is cut by the edge and fades into the wine (Cilo's soft cut), over a
   wine glow (Mitra's light). No objects, no button. The letters rise into place as the page ends (js/motion.js). */

.foot {
  --foot-soft: #A9B9C8;                         /* secondary text on dark wine: 8.9:1 */
  --foot-seam: clamp(200px, 18vw, 280px);       /* the close's page colour falls through dusk into dark wine */
  --foot-pb: 0px;                               /* 11-19: the page ends on the cut letters */
  position: relative; isolation: isolate;
  overflow: clip;                               /* the objects never cause a sideways scroll */
  padding: calc(var(--foot-seam) * 0.62) var(--pad) var(--foot-pb);
  color: var(--cold);
  /* Jeet 11-16, round 4: a DARK gradient. The page ends where the opening began: the light page colour falls
     through the same dusk as the hand section into the dark wine ground, a wine glow rises behind the wordmark (now
     in sky, as the opening draws it), and a fine grain lies over all of it (an SVG noise in the stylesheet) */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.2'/%3E%3C/svg%3E") 0 0 / 240px 240px,
    linear-gradient(in oklab, var(--cold) 0, #dfdde4 calc(var(--foot-seam) * 0.16), #bcadb8 calc(var(--foot-seam) * 0.34),
      #8a6d7c calc(var(--foot-seam) * 0.52), #573444 calc(var(--foot-seam) * 0.7), #36151f calc(var(--foot-seam) * 0.86),
      var(--ink) var(--foot-seam), #22090F 70%, #170609 100%);
}
.foot :focus-visible { outline-color: var(--sky); }   /* the wine ring disappears on dark wine */
/* behind the wordmark, a wine glow rising from the floor: the sky letters stand on light from below */
.foot-art::before {
  content: ""; position: absolute; z-index: 0; left: -16%; right: -16%; top: -70%; bottom: -45%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(150, 56, 88, 0.62), rgba(112, 38, 63, 0.42) 42%, rgba(84, 32, 47, 0.18) 72%, rgba(84, 32, 47, 0) 100%);
}

.foot-vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- the index ---------- */
.foot-index {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5);
  align-items: start;
}
.foot-nav { grid-column: 1 / span 3; display: flex; flex-direction: column; align-items: flex-start; }
.foot-reach { grid-column: 4 / span 4; display: flex; flex-direction: column; align-items: flex-start; }
.foot-nav a, .foot-reach > a, .foot-mail a {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 500 var(--t-lead)/1.2 var(--sans); letter-spacing: -0.01em; color: var(--cold);
  transition: color 150ms ease;
}
.foot-mail { display: flex; flex-wrap: wrap; align-items: center; margin: 0; }
.foot-mail button {
  min-height: 44px; margin-left: var(--s1); padding: 0 var(--s3);
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 var(--t-ui)/1 var(--sans); color: var(--foot-soft);
  transition: color 150ms ease, background-color 150ms ease;
}
.foot-mail button:active { background: rgba(214, 229, 240, 0.12); }

/* the policies in one row along the right edge, level with the first line */
.foot-legal {
  grid-column: 8 / span 5; justify-self: end;
  display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: var(--s5);
  font-size: var(--t-ui);
}
.foot-legal a, .foot-legal button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font: 400 var(--t-ui)/1.2 var(--sans); color: var(--foot-soft);
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .foot-nav a:hover, .foot-reach > a:hover, .foot-mail a:hover { color: var(--sky); }
  .foot-legal a:hover, .foot-legal button:hover { color: var(--cold); }
  .foot-mail button:hover { color: var(--cold); background: rgba(214, 229, 240, 0.08); }
}

/* © under the policies, on the right */
.foot-copy { grid-column: 8 / span 5; justify-self: end; margin: var(--s2) 0 0; font-size: var(--t-ui); line-height: 1.2; color: var(--foot-soft); }

/* ---------- the wordmark, cut by the end of the page ----------
   The box is the visible part (the top 68% of the letters; 56% until Jeet's 11-19 "a bit more up"); the letters keep their full size inside it and the box
   clips them, so they rise from the cut as the page ends. Without JS the wordmark itself is clipped the same way. */
.foot-art {
  position: relative; z-index: 1;
  aspect-ratio: 902.44 / 136;
  margin-top: clamp(96px, 9vw, 150px);
}
.foot-wm, .foot-art .fg-wm-l {
  position: absolute; left: 0; right: 0; top: 0; inset: 0 0 auto 0;
  width: 100%; height: auto; aspect-ratio: 902.44 / 200; max-width: none;
}
.foot-wm { z-index: 2; clip-path: inset(0 0 32% 0); }
.foot-art .fg-wm, .foot-wm {
  -webkit-mask-image: linear-gradient(#000 22%, rgba(0, 0, 0, 0.55) 62%, transparent 100%);
  mask-image: linear-gradient(#000 22%, rgba(0, 0, 0, 0.55) 62%, transparent 100%);
}
.foot-wm { -webkit-mask-size: 100% 68%; mask-size: 100% 68%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .foot-nav { grid-column: 1 / span 4; }
  .foot-reach { grid-column: 5 / span 4; }
  .foot-legal { grid-column: 9 / span 4; flex-direction: column; align-items: flex-end; }
  .foot-copy { grid-column: 9 / span 4; }
}

/* a narrow column has no room for the address and Copy side by side: Copy goes under it, its word on the edge */
@media (max-width: 880px) {
  .foot-mail { flex-direction: column; align-items: flex-start; }
  .foot-mail button { margin-left: calc(-1 * var(--s2)); padding: 0 var(--s2); }
}

/* ---------- phone: the index in two columns, the policies in a row, ©; room under the wordmark for the bottom bar */
@media (max-width: 720px) {
  .foot { --foot-pb: calc(96px + env(safe-area-inset-bottom)); }
  .foot-index { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s4); }
  .foot-nav { grid-column: 1; }
  .foot-reach { grid-column: 2; }
  .foot-nav a, .foot-reach > a, .foot-mail a { font-size: var(--t-body); }
  .foot-legal {
    grid-column: 1 / -1; justify-self: start; flex-direction: row; align-items: center; justify-content: flex-start;
    column-gap: var(--s4); margin-top: var(--s4);
  }
  .foot-copy { grid-column: 1 / -1; justify-self: start; }
  /* phones (Jeet 11-19: too small): the word runs edge to edge and more of it shows, so it reads at arm's length */
  .foot-art { margin: clamp(48px, 14vw, 72px) calc(-1 * var(--pad)) 0; aspect-ratio: 902.44 / 170; }
  .foot-wm { clip-path: inset(0 0 15% 0); -webkit-mask-size: 100% 85%; mask-size: 100% 85%; }
  .foot-art .fg-wm, .foot-wm {
    -webkit-mask-image: linear-gradient(#000 45%, rgba(0, 0, 0, 0.6) 78%, transparent 100%);
    mask-image: linear-gradient(#000 45%, rgba(0, 0, 0, 0.6) 78%, transparent 100%);
  }
}
/* ---------- reduced motion: everything in place (js/footer.js moves nothing either) ---------- */
@media (prefers-reduced-motion: reduce) {
  .foot-nav a, .foot-reach > a, .foot-mail a, .foot-mail button, .foot-legal a, .foot-legal button { transition: none; }
}
