/* =====================================================
   Mido Hasan — LOGO WALL (scoped)
   /assets/css/08__logo-wall.css
   Lifted verbatim from 08__Logo_Wall.html (section CSS only).
   Excluded as duplicate globals: :root, reset, html/body/a,
   ::selection, :focus-visible, fonts, .demo-spacer. Icon-only
   layout, reveal + scroll-stretch + ordered animation preserved.
   Requires the Flaticon UIcons brands stylesheet (loaded once in head).
   ===================================================== */

.mht-logo-wall {
  position: relative;
  padding-block: var(--section-padding);
  background: transparent;
  overflow: clip;
  isolation: isolate;
}

.mht-logo-wall::before {
  content: none;
}

.mht-logo-wall__inner {
  width: min(900px, var(--site-w));
  margin-inline: auto;
}

.mht-logo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(34px, 5vw, 72px) clamp(30px, 5vw, 68px);
  align-items: center;
  justify-items: center;
}

.mht-logo-item {
  --stretch: 1;
  display: grid;
  place-items: center;
  width: clamp(54px, 6vw, 86px);
  height: clamp(54px, 6vw, 86px);
}

.mht-logo-mark {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(245,243,247,.78);
  /* Phase 10.2.1: default visible — JS gates opacity:0 below */
  opacity: .86;
  /* Phase 10.10.4+: filter:blur removed. Use transform+opacity only. */
  transform: translateY(0);
  transform-origin: center;
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out),
    color 450ms var(--ease-out);
  will-change: transform, opacity;
}

/* Phase 10.2.1: Only hide when JS is active (js-enabled class set in header) */
.js-enabled .mht-logo-mark {
  opacity: 0;
  /* Phase 10.10.4+: filter:blur removed — transform+opacity only */
  transform: translateY(22px);
}

.mht-logo-item.is-visible .mht-logo-mark {
  opacity: .86;
  transform: translateY(0);
}

.mht-logo-item:hover .mht-logo-mark {
  color: var(--text-primary);
  opacity: 1;
  /* Phase 10.10.4+: drop-shadow filter removed — no filter effects anywhere */
  transition-delay: 0ms !important;
}

.mht-logo-mark i {
  display: block;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1;
  transform: scaleX(var(--stretch, 1));
  transform-origin: center;
  transition: transform 180ms var(--ease-out);
  will-change: transform;
}
.mht-logo-text {
  display: block;
  font-family: "Blauer Nue", system-ui, sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
}

@media (max-width: 560px) {
  .mht-logo-wall {
    padding-top: 64px;
    padding-bottom: 74px;
  }

  .mht-logo-wall__inner {
    width: min(100% - 40px, 900px);
  }

  .mht-logo-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px 18px;
  }

  .mht-logo-item {
    width: clamp(38px, 12vw, 54px);
    height: clamp(38px, 12vw, 54px);
  }

  .mht-logo-mark i {
    font-size: clamp(1.9rem, 10vw, 2.7rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mht-logo-mark {
    opacity: .86 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Client logo image style — MIDO PHASE 9.6.1 CLIENT LOGO WALL ACTIVE ── */
.mht-logo-mark--img {
  /* Override icon sizing — images need contain, not font-size */
}

/* Phase 10.10.8: CSS mask approach — renders any logo as a light/white shape
   without CSS filter. The <img> is visually hidden (screen-reader accessible);
   the .mht-client-logo-mask sibling uses the same URL as a mask-image so the
   logo shape is filled with a solid colour.

   IMPORTANT: This works correctly only for logos with transparent backgrounds
   (SVG or PNG with alpha). If a logo has a solid white/opaque background the
   mask will render as a filled rectangle. The fix for that is to upload a
   transparent-background version of the logo asset, not to use CSS filters. */

/* Hide the <img> visually but keep it for accessibility/alt text */
.mht-client-logo-img {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Mask element — filled with brand lavender, shaped by logo URL */
.mht-client-logo-mask {
  display: block;
  width: 100%;
  height: 100%;
  max-width: clamp(54px, 6vw, 86px);
  max-height: clamp(54px, 6vw, 86px);
  background-color: rgba(221,214,227,0.68);
  opacity: 0.74;
  /* mask-size: contain keeps aspect ratio intact */
  -webkit-mask: var(--mht-logo-url) center / contain no-repeat;
  mask: var(--mht-logo-url) center / contain no-repeat;
  transition:
    opacity 420ms var(--ease-out),
    background-color 420ms var(--ease-out),
    transform 420ms var(--ease-out);
}

.mht-logo-item:hover .mht-client-logo-mask,
.mht-logo-item.is-visible:hover .mht-client-logo-mask {
  background-color: #E6D8FF;
  opacity: 1;
  transform: translateY(-2px);
}

@media (max-width: 560px) {
  .mht-client-logo-mask {
    max-width: clamp(38px, 12vw, 54px);
    max-height: clamp(38px, 12vw, 54px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mht-client-logo-img { transition: none !important; }
}

/* ── MIDO PHASE 9.6.2 HOW THINK LOGO WALL SEAM FIX ACTIVE ──
   Pull the logo wall up so it overlaps the bottom of the How I Think
   section — the sections feel connected, no hard visual break.
   Negative margin-top collapses the gap. padding-top compensates
   so internal spacing stays correct. ── */
.mht-logo-wall {
  margin-top: calc(-1 * clamp(40px, 6vw, 80px));
  padding-top: calc(var(--section-padding) + clamp(40px, 6vw, 80px));
  position: relative;
  z-index: 5; /* above scene shadow layer */
}
