/* ==========================================================================
   Site footer
   --------------------------------------------------------------------------
   Loaded on every page, straight after header.css, so the two ends of the
   document share one visual language: the same glass surfaces, the same
   gradient hairlines, and the same amber line marker the nav uses.

   The theme's own footer rules live in main.css around .xb-footer-*. These
   override the parts that sat off-palette — flat #21232f social chips, plain
   text links with no hover affordance — without touching the layout.
   ========================================================================== */

/* --- Panel ---------------------------------------------------------------
   The panel is pulled 75px up over the footer artwork by main.css. Adding a
   hairline and a lit top edge stops it reading as a flat hole punched in the
   background image.
   ------------------------------------------------------------------------ */

.footer .xb-footer-bottom {
  border: 1px solid var(--color-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

/* --- Column headings -----------------------------------------------------
   A short amber rule under each heading, matching the marker in the nav.
   ------------------------------------------------------------------------ */

.footer .xb-item--widget-title {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.footer .xb-item--widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    rgba(255, 166, 8, 0)
  );
}

/* --- Link columns --------------------------------------------------------
   The links were plain text that turned white on hover, with nothing to aim
   at. A line now grows in from the left as the label steps aside — the same
   gesture as the drawer's sub-items, so the two read as one system.
   ------------------------------------------------------------------------ */

.footer .xb-item--footer_widget-list li a {
  position: relative;
  display: inline-block;
  padding-left: 0;
  line-height: 32px;
  transition:
    color var(--transition-fast),
    padding-left var(--transition-fast);
}

.footer .xb-item--footer_widget-list li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
  box-shadow: 0 0 8px rgba(255, 166, 8, 0.5);
  transform: translateY(-50%);
  transition: width var(--transition-fast);
}

.footer .xb-item--footer_widget-list li a:hover,
.footer .xb-item--footer_widget-list li a:focus-visible {
  color: var(--color-heading);
  padding-left: 20px;
}

.footer .xb-item--footer_widget-list li a:hover::before,
.footer .xb-item--footer_widget-list li a:focus-visible::before {
  width: 13px;
}

/* --- Contact lines -------------------------------------------------------
   These were underlined text. An envelope glyph in front of each identifies
   them as addresses without needing the underline, which on a dark ground
   read as damage rather than emphasis.
   ------------------------------------------------------------------------ */

.footer .xb-item--footer_widget-list .underline {
  text-decoration: none;
}

.footer .xb-item--footer_widget-list .underline a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 0;
  word-break: break-word;
}

.footer .xb-item--footer_widget-list .underline a::before {
  content: "\f0e0";
  position: static;
  width: auto;
  height: auto;
  box-shadow: none;
  transform: none;
  background: none;
  border-radius: 0;
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 12px;
  color: var(--color-primary);
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

/* The left-growing line belongs to the page links, not to these. */
.footer .xb-item--footer_widget-list .underline a:hover {
  padding-left: 0;
  color: var(--color-primary);
}

.footer .xb-item--footer_widget-list .underline a:hover::before {
  width: auto;
  opacity: 1;
}

/* --- Social ---------------------------------------------------------------
   Flat #21232f squares became glass tiles carrying the same gradient hairline
   as the header buttons and the burger.
   ------------------------------------------------------------------------ */

.footer .xb-item--social-link a {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--color-default);
  font-size: 15px;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.footer .xb-item--social-link a::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 166, 8, 0.36)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  transition: background var(--transition-fast);
}

.footer .xb-item--social-link a:hover,
.footer .xb-item--social-link a:focus-visible {
  background: var(--gradient-primary);
  color: var(--color-on-primary);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 20px rgba(255, 166, 8, 0.35);
}

.footer .xb-item--social-link a:hover::before,
.footer .xb-item--social-link a:focus-visible::before {
  background: linear-gradient(
    140deg,
    rgba(255, 214, 140, 0.9),
    rgba(255, 166, 8, 0.6)
  );
}

.footer .xb-item--social-link li:not(:last-child) {
  margin-right: 8px;
}

/* --- Copyright ------------------------------------------------------------ */

.footer .xb-footer-bottom .footer-copyright {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-faint);
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
}

/* --- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .footer .xb-item--footer_widget-list li a,
  .footer .xb-item--footer_widget-list li a::before,
  .footer .xb-item--social-link a {
    transition: color var(--transition-fast), background var(--transition-fast);
  }

  .footer .xb-item--social-link a:hover,
  .footer .xb-item--social-link a:focus-visible {
    transform: none;
  }

  .footer .xb-item--footer_widget-list li a:hover,
  .footer .xb-item--footer_widget-list li a:focus-visible {
    padding-left: 20px;
  }
}

/* --- Narrow screens ------------------------------------------------------- */

@media (max-width: 767px) {
  .footer .xb-footer-bottom {
    padding: 40px 26px 26px;
    border-radius: var(--radius-md);
  }

  .footer .xb-item--social-link a {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}
