.sbs {
  container-type: inline-size;
  container-name: sbs;
}

.sbs__card {
  position: sticky;
  top: 40px;
  width: 100%;
  height: calc(100vh - 80px);
  min-height: 450px;
}

.sbs__card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background-color: #ffe600;
  overflow: hidden;
  box-sizing: border-box;
}

.sbs__grid {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 24px;
  gap: 48px;
  box-sizing: border-box;
}

.sbs__title {
  font-family: 'Proxima Nova A', -apple-system, 'Roboto', Arial, sans-serif;
  font-feature-settings: "salt" 1, "calt" 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1.28px;
  color: #282834;
  flex-shrink: 0;
}

.sbs__visual {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sbs__phone {
  position: relative;
  width: auto;
  height: min(100%, 420px);
  aspect-ratio: 151 / 305;
  flex-shrink: 0;
  filter: drop-shadow(10.82px 12.849px 0px rgba(0, 0, 0, 0.2));
}

.sbs__screen {
  position: absolute;
  top: 2.15%;
  right: 5.26%;
  bottom: 2.15%;
  left: 5.49%;
  border-radius: 10px;
  overflow: hidden;
}

.sbs__screen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sbs__screen-img--active {
  opacity: 1;
}

.sbs__shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.sbs__step-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

@keyframes sbs-exit {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-20px); opacity: 0; }
}

@keyframes sbs-enter {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.sbs__step-group--exit {
  animation: sbs-exit 0.3s ease-out forwards;
  pointer-events: none;
}

.sbs__step-group--enter {
  animation: sbs-enter 0.3s ease-out forwards;
}

.sbs__step-num {
  font-family: 'Inter', -apple-system, 'Roboto', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
  font-feature-settings: "case" 1;
  color: #282834;
}

.sbs__step-desc {
  font-family: 'Proxima Nova A', -apple-system, 'Roboto', Arial, sans-serif;
  font-feature-settings: "salt" 1, "calt" 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.96px;
  color: #282834;
}

.sbs__indicator {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.sbs__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(40, 40, 52, 0.3);
  flex-shrink: 0;
  transition: height 0.3s ease, background-color 0.3s ease;
}

.sbs__dot--active {
  height: 24px;
  background: #282834;
}


@container sbs (min-width: 768px) {
  .sbs__grid {
    display: grid;
    grid-template-rows: 1fr;
    width: calc(100% - 80px);
    padding: 0;
    column-gap: 8px;
    row-gap: 0;
  }

  .sbs__title {
    grid-column: 1 / span 6;
    grid-row: 1;
    align-self: start;
    padding: 40px 0 0;
  }

  .sbs__visual {
    grid-column: 7 / -1;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .sbs__step-group {
    grid-column: 1 / span 6;
    grid-row: 1;
    align-self: end;
    padding: 0 0 40px;
  }

  .sbs__phone {
    width: clamp(224px, 16.6cqw, 360px);
    height: auto;
    aspect-ratio: 224 / 451;
    filter: drop-shadow(16px 19px 0px rgba(0, 0, 0, 0.2));
  }

  .sbs__indicator {
    right: 0;
  }

  .sbs__step-desc {
    font-size: 48px;
    letter-spacing: -1.92px;
  }
}

@media (min-width: 768px) and (max-width: 1365px) {
  .sbs__title {
    font-size: 60px;
    letter-spacing: -0.05em;
  }

  .sbs__step-desc {
    font-size: 32px;
    letter-spacing: -1.28px;
  }
}

@media (min-width: 1366px) {
  .sbs__title {
    font-size: 72px;
    letter-spacing: -2.88px;
  }
}
