/* ==========================================================================
   Footer (partials/footer.php): drawing paper, like the header's plates. Its top edge carries the board's dock on a
   raised ledge (inline end) and Si-o-se-pol rising out of the paper (inline start), drawn in ink, lit at dusk.
   The edge's shape is an SVG drawn by assets/js/footer.js; without the script the edge is flat.
   ========================================================================== */
.site-footer {
  --paper-f: #F3F5F0; --rule-f: rgb(14 20 27 / .1); --ink-f: var(--ink);
  --dock-size: clamp(64px, 6.2vw, 96px); --dock-gap: clamp(14px, 1.9vw, 30px); --dock-max: 1.6;
  position: relative; z-index: 6; padding: 0 var(--gutter); color: var(--ink-f); overflow-x: clip;   /* (the raised edge still shows above it) */
  background: linear-gradient(var(--paper-f), #E8ECE5);
}
.site-footer::before {   /* graph paper, faint, fading in below the edge */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgb(14 156 89 / .055) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgb(14 156 89 / .055) 1px, transparent 1px) 0 0 / 24px 24px;
  -webkit-mask: linear-gradient(transparent 40px, #000 240px); mask: linear-gradient(transparent 40px, #000 240px);
}

/* ---------- the edge: a ledge under the dock, rising in an S (footer.js) ---------- */
.sf-edge { position: absolute; left: 0; bottom: calc(100% - 2px); width: 100%; height: 62px; overflow: visible; pointer-events: none; }
.sf-edge__fill { fill: var(--paper-f); }
.sf-edge__rim { fill: none; stroke: rgb(255 255 255 / .85); stroke-width: 1.2; }

/* ---------- Si-o-se-pol: the paper rises into the bridge; its foot is the edge, its reflection below it ---------- */
.sf-pol {
  --pw: min(47vw, 760px);
  position: absolute; z-index: 1; bottom: calc(100% - var(--pw) / 12); inset-inline-start: 0;   /* the water line (y 150 of 210) on the edge */
  width: var(--pw); height: auto; overflow: visible; pointer-events: none;
}
[dir="ltr"] .sf-pol { transform: scaleX(-1); }   /* the near end at the inline start */
.sf-pol__fill { fill: var(--paper-f); }
.sf-pol__rim { fill: none; stroke: rgb(255 255 255 / .9); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sf-pol__ink path { fill: none; stroke: rgb(12 92 60 / .8); stroke-width: .9; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sf-pol__low { fill: url(#sf-pol-lit); }
.sf-pol__up { fill: #121A20; }
.sf-pol__glint { fill: rgb(240 160 80 / .16); }
.sf-pol__refl { fill: none; stroke: rgb(12 92 60 / .16); stroke-width: .8; stroke-dasharray: 1 4; vector-effect: non-scaling-stroke; }
.sf-pol__ripple { fill: none; stroke: rgb(12 92 60 / .28); stroke-width: .8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* it draws itself when it comes into view (footer.js: --len per line, .is-drawn), then the arches light up */
html.js:not(.gr-static) .sf-pol__ink > * { stroke-dasharray: var(--len, 0) var(--len, 0); stroke-dashoffset: var(--len, 0); }
html.js:not(.gr-static) .sf-pol__lights, html.js:not(.gr-static) .sf-pol__water { opacity: 0; }
html.js:not(.gr-static) .sf-pol.is-drawn .sf-pol__ink > * { stroke-dashoffset: 0; transition: stroke-dashoffset 3s cubic-bezier(.45, .05, .25, 1) var(--d, 0s); }
html.js:not(.gr-static) .sf-pol.is-drawn .sf-pol__lights { opacity: 1; transition: opacity 1.6s ease 2.2s; }
html.js:not(.gr-static) .sf-pol.is-drawn .sf-pol__water { opacity: 1; transition: opacity 1.8s ease 2.6s; }

/* ---------- the board's dock ---------- */
.sf-dock {
  position: absolute; z-index: 2; top: calc(-1 * var(--dock-size) - 12px); inset-inline-end: var(--gutter); width: calc(50% - var(--gutter));
  display: flex; flex-direction: column; align-items: center;
}
.sf-dock__row { display: flex; gap: var(--dock-gap); margin: 0; padding: 0; list-style: none; }
.sf-dock__item { position: relative; width: var(--dock-size); height: var(--dock-size); flex: none; outline: none; cursor: default; will-change: transform; }
.sf-dock__fig { position: relative; width: 100%; height: 100%; margin: 0; }
.sf-dock__pic {   /* drawn at the largest size and scaled down, so it stays sharp when it grows */
  position: absolute; bottom: 0; left: 50%; width: calc(var(--dock-size) * var(--dock-max)); height: calc(var(--dock-size) * var(--dock-max));
  margin-left: calc(var(--dock-size) * var(--dock-max) / -2); border-radius: 50%; overflow: hidden;
  transform: scale(calc(var(--s, 1) / var(--dock-max))); transform-origin: 50% 100%; will-change: transform;
  box-shadow: 0 0 0 4px var(--paper-f), 0 22px 34px -18px rgb(0 0 0 / .55);
}
.sf-dock__pic svg, .sf-dock__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sf-dock__label {   /* the name and the role, in a small paper card over the one pointed at */
  position: absolute; left: 50%; bottom: calc(var(--dock-size) * var(--s, 1) + 16px); z-index: 2; display: grid; gap: 2px; justify-items: center;
  padding: 9px 16px 10px; border-radius: 12px; white-space: nowrap; pointer-events: none;
  background: var(--paper-f); color: var(--ink-f); box-shadow: 0 16px 30px -14px rgb(0 0 0 / .55), inset 0 0 0 1px rgb(14 20 27 / .06);
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .3s, transform .45s var(--ease-out);
}
.sf-dock__label::after { content: ""; position: absolute; top: 100%; left: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.sf-dock__label b { font-size: 14px; font-weight: 650; }
.sf-dock__label span { color: rgb(14 20 27 / .55); font-size: 11.5px; font-weight: 600; }
.sf-dock__item.is-hot .sf-dock__label, .sf-dock__item:focus-visible .sf-dock__label { opacity: 1; transform: translate(-50%, 0); }
.sf-dock__item:focus-visible .sf-dock__pic { box-shadow: 0 0 0 4px var(--paper-f), 0 0 0 6px var(--green), 0 22px 34px -18px rgb(0 0 0 / .55); }
.sf-dock__cap { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--ink-f); font-size: 12.5px; font-weight: 700; }
.sf-dock__cap span { color: rgb(14 20 27 / .45); font-weight: 500; }
.sf-dock__cap span::before { content: ""; display: inline-block; width: 18px; height: 1px; margin-inline-end: 10px; vertical-align: middle; background: rgb(14 20 27 / .25); }
/* without the script: the dock still answers the pointer, simply */
html:not(.js) .sf-dock__item:hover .sf-dock__label, html.gr-static .sf-dock__item:hover .sf-dock__label { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the body ---------- */
.sf-body {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 32px; max-width: 1600px; margin: 0 auto;
  padding: 120px 0 64px;
}
.sf-k { margin-bottom: 16px; color: var(--green-lo); font-size: 12px; font-weight: 750; }
.sf-brand { grid-column: 1 / span 3; }
.brand--footer { color: var(--ink-f); }
.brand--footer .brand__mark { width: 52px; height: 52px; color: var(--green); }
.brand--footer .brand__name { font-size: 19px; }
.sf-brand__line { max-width: 24em; margin-top: 18px; color: rgb(14 20 27 / .62); font-size: 14px; line-height: 1.95; }
.sf-reach { grid-column: 4 / span 3; display: grid; align-content: start; gap: 14px; font-style: normal; }
.sf-reach__row { display: grid; gap: 3px; color: var(--ink-f); font-size: 14.5px; font-weight: 600; line-height: 1.7; text-decoration: none; }
.sf-reach__row small { color: rgb(14 20 27 / .45); font-size: 11.5px; font-weight: 600; }
a.sf-reach__row:hover span { color: var(--green); }
.sf-links { grid-column: 7 / span 3; }
.sf-links ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.sf-links a { position: relative; color: rgb(14 20 27 / .78); font-size: 14.5px; font-weight: 600; text-decoration: none; transition: color .25s; }
.sf-links a::after { content: ""; position: absolute; inset-inline: 0; bottom: -3px; height: 1px; background: var(--green); transform: scaleX(0); transform-origin: var(--o, right); transition: transform .4s var(--ease-out); }
[dir="ltr"] .sf-links a { --o: left; }
.sf-links a:hover { color: var(--ink-f); }
.sf-links a:hover::after { transform: scaleX(1); }
.sf-act { grid-column: 10 / span 3; display: grid; align-content: start; justify-items: start; gap: 12px; }
.sf-act__say { margin-bottom: 8px; font-size: clamp(19px, 1.6vw, 25px); font-weight: 300; line-height: 1.6; }
.sf-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding-inline: 20px; border-radius: 999px;
  color: var(--ink-f); font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1px rgb(14 20 27 / .2);
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.sf-btn .arrow { width: 18px; height: 18px; transition: translate .35s var(--ease-out); }
.sf-btn:hover { background: var(--ink-f); color: var(--white); box-shadow: none; }
.sf-btn:hover .arrow { translate: var(--nudge, -3px) 0; }
[dir="ltr"] .sf-btn { --nudge: 3px; }
.sf-btn--live { color: var(--white); background: linear-gradient(180deg, #13A863, #0B874D 55%, #0A7C47); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 12px 26px -12px rgb(14 156 89 / .8); }
.sf-btn--live:hover { background: linear-gradient(180deg, #12A05E, #0A7F48 55%, #097443); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 16px 30px -12px rgb(14 156 89 / .9); }
.sf-btn:focus-visible, .sf-links a:focus-visible, .sf-reach__row:focus-visible, .sf-up:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

/* ---------- the bottom line ---------- */
.sf-base {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1600px; margin: 0 auto;
  padding: 22px 0 28px; border-top: 1px solid var(--rule-f); color: rgb(14 20 27 / .55); font-size: 12.5px;
}
.langs--paper { background: rgb(14 20 27 / .05); box-shadow: inset 0 0 0 1px rgb(14 20 27 / .12); }
.langs--paper .langs__item { color: var(--ink-f); }
.langs--paper .langs__item[aria-current] { background: var(--ink-f); color: var(--white); }
.sf-up { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-f); font-weight: 650; text-decoration: none; }
.sf-up svg { width: 18px; height: 18px; transition: transform .4s var(--ease-out); }
.sf-up:hover svg { transform: translateY(-3px); }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .sf-brand { grid-column: 1 / span 6; }
  .sf-reach { grid-column: 7 / span 6; }
  .sf-links { grid-column: 1 / span 6; }
  .sf-act { grid-column: 7 / span 6; }
}
@media (max-width: 760px) {
  .site-footer { --dock-size: 54px; --dock-gap: 12px; --dock-max: 1.36; }   /* the row stays inside the screen when it spreads */
  .sf-pol { --pw: 100vw; }
  .sf-dock { position: relative; top: auto; inset: auto; width: auto; padding-top: 70px; }   /* in the paper, under the edge: the label rises into the room above */
  .sf-dock__label { background: var(--ink-f); color: var(--white); }
  .sf-dock__label span { color: rgb(255 255 255 / .6); }
  .sf-dock__cap { margin-top: 18px; }
  .sf-body { grid-template-columns: 1fr 1fr; gap: 36px 20px; padding: 44px 0 40px; }
  .sf-brand, .sf-reach, .sf-act { grid-column: 1 / -1; }
  .sf-links { grid-column: 1 / -1; }
  .sf-links ul { grid-template-columns: 1fr 1fr; }
  .sf-act { justify-items: stretch; }
  .sf-btn { justify-content: space-between; }
  .sf-base { flex-direction: column; gap: 16px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-dock__label, .sf-dock__pic { transition: none; }
}
