/* ==========================================================================
   DEXIE - hero rotator, navigation contrast, brand wall
   Loaded last so it settles anything earlier.
   ========================================================================== */

/* ---------- 1. navigation: ink bar, legible labels ---------------------- */
/* Bootstrap's bg-primary was setting a background whose contrast with the
   link colour was effectively nil. The nav is now an ink bar with white
   labels, which also gives the page a firm horizontal edge under the header. */
#menu.dx-nav,
nav#menu {
  background: var(--ink) !important;
  border-bottom: 0;
}
#menu.dx-nav .nav-link,
nav#menu .nav-link {
  color: rgba(255, 255, 255, .82) !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 15px 18px 15px 0;
  margin-right: 10px;
  position: relative;
}
#menu.dx-nav .nav-link:hover,
#menu.dx-nav .nav-link:focus,
nav#menu .nav-link:hover {
  color: #fff !important;
}
#menu.dx-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 10px; bottom: 9px;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s cubic-bezier(.16,.84,.44,1);
}
#menu.dx-nav .nav-link:hover::after { transform: scaleX(1); }
#menu.dx-nav .dropdown-menu { background: var(--surface); }
#menu.dx-nav #category { color: rgba(255,255,255,.7); }
#menu.dx-nav .navbar-toggler { color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- 2. hero rotator -------------------------------------------- */
.dx-hero {
  position: relative;
  margin: 0 0 72px;
  background: var(--ink);
  overflow: hidden;
}
.dx-hero__track {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 620px;
}
@media (max-width: 767px) { .dx-hero__track { aspect-ratio: 4 / 5; max-height: none; } }

.dx-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity .62s cubic-bezier(.16,.84,.44,1), visibility 0s linear .62s;
}
.dx-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .62s cubic-bezier(.16,.84,.44,1);
}

/* The image drifts slowly while its slide is showing - enough to feel alive,
   not enough to notice as an effect. */
.dx-slide__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s linear;
}
.dx-slide.is-active .dx-slide__img { transform: scale(1); }

.dx-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(10,16,24,.86) 0%, rgba(10,16,24,.55) 46%, rgba(10,16,24,.12) 100%);
}

.dx-slide__dim {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  font-size: 10px;
  letter-spacing: .12em;
  font-weight: 700;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.1);
  border: 1px dashed rgba(255,255,255,.35);
  padding: 5px 10px;
}

.dx-slide__body {
  position: relative;
  z-index: 2;
  padding: 0 0 clamp(38px, 6vw, 76px) clamp(22px, 6vw, 84px);
  max-width: 46rem;
  color: #fff;
}

/* Entry: each line arrives in sequence once its slide becomes active. */
.dx-slide__eyebrow,
.dx-slide__title,
.dx-slide__text,
.dx-slide__btn {
  opacity: 0;
  transform: translateY(20px);
}
.dx-slide.is-active .dx-slide__eyebrow,
.dx-slide.is-active .dx-slide__title,
.dx-slide.is-active .dx-slide__text,
.dx-slide.is-active .dx-slide__btn {
  animation: dxRise .68s cubic-bezier(.16,.84,.44,1) forwards;
}
.dx-slide.is-active .dx-slide__eyebrow { animation-delay: .10s; }
.dx-slide.is-active .dx-slide__title   { animation-delay: .20s; }
.dx-slide.is-active .dx-slide__text    { animation-delay: .32s; }
.dx-slide.is-active .dx-slide__btn     { animation-delay: .44s; }

@keyframes dxRise { to { opacity: 1; transform: none; } }

.dx-slide__eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; color: var(--copper); margin: 0 0 14px;
}
.dx-slide__title {
  font-weight: 800;
  font-size: clamp(2rem, 5.4vw, 4.1rem);
  line-height: .95;
  letter-spacing: -.05em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: #fff;
  text-wrap: balance;
}
.dx-slide__text {
  font-size: 15px; line-height: 1.55; margin: 0 0 26px;
  color: rgba(255,255,255,.78); max-width: 38ch;
}
.dx-slide__btn {
  display: inline-block;
  background: #fff; color: var(--ink);
  border: 1px solid #fff; border-radius: var(--radius);
  font-size: 11.5px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; padding: 14px 30px; text-decoration: none;
  transition: background .16s, color .16s;
}
.dx-slide__btn:hover { background: transparent; color: #fff; }

/* ---------- 3. hero controls ------------------------------------------- */
.dx-hero__nav {
  position: absolute;
  right: clamp(20px, 5vw, 44px); bottom: clamp(24px, 4vw, 40px);
  z-index: 4;
  display: flex; gap: 8px;
}
.dx-hero__dot {
  width: 30px; height: 3px;
  background: rgba(255,255,255,.32);
  border: 0; padding: 0; cursor: pointer;
  transition: background .2s;
}
.dx-hero__dot.is-active { background: var(--copper); }

.dx-hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 4;
  width: 46px; height: 46px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff; cursor: pointer;
  transition: background .18s, border-color .18s;
}
.dx-hero__arrow:hover { background: rgba(255,255,255,.22); border-color: #fff; }
.dx-hero__arrow--prev { left: clamp(10px, 2vw, 20px); }
.dx-hero__arrow--next { right: clamp(10px, 2vw, 20px); }
@media (max-width: 767px) { .dx-hero__arrow { display: none; } }

/* ---------- 4. brand wall ---------------------------------------------- */
.dx-brands {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 600px) { .dx-brands { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .dx-brands { grid-template-columns: repeat(6, 1fr); } }

.dx-brand-tile {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  padding: 22px 16px;
  min-height: 96px;
  transition: background .18s;
}
.dx-brand-tile img {
  max-width: 100%; max-height: 46px;
  width: auto; height: auto;
  filter: grayscale(1) contrast(.85);
  opacity: .62;
  transition: filter .22s, opacity .22s;
  mix-blend-mode: multiply;
}
.dx-brand-tile:hover { background: var(--surface-2); }
.dx-brand-tile:hover img { filter: none; opacity: 1; }

/* ---------- 5. reduced motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .dx-slide, .dx-slide__img { transition: none; }
  .dx-slide.is-active .dx-slide__eyebrow,
  .dx-slide.is-active .dx-slide__title,
  .dx-slide.is-active .dx-slide__text,
  .dx-slide.is-active .dx-slide__btn {
    animation: none; opacity: 1; transform: none;
  }
  .dx-slide.is-active .dx-slide__img { transform: none; }
  #menu.dx-nav .nav-link::after { transition: none; }
}
