/**
 * Peak footer — front-end styling for the builder-rendered footer.
 *
 * The Peak Starter footer, one to one: a brand column beside the footer menu
 * over a hairline, then the slim bottom bar with the copyright on the left and
 * the credit on the right. Like the header sheet, every value reads a Peak
 * design token first and falls back to a literal only when the active theme
 * doesn't ship it — so this inherits the theme's palette on Peak Starter and
 * still looks right elsewhere.
 *
 * The panel's colours + spacing arrive as custom properties on the wrapper
 * (--peak-f-bg, --peak-f-color, --peak-f-accent, --peak-f-pad); each is
 * optional, and an unset one keeps the theme's own value. The shared .peak-cta
 * lives in header-front.css and reads --_accent, redeclared here.
 */
.peak-footer {
  --_bg: var(--peak-f-bg, transparent);
  --_color: var(--peak-f-color, var(--peak-muted, #5f5d5a));
  /* The strong colour (logo, hover, current item): a footer given colours of
     its own (a dark one) follows its accent, else its text — never the
     page's ink, which a dark footer would swallow. */
  --_ink: var(--peak-f-accent, var(--peak-f-color, var(--peak-ink, #191919)));
  --_accent: var(--peak-f-accent, var(--peak-ink, #191919));
  --_faint: var(--peak-faint, #868583);
  --_line: var(--peak-line, rgba(25, 25, 25, 0.07));
  --_pad: var(--peak-f-pad, clamp(2rem, 4vw, 3rem));
  --_ease: var(--peak-ease, cubic-bezier(0.2, 0.7, 0.2, 1));
  --_fs: var(--peak-fs-small, 0.875rem);
  width: 100%;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: 2rem;
  background: var(--_bg);
  color: var(--_color);
  font-size: var(--_fs);
}

/* Frame ------------------------------------------------------------- */
.peak-footer__inner {
  max-width: var(--peak-container, 1300px);
  margin-inline: auto;
  padding-inline: var(--peak-gutter, clamp(1.25rem, 4vw, 2.5rem));
}
.peak-footer__inner.is-full {
  max-width: none;
}

/* Rows + zones ------------------------------------------------------ */
.peak-footer__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  padding-block: var(--_pad);
}
.peak-footer__row + .peak-footer__row {
  padding-top: 0;
}
/* The theme draws its hairline inside the container, above the first row. */
/* A template supplies its own design — the wrapper is a landmark element and
   nothing more. See the same rule in header-front.css. */
.peak-footer--template {
  margin-top: 0;
  padding: 0;
  background: none;
  color: inherit;
  border: 0;
}

.peak-footer.has-border .peak-footer__row:first-child {
  border-top: 1px solid var(--_line);
}
.peak-footer__zone {
  display: flex;
  gap: 0.75rem;
  min-width: 0;
}
.peak-footer__zone.is-col {
  flex-direction: column;
}
.peak-footer__zone.is-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
/* The brand column reads as a paragraph, not a full-width band. */
.peak-footer__zone:first-child.is-col {
  max-width: 22rem;
}
.peak-footer__el {
  display: inline-flex;
  min-width: 0;
}
.peak-footer__el--menu {
  flex: 1 1 auto;
  width: 100%;
}

/* Logo -------------------------------------------------------------- */
.peak-footer__el--logo img,
.peak-footer .custom-logo {
  display: block;
  max-height: 36px;
  width: auto;
  height: auto;
}
.peak-footer__logo-text,
.peak-footer .site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
  color: var(--_ink);
}
.peak-footer .site-mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
}
/* The theme paints the mark in the page's ink (.site-title .site-mark, loaded
   after this sheet): in a footer it is the footer's strong colour. */
.peak-footer .site-title .site-mark {
  color: var(--_ink);
}
.peak-footer .site-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Text -------------------------------------------------------------- */
.peak-footer__text {
  margin: 0;
  line-height: var(--peak-lh-body, 1.65);
  color: var(--_color);
}

/* Menu — flat pill row, or titled link columns when it has children -- */
.peak-footer__menu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.peak-footer__menu a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35em 0.8em;
  border-radius: var(--peak-radius-pill, 9999px);
  font-weight: 500;
  color: var(--_color);
  text-decoration: none;
  transition: background-color 0.15s var(--_ease), color 0.15s var(--_ease);
}
.peak-footer__menu a:hover {
  background: var(--peak-inset, rgba(25, 25, 25, 0.045));
  color: var(--_accent);
}
.peak-footer__menu .current-menu-item > a {
  color: var(--_ink);
}

.peak-footer__menu.is-grouped > ul {
  display: flex;
  gap: 2rem 2.5rem;
  justify-items: start;
}
.peak-footer__menu.is-grouped > ul > li {
  display: block;
  min-width: 0;
}
.peak-footer__menu.is-grouped > ul > li > a {
  min-height: 0;
  padding: 0 0 0.6rem;
  border-radius: 0;
  font-size: var(--peak-fs-caption, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--_faint);
}
.peak-footer__menu.is-grouped > ul > li > a:hover {
  background: transparent;
  color: var(--_ink);
}
.peak-footer__menu.is-grouped .sub-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.peak-footer__menu.is-grouped .sub-menu a {
  min-height: 30px;
  padding: 0.2em 0;
  border-radius: 0;
  font-weight: 400;
}
.peak-footer__menu.is-grouped .sub-menu a:hover {
  background: transparent;
  color: var(--_ink);
}
@media (max-width: 560px) {
  .peak-footer__menu.is-grouped > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Search ------------------------------------------------------------ */
.peak-footer__el--search {
  width: min(320px, 100%);
}
.peak-footer__el--search .search-form {
  width: 100%;
}

/* Bottom bar -------------------------------------------------------- */
.peak-footer__bottom .peak-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--_line);
  font-size: var(--peak-fs-caption, 0.75rem);
  color: var(--_faint);
}
.peak-footer__copy,
.peak-footer__credit {
  margin: 0;
}
.peak-footer__copy a,
.peak-footer__credit a {
  color: var(--_color);
  text-decoration: none;
}
.peak-footer__copy a:hover,
.peak-footer__credit a:hover {
  color: var(--_ink);
}

/* Small screens: stack zones ---------------------------------------- */
@media (max-width: 700px) {
  .peak-footer__row {
    flex-direction: column;
    gap: 2rem;
  }
  .peak-footer__zone {
    flex-basis: auto !important;
    width: 100%;
  }
}
