/*
 * The fleet footer's stylesheet, split from fleet.css on 2026-10-29 the way the
 * header's was on 2026-10-26: its own handle (samye-fleet-footer), so a site
 * that cannot load fleet.css (the Institute's retained PHP views) can still
 * draw the footer. Markup: inc/footer.php. Sized in rem at the fleet's 10px
 * root; the Institute serves a px copy of this file where its root is 16px.
 */

/* ----- Fleet footer ------------------------------------------------ */
/* Rendered by inc/footer.php on Bricks' `render_footer` hook, from the
   plugin's identity options. Identical markup on every centre site.
   Layout mirrors samyemandala.org's footer-2: brand | link columns,
   divider, colophon with socials. */

/* The footer column must sit exactly on the Bricks content column: ACSS
   gives every section a fluid --gutter and every container --content-width,
   so the footer uses the same pair — a fixed gutter here reads as "the
   footer is wider than the site" at mid viewports (it was, by 20px/side
   at 1280). */
.samye-footer {
  background: var(--samye-parchment, #F5F3F3);
  /* Every fleet template paints its main #FFFFFF and the footer is #F5F3F3 — 1.105:1, which is
     not a boundary anyone can see. The soft shadow below was meant to do this job and does not
     carry at 6% over 40px. A hairline does, and it is the quiet version: no colour moves, so a
     centre's pages look exactly as they did apart from the edge. Matt's pick, 2026-08-29, over
     darkening the footer to #EDE7DE or sand.
     Noticed because the standard-pages rollout put 56 more pages onto white mains, which made
     one long-standing near-invisible edge into the edge on most of the site. */
  border-block-start: 1px solid var(--samye-silver-soft, #E5E3E0);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.06);
  color: var(--samye-ink-soft, #4a4a4a);
  font-family: var(--samye-t-body, sans-serif);
  font-size: 1.45rem;
  line-height: 1.65;
  padding: 6.4rem var(--gutter, 2.4rem) 2.4rem;
}

.samye-footer__inner {
  display: grid;
  grid-template-columns: minmax(24rem, 34rem) 1fr;
  gap: 4.8rem 8rem;
  align-items: start;
  max-width: var(--samye-container);
  margin-inline: auto;
}

.samye-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.samye-footer__logo {
  align-items: flex-start;
}

.samye-footer__logo .samye-logo__mark,
.samye-footer .custom-logo {
  max-width: 130px;
  height: auto;
  display: block;
}

.samye-footer__tagline {
  margin: 0;
  max-width: 36ch;
  color: var(--samye-ink-soft, #4a4a4a);
}

/* Address and phone live in the brand column (Matt, 2026-08-18): one line
   each, mark first, wrapped text hanging off the mark. They are one contact
   group, so their wrapper spaces them tighter than the brand column's 2rem
   rhythm between logo, tagline and contact. */
.samye-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* A grid, not flex: it fixes the text column at mark-width + gap, so the two
   lines start at the same x even if one mark ever renders at another size —
   which is exactly how they fell out of line before (see the social glyph
   rule below). The brand column's flex gap does the outer spacing, so no
   margin here. */
.samye-footer__brand .samye-footer__address,
.samye-footer__brand .samye-footer__phone,
.samye-footer__brand .samye-footer__line,
.samye-footer__brand .samye-footer__contact-link {
  margin: 0;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  align-items: start;
  gap: 0.8rem;
}

/* One rule for both marks: the phone sits directly under the address and any
   difference in size or colour between the two would read as a mistake. */
.samye-footer__pin,
.samye-footer__icon {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  /* optical: centers the mark on the first text line. The footer sets
     1.45rem/1.65, so a line box is 2.39rem and a 1.6rem mark needs
     (2.39 - 1.6) / 2 to sit level with it. */
  margin-top: 0.4rem;
  color: var(--samye-crimson, #B83029);
}

/* auto-FIT would stretch two columns across the whole track when a centre
   has no address or phone yet; auto-FILL keeps them their natural width. */
/* auto-FIT with a 1fr max, and both halves matter.
   `repeat(auto-fill, minmax(18rem, 22rem))` looks like it asks for as many
   18rem columns as fit, but when the max is a definite length the browser
   counts repetitions at the MAX, not the min. In this footer the menu area is
   440px wide, so it worked out floor((440 + 40) / (220 + 40)) = 1 track — two
   menus stacked in a half-width column with the other half left blank (Matt,
   samyebali.org, 2026-08-21). A 1fr max is indefinite, so the count falls back
   to the 18rem min and two tracks fit.
   auto-FIT rather than auto-fill for the same reason in reverse: on a wide
   footer three tracks fit and only two are filled, and auto-fill would hold
   the third open as exactly the gap this was reported for. */
.samye-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 3.2rem 4rem;
  align-content: start;
}

.samye-footer__title {
  margin: 0 0 1.2rem;
  font-family: var(--samye-t-body, sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--samye-ink, #111);
}

.samye-footer__address {
  /* No margin of its own: the brand-column grid rule above owns spacing, and
     the address renders nowhere else. */
  font-style: normal;
}

.samye-footer p {
  margin: 0 0 0.6rem;
}

.samye-footer__link,
.samye-footer a {
  color: var(--samye-ink-soft, #4a4a4a);
  text-decoration: none;
}

.samye-footer a {
  transition: color 150ms ease;
}

/* The colour is the whole hover state — no underline (Matt, 2026-08-19).
   :focus-visible for the same reason as the header menu: keyboard keeps
   the crimson, a mouse click no longer leaves it stuck. */
.samye-footer__link:hover,
.samye-footer a:hover,
.samye-footer a:focus-visible {
  color: var(--samye-crimson, #B83029);
}

.samye-footer__menu,
.samye-footer__social {
  margin: 0;
  padding: 0;
  list-style: none;
}

.samye-footer__menu li {
  margin-bottom: 0.7rem;
}

.samye-footer__colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--samye-container);
  margin: 4.8rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--samye-silver-soft, #E5E3E0);
  font-size: 1.28rem;
  color: var(--samye-ink-muted, #6E6E6E);
}

.samye-footer__colophon p {
  margin: 0;
}

/* Social links are icon-only: the glyph carries the brand, the label is
   read out by screen readers. They close the brand column, under "Contact
   us" (Matt, 2026-11-16). The negative start margin cancels the first
   link's tap padding so the first glyph lines up with the contact marks. */
.samye-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-inline-start: -1rem;
}

/* The optional line naming whose accounts the icons are (identity
   `social_title`, Matt 2026-11-16). Same voice as the column titles, held
   close to the icons it names. */
.samye-footer__follow {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.samye-footer__follow-title {
  margin: 0;
  font-family: var(--samye-t-body, sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--samye-ink, #111);
}

/* Shared with .samye-contact-page__social-link below: same tap target,
   same hover colour, same glyph size — one row in the footer, one in the
   managed contact page. */
.samye-footer__social-link,
.samye-contact-page__social-link {
  display: inline-flex;
  /* 2rem glyph + 2rem padding = a 40px tap target. */
  padding: 1rem;
  color: var(--samye-ink-muted, #6E6E6E);
}

.samye-footer__social-link:hover,
.samye-footer__social-link:focus-visible,
.samye-contact-page__social-link:hover,
.samye-contact-page__social-link:focus-visible {
  color: var(--samye-crimson, #B83029);
}

/* Social glyphs are the larger mark. Scoped to the link: unscoped, this rule
   won the cascade over the shared 1.6rem mark size above and rendered the
   phone icon 0.4rem wider than the pin, which knocked the phone number out of
   line with the address (Matt, 2026-08-19). */
.samye-footer__social-link .samye-footer__icon,
.samye-contact-page__social-link .samye-footer__icon {
  width: 2rem;
  height: 2rem;
  display: block;
}


@media (max-width: 900px) {
  .samye-footer__inner {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

/* Site-owned legal destinations, shared footer presentation. */
.samye-footer__legal-menu {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.samye-footer__legal { min-width: 0; }
.samye-footer__legal-menu a { color: inherit; text-decoration: none; }
.samye-footer__legal-menu a:hover,
.samye-footer__legal-menu a:focus-visible { text-decoration: underline; }
