/* CorTIF site footer: pre-footer band (CTA + contact tiles), link columns, legal bar.
   Shared by every page; uses theme tokens so it follows dark/light mode. */
.site-footer.sf { position: relative; overflow: hidden; background: var(--bg); color: var(--muted); border-top: 1px solid var(--line); padding-top: clamp(64px, 9vw, 112px); }
.sf::before { content: ""; position: absolute; left: 50%; top: -260px; transform: translateX(-50%); width: 900px; height: 520px; border-radius: 50%; background: radial-gradient(ellipse, rgba(93, 214, 44, .09), transparent 66%); pointer-events: none; }
.sf .container { position: relative; z-index: 1; }
.sf a { text-decoration: none; }

/* ---------- pre-footer band ---------- */
.sf-band { position: relative; overflow: hidden; border-radius: 26px; border: 1px solid rgba(93, 214, 44, .26);
  background: linear-gradient(135deg, rgba(93, 214, 44, .13) 0%, rgba(93, 214, 44, .03) 46%, transparent 70%), var(--surface);
  padding: 46px 48px 0; }
.sf-band::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 85% 0%, #000, transparent 60%); mask-image: radial-gradient(ellipse at 85% 0%, #000, transparent 60%); }
.sf-band > * { position: relative; z-index: 1; }
.sf-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; align-items: center; padding-bottom: 38px; }
.sf-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; font-family: var(--font-head); font-size: .72rem; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--faint); }
.sf-eyebrow i { font-style: normal; color: var(--primary); letter-spacing: 0; }
.sf-cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 10px; color: var(--ink); max-width: 640px; }
.sf-cta h2 span { color: var(--primary); }
.sf-cta p { margin: 0; color: var(--muted); font-size: .98rem; max-width: 520px; }
.sf-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.sf-cta-actions .btn { white-space: nowrap; }

.sf-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); margin: 0 -48px; }
.sf-band.no-cta { padding-top: 0; }
.sf-band.no-cta .sf-contact { border-top: 0; }
.sf-ct { display: flex; align-items: center; gap: 14px; padding: 22px 28px 22px 48px; color: var(--ink-2); transition: background .25s ease; min-width: 0; }
.sf-ct + .sf-ct { border-left: 1px solid var(--line); padding-left: 28px; }
a.sf-ct:hover { background: rgba(93, 214, 44, .06); }
.sf-ct-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--primary); background: rgba(93, 214, 44, .1); border: 1px solid rgba(93, 214, 44, .24); transition: .3s ease; }
.sf-ct-ic svg { width: 19px; height: 19px; }
a.sf-ct:hover .sf-ct-ic { background: var(--primary); color: #0f0f0f; transform: rotate(-6deg); }
.sf-ct small { display: block; font-family: var(--font-head); font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.sf-ct b { display: block; font-weight: 600; font-size: .95rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- main: brand + link columns ---------- */
.sf-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 3fr); gap: 48px; padding: 64px 0 52px; }
.sf-brand .brand { display: inline-flex; margin-bottom: 18px; }
.sf-brand .brand-logo { height: 34px; width: auto; }
.sf-name { display: block; font-family: var(--font-head); font-size: .74rem; font-weight: 700; line-height: 1.55; letter-spacing: .02em; color: var(--primary); padding: 10px 14px; border-left: 3px solid var(--primary); background: rgba(93, 214, 44, .06); border-radius: 0 10px 10px 0; max-width: 300px; margin-bottom: 16px; }
.sf-brand p { font-size: .9rem; line-height: 1.65; color: var(--muted); max-width: 320px; margin: 0 0 20px; }
.sf-account { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-account a { font-family: var(--font-head); font-size: .8rem; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; transition: .25s ease; }
.sf-account a:hover { color: var(--primary); border-color: rgba(93, 214, 44, .5); }
.sf-account a.on { color: #0f0f0f; background: var(--primary); border-color: var(--primary); }
.sf-account a.on:hover { color: #0f0f0f; filter: brightness(1.08); }

.sf-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.sf-col h5 { display: flex; align-items: center; gap: 9px; font-family: var(--font-head); font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin: 0 0 18px; }
.sf-col h5::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--primary); }
.sf-col ul { list-style: none; margin: 0; padding: 0; }
.sf-col li { margin: 0 0 11px; }
.sf-col a { position: relative; display: inline-flex; align-items: center; font-size: .9rem; color: var(--muted); transition: color .2s ease, transform .25s ease; }
.sf-col a::before { content: "\2192"; position: absolute; left: -16px; opacity: 0; color: var(--primary); transform: translateX(-4px); transition: .25s ease; }
.sf-col a:hover { color: var(--ink); transform: translateX(14px); }
.sf-col a:hover::before { opacity: 1; transform: none; }

/* ---------- legal bar ---------- */
.sf-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--faint); }
.sf-bottom p { margin: 0; color: var(--faint); font-size: .8rem; }
.sf-legal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sf-legal a { color: var(--muted); transition: color .2s; }
.sf-legal a:hover { color: var(--primary); }
.sf-note { display: inline-flex; align-items: center; gap: 8px; }
.sf-note i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .sf-main { grid-template-columns: 1fr; gap: 40px; }
  .sf-brand p, .sf-name { max-width: 520px; }
}
@media (max-width: 900px) {
  .sf-cta { grid-template-columns: minmax(0, 1fr); }
  .sf-cta-actions { justify-content: flex-start; }
  .sf-contact { grid-template-columns: 1fr; }
  .sf-ct, .sf-ct + .sf-ct { padding: 18px 28px; border-left: 0; }
  .sf-ct + .sf-ct { border-top: 1px solid var(--line); }
  .sf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}
@media (max-width: 600px) {
  .sf-band { padding: 32px 22px 0; border-radius: 20px; }
  .sf-contact { margin: 0 -22px; }
  .sf-cta-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .sf-cta-actions .btn { justify-content: center; width: 100%; }
  .sf-ct, .sf-ct + .sf-ct { padding: 16px 22px; }
  .sf-main { padding: 48px 0 36px; }
  .sf-bottom { flex-direction: column; text-align: center; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .sf-legal { justify-content: center; }
}

/* light theme tweaks (theme.css forces .site-footer onto --surface) */
html[data-theme="light"] .sf-band { background: linear-gradient(135deg, rgba(47, 158, 11, .1) 0%, rgba(47, 158, 11, .02) 46%, transparent 70%), var(--bg) !important; border-color: rgba(47, 158, 11, .3); }
html[data-theme="light"] a.sf-ct:hover .sf-ct-ic, html[data-theme="light"] .sf-account a.on { color: #fff; }

/* .site-footer a:hover (redesign.css) would tint the button label green-on-green */
.sf .sf-cta-actions .btn-primary, .sf .sf-cta-actions .btn-primary:hover { color: var(--lime-ink, #0f0f0f); }

/* compact footer for signed-in app-shell pages */
.site-footer.sf.sf-app { padding-top: 0; }
.sf-app .sf-main { padding-top: 56px; }
