/*
 * 2026 redesign - site-wide tokens, shared components, header and footer.
 * Tokens follow the Birmingham Metal design system (docs: "Birmingham Metal Homepage NEW.html"),
 * with the site's Archivo (display) and Inter (body) fonts.
 */

:root {
  /* Sticky header height; js/bm-site.js replaces these fallbacks with the measured value */
  --bm-header-h: 272px;

  --bm-gold: #F8D237;
  --bm-black: #000;
  --bm-white: #fff;

  --bm-gold-50: #FEFAE6;
  --bm-gold-100: #FDF2C2;
  --bm-gold-200: #FBE68A;
  --bm-gold-500: #E8BE1A;
  --bm-gold-600: #C29C0C;
  --bm-gold-700: #8F7206;

  --bm-plat-50: #F4F5F5;
  --bm-plat-100: #E9EBEA;
  --bm-plat-200: #DCDEDD;
  --bm-plat-300: #CBCDCC;
  --bm-plat-400: #A9ACAB;
  --bm-plat-500: #7E8281;
  --bm-plat-600: #5C605F;
  --bm-plat-700: #3F4342;
  --bm-plat-800: #232625;
  --bm-plat-900: #141615;

  --bm-text-strong: var(--bm-black);
  --bm-text-body: var(--bm-plat-800);
  --bm-text-muted: var(--bm-plat-600);
  --bm-border: var(--bm-plat-200);
  --bm-border-subtle: var(--bm-plat-100);
  --bm-border-strong: var(--bm-plat-400);

  --bm-font-display: 'Archivo', system-ui, sans-serif;
  --bm-font-body: 'Inter', system-ui, sans-serif;

  --bm-radius-m: 10px;
  --bm-radius-l: 16px;
  --bm-radius-xl: 20px;
  --bm-shadow-2: 0 4px 12px rgba(10, 11, 11, .07), 0 1px 3px rgba(10, 11, 11, .05);
  --bm-shadow-3: 0 12px 32px rgba(10, 11, 11, .10), 0 2px 6px rgba(10, 11, 11, .06);
  --bm-focus-ring: 0 0 0 3px rgba(248, 210, 55, .55);
  --bm-ease: cubic-bezier(.2, .7, .2, 1);

  --bm-container: 1280px;
  --bm-gutter: 32px;
}

/* The child theme sets a body-wide font-variation-settings weight, which would
   override font-weight on these variable fonts - reset it inside new components. */
.bm-header,
.bm-footer,
.bm-section {
  font-variation-settings: normal;
  font-family: var(--bm-font-body);
  -webkit-font-smoothing: antialiased;
}

.bm-wrap {
  max-width: var(--bm-container);
  margin: 0 auto;
  padding: 0 var(--bm-gutter);
  box-sizing: border-box;
}

.bm-icon {
  width: 1.125em;
  height: 1.125em;
  flex: none;
}

.bm-overline {
  display: block;
  font: 600 12px/1.2 var(--bm-font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bm-gold-700);
}

.bm-overline--gold {
  color: var(--bm-gold);
}

/* ---------- Buttons ---------- */

#top .bm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--bm-font-display);
  font-variation-settings: normal;
  letter-spacing: .01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s var(--bm-ease), border-color .12s, transform .12s;
}

#top .bm-btn:active {
  transform: scale(.98);
}

#top .bm-btn .bm-icon {
  width: 18px;
  height: 18px;
}

#top .bm-btn--s {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

#top .bm-btn--l {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
}

#top .bm-btn--l .bm-icon {
  width: 20px;
  height: 20px;
}

#top .bm-btn--primary { background: var(--bm-gold); color: var(--bm-black); }
#top .bm-btn--primary:hover { background: var(--bm-gold-500); color: var(--bm-black); }
#top .bm-btn--secondary { background: var(--bm-black); color: var(--bm-white); }
#top .bm-btn--secondary:hover { background: var(--bm-plat-800); color: var(--bm-white); }
#top .bm-btn--outline { background: transparent; color: var(--bm-text-strong); border-color: var(--bm-border-strong); }
#top .bm-btn--outline:hover { background: var(--bm-plat-50); color: var(--bm-text-strong); }
#top .bm-btn--ghost { background: transparent; color: var(--bm-text-strong); }
#top .bm-btn--ghost:hover { background: var(--bm-plat-100); color: var(--bm-text-strong); }
#top .bm-btn--inverse { background: transparent; color: var(--bm-white); border-color: var(--bm-plat-600); }
#top .bm-btn--inverse:hover { background: rgba(255, 255, 255, .08); color: var(--bm-white); }

/* Arrow without inline SVG, for buttons typed into builder text blocks */
#top .bm-btn--arrow::after {
  content: '';
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url(../svg/icons/arrow-right.svg) center / contain no-repeat;
  mask: url(../svg/icons/arrow-right.svg) center / contain no-repeat;
}

#top .bm-btn:focus-visible,
#top .bm-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus-ring);
}

#top .bm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--bm-text-strong);
  cursor: pointer;
  transition: background .12s;
}

#top .bm-icon-btn .bm-icon { width: 18px; height: 18px; }
#top .bm-icon-btn--primary { background: var(--bm-gold); color: var(--bm-black); }
#top .bm-icon-btn--primary:hover { background: var(--bm-gold-500); }
#top .bm-icon-btn--inverse { color: var(--bm-white); border-color: var(--bm-plat-700); }
#top .bm-icon-btn--inverse:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Header ---------- */

/* In-page links (e.g. product side navigation) land below the sticky header */
html {
  scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--bm-header-h) + 24px);
}

.bm-header {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 400;
  background: var(--bm-white);
  box-shadow: 0 1px 0 var(--bm-border);
}

.bm-topbar {
  background: var(--bm-black);
}

.bm-topbar__inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 56px;
}

#top .bm-topbar__link,
.bm-topbar__tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 16px/1 var(--bm-font-display);
  color: var(--bm-white);
  text-decoration: none;
}

#top .bm-topbar__link:hover {
  color: var(--bm-gold);
}

.bm-topbar__link .bm-icon {
  color: var(--bm-gold);
}

.bm-topbar__tagline {
  margin-left: auto;
  color: var(--bm-plat-400);
}

/* Region switcher (WPML) */

.bm-lang {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.bm-topbar__tagline + .bm-lang {
  margin-left: 0;
}

.bm-lang .bm-icon {
  color: var(--bm-gold);
}

.bm-lang__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-lang__list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-lang__list li + li {
  border-left: 1px solid var(--bm-plat-700);
}

#top .bm-lang__link {
  display: block;
  padding: 0 10px;
  font: 600 14px/1 var(--bm-font-display);
  color: var(--bm-plat-400);
  text-decoration: none;
}

#top .bm-lang__link:hover,
#top .bm-lang__link.is-current {
  color: var(--bm-white);
}

#top .bm-lang__link.is-current {
  text-decoration: underline;
  text-decoration-color: var(--bm-gold);
  text-underline-offset: 4px;
}

.bm-masthead {
  display: grid;
  grid-template-columns: 1fr minmax(0, 560px) 1fr; /* equal sides keep the search on the page centre line */
  align-items: center;
  gap: 36px;
  height: 112px;
}

.bm-logo {
  flex: none;
  display: block;
  justify-self: start;
}

.bm-logo img {
  display: block;
  height: 84px;
  width: auto;
}

/* Search */

.bm-search {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 6px 0 18px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1.5px solid var(--bm-border);
  background: var(--bm-plat-50);
  transition: border-color .12s, box-shadow .12s, background .12s;
}

/* beats Enfold's #top form { margin-bottom: 20px }, which pushed the bar off centre */
#top .bm-search {
  margin: 0;
}

.bm-search:focus-within {
  border-color: var(--bm-black);
  background: var(--bm-white);
  box-shadow: var(--bm-focus-ring);
}

.bm-search__icon {
  color: var(--bm-plat-500);
}

/* :focus beats Enfold's #top input[type="search"]:focus shadow; the pill shows focus instead */
#top .bm-search .bm-search__input,
#top .bm-search .bm-search__input:focus {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  font: 400 16px/1 var(--bm-font-body);
  font-variation-settings: normal;
  color: var(--bm-text-strong);
}

.bm-search__suggestions {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  padding: 8px;
  background: var(--bm-white);
  border: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-radius-l);
  box-shadow: var(--bm-shadow-3);
  z-index: 10;
}

#top .bm-search__suggestions a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--bm-radius-m);
  font: 500 15px/1.2 var(--bm-font-body);
  color: var(--bm-text-strong);
  text-decoration: none;
}

#top .bm-search__suggestions a:hover,
#top .bm-search__suggestions a.is-active {
  background: var(--bm-plat-50);
}

.bm-search__suggestions .bm-icon {
  color: var(--bm-gold-700);
}

.bm-masthead__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.bm-nav-toggle {
  display: none !important;
}

.bm-nav-toggle__close,
.bm-header.is-nav-open .bm-nav-toggle__open {
  display: none;
}

.bm-header.is-nav-open .bm-nav-toggle__close {
  display: block;
}

/* Main navigation */

.bm-nav {
  border-top: 1px solid var(--bm-border-subtle);
}

#top .bm-nav__menu {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Static so dropdown panels position against the menu, not the item */
#top .bm-nav__menu > li {
  position: static;
  margin: 0;
  padding: 0;
  list-style: none;
}

#top .bm-nav__menu > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding: 0 16px;
  box-sizing: border-box;
  border-bottom: 3px solid transparent;
  font: 600 15px/1 var(--bm-font-display);
  color: var(--bm-plat-700);
  text-decoration: none;
}

#top .bm-nav__menu > li:hover > a,
#top .bm-nav__menu > li:focus-within > a,
#top .bm-nav__menu > li.current-menu-item > a,
#top .bm-nav__menu > li.current-menu-ancestor > a {
  color: var(--bm-text-strong);
  border-bottom-color: var(--bm-gold);
}

.bm-nav__chevron {
  width: 14px;
  height: 14px;
}

/* Dropdown panel: spans the full menu (container) width,
   links on the left, call-to-action card on the right */
.bm-nav__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 24px;
  background: var(--bm-white);
  border: 1px solid var(--bm-border-subtle);
  border-radius: 0 0 var(--bm-radius-l) var(--bm-radius-l);
  box-shadow: var(--bm-shadow-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s var(--bm-ease), transform .2s var(--bm-ease), visibility .2s;
}

#top .bm-nav__menu > li:hover > .bm-nav__panel,
#top .bm-nav__menu > li:focus-within > .bm-nav__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Links fill the space beside the card in three columns */
#top .bm-nav__menu .sub-menu {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-nav__cta {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  padding: 24px;
  box-sizing: border-box;
  border-radius: var(--bm-radius-l);
  background: var(--bm-black);
}

.bm-nav__cta-title {
  font: 600 18px/1.3 var(--bm-font-display);
  color: var(--bm-white);
}

.bm-nav__cta-text {
  font: 400 14px/1.4 var(--bm-font-body);
  color: var(--bm-plat-300);
}

#top #bm-header .bm-nav__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  font: 600 14px/1 var(--bm-font-display);
  color: var(--bm-gold);
  text-decoration: none;
}

#top #bm-header .bm-nav__cta-link:hover {
  color: var(--bm-gold-200);
}

.bm-nav__cta-link .bm-icon {
  width: 16px;
  height: 16px;
  transition: transform .2s var(--bm-ease);
}

.bm-nav__cta-link:hover .bm-icon {
  transform: translateX(3px);
}

#top .bm-nav__menu .sub-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
  break-inside: avoid;
}

/* #bm-header beats the child theme's ".responsive body#top .sub-menu a" (16px, capitalize) */
#top #bm-header .bm-nav__menu .sub-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--bm-radius-m);
  font: 500 15px/1.25 var(--bm-font-body);
  text-transform: none;
  color: var(--bm-text-strong);
  text-decoration: none;
}

#top #bm-header .bm-nav__menu .sub-menu a:hover,
#top #bm-header .bm-nav__menu .sub-menu .current-menu-item > a {
  color: var(--bm-gold-700);
  background: var(--bm-plat-50);
}

/* USP strip */

.bm-usps {
  background: var(--bm-plat-50);
  border-top: 1px solid var(--bm-border-subtle);
}

.bm-usps__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  height: 52px;
}

.bm-usp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 600 14px/1.2 var(--bm-font-display);
  color: var(--bm-text-strong);
}

.bm-usp .bm-icon {
  color: var(--bm-gold-700);
}

/* ---------- Footer ---------- */

.bm-footer {
  background: var(--bm-black);
  border-top: 4px solid var(--bm-gold);
  color: var(--bm-plat-400);
}

.bm-footer__main {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 40px;
}

.bm-footer__brand img {
  display: block;
  width: 210px;
  height: auto;
  margin-bottom: 16px;
}

.bm-footer__brand p {
  margin: 0;
  font: 400 14px/1.6 var(--bm-font-body);
  color: var(--bm-plat-400);
}

#top .bm-footer a {
  color: var(--bm-plat-300);
  text-decoration: none;
}

#top .bm-footer a:hover {
  color: var(--bm-gold);
}

.bm-footer__col .bm-overline {
  margin-bottom: 16px;
}

#top .bm-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#top .bm-footer__col li {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font: 400 14px/1.4 var(--bm-font-body);
}

.bm-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--bm-plat-800);
  font: 400 14px/1.4 var(--bm-font-body);
  color: var(--bm-plat-500);
}

.bm-footer__social {
  display: flex;
  gap: 20px;
}

#top .bm-footer__social a {
  text-decoration: underline;
  text-decoration-color: var(--bm-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .bm-topbar__tagline { display: none; }
  .bm-topbar__tagline + .bm-lang { margin-left: auto; }
  .bm-masthead { gap: 24px; }
  #top .bm-masthead__actions .bm-btn--ghost { display: none; }
  #top .bm-nav__menu > li > a { padding: 0 10px; font-size: 14px; }
}

@media (max-width: 989px) {
  :root { --bm-gutter: 20px; }

  .bm-topbar__inner { height: 44px; gap: 20px; }
  #top .bm-topbar__link { font-size: 14px; }

  .bm-masthead { display: flex; height: 80px; gap: 16px; }
  .bm-logo img { height: 60px; }
  .bm-search { display: none; }
  .bm-nav-toggle { display: inline-flex !important; }

  .bm-nav {
    display: none;
    max-height: calc(100vh - 124px);
    overflow-y: auto;
  }

  :root { --bm-header-h: 169px; }

  .bm-header.is-nav-open .bm-nav { display: block; }

  #top .bm-nav__menu { flex-direction: column; gap: 0; padding: 8px 0 16px; }
  #top .bm-nav__menu > li > a { height: 48px; padding: 0; border-bottom: 1px solid var(--bm-border-subtle); }
  #top .bm-nav__menu > li:hover > a { border-bottom-color: var(--bm-border-subtle); }
  .bm-nav__chevron { margin-left: auto; transition: transform .2s; }
  #top .bm-nav__menu > li.is-open .bm-nav__chevron { transform: rotate(180deg); }

  .bm-nav__panel {
    position: static;
    display: none;
    padding: 4px 0 8px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  #top .bm-nav__menu > li.is-open > .bm-nav__panel { display: block; }

  #top .bm-nav__menu .sub-menu { display: block; }

  .bm-nav__cta { display: none; }
  #top #bm-header .bm-nav__menu .sub-menu a { padding: 8px 16px; }

  .bm-usps__inner {
    display: flex;
    height: 44px;
    overflow-x: auto;
    gap: 28px;
    scrollbar-width: none;
  }
  .bm-usp { flex: none; font-size: 13px; }

  .bm-footer__main { grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 48px; }
  .bm-footer__brand { grid-column: 1 / -1; }
  .bm-footer__bottom { flex-direction: column; }
}

@media (max-width: 600px) {
  .bm-topbar__link:nth-child(2) span { display: none; }
  #top .bm-masthead__actions .bm-btn { height: 40px; padding: 0 14px; }
  #top .bm-masthead__actions .bm-btn .bm-icon { display: none; }
  .bm-logo img { height: 52px; }
}
