/* Site footer and back-to-top button, shared by every page (homepage and site-shell pages).
   Markup: site-footer.js. Moved out of home-ending.css on 10-15 when the site shell adopted the
   homepage's paper footer. Asset URLs are relative to this file. */
/* ---------- footer ---------- */
.home-footer { position: relative; margin-top: 0; color: #1f3a2e; }
.home-footer .hf-inner { position: relative; max-width: 1440px; margin: 0 auto; padding: 72px 6% 30px; display: grid; grid-template-columns: minmax(240px,1.1fr) 2fr; gap: 40px 64px; }
.home-footer .brand { display: inline-flex; align-items: center; gap: 9px; font-family: 'Times New Roman',Georgia,serif; font-size: 26px; letter-spacing: -.8px; color: #082f29; text-decoration: none; }
.home-footer .brand img { width: 36px; height: 36px; }
.home-footer .hf-brand p { max-width: 30em; margin: 14px 0 18px; font-size: 15px; line-height: 1.8; color: #3d4f43; }
.home-footer .hf-languages { display: flex; flex-wrap: wrap; gap: 6px; }
.home-footer .hf-languages button { min-height: 40px; padding: 6px 12px; border: 1px solid #6d7d6655; border-radius: 999px; background: transparent; color: #1f3a2e; font: inherit; font-size: 13px; cursor: pointer; }
.home-footer .hf-languages button[aria-pressed=true] { background: #f7ecde99; font-weight: 600; }
.home-footer .hf-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.home-footer h2 { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: #4d6450; margin: 0 0 10px; }
.home-footer ul { list-style: none; margin: 0; padding: 0; }
.home-footer a:not(.brand) { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; color: #1f3a2e; text-decoration: none; }
.home-footer a:not(.brand):hover { text-decoration: underline; text-underline-offset: 5px; }
.home-footer .hf-base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 20px; border-top: 1px solid #4d64503a; }
.home-footer .hf-base p { margin: 0; font-size: 13px; line-height: 1.7; color: #4f5f52; }
.home-footer :focus-visible { outline: 2px solid #ba8645; outline-offset: 2px; }

/* Paper-cut lower layer (chosen 10-14 over frosted glass). The footer is a sage sheet one layer below the ivory page. The sheet
   is the seamless sage tile everywhere (one grain scale at every width), cut to the painted wave by
   a mask; the ivory's shadow and the cut's light rim are a separate smooth layer on top, which can
   stretch to any width without showing it (tools/make-footer-layers.py). */
.home-footer { --edge-h: calc(100vw * 172 / 1672); --edge-w: 100%; margin-top: 0; isolation: isolate; }
.home-footer::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: #c5cbb5 url('assets/footer-sage-tile-v1.webp') 0 0 / 330px;
  -webkit-mask: url('assets/footer-wave-mask.svg') center top / var(--edge-w) var(--edge-h) no-repeat, linear-gradient(#000, #000) 0 calc(var(--edge-h) - 2px) / 100% 100% no-repeat;
          mask: url('assets/footer-wave-mask.svg') center top / var(--edge-w) var(--edge-h) no-repeat, linear-gradient(#000, #000) 0 calc(var(--edge-h) - 2px) / 100% 100% no-repeat; }
.home-footer .hf-edge { position: absolute; left: 0; right: 0; top: 0; height: var(--edge-h); pointer-events: none;
  background: url('assets/footer-wave-rim.svg') center top / var(--edge-w) 100% no-repeat, url('assets/footer-wave-shade@2x.webp') center top / var(--edge-w) 100% no-repeat; }
.home-footer .hf-inner { padding-top: calc(var(--edge-h) * .62 + 24px); }
@media (max-width:1100px) {
  /* keep the wave's height on narrow screens: show the middle 1100 px of the strip */
  .home-footer { --edge-h: 113px; --edge-w: 1100px; }
}
@media (max-width:900px) {
  .home-footer .hf-inner { grid-template-columns: 1fr; padding: 60px 6% 28px; }
  .home-footer .hf-columns { grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); }
  
}

/* ---------- back to top: sage paper disc ---------- */
.to-top { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); z-index: 40;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #1f3a2e;
  background: #c5cbb5 url('assets/footer-sage-tile-v1.webp') center / 330px;
  box-shadow: inset 0 1px 0 #f4f7ee, inset 0 -1px 0 #93a28a, 0 1px 1.5px #5a46285c, 0 6px 14px #5a462838;
  opacity: 0; transform: translateY(8px); transition: opacity .22s ease, transform .22s ease, box-shadow .22s ease; }
.to-top.is-on { opacity: 1; transform: none; }
.to-top svg { width: 22px; height: 22px; display: block; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover:hover) { .to-top.is-on:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 #f4f7ee, inset 0 -1px 0 #93a28a, 0 2px 2px #5a46285c, 0 10px 20px #5a462840; } }
.to-top:focus-visible { outline: 2px solid #ba8645; outline-offset: 3px; }
@media (max-width:600px) { .to-top { width: 46px; height: 46px; right: 16px; bottom: 18px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* the footer content follows the page gutter (the logo's left edge) on desktop */
@media (min-width:1101px) { .home-footer .hf-inner { max-width: none; padding-inline: var(--gutter, 5.68%); } }
