/* Site chrome shared by every Perspective page, the editions included.

   MASTHEAD: copied from the ICS MA & PhD site (philosophy/docs/assets/site.css),
   itself from faculty.icscanada.edu: black bar, 0.8rem / 600 / 0.14em uppercase
   links, 6px-offset 1.5px red hover underline, right-aligned dropdowns,
   asymmetric three-bar burger, full-screen overlay menu.

   FOOTER: copied directly from ics-site (css/styles.css, FOOTER and its
   responsive rules), recoloured to the masthead: black ground, white text,
   ICS red only for the top rule, hover underlines and focus rings. Its faces are self-hosted here (ics-site loads the same
   Libre Baskerville and Outfit from Google Fonts). Its tokens and faces are scoped to .site-footer so an
   edition's own --cream or type never leaks in, and the markup comes from
   assets/js/footer.js, a verbatim copy of ics-site/js/footer.js. */

@font-face { font-family: "Libre Baskerville"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/LibreBaskerville-Bold-latin.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fonts/Outfit-latin.woff2) format("woff2"); }

.ics-header,
.ics-mobile-menu {
  --ink:        #000000;
  --brand-red:  #D31145;
  --paper:      #FFFFFF;
  --nav-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

:where(.ics-header) ul { margin: 0; padding: 0; }
:where(.ics-header, .ics-mobile-menu) a { text-decoration: none; }
:where(.ics-header, .ics-mobile-menu) button { font: inherit; margin: 0; }

.ics-header :focus-visible,
.ics-mobile-menu :focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 3px;
}

.ics-header {
  background: var(--ink);
  width: 100%;
  position: relative;
  z-index: 300;
  -webkit-font-smoothing: antialiased;
}

.ics-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 100px;
}

.ics-header__logo-link { display: flex; align-items: center; flex-shrink: 0; }
.ics-header__logo-img  { height: 53px; width: auto; display: block; }

.ics-nav { display: flex; align-items: center; gap: 0; list-style: none; }
.ics-nav__item { position: relative; }

.ics-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 14px 12px;
  font-family: var(--nav-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s ease;
}
.ics-nav__link:hover {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

.ics-nav__item--active .ics-nav__link {
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

/* Donate: the one call to action in the bar, a small square ICS-red button */
.ics-nav__link--donate {
  margin-left: 10px;
  padding: 10px 16px;
  background: var(--brand-red);
  transition: background-color 0.2s ease;
}
.ics-nav__link--donate:hover {
  background: #A80D37;
  text-decoration: none;
}
.ics-nav__link--donate:focus-visible { outline-color: var(--paper); }

.ics-nav__caret {
  display: inline-block;
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid rgba(255,255,255,0.55);
  margin-left: 2px;
  margin-top: 1px;
  transition: border-top-color 0.2s ease;
}
.ics-nav__item:hover .ics-nav__caret,
.ics-nav__link[aria-expanded="true"] .ics-nav__caret {
  border-top-color: var(--brand-red);
}

.ics-dropdown {
  position: absolute;
  top: 100%; right: 0;
  min-width: 240px;
  background: var(--ink);
  border-top: 2px solid var(--brand-red);
  padding: 6px 0 10px;
  opacity: 0; visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}
.ics-nav__item:hover .ics-dropdown,
.ics-nav__item:focus-within .ics-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.ics-dropdown__link {
  display: block;
  white-space: nowrap;
  padding: 5px 20px;
  font-family: var(--nav-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-transform: uppercase;
  text-align: right;
  color: var(--paper);
}
.ics-dropdown__link:hover {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

/* Light/dark switch: Perspective's one addition to the borrowed bar, drawn in
   the bar's own white like the burger beside it. Laid out only once the head
   script has marked the page `js`; the half-filled disc turns over in dark. */
.ics-header__inner > nav { margin-left: auto; }
.ics-theme {
  display: none;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  padding: 0;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.85);
  transition: color 0.3s ease;
}
.js .ics-theme { display: grid; }
.ics-theme:hover { color: var(--brand-red); }
.ics-theme svg { width: 22px; height: 22px; transition: transform 0.6s cubic-bezier(.16, 1, .3, 1); }
.ics-theme[aria-pressed="true"] svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .ics-theme svg { transition: none; } }

.ics-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 8px;
  background: none; border: none; cursor: pointer;
}
.ics-burger span {
  display: block; height: 1px;
  background: rgba(255,255,255,0.85);
  transition: all 0.3s ease;
}
.ics-burger span:first-child  { width: 50%;  margin-left: auto; }
.ics-burger span:nth-child(2) { width: 100%; }
.ics-burger span:last-child   { width: 75%;  margin-left: auto; }
.ics-burger:hover span { background: var(--brand-red); }

.ics-mobile-menu {
  display: none;
  position: fixed; inset: 0;
  background: var(--ink);
  z-index: 999;
  padding: 88px 1.5rem 3rem;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ics-mobile-menu.is-open { display: flex; }

.ics-mobile-menu__close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.75);
  font-size: 1.9rem; line-height: 1;
}
.ics-mobile-menu__close:hover { color: var(--brand-red); }

.ics-mobile-menu__link {
  display: block;
  padding: 15px 0;
  font-family: var(--nav-sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ics-mobile-menu__link:hover { color: var(--paper); }
.ics-mobile-menu__link--current {
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.ics-mobile-menu__link--donate {
  align-self: flex-start;
  margin-top: 1.5rem;
  padding: 13px 22px;
  background: var(--brand-red);
  border-bottom: 0;
}
.ics-mobile-menu__link--donate:hover { background: #A80D37; }
.ics-mobile-menu__link--donate:focus-visible { outline-color: var(--paper); }
.ics-mobile-menu__group > .ics-mobile-menu__link { color: rgba(255,255,255,0.5); }

.ics-mobile-menu__sub { padding: 0.35rem 0 0.9rem 1.1rem; }
.ics-mobile-menu__sub a {
  display: block;
  padding: 11px 0;
  font-family: var(--nav-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.ics-mobile-menu__sub a:hover,
.ics-mobile-menu__sub a.is-current {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

@media (max-width: 1200px) {
  .ics-nav { display: none; }
  .ics-burger { display: flex; }
  .ics-header__inner { padding: 0 clamp(1rem, 4vw, 2rem); min-height: 69px; }
  .ics-header__logo-img { height: 30px; }
}
@media (min-width: 1201px) {
  .ics-mobile-menu { display: none !important; }
}

/* ================================================================
   FOOTER (ics-site, in the masthead's colours)
   ================================================================ */
.site-footer {
  --wine-deep:      #000000;  /* masthead --ink */
  --accent-light:   rgba(255,255,255,0.72);
  --accent-on-wine: #FFFFFF;
  --cream:          #FFFFFF;
  --text-on-dark:   rgba(255,255,255,0.72);
  --brand-red:      #D31145;
  --serif: 'Libre Baskerville', Georgia, serif;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.site-footer *, .site-footer *::before, .site-footer *::after { box-sizing: border-box; }
.site-footer a { text-decoration: none; color: inherit; }
.site-footer ul, .site-footer h4, .site-footer p, .site-footer address { margin: 0; padding: 0; }
.site-footer .container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.site-footer :focus-visible { outline: 2px solid var(--brand-red); outline-offset: 3px; }

.site-footer {
  background: var(--wine-deep);
  padding: 3.5rem 0 2rem;
  color: var(--text-on-dark);
  border-top: 2px solid var(--brand-red);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer__brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.footer__desc {
  font-size: 0.82rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  max-width: 280px;
}

.footer__address {
  font-size: 0.82rem;
  line-height: 1.7;
  font-style: normal;
}

.footer__heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-on-wine);
  margin-bottom: 1.2rem;
}

.footer__links { list-style: none; }
.footer__links li { margin-bottom: 0.6rem; }
.footer__links a {
  font-size: 0.85rem;
  color: var(--text-on-dark);
  transition: color 0.2s ease;
  display: inline-block;
  padding: 0.15rem 0;
}
.footer__links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.footer__social {
  display: flex; gap: 0.6rem;
}
.footer__social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: var(--text-on-dark);
  transition: all 0.2s ease;
}
.footer__social a:hover {
  border-color: var(--brand-red);
  color: #FFFFFF;
}

.footer__social .social-substack {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .site-footer .container { padding: 0 1.25rem; }
  .site-footer { padding: 2.5rem 0 1.5rem; }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer__desc { max-width: 100%; }
  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .footer__social { justify-content: center; }
  .footer__social a { width: 44px; height: 44px; }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}

@media print {
  .ics-header, .ics-mobile-menu, .site-footer { display: none !important; }
}
