/* ==========================================================
   PUBLIC SITE FOOTER — "next stop" station scene
   The seaside platform photo (assets/img/footer-station.webp) sits at
   the bottom at full width; its sky is extended upward with the photo's
   own top-row colours, so every line of footer text rests on one
   continuous sky, above the lamp post and the wire.
   ========================================================== */
footer.sf{
  --sf-photo-h:calc(100vw * .5628);
  position:relative; isolation:isolate; overflow:hidden; color:#fff; border-top:0;
  padding:clamp(70px, 8vw, 112px) 0 calc(var(--sf-photo-h) * .77 + 28px) !important;
  background:
    url('img/footer-station.webp') center bottom / 100% auto no-repeat,
    linear-gradient(90deg, #0294f6 0%, #06a0fc 52%, #31acfd 100%);
}
/* deeper sky behind the text so small links stay readable */
footer.sf::before{
  content:""; position:absolute; inset:0 0 auto 0; z-index:-1; pointer-events:none;
  height:calc(100% - var(--sf-photo-h) * .55);
  background:linear-gradient(180deg, rgba(1,36,96,.46) 0%, rgba(1,36,96,.24) 55%, rgba(1,36,96,0) 100%);
}
html[data-theme="dark"] footer.sf::after{ content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; background:rgba(3,9,26,.34); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) footer.sf::after{ content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; background:rgba(3,9,26,.34); } }

.sf-wrap{ position:relative; max-width:var(--rail-w, 1240px); margin:0 auto; padding:0 clamp(20px, 4vw, 56px); }

/* the pitch */
.sf-top{ display:flex; align-items:flex-end; justify-content:space-between; gap:32px; padding-bottom:38px; border-bottom:1px solid rgba(255,255,255,.28); }
.sf-kicker{
  display:inline-flex; align-items:center; gap:8px; padding:7px 13px 7px 11px; border-radius:999px;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.32); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  font:600 11px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:#fff;
}
.sf-kicker svg{ width:14px; height:14px; }
:root .sf-title{
  margin:18px 0 12px; color:#fff; font-family:var(--font-display); font-weight:450;
  font-size:clamp(34px, 4.4vw, 60px); line-height:1.02; letter-spacing:-.05em; text-shadow:0 2px 26px rgba(0,30,80,.28);
}
.sf-sub{ max-width:520px; margin:0; font-size:16px; line-height:1.6; color:rgba(255,255,255,.9); }
.sf-actions{ display:flex; flex-wrap:wrap; gap:10px; flex:none; }

/* links */
.sf-cols{ display:grid; grid-template-columns:1.5fr repeat(3, minmax(0,1fr)); gap:32px; padding-top:36px; }
.sf-logo{ display:inline-flex; align-items:center; gap:10px; color:#fff; text-decoration:none; font:650 17px/1 var(--font-ui); letter-spacing:-.04em; }
.sf-logo img{ width:30px; height:30px; object-fit:contain; transform:scale(1.25); filter:drop-shadow(0 4px 10px rgba(0,30,80,.35)); }
.sf-brand p{ max-width:300px; margin:16px 0 18px; font-size:14px; line-height:1.6; color:rgba(255,255,255,.88); }
/* social links: plain white network glyphs, no tile around them */
/* each link is a 40px tap target around a 20px glyph; the negative margin keeps the glyphs where they were */
.sf-social{ display:flex; align-items:center; gap:0; margin:-10px 0 -10px -10px; }
.sf-social a{
  display:grid; place-items:center; width:40px; height:40px; color:#fff; opacity:.86; line-height:0; text-decoration:none;
  filter:drop-shadow(0 2px 8px rgba(0,30,80,.35));
  transition:opacity .2s ease, transform .2s cubic-bezier(.2,.8,.2,1);
}
.sf-social a:hover{ opacity:1; transform:translateY(-2px); }
.sf-social a:focus-visible{ outline:2px solid #fff; outline-offset:-4px; border-radius:8px; }
.sf-social a[aria-disabled="true"]{ cursor:default; }
.sf-social svg{ display:block; width:20px; height:20px; }
:root .sf-col h5{ margin:0 0 14px; font:600 11px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.72); }
.sf-col a{
  display:block; width:fit-content; padding:5px 0; color:#fff; text-decoration:none;
  font-size:14.5px; font-weight:500; letter-spacing:-.01em; opacity:.92; transition:opacity .15s ease;
}
.sf-col a:hover{ opacity:1; text-decoration:underline; text-underline-offset:4px; text-decoration-thickness:1px; }

/* bottom line, resting on the rails of the photo */
.sf-base{
  position:absolute; left:0; right:0; bottom:0; z-index:1; padding:34px 0 14px;
  background:linear-gradient(180deg, rgba(14,10,9,0), rgba(14,10,9,.72) 58%);
  font-size:12.5px; color:rgba(255,255,255,.84);
}
.sf-base-row{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; }
.sf-made{ display:inline-flex; align-items:center; gap:7px; }
.sf-base-end{ display:inline-flex; align-items:center; gap:14px; }
.sf-theme{ display:inline-flex; }
.sf-theme:empty{ display:none; }
/* the site-wide theme switch: a small icon at the very end of the footer */
footer.sf .theme-toggle-btn{
  position:static; width:28px; height:28px; padding:0; border-radius:50%; display:grid; place-items:center;
  color:#fff; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.3); box-shadow:none;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); cursor:pointer;
  transition:background-color .2s ease, border-color .2s ease;
}
footer.sf .theme-toggle-btn:hover{ background:rgba(255,255,255,.24); border-color:rgba(255,255,255,.55); transform:none; box-shadow:none; }
footer.sf .theme-toggle-btn:active{ transform:scale(.92); }
footer.sf .theme-toggle-btn:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
footer.sf .theme-toggle-btn i, footer.sf .theme-toggle-btn svg{ width:14px; height:14px; }
.sf-made::before{ content:""; width:6px; height:6px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.25); }

@media (max-width:980px){
  .sf-top{ flex-direction:column; align-items:flex-start; }
  .sf-cols{ grid-template-columns:repeat(3, minmax(0,1fr)); }
  .sf-brand{ grid-column:1/-1; }
}
@media (max-width:760px){
  /* phones: show the scene larger and keep the bench, pole and sign in frame */
  footer.sf{ --sf-photo-h:calc(100vw * .5628 * 1.6); padding-top:64px !important; background-size:160% auto, auto; }
  .sf-cols{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:26px 18px; }
  .sf-col:last-child{ grid-column:1/-1; }
  .sf-made{ display:none; }
  .sf-base{ padding-top:26px; }
}
