.mhs{
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  font-family: Manrope, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  contain: layout paint;
  background: #0b0b0c;

  min-height: clamp(340px, 46vw, 640px);

  --mhs-safe-top: 88px;
  --mhs-safe-bottom: 140px;
  --mhs-seg-bottom: 40px;
  --mhs-seg-h: 4px;
  --mhs-seg-gap: 8px;
}

@media (min-width: 1025px){
  .mhs{
    height: 100vh;
    min-height: 100vh;
    --mhs-seg-bottom: 64px;
    --mhs-safe-bottom: 92px;
    --mhs-safe-top: 92px;
  }
}

/* BG */
.mhs__bg{
  position:absolute;
  inset:0;
  z-index: 1;
  background:#0b0b0c;
}

.mhs__slide{
  position:absolute;
  inset:0;
  opacity:0;
  overflow:hidden;
  transition: opacity 420ms ease;
}
.mhs__slide.is-active{ opacity:1; }

.mhs__img{
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display:block;

  opacity: 0;
  transition: opacity 300ms ease;
  transform: translateZ(0);
}
.mhs.is-bg-ready .mhs__slide.is-active .mhs__img{
  opacity: 1;
}

/* darker gradient for readability */
.mhs__gradient{
  position:absolute;
  inset:0;
  z-index: 2;
  pointer-events:none;
  background:
    linear-gradient(90deg,
      rgba(0,0,0,.74) 0%,
      rgba(0,0,0,.58) 30%,
      rgba(0,0,0,.36) 58%,
      rgba(0,0,0,.16) 80%,
      rgba(0,0,0,.08) 100%
    );
}

.mhs__inner{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================
   SKELETON
========================= */
.mhs__skeleton{
  position:absolute;
  inset:0;
  z-index: 90;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  background-size: 300% 100%;
  animation: mhs_skel 1.1s linear infinite;
  opacity: 1;
  transition: opacity 240ms ease;
}

@keyframes mhs_skel{
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* =========================================================
   IMPORTANT FIX: UI visibility controlled ONLY by is-ready.
   This avoids theme/critical-css overriding and hiding UI forever.
========================================================= */

/* default: hide UI before ready */
.mhs:not(.is-ready) .mhs__topbar,
.mhs:not(.is-ready) .mhs__overlay,
.mhs:not(.is-ready) .mhs__segments,
.mhs:not(.is-ready) .mhs__next{
  opacity: 0 !important;
  pointer-events: none !important;
}

/* show UI when ready */
.mhs.is-ready .mhs__topbar,
.mhs.is-ready .mhs__overlay,
.mhs.is-ready .mhs__segments{
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: opacity 220ms ease;
}

/* skeleton hide when ready */
.mhs.is-ready .mhs__skeleton{
  opacity: 0 !important;
  pointer-events: none !important;
}

/* next button: visible only on hover/focus, but ONLY after ready */
.mhs.is-ready .mhs__next{
  opacity: 0 !important;
  pointer-events: auto !important;
  transition: opacity 0.5s;
}
.mhs.is-ready:hover .mhs__next,
.mhs.is-ready:focus-within .mhs__next{
  opacity: 1 !important;
}

/* =========================
   TOPBAR
========================= */
.mhs__topbar{
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: 0;
  padding: 18px 0;
}
.mhs__topinner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}
.mhs__logoText{
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 14px rgba(0,0,0,0.35);
  pointer-events: none;
}
.mhs__topBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff !important;
  color: #111111 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
  white-space: nowrap;
}

/* =========================
   OVERLAY CONTENT
========================= */
.mhs__overlay{
  position:absolute;
  inset:0;
  z-index: 55;
  display:flex;
  align-items: center;
  padding: var(--mhs-safe-top) 0 var(--mhs-safe-bottom) 0;
}
.mhs__content{
  max-width: 860px;
  color: #fff;
  text-align: left;
}

.mhs__text{
  margin: 0 0 10px 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  opacity: 0.88;
}
.mhs__text p{ margin: 0; }

.mhs__title{
  margin: 12px 0 0 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 45px;
  line-height: 1.08;
}
.mhs__subtitle{
  margin: 30px 0 50px 0;
  opacity: 0.95;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.35;
}

.mhs__bullets{
  margin: 22px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.mhs__bullet{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 16px;

  margin-bottom: 8px;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);

  font-size: 14px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
}
.mhs__bullet::before{
  content:"";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgb(173, 172, 172);
  flex: 0 0 auto;
}

.mhs__btn{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  margin-top: 50px;
  padding: 20px 45px;
  border-radius: 12px;
  text-decoration:none !important;
  background: #0F3D2E !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  transition: transform 140ms ease, opacity 140ms ease;
}
.mhs__btn:hover{
  background: rgba(255,255,255,0.96) !important;
  color:#0b0b0c !important;
  transform: translateY(-1px);
}
.mhs__btn:active{
  background: rgba(255,255,255,0.96) !important;
  color:#0b0b0c !important;
  transform: translateY(0);
  opacity: 0.92;
}

/* =========================
   NEXT BUTTON
========================= */
.mhs__next{
  position:absolute;
  z-index: 65;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.314) !important;
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  border-radius: 80px;
  border: 0 !important;
  box-shadow: none !important;
  color: #ffffff !important;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  outline: none !important;
}
.mhs__nextIcon{
  font-size: 28px;
  line-height: 1;
  margin-left: 2px;
}

/* =========================
   PROGRESS SEGMENTS
========================= */
.mhs__segments{
  position:absolute;
  z-index: 58;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  padding-right: 76px;
  bottom: var(--mhs-seg-bottom);
  display:flex;
  gap: var(--mhs-seg-gap);
}
.mhs__seg{
  appearance:none;
  border:0 !important;
  background: transparent !important;
  padding: 0;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
  outline: none !important;
}
.mhs__segTrack{
  display:block;
  width:100%;
  height: var(--mhs-seg-h);
  border-radius: 999px;
  background: rgba(255,255,255,0.26) !important;
  overflow:hidden;
  transition: background 140ms ease;
}
.mhs__segFill{
  display:block;
  height:100%;
  width: 0%;
  background: rgba(255,255,255,0.92) !important;
  border-radius: 999px;
  will-change: width;
}
.mhs__seg.is-active .mhs__segTrack{
  background: rgba(255,255,255,0.33) !important;
}
.mhs__seg:hover .mhs__segTrack,
.mhs__seg:focus-visible .mhs__segTrack{
  background: rgba(255,255,255,0.40) !important;
}

/* Tablet */
@media (max-width: 1024px){
  .mhs{
    --mhs-safe-top: 78px;
    --mhs-safe-bottom: 155px;
    --mhs-seg-bottom: 34px;
  }
  .mhs__title{ font-size: 34px; }
  .mhs__subtitle{ font-size: 16px; }
  .mhs__text{ font-size: 13px; }
}

/* Short height (768×624 etc.) */
@media (max-height: 700px){
  .mhs{
    --mhs-safe-top: 74px;
    --mhs-safe-bottom: 140px;
    --mhs-seg-bottom: 28px;
  }
  .mhs__overlay{ align-items: flex-start; }
  .mhs__subtitle{ margin-top: 12px; }
  .mhs__bullets{ margin-top: 14px; }
  .mhs__btn{ margin-top: 16px; }
}

/* Mobile */
@media (max-width: 767px){
  .mhs{
    --mhs-safe-top: 70px;
    --mhs-safe-bottom: 165px;
    --mhs-seg-bottom: 22px;
  }
  .mhs__topbar{ padding: 14px 0; }
  .mhs__title{ font-size: 26px; }
  .mhs__subtitle{ font-size: 14px; margin-top: 12px; }
  .mhs__text{ font-size: 12px; }
  .mhs__bullet{ font-size: 13px; line-height: 15px; padding: 8px 14px; }
  .mhs__btn{ padding: 16px 26px; font-size: 13px; }
  .mhs__segments{ width: calc(100% - 24px); padding-right: 68px; }
  .mhs__next{ right: 12px; }
}

@media (max-width: 420px){
  .mhs__title{ font-size: 24px; }
  .mhs__subtitle{ font-size: 13px; }
  .mhs__logoText{ font-size: 13px; }
  .mhs__topBtn{ padding: 9px 12px; font-size: 12px; }
}
