/* Site-wide super footer
   Meant to pair with supernav.css. Self-contained, safe to include everywhere.
   When supernav is in overlay mode, the footer hides itself (full-screen apps).
*/

:root{
  --sf-bg: rgba(5, 7, 12, 0.68);
  --sf-line: rgba(216,181,106,0.18);
  --sf-muted: rgba(243,240,233,0.62);
  --sf-text:  rgba(243,240,233,0.88);
  --sf-pill: rgba(255,255,255,0.03);
  --sf-pill-line: rgba(255,255,255,0.12);
  --sf-gold: #d8b56a;
  --sf-gold2: #f0d58f;
}

.superfooter{
  margin-top: 48px;
  background: var(--sf-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--sf-line);
  color: var(--sf-text);
}

/* Hide the footer when it's rendered inside an overlay-mode page
   (e.g., slide decks, full-screen study tools).
   Supernav overlay mode adds `.supernav--overlay`; we can't detect that from CSS
   alone, so we let PHP skip the include in overlay mode — this class is a fallback
   for any hard-coded instance that still needs suppression. */
.superfooter.superfooter--hidden{ display: none; }

.superfooter-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 44px) 16px clamp(18px, 2.5vw, 26px);
}

.sf-top{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.sf-brand{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-brand .sf-mark{
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--sf-text);
  text-decoration: none;
}

.sf-brand .sf-tag{
  font-size: 13px;
  color: var(--sf-muted);
  max-width: 34ch;
  line-height: 1.55;
}

.sf-col{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sf-col-h{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sf-gold);
  opacity: .85;
  margin-bottom: 4px;
}

.sf-link{
  color: var(--sf-text);
  opacity: .88;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease, opacity .15s ease;
  width: fit-content;
}

.sf-link:hover{
  opacity: 1;
  color: var(--sf-gold2);
  border-bottom-color: rgba(216,181,106,.35);
}

.sf-link .sf-ext{
  font-size: 11px;
  opacity: .6;
  margin-left: 2px;
}

.sf-email{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.sf-bottom{
  margin-top: clamp(22px, 3vw, 32px);
  padding-top: 18px;
  border-top: 1px solid rgba(216,181,106,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--sf-muted);
  font-size: 12.5px;
}

.sf-bottom .sf-small{
  letter-spacing: .04em;
}

@media (max-width: 820px){
  .sf-top{
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
  .sf-brand{ grid-column: 1 / -1; }
}

@media (max-width: 520px){
  .sf-top{
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .sf-brand{ grid-column: auto; }
  .superfooter-inner{ padding: 26px 14px 20px; }
  .sf-bottom{ justify-content: center; text-align: center; }
}

@media (prefers-color-scheme: light){
  :root{
    --sf-bg: rgba(255,255,255,0.82);
    --sf-line: rgba(10, 12, 18, 0.10);
    --sf-muted: rgba(10, 12, 18, 0.60);
    --sf-text:  rgba(10, 12, 18, 0.86);
    --sf-pill: rgba(10, 12, 18, 0.03);
    --sf-pill-line: rgba(10, 12, 18, 0.12);
    --sf-gold: #b88939;
    --sf-gold2: #8a6420;
  }
  .sf-bottom{ border-top-color: rgba(184,137,57,0.18); }
  .sf-link:hover{ border-bottom-color: rgba(184,137,57,.45); }
}
