/* ============================================================
   SITE FOOTER: one footer for every page on the site
   ------------------------------------------------------------
   Rendered by Pages/Shared/_SiteFooter.cshtml. The markup is
   shared by the homepage, the programme pages, the content pages
   and the legacy template pages, so this file cannot lean on any
   one page's tokens: every custom property carries a fallback.
   ============================================================ */

.sf {
  --sf-bg: #0d0f12;
  --sf-ink: #f4f5f7;
  --sf-muted: #9aa1ab;
  --sf-line: rgba(255, 255, 255, .11);
  --sf-accent: var(--accent, #e03a2f);
  --sf-pad: var(--pad, 28px);
  --sf-max: var(--container, 1440px);

  background: var(--sf-bg);
  color: var(--sf-ink);
  padding: 72px 0 0;
  font-family: inherit;
}

.sf-in {
  max-width: var(--sf-max);
  margin: 0 auto;
  padding: 0 var(--sf-pad) 48px;
  display: grid;
  /* brand block takes the slack; the four link columns stay equal so the
     list edges line up the way they do on the live footer */
  grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr));
  gap: clamp(24px, calc(2.4 * var(--fv, 1vw)), 44px);
}

/* ---- brand / address block ---- */
/* same artwork as the header logo, set on a white panel so the red
   wordmark reads on the dark footer and matches the light header */
.sf-logo {
  display: block;
  width: min(100%, 340px);
  box-sizing: border-box;
  margin-bottom: 22px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 16px;
  line-height: 0;
}
.sf-logo img { display: block; width: 100%; height: auto; }

.sf-addr,
.sf-contact,
.sf-accred {
  margin: 0 0 12px;
  max-width: 330px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--sf-muted);
}
.sf-contact a {
  color: var(--sf-ink);
  text-decoration: none;
  transition: color .2s ease;
}
.sf-contact a:hover { color: var(--sf-accent); }
.sf-sep { padding: 0 6px; color: var(--sf-muted); }

.sf-accred {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sf-muted);
}

/* ---- social row ----
   Solid white discs with dark glyphs (client ask, 2026-10-19: the old
   hairline outlines were barely visible on the dark footer). */
.sf-social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.sf-social a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sf-ink);
  border-radius: 50%;
  background: var(--sf-ink);
  color: var(--sf-bg);
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.sf-social a:hover,
.sf-social a:focus-visible {
  background: var(--sf-accent);
  border-color: var(--sf-accent);
  color: #fff;
  transform: translateY(-2px);
}
.sf-social a:active { transform: translateY(0) scale(.97); }
.sf-social svg { width: 20px; height: 20px; fill: currentColor; }

/* ---- link columns ---- */
.sf-col { display: flex; flex-direction: column; min-width: 0; }
.sf-col .sf-h {
  margin: 0 0 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--sf-muted);
}
.sf-col a {
  padding: 6px 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--sf-ink);
  text-decoration: none;
  transition: color .2s ease;
}
.sf-col a:hover { color: var(--sf-accent); }

.sf-apply {
  margin-top: 16px;
  align-self: flex-start;
  padding: 11px 18px !important;
  border-radius: 999px;
  background: var(--sf-accent);
  font-size: 14px !important;
  font-weight: 600;
  color: #fff !important;
  transition: filter .25s ease, transform .25s ease;
}
.sf-apply:hover { filter: brightness(1.1); transform: translateY(-1px); color: #fff !important; }

/* ---- bottom bar ---- */
.sf-bottom {
  max-width: var(--sf-max);
  margin: 0 auto;
  padding: 20px var(--sf-pad) 26px;
  border-top: 1px solid var(--sf-line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--sf-muted);
}
.sf-note { max-width: 620px; text-align: right; }
.sf-credit { display: block; margin-top: 6px; }
.sf-credit a { color: var(--sf-ink); text-decoration: underline; text-decoration-color: var(--sf-line); text-underline-offset: 3px; transition: color .2s ease; }
.sf-credit a:hover { color: var(--sf-accent); }

/* ---- responsive ---- */
@media (max-width: 1180px) {
  /* brand on its own row, then the four link columns in one row so their lists line up */
  .sf-in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sf-brand { grid-column: 1 / -1; }
  .sf-addr, .sf-contact, .sf-accred { max-width: 520px; }
}
@media (max-width: 720px) {
  .sf { padding-top: 54px; }
  .sf-in { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .sf-note { text-align: left; }
}
@media (max-width: 460px) {
  .sf-in { grid-template-columns: 1fr; }
  .sf-admit { grid-column: 1 / -1; }
}

/* ---- phones: admissions first, link groups fold away ----
   Below 720px the footer ran to about three screens of links. The enquiry
   block (the one thing a visitor at the bottom of the page is likely to want)
   moves to the top as a card, Programmes and both link groups collapse behind
   their headings (nav-mega.js turns each heading into a toggle at this width
   only), and the brand block closes the footer above the copyright. */
.sf-acc { display: none; }
@media (max-width: 720px) {
  .sf { padding-top: 40px; }
  .sf-in { display: flex; flex-direction: column; gap: 0; padding-bottom: 28px; }
  .sf-admit {
    order: -1;
    margin-bottom: 22px;
    padding: 20px 20px 22px;
    border: 1px solid var(--sf-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
  }
  .sf-admit .sf-h { margin-bottom: 8px; }
  .sf-admit a { font-size: 16px; }
  .sf-admit .sf-apply {
    align-self: stretch;
    justify-content: center;
    margin-top: 14px;
    min-height: 50px;
    font-size: 16px !important;
  }
  .sf-col.is-acc { border-top: 1px solid var(--sf-line); }
  .sf-col.is-acc .sf-h { margin: 0; }
  .sf-acc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    font-size: 13px;
    color: var(--sf-ink);
    cursor: pointer;
  }
  .sf-acc:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; border-radius: 4px; }
  .sf-acc svg { width: 16px; height: 16px; flex: none; transition: transform .25s ease; }
  .sf-col.is-open .sf-acc svg { transform: rotate(180deg); }
  .sf-col.is-acc:not(.is-open) > a { display: none; }
  .sf-col.is-acc.is-open { padding-bottom: 10px; }
  .sf-brand { order: 5; padding-top: 26px; border-top: 1px solid var(--sf-line); }
  .sf-bottom { padding-top: 18px; padding-bottom: 22px; }
}
@media (max-width: 720px) {
  /* the link is a flex box on phones (44px targets), which drops the space
     before the arrow */
  .sf-admit .sf-apply { gap: 8px; }
}
