/* ============================================================
   QMT SHARED — Custom Properties, Base Styles, Shared Components
   ============================================================ */

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
  --qmt-gold:         #B8962E;
  --qmt-gold-light:   #D4B060;
  --qmt-gold-pale:    rgba(184, 150, 46, 0.12);
  --qmt-gold-rule:    rgba(184, 150, 46, 0.45);
  --qmt-bg:           #080809;
  --qmt-bg-alt:       #0A0A0C;
  --qmt-bg-glass:     rgba(8, 8, 9, 0.88);
  --qmt-surface:      #0F0F11;
  --qmt-border:       rgba(255, 255, 255, 0.06);
  --qmt-border-gold:  rgba(184, 150, 46, 0.22);
  --qmt-text:         #E2DED7;
  --qmt-text-dim:     #9C9890;
  --qmt-text-muted:   #A8ABB0;
  --qmt-text-faint:   #A8ABB0;
  --qmt-gold-accent:  #C9A84C;
  --qmt-off-white:    #F5F2ED;
  --qmt-font-display: 'Rajdhani', sans-serif;
  --qmt-font-body:    'DM Sans', sans-serif;
  --qmt-h:            76px;
  --qmt-ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --qmt-ease-in:      cubic-bezier(0.55, 0, 1, 0.45);
}

/* ---------- SHARED PAGE HERO ---------- */
.qmt-page-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: clamp(60px, 8vw, 100px) clamp(24px, 5vw, 80px) clamp(40px, 5vw, 60px);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Dark gradient overlay */
.qmt-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, var(--qmt-hero-overlay, 0.86)), var(--qmt-bg));
  pointer-events: none;
}

/* Bottom fade */
.qmt-page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent 0%, var(--qmt-bg) 100%);
  pointer-events: none;
  z-index: 1;
}

.qmt-page-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.qmt-page-hero__eyebrow {
  font-family: var(--qmt-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--qmt-gold);
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 12px;
}

.qmt-page-hero__eyebrow::before,
.qmt-page-hero__eyebrow::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: rgba(184, 150, 46, 0.35);
}

.qmt-page-hero__heading {
  font-family: var(--qmt-font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--qmt-off-white);
  line-height: 1.1;
  margin: 0;
}

.qmt-page-hero__subtext {
  font-family: var(--qmt-font-body);
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--qmt-text-dim);
  line-height: 1.8;
  max-width: 560px;
  margin: 4px 0 0;
}

@media (max-width: 767px) {
  .qmt-page-hero {
    padding: 48px 24px 32px;
  }
}

/* ---------- PAGE BASE ---------- */
body {
  background-color: #080809 !important;
  margin: 0;
  padding: 0;
}

/* Site-wide dark default: any page (including future/plain Bricks or WP pages
   with no section backgrounds) is black with readable light text. Low
   specificity, no !important, so sections that set their own colours win. */
html {
  background-color: #0A0A0B;
}

html body {
  background-color: #0A0A0B;
  color: #E2DED7;
}

/* Break out of any theme content wrapper — scope to QMT pages only */
.qmt-page-hero,
.qmt-hero,
.qmt-features-section,
.qmt-fg,
.qmt-bd,
.qmt-pricing,
.qmt-cta,
.qmt-problem,
.qmt-hiw,
.qmt-explainer,
.qmt-guide,
.qmt-faq,
.qmt-support {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  margin-top: 0;
  margin-bottom: 0;
  box-sizing: border-box;
}

/* Kill theme content container constraints */
.entry-content,
.post-content,
.page-content,
.site-content,
.content-area,
.brxe-post-content,
[class*="bricks-layout"] {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

/* Remove any Bricks content wrapper padding — but only on QMT pages, not archive/search */
.qmt-page-hero ~ .bricks-layout-wrapper,
.qmt-page-hero ~ .brxe-container,
.qmt-page-hero ~ .brxe-section,
.qmt-hero ~ .bricks-layout-wrapper,
.qmt-hero ~ .brxe-container,
.qmt-hero ~ .brxe-section,
.qmt-support ~ .bricks-layout-wrapper,
.qmt-support ~ .brxe-container,
.qmt-support ~ .brxe-section {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ---------- SCOPED RESET ---------- */
.qmt-header,
.qmt-mobile-overlay {
  box-sizing: border-box;
}
.qmt-header > *,
.qmt-mobile-overlay > * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- BODY STATE ---------- */
body.qmt-menu-open {
  overflow: hidden;
}

/* ============================================================
   HEADER SHELL
   ============================================================ */
.qmt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9000;
  background: var(--qmt-bg);
  transition-property: background;
  transition-duration: 0.5s;
  transition-timing-function: var(--qmt-ease);
}

.qmt-header.is-scrolled {
  background: var(--qmt-bg-glass);
  backdrop-filter: blur(24px) saturate(0.75);
  -webkit-backdrop-filter: blur(24px) saturate(0.75);
  box-shadow: 0 1px 0 var(--qmt-border-gold);
}

/* Inner layout */
.qmt-header__inner {
  display: flex !important;
  align-items: center;
  height: var(--qmt-h);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  gap: 0;
}

/* ============================================================
   LOGO
   ============================================================ */
.qmt-header__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.qmt-logo--full {
  height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity 0.3s;
}

.qmt-logo--icon {
  height: 34px;
  width: auto;
  display: none;
  object-fit: contain;
}

/* ============================================================
   DESKTOP NAV
   ============================================================ */
.qmt-header__nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qmt-nav__list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
}

.qmt-nav__link {
  font-family: var(--qmt-font-body);
  font-size: clamp(10px, 0.85vw, 12px);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qmt-text);
  text-decoration: none;
  padding: 10px clamp(8px, 1.1vw, 18px);
  display: block;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s var(--qmt-ease);
}

/* Vertical separator between items */
.qmt-nav__list li + li .qmt-nav__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 10px;
  background: var(--qmt-border);
}

/* Underline reveal on hover */
.qmt-nav__link span {
  position: relative;
  display: inline-block;
}

.qmt-nav__link span::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--qmt-gold);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.4s var(--qmt-ease);
}

.qmt-nav__link:hover {
  color: var(--qmt-off-white);
}

.qmt-nav__link:hover span::after {
  transform: scaleX(1);
}

/* ============================================================
   ACTIONS
   ============================================================ */
.qmt-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.5vw, 6px);
}

/* Customer Login */
.qmt-header__login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--qmt-font-body);
  font-size: clamp(10px, 0.8vw, 11px);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qmt-text);
  text-decoration: none;
  padding: 8px clamp(8px, 1vw, 14px);
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s;
}

.qmt-login__icon {
  opacity: 0.5;
  transition: opacity 0.3s;
  flex-shrink: 0;
}

.qmt-header__login:hover {
  color: var(--qmt-gold-light);
  border-color: var(--qmt-border-gold);
}

.qmt-header__login:hover .qmt-login__icon {
  opacity: 1;
}

/* Get Started CTA */
.qmt-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--qmt-font-display);
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qmt-bg);
  text-decoration: none;
  padding: 11px clamp(14px, 1.5vw, 24px);
  background: var(--qmt-gold);
  border: 1px solid var(--qmt-gold);
  border-radius: 2px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: color 0.35s var(--qmt-ease);
}

.qmt-header__cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--qmt-off-white);
  transform: translateX(-101%);
  transition: transform 0.4s var(--qmt-ease);
}

.qmt-header__cta:hover::after {
  transform: translateX(0);
}

.qmt-cta__label,
.qmt-cta__icon {
  position: relative;
  z-index: 1;
}

.qmt-cta__icon {
  display: flex;
  align-items: center;
  transition: transform 0.3s var(--qmt-ease);
}

.qmt-header__cta:hover .qmt-cta__icon {
  transform: translate(3px, -3px);
}

/* ============================================================
   HAMBURGER
   ============================================================ */
.qmt-hamburger {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--qmt-border);
  border-radius: 2px;
  cursor: pointer;
  padding: 9px 14px;
  flex-shrink: 0;
  transition: border-color 0.3s;
}

.qmt-hamburger:hover {
  border-color: var(--qmt-border-gold);
}

.qmt-hamburger__inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.qmt-hamburger__bar {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--qmt-text);
  transition: transform 0.35s var(--qmt-ease), opacity 0.3s, width 0.35s var(--qmt-ease);
}

.qmt-hamburger__bar--short {
  width: 60%;
}

.qmt-hamburger__label {
  font-family: var(--qmt-font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qmt-text-dim);
  transition: color 0.3s;
}

.qmt-hamburger:hover .qmt-hamburger__label {
  color: var(--qmt-gold-light);
}

/* Open state */
.qmt-hamburger.is-open .qmt-hamburger__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
  width: 100%;
}

.qmt-hamburger.is-open .qmt-hamburger__bar--short {
  opacity: 0;
}

.qmt-hamburger.is-open + .qmt-hamburger__label {
  opacity: 0;
}

/* ============================================================
   MOBILE OVERLAY
   ============================================================ */
.qmt-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 8999;
  background: var(--qmt-bg);
  visibility: hidden;
  opacity: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition:
    opacity 0.45s var(--qmt-ease),
    visibility 0s 0.45s;
  overflow: hidden;
}

.qmt-mobile-overlay.is-open {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 0.45s var(--qmt-ease),
    visibility 0s 0s;
}

/* Large watermark text in background */
.qmt-overlay__watermark {
  position: absolute;
  bottom: -0.15em;
  right: -0.05em;
  font-family: var(--qmt-font-display);
  font-size: clamp(120px, 30vw, 240px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(184, 150, 46, 0.07);
  text-stroke: 1px rgba(184, 150, 46, 0.07);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.qmt-mobile-overlay__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 36px 40px;
}

.qmt-mobile-overlay__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--qmt-h);
  border-bottom: 1px solid var(--qmt-border);
  flex-shrink: 0;
}

.qmt-mobile-overlay__logo {
  height: 30px;
  width: auto;
}

.qmt-mobile-overlay__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--qmt-font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qmt-text-dim);
  background: none;
  border: 1px solid var(--qmt-border);
  border-radius: 2px;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.3s, border-color 0.3s;
}

.qmt-mobile-overlay__close:hover {
  color: var(--qmt-off-white);
  border-color: var(--qmt-border-gold);
}

/* Mobile nav */
.qmt-mobile-nav {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 20px 0;
}

.qmt-mobile-nav__list {
  list-style: none;
  width: 100%;
}

.qmt-mobile-nav__item {
  border-bottom: 1px solid var(--qmt-border);
  transform: translateY(16px);
  opacity: 0;
  transition:
    transform 0.5s var(--qmt-ease),
    opacity 0.5s var(--qmt-ease);
}

.qmt-mobile-overlay.is-open .qmt-mobile-nav__item:nth-child(1) { transition-delay: 0.08s; }
.qmt-mobile-overlay.is-open .qmt-mobile-nav__item:nth-child(2) { transition-delay: 0.13s; }
.qmt-mobile-overlay.is-open .qmt-mobile-nav__item:nth-child(3) { transition-delay: 0.18s; }
.qmt-mobile-overlay.is-open .qmt-mobile-nav__item:nth-child(4) { transition-delay: 0.23s; }
.qmt-mobile-overlay.is-open .qmt-mobile-nav__item:nth-child(5) { transition-delay: 0.28s; }
.qmt-mobile-overlay.is-open .qmt-mobile-nav__item:nth-child(6) { transition-delay: 0.33s; }

.qmt-mobile-overlay.is-open .qmt-mobile-nav__item {
  transform: translateY(0);
  opacity: 1;
}

.qmt-mobile-nav__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
  padding: 16px 0;
  transition: transform 0.35s var(--qmt-ease);
}

.qmt-mobile-nav__link:hover {
  transform: translateX(6px);
}

.qmt-mobile-nav__num {
  font-family: var(--qmt-font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--qmt-gold);
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.3s;
}

.qmt-mobile-nav__link:hover .qmt-mobile-nav__num {
  opacity: 1;
}

.qmt-mobile-nav__text {
  font-family: var(--qmt-font-display);
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--qmt-text);
  line-height: 1;
  transition: color 0.3s;
}

.qmt-mobile-nav__link:hover .qmt-mobile-nav__text {
  color: var(--qmt-off-white);
}

/* Mobile bottom actions */
.qmt-mobile-overlay__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--qmt-border);
  transform: translateY(10px);
  opacity: 0;
  transition:
    transform 0.5s var(--qmt-ease) 0.42s,
    opacity 0.5s var(--qmt-ease) 0.42s;
}

.qmt-mobile-overlay.is-open .qmt-mobile-overlay__actions {
  transform: translateY(0);
  opacity: 1;
}

.qmt-mobile-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--qmt-font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qmt-bg);
  background: var(--qmt-gold);
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 2px;
  transition: background 0.3s;
}

.qmt-mobile-cta:hover {
  background: var(--qmt-gold-light);
}

.qmt-mobile-login {
  font-family: var(--qmt-font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qmt-text-dim);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.3s;
}

.qmt-mobile-login:hover {
  color: var(--qmt-gold-light);
}

/* ============================================================
   HEADER / NAV RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .qmt-header__inner {
    padding: 0 28px;
  }

  .qmt-header__login .qmt-login__text {
    display: none;
  }

  .qmt-header__login {
    padding: 8px 10px;
    border-color: var(--qmt-border);
    gap: 0;
  }

  .qmt-login__icon {
    opacity: 0.7;
    width: 14px;
    height: 14px;
  }

  .qmt-header__login:hover .qmt-login__icon {
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .qmt-header__nav,
  .qmt-header__actions {
    display: none;
  }

  .qmt-hamburger {
    display: inline-flex;
    justify-self: end;
    grid-column: 3;
  }

  .qmt-mobile-nav__text {
    font-size: clamp(22px, 5.5vw, 42px);
  }

  .qmt-mobile-nav__num {
    font-size: clamp(9px, 1.8vw, 11px);
  }

  .qmt-mobile-cta {
    font-size: clamp(12px, 3vw, 15px);
    padding: clamp(10px, 2.5vw, 14px) clamp(20px, 4vw, 28px);
  }

  .qmt-mobile-login {
    font-size: clamp(10px, 2.2vw, 12px);
  }

  .qmt-mobile-overlay__close span {
    font-size: clamp(9px, 1.8vw, 11px);
  }
}

@media (max-width: 480px) {
  .qmt-logo--full {
    display: none;
  }

  .qmt-logo--icon {
    display: block;
  }

  .qmt-header__inner {
    padding: 0 20px;
  }

  .qmt-mobile-overlay__inner {
    padding: 0 24px 36px;
  }

  .qmt-mobile-nav__text {
    font-size: clamp(20px, 7vw, 32px);
  }

  .qmt-mobile-nav__link {
    padding: 13px 0;
  }

  .qmt-mobile-overlay__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .qmt-mobile-cta {
    justify-content: center;
    font-size: 13px;
  }
}

/* Safe area inset for iPhone notch / Dynamic Island */
@supports (padding-top: env(safe-area-inset-top)) {
  .qmt-header__inner {
    padding-left: max(40px, env(safe-area-inset-left));
    padding-right: max(40px, env(safe-area-inset-right));
  }

  @media (max-width: 960px) {
    .qmt-header__inner {
      padding-left: max(28px, env(safe-area-inset-left));
      padding-right: max(28px, env(safe-area-inset-right));
    }
  }

  @media (max-width: 480px) {
    .qmt-header__inner {
      padding-left: max(20px, env(safe-area-inset-left));
      padding-right: max(20px, env(safe-area-inset-right));
    }
  }
}

/* FOOTER STYLES MOVED TO qmt-footer.css */

/* ============================================================
   GLOBAL ACCESSIBILITY
   ============================================================ */

/* Button label protection: wipe overlay sits behind content */
.qmt-pricing__cta,
.qmt-hero-btn,
.qmt-hero-btn--primary,
.qmt-hero-btn--secondary,
.qmt-cta__btn,
.qmt-cta__btn--primary,
.qmt-cta__btn--secondary,
.qmt-aff-cta__btn,
.qmt-footer__cta {
  isolation: isolate;
}

.qmt-pricing__cta::after,
.qmt-hero-btn::after,
.qmt-hero-btn--primary::after,
.qmt-hero-btn--secondary::after,
.qmt-cta__btn::after,
.qmt-cta__btn--primary::after,
.qmt-cta__btn--secondary::after,
.qmt-aff-cta__btn::after,
.qmt-footer__cta::after {
  z-index: -1;
}

/* Ghost button border transition */
.qmt-pricing__cta--ghost {
  transition: color 0.3s, border-color 0.3s;
}

/* Default focus ring for all interactive elements */
:where(.qmt-page-hero,.qmt-header,.qmt-footer,.qmt-mobile-overlay,.qmt-faq,.qmt-support,.qmt-pricing,.qmt-cta,.qmt-hero,.qmt-rmt,.qmt-partners,.qmt-aff-cta,.qmt-news,.qmt-guide,.qmt-post,.qmt-home,.qmt-download,.qmt-legal,body.error404) :is(a,button,input,select,textarea,[tabindex]):focus-visible {
  outline: 2px solid var(--qmt-gold-light);
  outline-offset: 3px;
}

/* Form inputs need tighter offset */
.qmt-support__input:focus-visible,
.qmt-support__select:focus-visible,
.qmt-support__textarea:focus-visible {
  outline: 2px solid var(--qmt-gold-light);
  outline-offset: 2px;
}

/* News cards focus ring */
.qmt-news__card:focus-visible {
  outline: 2px solid var(--qmt-gold-light);
  outline-offset: 3px;
}

/* HIW download button focus ring */
.qmt-guide__download:focus-visible {
  outline: 2px solid var(--qmt-gold-light);
  outline-offset: 3px;
}

/* Post content links focus ring */
.qmt-post__content a:focus-visible {
  outline: 2px solid var(--qmt-gold-light);
  outline-offset: 3px;
}

.qmt-post__back:focus-visible {
  outline: 2px solid var(--qmt-gold-light);
  outline-offset: 3px;
}

/* Disabled button styling for aria-disabled and .is-disabled */
:where(.qmt-pricing__cta, .qmt-hero-btn, .qmt-hero-btn--primary, .qmt-hero-btn--secondary, .qmt-cta__btn, .qmt-cta__btn--primary, .qmt-cta__btn--secondary, .qmt-aff-cta__btn, .qmt-footer__cta)[aria-disabled="true"],
:where(.qmt-pricing__cta, .qmt-hero-btn, .qmt-hero-btn--primary, .qmt-hero-btn--secondary, .qmt-cta__btn, .qmt-cta__btn--primary, .qmt-cta__btn--secondary, .qmt-aff-cta__btn, .qmt-footer__cta).is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(184, 150, 46, 0.3) !important;
  border-style: dashed !important;
}

:where(.qmt-pricing__cta, .qmt-hero-btn, .qmt-hero-btn--primary, .qmt-hero-btn--secondary, .qmt-cta__btn, .qmt-cta__btn--primary, .qmt-cta__btn--secondary, .qmt-aff-cta__btn, .qmt-footer__cta)[aria-disabled="true"]::after,
:where(.qmt-pricing__cta, .qmt-hero-btn, .qmt-hero-btn--primary, .qmt-hero-btn--secondary, .qmt-cta__btn, .qmt-cta__btn--primary, .qmt-cta__btn--secondary, .qmt-aff-cta__btn, .qmt-footer__cta).is-disabled::after {
  transform: translateX(-101%) !important;
}

:where(.qmt-pricing__cta, .qmt-hero-btn, .qmt-hero-btn--primary, .qmt-hero-btn--secondary, .qmt-cta__btn, .qmt-cta__btn--primary, .qmt-cta__btn--secondary, .qmt-aff-cta__btn, .qmt-footer__cta)[aria-disabled="true"]:hover,
:where(.qmt-pricing__cta, .qmt-hero-btn, .qmt-hero-btn--primary, .qmt-hero-btn--secondary, .qmt-cta__btn, .qmt-cta__btn--primary, .qmt-cta__btn--secondary, .qmt-aff-cta__btn, .qmt-footer__cta).is-disabled:hover {
  cursor: not-allowed;
}

/* ============================================================
   PREFERS REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  /* Explicitly stop infinite decorative animations */
  .qmt-rotation-ui__ring--main,
  .qmt-rotation-ui__logo,
  .qmt-chart-dot {
    animation: none !important;
  }
}

/* ============================================================
   BRICKS-RENDERED PAGES (News, Legal, Search, 404)
   Offset content under fixed 76px header + breathing room
   ============================================================ */

/* Archive/search title (outside main) */
body.archive .bricks-archive-title-wrapper,
body.search .bricks-archive-title-wrapper,
body.author .bricks-archive-title-wrapper,
body.category .bricks-archive-title-wrapper {
  padding-top: 120px;
}

/* Loader pages: Legal (Privacy/Terms) and News */
#brx-content:has(> .qmt-legal),
#brx-content:has(> .qmt-news) {
  padding-top: 40px;
}

/* Loader pages: Single post articles */
#brx-content:has(> .qmt-post) {
  padding-top: 0;
}

/* The hero has its own background: start it under the header and keep the
   text clear of the fixed header via the hero's inner padding instead. */
#brx-content .qmt-post__hero--no-image .qmt-post__hero-content {
  padding-top: 112px;
}

/* 404 page */
body.error404 main {
  padding-top: 140px !important;
}

/* Archive/search heading and text styling (scoped to title wrapper outside main) */
body.archive .bricks-archive-title-wrapper h1,
body.search .bricks-archive-title-wrapper h1,
body.author .bricks-archive-title-wrapper h1,
body.category .bricks-archive-title-wrapper h1 {
  color: #F5F2ED;
  font-size: clamp(32px, 5vw, 56px);
  font-family: var(--qmt-font-display);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

body.archive main h1,
body.search main h1,
body.author main h1,
body.category main h1 {
  color: #F5F2ED;
  font-size: clamp(32px, 5vw, 56px);
  font-family: var(--qmt-font-display);
  font-weight: 700;
  text-transform: uppercase;
}

body.archive main h3,
body.search main h3,
body.category main h3 {
  color: #F5F2ED;
  text-decoration: none;
}

body.archive main a,
body.search main a,
body.author main a,
body.category main a {
  color: var(--qmt-gold-light);
}

body.archive main a:hover,
body.search main a:hover,
body.author main a:hover,
body.category main a:hover {
  color: var(--qmt-gold);
}

/* 404 specific styling */
body.error404 h1 {
  color: #F5F2ED;
  font-size: clamp(32px, 5vw, 56px);
  font-family: var(--qmt-font-display);
  font-weight: 700;
  text-transform: uppercase;
}

body.error404 main {
  padding-inline: 16px;
  box-sizing: border-box;
}

body.error404 main form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.error404 input[name=s] {
  color: #F5F2ED;
  background: #0F0F11;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
  padding: 12px 16px;
  min-width: 280px;
  border-radius: 2px;
  font-family: var(--qmt-font-body);
}

body.error404 input[name=s]::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

body.error404 input[name=s]:focus-visible {
  outline: 2px solid var(--qmt-gold-light);
  outline-offset: 3px;
}

/* Archive/search posts grid responsive fix */
@media (max-width: 767px) {
  /* Force archive/search/author containers to full width, not 1100px */
  body.archive .bricks-archive-title-wrapper,
  body.search .bricks-archive-title-wrapper,
  body.author .bricks-archive-title-wrapper,
  body.archive main .brxe-container,
  body.search main .brxe-container,
  body.author main .brxe-container,
  body.archive .brxe-posts,
  body.search .brxe-posts,
  body.author .brxe-posts {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding-inline: 16px;
  }

  body.archive .brxe-posts .bricks-layout-wrapper,
  body.search .brxe-posts .bricks-layout-wrapper,
  body.author .brxe-posts .bricks-layout-wrapper {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
  }

  body.archive main,
  body.search main,
  body.author main {
    padding-inline: 16px;
    box-sizing: border-box;
  }
}

/* ============================================================
   ARCHIVE / SEARCH / AUTHOR RESULT CARDS (Bricks posts element)
   Mirrors the News page card treatment. All text >= 4.5:1.
   ============================================================ */
:is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner {
  position: relative;
  height: 100%;
  background: #080809;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: background 0.35s cubic-bezier(.2, .7, .2, 1), border-color 0.35s cubic-bezier(.2, .7, .2, 1);
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #B8962E;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(.2, .7, .2, 1);
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner:hover,
:is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner:focus-within {
  background: #0F0F11;
  border-color: rgba(255, 255, 255, 0.1);
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner:hover::before,
:is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner:focus-within::before {
  transform: scaleY(1);
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts .content-wrapper {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts h3.dynamic {
  font-family: var(--qmt-font-display);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
  color: #F5F2ED;
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts h3.dynamic a {
  color: #F5F2ED;
  text-decoration: none;
  transition: color 0.3s;
}

/* Stretch the title link over the whole card (single click target) */
:is(body.archive, body.search, body.author, body.category) .brxe-posts h3.dynamic a::after {
  content: '';
  position: absolute;
  inset: 0;
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner:hover h3.dynamic a,
:is(body.archive, body.search, body.author, body.category) .brxe-posts h3.dynamic a:hover,
:is(body.archive, body.search, body.author, body.category) .brxe-posts h3.dynamic a:focus-visible {
  color: #D4B060;
}

:is(body.archive, body.search, body.author, body.category) .brxe-posts h3.dynamic a:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: -2px;
}

/* Date (field 1) */
:is(body.archive, body.search, body.author, body.category) .brxe-posts div.dynamic[data-field-id="1"] {
  font-family: var(--qmt-font-body);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #A8A49C;
  order: -1;
}

/* Excerpt (field 2) */
:is(body.archive, body.search, body.author, body.category) .brxe-posts div.dynamic[data-field-id="2"] {
  font-family: var(--qmt-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: #CFCBC4;
}

@media (prefers-reduced-motion: reduce) {
  :is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner,
  :is(body.archive, body.search, body.author, body.category) .brxe-posts .bricks-layout-inner::before,
  :is(body.archive, body.search, body.author, body.category) .brxe-posts h3.dynamic a {
    transition: none;
  }
}

/* ============================================================
   LEGAL PAGES (loader-rendered, source hash-locked): contrast fixes
   ============================================================ */
.qmt-legal .qmt-legal__section-num {
  color: #C9A54A;
  opacity: 1;
  font-size: 11px;
}

.qmt-legal .qmt-legal__contact-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.qmt-legal .qmt-legal__contact-link:focus-visible {
  color: #F5F2ED;
}

/* ============================================================
   0.0.10 polish: archive pager, 404 home link
   ============================================================ */
:is(body.archive, body.search, body.author, body.category) .bricks-pagination {
  /* Bricks' layout wrapper ends with a -30px gutter margin: 72px nets ~42px above the pager. */
  margin-top: 72px;
}

:is(body.archive, body.search, body.author, body.category) .bricks-pagination a.page-numbers {
  transition: color 0.25s ease, border-color 0.25s ease;
}

:is(body.archive, body.search, body.author, body.category) .bricks-pagination a.page-numbers:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: 3px;
  color: #F5F2ED;
}

body.error404 .qmt-404-home {
  display: inline-flex;
  align-items: center;
  margin: 20px 0 24px;
  padding: 12px 24px;
  font-family: var(--qmt-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #F5F2ED;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

body.error404 .qmt-404-home:hover,
body.error404 .qmt-404-home:focus-visible {
  color: #D4B060;
  border-color: #D4B060;
  background: rgba(212, 176, 96, 0.08);
}

body.error404 .qmt-404-home:focus-visible {
  outline: 2px solid #D4B060;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  body.error404 .qmt-404-home,
  :is(body.archive, body.search, body.author, body.category) .bricks-pagination a.page-numbers {
    transition: none;
  }
}

/* Post body inline colours from the block editor, made readable on dark. */
.qmt-post mark {
  background-color: rgba(212, 176, 96, 0.22);
  color: #F5F2ED;
  padding: 0 0.15em;
}
.qmt-post .has-vivid-red-color {
  color: #FF7A7A !important;
}

/* Archive/search pager: clear the footer and give each page link a real tap target. */
.bricks-pagination {
  margin-bottom: 56px;
}
.bricks-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
